first commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
/**
|
||||
* This file is generated by Webpack, do not edit it directly.
|
||||
*/
|
||||
return [
|
||||
'handle' => 'elementor-v2-utils',
|
||||
'deps' => [
|
||||
'react',
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,2 @@
|
||||
/*! For license information please see utils.js.LICENSE.txt */
|
||||
!function(){"use strict";var e={react:function(e){e.exports=window.React}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var u=t[r]={exports:{}};return e[r](u,u.exports,n),u.exports}n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};!function(){n.r(r),n.d(r,{ElementorError:function(){return t},createError:function(){return o},debounce:function(){return c},ensureError:function(){return u},useDebounceState:function(){return l}});var e=n("react"),t=class extends Error{context;code;constructor(e,{code:t,context:n=null,cause:r=null}){super(e,{cause:r}),this.context=n,this.code=t}},o=({code:e,message:n})=>class extends t{constructor({cause:t,context:r}={}){super(n,{cause:t,code:e,context:r})}},u=e=>{if(e instanceof Error)return e;let t,n=null;try{t=JSON.stringify(e)}catch(e){n=e,t="Unable to stringify the thrown value"}return new Error(`Unexpected non-error thrown: ${t}`,{cause:n})};function c(e,t){let n=null;const r=()=>{n&&(clearTimeout(n),n=null)},o=(...o)=>{r(),n=setTimeout((()=>{e(...o),n=null}),t)};return o.flush=(...t)=>{r(),e(...t)},o.cancel=r,o.pending=()=>!!n,o}function l(t={}){const{delay:n=300,initialValue:r=""}=t,[o,u]=(0,e.useState)(r),[l,i]=(0,e.useState)(r),a=(0,e.useRef)(null);(0,e.useEffect)((()=>()=>{a.current?.cancel?.()}),[]);const s=(0,e.useCallback)((e=>{a.current?.cancel?.(),a.current=c((()=>{u(e)}),n),a.current()}),[n]);return{debouncedValue:o,inputValue:l,handleChange:e=>{i(e),s(e)},setInputValue:i}}}(),(window.elementorV2=window.elementorV2||{}).utils=r}(),window.elementorV2.utils?.init?.();
|
||||
@@ -0,0 +1,9 @@
|
||||
/*! react */
|
||||
|
||||
/*!**************************!*\
|
||||
!*** external ["React"] ***!
|
||||
\**************************/
|
||||
|
||||
/*!******************************************************!*\
|
||||
!*** ./node_modules/@elementor/utils/dist/index.mjs ***!
|
||||
\******************************************************/
|
||||
1
wp-content/plugins/elementor/assets/js/packages/utils/utils.min.js
vendored
Normal file
1
wp-content/plugins/elementor/assets/js/packages/utils/utils.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){"use strict";var e={d:function(n,t){for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:!0,get:t[r]})},o:function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{ElementorError:function(){return r},createError:function(){return o},debounce:function(){return c},ensureError:function(){return u},useDebounceState:function(){return l}});var t=window.React,r=class extends Error{context;code;constructor(e,{code:n,context:t=null,cause:r=null}){super(e,{cause:r}),this.context=t,this.code=n}},o=({code:e,message:n})=>class extends r{constructor({cause:t,context:r}={}){super(n,{cause:t,code:e,context:r})}},u=e=>{if(e instanceof Error)return e;let n,t=null;try{n=JSON.stringify(e)}catch(e){t=e,n="Unable to stringify the thrown value"}return new Error(`Unexpected non-error thrown: ${n}`,{cause:t})};function c(e,n){let t=null;const r=()=>{t&&(clearTimeout(t),t=null)},o=(...o)=>{r(),t=setTimeout((()=>{e(...o),t=null}),n)};return o.flush=(...n)=>{r(),e(...n)},o.cancel=r,o.pending=()=>!!t,o}function l(e={}){const{delay:n=300,initialValue:r=""}=e,[o,u]=(0,t.useState)(r),[l,i]=(0,t.useState)(r),a=(0,t.useRef)(null);(0,t.useEffect)((()=>()=>{a.current?.cancel?.()}),[]);const s=(0,t.useCallback)((e=>{a.current?.cancel?.(),a.current=c((()=>{u(e)}),n),a.current()}),[n]);return{debouncedValue:o,inputValue:l,handleChange:e=>{i(e),s(e)},setInputValue:i}}(window.elementorV2=window.elementorV2||{}).utils=n}(),window.elementorV2.utils?.init?.();
|
||||
Reference in New Issue
Block a user