File: //home/swifizcd/buyease.com.ng/wp-content/plugins/elementor/assets/js/packages/utils/utils.min.js
!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 t},capitalize:function(){return p},compareVersions:function(){return m},createError:function(){return r},createTranslate:function(){return v},debounce:function(){return c},decodeString:function(){return s},encodeString:function(){return l},ensureError:function(){return o},generateUniqueId:function(){return h},hasProInstalled:function(){return b},hash:function(){return f},hashString:function(){return d},isProActive:function(){return w},isProAtLeast:function(){return V},isVersionGreaterOrEqual:function(){return S},isVersionLessThan:function(){return y},throttle:function(){return a},useDebounceState:function(){return i},useSearchState:function(){return g}});class t extends Error{constructor(e,{code:n,context:t=null,cause:r=null}){super(e,{cause:r}),this.context=t,this.code=n}}const r=({code:e,message:n})=>class extends t{constructor({cause:t,context:r}={}){super(n,{cause:t,code:e,context:r})}},o=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})};var u=window.React;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 i(e={}){const{delay:n=300,initialValue:t=""}=e,[r,o]=(0,u.useState)(t),[i,a]=(0,u.useState)(t),l=(0,u.useRef)(null);(0,u.useEffect)(()=>()=>{l.current?.cancel?.()},[]);const s=(0,u.useCallback)(e=>{l.current?.cancel?.(),l.current=c(()=>{o(e)},n),l.current()},[n]);return{debouncedValue:r,inputValue:i,handleChange:e=>{a(e),s(e)},setInputValue:a}}function a(e,n,t=!1){let r=null,o=!1;const u=()=>{r&&(clearTimeout(r),r=null)},c=(...u)=>{r?o=!0:(e(...u),r=setTimeout(()=>{r=null,o&&t&&e(...u),o=!1},n))};return c.flush=(...n)=>{u(),e(...n)},c.cancel=u,c.pending=()=>!!r,c}const l=e=>{const n=Array.from((new TextEncoder).encode(e),e=>String.fromCharCode(e)).join("");return btoa(n)},s=(e,n)=>{try{const n=atob(e),t=new Uint8Array(Array.from(n,e=>e.charCodeAt(0)));return(new TextDecoder).decode(t)}catch{return void 0!==n?n:""}};function f(e){return JSON.stringify(e,(e,n)=>function(e){return!!e&&"object"==typeof e&&!Array.isArray(e)}(n)?Object.keys(n).sort().reduce((e,t)=>(e[t]=n[t],e),{}):n)}function d(e,n){let t=5381,r=e.length;for(;r;)t=33*t^e.charCodeAt(--r);const o=(t>>>0).toString(36);return void 0===n?o:o.slice(-n).padStart(n,"0")}function g({localStorageKey:e}){const{debouncedValue:n,inputValue:t,handleChange:r}=i({delay:300,initialValue:(()=>{if(e){const n=localStorage.getItem(e);if(n)return localStorage.removeItem(e),n}return""})()});return{debouncedValue:n,inputValue:t,handleChange:r}}function h(e=""){return`${e?`${e}-`:""}${Date.now()}-${Math.random().toString(36).substring(2,9)}`}const p=e=>e.charAt(0).toUpperCase()+e.slice(1),m=(e,n)=>{const t=String(e||"0.0.0").split(".").map(Number),r=String(n||"0.0.0").split(".").map(Number);for(let e=0;e<Math.max(t.length,r.length);e++){const n=t[e]||0,o=r[e]||0;if(n!==o)return n-o}return 0},y=(e,n)=>m(e,n)<0,S=(e,n)=>m(e,n)>=0;function b(){return window.elementor?.helpers?.hasPro?.()??!1}function w(){return!!b()&&(window.elementorPro?.config?.isActive??!1)}function V(e){const n=window.elementorPro?.config?.version??"0.0";if(!n)return!1;const[t,r]=n.split(".").map(Number),[o,u]=e.split(".").map(Number);return t>o||t===o&&r>=u}function v({configKey:e,defaultStrings:n={}}){return(t,...r)=>{const o=window.elementorAppConfig,u=o?.[e]?.translations;let c={...n,...u}[t];if(!c)return t;for(let e=0;e<r.length;e++)c=c.replace(`%${e+1}$s`,r[e]),c=c.replace("%s",r[e]);return c}}(window.elementorV2=window.elementorV2||{}).utils=n}(),window.elementorV2.utils?.init?.();