@billgangcom/theme-lib 1.100.1 → 1.100.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builder.cjs.js +1 -1
- package/dist/builder.es.js +2 -2
- package/dist/{index-Bk6xkuYt.js → index-CIkAZ5oH.js} +4 -3
- package/dist/{index-CefwbdDT.cjs → index-_M52HeAv.cjs} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +2 -2
- package/package.json +1 -1
|
@@ -21960,14 +21960,15 @@ const wCe = SCe(vCe, {
|
|
|
21960
21960
|
};
|
|
21961
21961
|
return /* @__PURE__ */ c.jsxs(gp.Provider, { value: { recaptchaRef: t, executeRecaptcha: n }, children: [
|
|
21962
21962
|
e,
|
|
21963
|
-
/* @__PURE__ */ c.jsx(
|
|
21963
|
+
/* @__PURE__ */ c.jsx("div", { style: { visibility: "hidden", opacity: 0 }, children: /* @__PURE__ */ c.jsx(
|
|
21964
21964
|
wCe,
|
|
21965
21965
|
{
|
|
21966
21966
|
sitekey: ACe,
|
|
21967
21967
|
size: "invisible",
|
|
21968
|
-
ref: t
|
|
21968
|
+
ref: t,
|
|
21969
|
+
badge: "inline"
|
|
21969
21970
|
}
|
|
21970
|
-
)
|
|
21971
|
+
) })
|
|
21971
21972
|
] });
|
|
21972
21973
|
}, bp = () => {
|
|
21973
21974
|
const e = $.useContext(gp);
|
|
@@ -102,7 +102,7 @@ object-assign
|
|
|
102
102
|
(c) Sindre Sorhus
|
|
103
103
|
@license MIT
|
|
104
104
|
*/var ql,K1;function hx(){if(K1)return ql;K1=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function o(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},l=0;l<10;l++)s["_"+String.fromCharCode(l)]=l;var c=Object.getOwnPropertyNames(s).map(function(h){return s[h]});if(c.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(h){u[h]=h}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ql=i()?Object.assign:function(a,s){for(var l,c=o(a),u,h=1;h<arguments.length;h++){l=Object(arguments[h]);for(var f in l)t.call(l,f)&&(c[f]=l[f]);if(e){u=e(l);for(var g=0;g<u.length;g++)n.call(l,u[g])&&(c[u[g]]=l[u[g]])}}return c},ql}var Gl,Q1;function Yu(){if(Q1)return Gl;Q1=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Gl=e,Gl}var Yl,J1;function U0(){return J1||(J1=1,Yl=Function.call.bind(Object.prototype.hasOwnProperty)),Yl}var Zl,eh;function fx(){if(eh)return Zl;eh=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Yu(),n={},o=U0();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(a,s,l,c,u){if(process.env.NODE_ENV!=="production"){for(var h in a)if(o(a,h)){var f;try{if(typeof a[h]!="function"){var g=Error((c||"React class")+": "+l+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[h]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}f=a[h](s,h,c,l,null,t)}catch(C){f=C}if(f&&!(f instanceof Error)&&e((c||"React class")+": type specification of "+l+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var m=u?u():"";e("Failed "+l+" type: "+f.message+(m??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Zl=i,Zl}var Xl,th;function px(){if(th)return Xl;th=1;var e=Gu(),t=hx(),n=Yu(),o=U0(),i=fx(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(l){var c="Warning: "+l;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function s(){return null}return Xl=function(l,c){var u=typeof Symbol=="function"&&Symbol.iterator,h="@@iterator";function f(x){var ne=x&&(u&&x[u]||x[h]);if(typeof ne=="function")return ne}var g="<<anonymous>>",m={array:S("array"),bigint:S("bigint"),bool:S("boolean"),func:S("function"),number:S("number"),object:S("object"),string:S("string"),symbol:S("symbol"),any:y(),arrayOf:T,element:k(),elementType:A(),instanceOf:P,node:w(),objectOf:M,oneOf:E,oneOfType:B,shape:H,exact:X};function C(x,ne){return x===ne?x!==0||1/x===1/ne:x!==x&&ne!==ne}function I(x,ne){this.message=x,this.data=ne&&typeof ne=="object"?ne:{},this.stack=""}I.prototype=Error.prototype;function b(x){if(process.env.NODE_ENV!=="production")var ne={},pe=0;function L(le,ee,Ie,Se,ae,ce,Ue){if(Se=Se||g,ce=ce||Ie,Ue!==n){if(c){var Q=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw Q.name="Invariant Violation",Q}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ve=Se+":"+Ie;!ne[Ve]&&pe<3&&(a("You are manually calling a React.PropTypes validation function for the `"+ce+"` prop on `"+Se+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),ne[Ve]=!0,pe++)}}return ee[Ie]==null?le?ee[Ie]===null?new I("The "+ae+" `"+ce+"` is marked as required "+("in `"+Se+"`, but its value is `null`.")):new I("The "+ae+" `"+ce+"` is marked as required in "+("`"+Se+"`, but its value is `undefined`.")):null:x(ee,Ie,Se,ae,ce)}var Z=L.bind(null,!1);return Z.isRequired=L.bind(null,!0),Z}function S(x){function ne(pe,L,Z,le,ee,Ie){var Se=pe[L],ae=Ce(Se);if(ae!==x){var ce=be(Se);return new I("Invalid "+le+" `"+ee+"` of type "+("`"+ce+"` supplied to `"+Z+"`, expected ")+("`"+x+"`."),{expectedType:x})}return null}return b(ne)}function y(){return b(s)}function T(x){function ne(pe,L,Z,le,ee){if(typeof x!="function")return new I("Property `"+ee+"` of component `"+Z+"` has invalid PropType notation inside arrayOf.");var Ie=pe[L];if(!Array.isArray(Ie)){var Se=Ce(Ie);return new I("Invalid "+le+" `"+ee+"` of type "+("`"+Se+"` supplied to `"+Z+"`, expected an array."))}for(var ae=0;ae<Ie.length;ae++){var ce=x(Ie,ae,Z,le,ee+"["+ae+"]",n);if(ce instanceof Error)return ce}return null}return b(ne)}function k(){function x(ne,pe,L,Z,le){var ee=ne[pe];if(!l(ee)){var Ie=Ce(ee);return new I("Invalid "+Z+" `"+le+"` of type "+("`"+Ie+"` supplied to `"+L+"`, expected a single ReactElement."))}return null}return b(x)}function A(){function x(ne,pe,L,Z,le){var ee=ne[pe];if(!e.isValidElementType(ee)){var Ie=Ce(ee);return new I("Invalid "+Z+" `"+le+"` of type "+("`"+Ie+"` supplied to `"+L+"`, expected a single ReactElement type."))}return null}return b(x)}function P(x){function ne(pe,L,Z,le,ee){if(!(pe[L]instanceof x)){var Ie=x.name||g,Se=Le(pe[L]);return new I("Invalid "+le+" `"+ee+"` of type "+("`"+Se+"` supplied to `"+Z+"`, expected ")+("instance of `"+Ie+"`."))}return null}return b(ne)}function E(x){if(!Array.isArray(x))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),s;function ne(pe,L,Z,le,ee){for(var Ie=pe[L],Se=0;Se<x.length;Se++)if(C(Ie,x[Se]))return null;var ae=JSON.stringify(x,function(Ue,Q){var Ve=be(Q);return Ve==="symbol"?String(Q):Q});return new I("Invalid "+le+" `"+ee+"` of value `"+String(Ie)+"` "+("supplied to `"+Z+"`, expected one of "+ae+"."))}return b(ne)}function M(x){function ne(pe,L,Z,le,ee){if(typeof x!="function")return new I("Property `"+ee+"` of component `"+Z+"` has invalid PropType notation inside objectOf.");var Ie=pe[L],Se=Ce(Ie);if(Se!=="object")return new I("Invalid "+le+" `"+ee+"` of type "+("`"+Se+"` supplied to `"+Z+"`, expected an object."));for(var ae in Ie)if(o(Ie,ae)){var ce=x(Ie,ae,Z,le,ee+"."+ae,n);if(ce instanceof Error)return ce}return null}return b(ne)}function B(x){if(!Array.isArray(x))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var ne=0;ne<x.length;ne++){var pe=x[ne];if(typeof pe!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ve(pe)+" at index "+ne+"."),s}function L(Z,le,ee,Ie,Se){for(var ae=[],ce=0;ce<x.length;ce++){var Ue=x[ce],Q=Ue(Z,le,ee,Ie,Se,n);if(Q==null)return null;Q.data&&o(Q.data,"expectedType")&&ae.push(Q.data.expectedType)}var Ve=ae.length>0?", expected one of type ["+ae.join(", ")+"]":"";return new I("Invalid "+Ie+" `"+Se+"` supplied to "+("`"+ee+"`"+Ve+"."))}return b(L)}function w(){function x(ne,pe,L,Z,le){return W(ne[pe])?null:new I("Invalid "+Z+" `"+le+"` supplied to "+("`"+L+"`, expected a ReactNode."))}return b(x)}function V(x,ne,pe,L,Z){return new I((x||"React class")+": "+ne+" type `"+pe+"."+L+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Z+"`.")}function H(x){function ne(pe,L,Z,le,ee){var Ie=pe[L],Se=Ce(Ie);if(Se!=="object")return new I("Invalid "+le+" `"+ee+"` of type `"+Se+"` "+("supplied to `"+Z+"`, expected `object`."));for(var ae in x){var ce=x[ae];if(typeof ce!="function")return V(Z,le,ee,ae,be(ce));var Ue=ce(Ie,ae,Z,le,ee+"."+ae,n);if(Ue)return Ue}return null}return b(ne)}function X(x){function ne(pe,L,Z,le,ee){var Ie=pe[L],Se=Ce(Ie);if(Se!=="object")return new I("Invalid "+le+" `"+ee+"` of type `"+Se+"` "+("supplied to `"+Z+"`, expected `object`."));var ae=t({},pe[L],x);for(var ce in ae){var Ue=x[ce];if(o(x,ce)&&typeof Ue!="function")return V(Z,le,ee,ce,be(Ue));if(!Ue)return new I("Invalid "+le+" `"+ee+"` key `"+ce+"` supplied to `"+Z+"`.\nBad object: "+JSON.stringify(pe[L],null," ")+`
|
|
105
|
-
Valid keys: `+JSON.stringify(Object.keys(x),null," "));var Q=Ue(Ie,ce,Z,le,ee+"."+ce,n);if(Q)return Q}return null}return b(ne)}function W(x){switch(typeof x){case"number":case"string":case"undefined":return!0;case"boolean":return!x;case"object":if(Array.isArray(x))return x.every(W);if(x===null||l(x))return!0;var ne=f(x);if(ne){var pe=ne.call(x),L;if(ne!==x.entries){for(;!(L=pe.next()).done;)if(!W(L.value))return!1}else for(;!(L=pe.next()).done;){var Z=L.value;if(Z&&!W(Z[1]))return!1}}else return!1;return!0;default:return!1}}function se(x,ne){return x==="symbol"?!0:ne?ne["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&ne instanceof Symbol:!1}function Ce(x){var ne=typeof x;return Array.isArray(x)?"array":x instanceof RegExp?"object":se(ne,x)?"symbol":ne}function be(x){if(typeof x>"u"||x===null)return""+x;var ne=Ce(x);if(ne==="object"){if(x instanceof Date)return"date";if(x instanceof RegExp)return"regexp"}return ne}function ve(x){var ne=be(x);switch(ne){case"array":case"object":return"an "+ne;case"boolean":case"date":case"regexp":return"a "+ne;default:return ne}}function Le(x){return!x.constructor||!x.constructor.name?g:x.constructor.name}return m.checkPropTypes=i,m.resetWarningCache=i.resetWarningCache,m.PropTypes=m,m},Xl}var Kl,nh;function mx(){if(nh)return Kl;nh=1;var e=Yu();function t(){}function n(){}return n.resetWarningCache=t,Kl=function(){function o(s,l,c,u,h,f){if(f!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}o.isRequired=o;function i(){return o}var a={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:i,element:o,elementType:o,instanceOf:i,node:o,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},Kl}if(process.env.NODE_ENV!=="production"){var gx=Gu(),Ix=!0;Yc.exports=px()(gx.isElement,Ix)}else Yc.exports=mx()();var Cx=Yc.exports;const kn=Ws(Cx);var bx=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function Zc(){return Zc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Zc.apply(this,arguments)}function Sx(e,t){if(e==null)return{};var n={},o=Object.keys(e),i,a;for(a=0;a<o.length;a++)i=o[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Ja(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yx(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Xc(e,t)}function Xc(e,t){return Xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},Xc(e,t)}var dl=function(e){yx(t,e);function t(){var o;return o=e.call(this)||this,o.handleExpired=o.handleExpired.bind(Ja(o)),o.handleErrored=o.handleErrored.bind(Ja(o)),o.handleChange=o.handleChange.bind(Ja(o)),o.handleRecaptchaRef=o.handleRecaptchaRef.bind(Ja(o)),o}var n=t.prototype;return n.getCaptchaFunction=function(i){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[i]:this.props.grecaptcha[i]:null},n.getValue=function(){var i=this.getCaptchaFunction("getResponse");return i&&this._widgetId!==void 0?i(this._widgetId):null},n.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},n.execute=function(){var i=this.getCaptchaFunction("execute");if(i&&this._widgetId!==void 0)return i(this._widgetId);this._executeRequested=!0},n.executeAsync=function(){var i=this;return new Promise(function(a,s){i.executionResolve=a,i.executionReject=s,i.execute()})},n.reset=function(){var i=this.getCaptchaFunction("reset");i&&this._widgetId!==void 0&&i(this._widgetId)},n.forceReset=function(){var i=this.getCaptchaFunction("reset");i&&i()},n.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},n.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},n.handleChange=function(i){this.props.onChange&&this.props.onChange(i),this.executionResolve&&(this.executionResolve(i),delete this.executionReject,delete this.executionResolve)},n.explicitRender=function(){var i=this.getCaptchaFunction("render");if(i&&this._widgetId===void 0){var a=document.createElement("div");this._widgetId=i(a,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(a)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},n.componentDidMount=function(){this.explicitRender()},n.componentDidUpdate=function(){this.explicitRender()},n.handleRecaptchaRef=function(i){this.captcha=i},n.render=function(){var i=this.props;i.sitekey,i.onChange,i.theme,i.type,i.tabindex,i.onExpired,i.onErrored,i.size,i.stoken,i.grecaptcha,i.badge,i.hl,i.isolated;var a=Sx(i,bx);return z.createElement("div",Zc({},a,{ref:this.handleRecaptchaRef}))},t}(z.Component);dl.displayName="ReCAPTCHA";dl.propTypes={sitekey:kn.string.isRequired,onChange:kn.func,grecaptcha:kn.object,theme:kn.oneOf(["dark","light"]),type:kn.oneOf(["image","audio"]),tabindex:kn.number,onExpired:kn.func,onErrored:kn.func,size:kn.oneOf(["compact","normal","invisible"]),stoken:kn.string,hl:kn.string,badge:kn.oneOf(["bottomright","bottomleft","inline"]),isolated:kn.bool};dl.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var Zu=Gu(),Ex={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Tx={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},xx={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},V0={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Xu={};Xu[Zu.ForwardRef]=xx;Xu[Zu.Memo]=V0;function rh(e){return Zu.isMemo(e)?V0:Xu[e.$$typeof]||Ex}var _x=Object.defineProperty,wx=Object.getOwnPropertyNames,oh=Object.getOwnPropertySymbols,vx=Object.getOwnPropertyDescriptor,Ax=Object.getPrototypeOf,ih=Object.prototype;function z0(e,t,n){if(typeof t!="string"){if(ih){var o=Ax(t);o&&o!==ih&&z0(e,o,n)}var i=wx(t);oh&&(i=i.concat(oh(t)));for(var a=rh(e),s=rh(t),l=0;l<i.length;++l){var c=i[l];if(!Tx[c]&&!(n&&n[c])&&!(s&&s[c])&&!(a&&a[c])){var u=vx(t,c);try{_x(e,c,u)}catch{}}}}return e}var kx=z0;const Lx=Ws(kx);function Kc(){return Kc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Kc.apply(this,arguments)}function Nx(e,t){if(e==null)return{};var n={},o=Object.keys(e),i,a;for(a=0;a<o.length;a++)i=o[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Px(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var sr={},Rx=0;function Dx(e,t){return t=t||{},function(o){var i=o.displayName||o.name||"Component",a=function(l){Px(c,l);function c(h,f){var g;return g=l.call(this,h,f)||this,g.state={},g.__scriptURL="",g}var u=c.prototype;return u.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+Rx++),this.__scriptLoaderID},u.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},u.asyncScriptLoaderHandleLoad=function(f){var g=this;this.setState(f,function(){return g.props.asyncScriptOnLoad&&g.props.asyncScriptOnLoad(g.state)})},u.asyncScriptLoaderTriggerOnScriptLoaded=function(){var f=sr[this.__scriptURL];if(!f||!f.loaded)throw new Error("Script is not loaded.");for(var g in f.observers)f.observers[g](f);delete window[t.callbackName]},u.componentDidMount=function(){var f=this,g=this.setupScriptURL(),m=this.asyncScriptLoaderGetScriptLoaderID(),C=t,I=C.globalName,b=C.callbackName,S=C.scriptId;if(I&&typeof window[I]<"u"&&(sr[g]={loaded:!0,observers:{}}),sr[g]){var y=sr[g];if(y&&(y.loaded||y.errored)){this.asyncScriptLoaderHandleLoad(y);return}y.observers[m]=function(E){return f.asyncScriptLoaderHandleLoad(E)};return}var T={};T[m]=function(E){return f.asyncScriptLoaderHandleLoad(E)},sr[g]={loaded:!1,observers:T};var k=document.createElement("script");k.src=g,k.async=!0;for(var A in t.attributes)k.setAttribute(A,t.attributes[A]);S&&(k.id=S);var P=function(M){if(sr[g]){var B=sr[g],w=B.observers;for(var V in w)M(w[V])&&delete w[V]}};b&&typeof window<"u"&&(window[b]=function(){return f.asyncScriptLoaderTriggerOnScriptLoaded()}),k.onload=function(){var E=sr[g];E&&(E.loaded=!0,P(function(M){return b?!1:(M(E),!0)}))},k.onerror=function(){var E=sr[g];E&&(E.errored=!0,P(function(M){return M(E),!0}))},document.body.appendChild(k)},u.componentWillUnmount=function(){var f=this.__scriptURL;if(t.removeOnUnmount===!0)for(var g=document.getElementsByTagName("script"),m=0;m<g.length;m+=1)g[m].src.indexOf(f)>-1&&g[m].parentNode&&g[m].parentNode.removeChild(g[m]);var C=sr[f];C&&(delete C.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete sr[f])},u.render=function(){var f=t.globalName,g=this.props;g.asyncScriptOnLoad;var m=g.forwardedRef,C=Nx(g,["asyncScriptOnLoad","forwardedRef"]);return f&&typeof window<"u"&&(C[f]=typeof window[f]<"u"?window[f]:void 0),C.ref=m,_.createElement(o,C)},c}(_.Component),s=_.forwardRef(function(l,c){return _.createElement(a,Kc({},l,{forwardedRef:c}))});return s.displayName="AsyncScriptLoader("+i+")",s.propTypes={asyncScriptOnLoad:kn.func},Lx(s,o)}}var Qc="onloadcallback",Ox="grecaptcha";function Jc(){return typeof window<"u"&&window.recaptchaOptions||{}}function Mx(){var e=Jc(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+Qc+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+Qc+"&render=explicit"}const Bx=Dx(Mx,{callbackName:Qc,globalName:Ox,attributes:Jc().nonce?{nonce:Jc().nonce}:{}})(dl),Fx="6LdQiIIpAAAAAAkhvhS9zuo5WNS5mAzZrALD9cCa",$0=_.createContext(void 0),W0=({children:e})=>{const t=_.useRef(null);_.useEffect(()=>{typeof window<"u"&&Hx()},[]);const n=async()=>{var o,i;try{const a=await((o=t.current)==null?void 0:o.executeAsync());return(i=t.current)==null||i.reset(),a??null}catch(a){return console.error("executeRecaptcha error:",a),null}};return d.jsxs($0.Provider,{value:{recaptchaRef:t,executeRecaptcha:n},children:[e,d.jsx(Bx,{sitekey:Fx,size:"invisible",ref:t})]})},Ku=()=>{const e=_.useContext($0);if(e===void 0)throw new Error("useReCaptcha must be used within a ReCaptchaProvider");return e};function Hx(){var t,n;if(typeof window>"u")return;const e=(n=(t=[...document.getElementsByTagName("iframe")].find(o=>o.src.includes("google.com/recaptcha/api2/bframe")))==null?void 0:t.parentNode)==null?void 0:n.parentNode;e&&new MutationObserver(()=>{(e.style.visibility!=="visible"||e.style.opacity!=="1")&&(e.style.opacity="1",e.style.visibility="visible")}).observe(e,{attributeFilter:["style"]})}var jx=Object.defineProperty,Ux=Object.defineProperties,Vx=Object.getOwnPropertyDescriptors,Fs=Object.getOwnPropertySymbols,q0=Object.prototype.hasOwnProperty,G0=Object.prototype.propertyIsEnumerable,ah=(e,t,n)=>t in e?jx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zx=(e,t)=>{for(var n in t||(t={}))q0.call(t,n)&&ah(e,n,t[n]);if(Fs)for(var n of Fs(t))G0.call(t,n)&&ah(e,n,t[n]);return e},$x=(e,t)=>Ux(e,Vx(t)),Wx=(e,t)=>{var n={};for(var o in e)q0.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&Fs)for(var o of Fs(e))t.indexOf(o)<0&&G0.call(e,o)&&(n[o]=e[o]);return n};function qx(e){let t=setTimeout(e,0),n=setTimeout(e,10),o=setTimeout(e,50);return[t,n,o]}function Gx(e){let t=z.useRef();return z.useEffect(()=>{t.current=e}),t.current}var Yx=18,Y0=40,Zx=`${Y0}px`,Xx=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function Kx({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:o}){let[i,a]=z.useState(!1),[s,l]=z.useState(!1),[c,u]=z.useState(!1),h=z.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&i&&s,[i,s,n]),f=z.useCallback(()=>{let g=e.current,m=t.current;if(!g||!m||c||n==="none")return;let C=g,I=C.getBoundingClientRect().left+C.offsetWidth,b=C.getBoundingClientRect().top+C.offsetHeight/2,S=I-Yx,y=b;document.querySelectorAll(Xx).length===0&&document.elementFromPoint(S,y)===g||(a(!0),u(!0))},[e,t,c,n]);return z.useEffect(()=>{let g=e.current;if(!g||n==="none")return;function m(){let I=window.innerWidth-g.getBoundingClientRect().right;l(I>=Y0)}m();let C=setInterval(m,1e3);return()=>{clearInterval(C)}},[e,n]),z.useEffect(()=>{let g=o||document.activeElement===t.current;if(n==="none"||!g)return;let m=setTimeout(f,0),C=setTimeout(f,2e3),I=setTimeout(f,5e3),b=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(m),clearTimeout(C),clearTimeout(I),clearTimeout(b)}},[t,o,n,f]),{hasPWMBadge:i,willPushPWMBadge:h,PWM_BADGE_SPACE_WIDTH:Zx}}var Qx=z.createContext({}),Z0=z.forwardRef((e,t)=>{var n=e,{value:o,onChange:i,maxLength:a,textAlign:s="left",pattern:l,placeholder:c,inputMode:u="numeric",onComplete:h,pushPasswordManagerStrategy:f="increase-width",pasteTransformer:g,containerClassName:m,noScriptCSSFallback:C=Jx,render:I,children:b}=n,S=Wx(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),y,T,k,A,P;let[E,M]=z.useState(typeof S.defaultValue=="string"?S.defaultValue:""),B=o??E,w=Gx(B),V=z.useCallback(Te=>{i==null||i(Te),M(Te)},[i]),H=z.useMemo(()=>l?typeof l=="string"?new RegExp(l):l:null,[l]),X=z.useRef(null),W=z.useRef(null),se=z.useRef({value:B,onChange:V,isIOS:typeof window<"u"&&((T=(y=window==null?void 0:window.CSS)==null?void 0:y.supports)==null?void 0:T.call(y,"-webkit-touch-callout","none"))}),Ce=z.useRef({prev:[(k=X.current)==null?void 0:k.selectionStart,(A=X.current)==null?void 0:A.selectionEnd,(P=X.current)==null?void 0:P.selectionDirection]});z.useImperativeHandle(t,()=>X.current,[]),z.useEffect(()=>{let Te=X.current,we=W.current;if(!Te||!we)return;se.current.value!==Te.value&&se.current.onChange(Te.value),Ce.current.prev=[Te.selectionStart,Te.selectionEnd,Te.selectionDirection];function ze(){if(document.activeElement!==Te){pe(null),Z(null);return}let $e=Te.selectionStart,nt=Te.selectionEnd,Tn=Te.selectionDirection,pt=Te.maxLength,un=Te.value,mt=Ce.current.prev,Lt=-1,q=-1,oe;if(un.length!==0&&$e!==null&&nt!==null){let rt=$e===nt,dn=$e===un.length&&un.length<pt;if(rt&&!dn){let Je=$e;if(Je===0)Lt=0,q=1,oe="forward";else if(Je===pt)Lt=Je-1,q=Je,oe="backward";else if(pt>1&&un.length>1){let hn=0;if(mt[0]!==null&&mt[1]!==null){oe=Je<mt[1]?"backward":"forward";let fn=mt[0]===mt[1]&&mt[0]<pt;oe==="backward"&&!fn&&(hn=-1)}Lt=hn+Je,q=hn+Je+1}}Lt!==-1&&q!==-1&&Lt!==q&&X.current.setSelectionRange(Lt,q,oe)}let _e=Lt!==-1?Lt:$e,Ae=q!==-1?q:nt,We=oe??Tn;pe(_e),Z(Ae),Ce.current.prev=[_e,Ae,We]}if(document.addEventListener("selectionchange",ze,{capture:!0}),ze(),document.activeElement===Te&&x(!0),!document.getElementById("input-otp-style")){let $e=document.createElement("style");if($e.id="input-otp-style",document.head.appendChild($e),$e.sheet){let nt="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Ni($e.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Ni($e.sheet,`[data-input-otp]:autofill { ${nt} }`),Ni($e.sheet,`[data-input-otp]:-webkit-autofill { ${nt} }`),Ni($e.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Ni($e.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Et=()=>{we&&we.style.setProperty("--root-height",`${Te.clientHeight}px`)};Et();let _t=new ResizeObserver(Et);return _t.observe(Te),()=>{document.removeEventListener("selectionchange",ze,{capture:!0}),_t.disconnect()}},[]);let[be,ve]=z.useState(!1),[Le,x]=z.useState(!1),[ne,pe]=z.useState(null),[L,Z]=z.useState(null);z.useEffect(()=>{qx(()=>{var Te,we,ze,Et;(Te=X.current)==null||Te.dispatchEvent(new Event("input"));let _t=(we=X.current)==null?void 0:we.selectionStart,$e=(ze=X.current)==null?void 0:ze.selectionEnd,nt=(Et=X.current)==null?void 0:Et.selectionDirection;_t!==null&&$e!==null&&(pe(_t),Z($e),Ce.current.prev=[_t,$e,nt])})},[B,Le]),z.useEffect(()=>{w!==void 0&&B!==w&&w.length<a&&B.length===a&&(h==null||h(B))},[a,h,w,B]);let le=Kx({containerRef:W,inputRef:X,pushPasswordManagerStrategy:f,isFocused:Le}),ee=z.useCallback(Te=>{let we=Te.currentTarget.value.slice(0,a);if(we.length>0&&H&&!H.test(we)){Te.preventDefault();return}typeof w=="string"&&we.length<w.length&&document.dispatchEvent(new Event("selectionchange")),V(we)},[a,V,w,H]),Ie=z.useCallback(()=>{var Te;if(X.current){let we=Math.min(X.current.value.length,a-1),ze=X.current.value.length;(Te=X.current)==null||Te.setSelectionRange(we,ze),pe(we),Z(ze)}x(!0)},[a]),Se=z.useCallback(Te=>{var we,ze;let Et=X.current;if(!g&&(!se.current.isIOS||!Te.clipboardData||!Et))return;let _t=Te.clipboardData.getData("text/plain"),$e=g?g(_t):_t;Te.preventDefault();let nt=(we=X.current)==null?void 0:we.selectionStart,Tn=(ze=X.current)==null?void 0:ze.selectionEnd,pt=(nt!==Tn?B.slice(0,nt)+$e+B.slice(Tn):B.slice(0,nt)+$e+B.slice(nt)).slice(0,a);if(pt.length>0&&H&&!H.test(pt))return;Et.value=pt,V(pt);let un=Math.min(pt.length,a-1),mt=pt.length;Et.setSelectionRange(un,mt),pe(un),Z(mt)},[a,V,H,B]),ae=z.useMemo(()=>({position:"relative",cursor:S.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[S.disabled]),ce=z.useMemo(()=>({position:"absolute",inset:0,width:le.willPushPWMBadge?`calc(100% + ${le.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:le.willPushPWMBadge?`inset(0 ${le.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:s,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[le.PWM_BADGE_SPACE_WIDTH,le.willPushPWMBadge,s]),Ue=z.useMemo(()=>z.createElement("input",$x(zx({autoComplete:S.autoComplete||"one-time-code"},S),{"data-input-otp":!0,"data-input-otp-placeholder-shown":B.length===0||void 0,"data-input-otp-mss":ne,"data-input-otp-mse":L,inputMode:u,pattern:H==null?void 0:H.source,"aria-placeholder":c,style:ce,maxLength:a,value:B,ref:X,onPaste:Te=>{var we;Se(Te),(we=S.onPaste)==null||we.call(S,Te)},onChange:ee,onMouseOver:Te=>{var we;ve(!0),(we=S.onMouseOver)==null||we.call(S,Te)},onMouseLeave:Te=>{var we;ve(!1),(we=S.onMouseLeave)==null||we.call(S,Te)},onFocus:Te=>{var we;Ie(),(we=S.onFocus)==null||we.call(S,Te)},onBlur:Te=>{var we;x(!1),(we=S.onBlur)==null||we.call(S,Te)}})),[ee,Ie,Se,u,ce,a,L,ne,S,H==null?void 0:H.source,B]),Q=z.useMemo(()=>({slots:Array.from({length:a}).map((Te,we)=>{var ze;let Et=Le&&ne!==null&&L!==null&&(ne===L&&we===ne||we>=ne&&we<L),_t=B[we]!==void 0?B[we]:null,$e=B[0]!==void 0?null:(ze=c==null?void 0:c[we])!=null?ze:null;return{char:_t,placeholderChar:$e,isActive:Et,hasFakeCaret:Et&&_t===null}}),isFocused:Le,isHovering:!S.disabled&&be}),[Le,be,a,L,ne,S.disabled,B]),Ve=z.useMemo(()=>I?I(Q):z.createElement(Qx.Provider,{value:Q},b),[b,Q,I]);return z.createElement(z.Fragment,null,C!==null&&z.createElement("noscript",null,z.createElement("style",null,C)),z.createElement("div",{ref:W,"data-input-otp-container":!0,style:ae,className:m},Ve,z.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Ue)))});Z0.displayName="Input";function Ni(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var Jx=`
|
|
105
|
+
Valid keys: `+JSON.stringify(Object.keys(x),null," "));var Q=Ue(Ie,ce,Z,le,ee+"."+ce,n);if(Q)return Q}return null}return b(ne)}function W(x){switch(typeof x){case"number":case"string":case"undefined":return!0;case"boolean":return!x;case"object":if(Array.isArray(x))return x.every(W);if(x===null||l(x))return!0;var ne=f(x);if(ne){var pe=ne.call(x),L;if(ne!==x.entries){for(;!(L=pe.next()).done;)if(!W(L.value))return!1}else for(;!(L=pe.next()).done;){var Z=L.value;if(Z&&!W(Z[1]))return!1}}else return!1;return!0;default:return!1}}function se(x,ne){return x==="symbol"?!0:ne?ne["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&ne instanceof Symbol:!1}function Ce(x){var ne=typeof x;return Array.isArray(x)?"array":x instanceof RegExp?"object":se(ne,x)?"symbol":ne}function be(x){if(typeof x>"u"||x===null)return""+x;var ne=Ce(x);if(ne==="object"){if(x instanceof Date)return"date";if(x instanceof RegExp)return"regexp"}return ne}function ve(x){var ne=be(x);switch(ne){case"array":case"object":return"an "+ne;case"boolean":case"date":case"regexp":return"a "+ne;default:return ne}}function Le(x){return!x.constructor||!x.constructor.name?g:x.constructor.name}return m.checkPropTypes=i,m.resetWarningCache=i.resetWarningCache,m.PropTypes=m,m},Xl}var Kl,nh;function mx(){if(nh)return Kl;nh=1;var e=Yu();function t(){}function n(){}return n.resetWarningCache=t,Kl=function(){function o(s,l,c,u,h,f){if(f!==e){var g=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw g.name="Invariant Violation",g}}o.isRequired=o;function i(){return o}var a={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:i,element:o,elementType:o,instanceOf:i,node:o,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},Kl}if(process.env.NODE_ENV!=="production"){var gx=Gu(),Ix=!0;Yc.exports=px()(gx.isElement,Ix)}else Yc.exports=mx()();var Cx=Yc.exports;const kn=Ws(Cx);var bx=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function Zc(){return Zc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Zc.apply(this,arguments)}function Sx(e,t){if(e==null)return{};var n={},o=Object.keys(e),i,a;for(a=0;a<o.length;a++)i=o[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Ja(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yx(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Xc(e,t)}function Xc(e,t){return Xc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},Xc(e,t)}var dl=function(e){yx(t,e);function t(){var o;return o=e.call(this)||this,o.handleExpired=o.handleExpired.bind(Ja(o)),o.handleErrored=o.handleErrored.bind(Ja(o)),o.handleChange=o.handleChange.bind(Ja(o)),o.handleRecaptchaRef=o.handleRecaptchaRef.bind(Ja(o)),o}var n=t.prototype;return n.getCaptchaFunction=function(i){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[i]:this.props.grecaptcha[i]:null},n.getValue=function(){var i=this.getCaptchaFunction("getResponse");return i&&this._widgetId!==void 0?i(this._widgetId):null},n.getWidgetId=function(){return this.props.grecaptcha&&this._widgetId!==void 0?this._widgetId:null},n.execute=function(){var i=this.getCaptchaFunction("execute");if(i&&this._widgetId!==void 0)return i(this._widgetId);this._executeRequested=!0},n.executeAsync=function(){var i=this;return new Promise(function(a,s){i.executionResolve=a,i.executionReject=s,i.execute()})},n.reset=function(){var i=this.getCaptchaFunction("reset");i&&this._widgetId!==void 0&&i(this._widgetId)},n.forceReset=function(){var i=this.getCaptchaFunction("reset");i&&i()},n.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},n.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},n.handleChange=function(i){this.props.onChange&&this.props.onChange(i),this.executionResolve&&(this.executionResolve(i),delete this.executionReject,delete this.executionResolve)},n.explicitRender=function(){var i=this.getCaptchaFunction("render");if(i&&this._widgetId===void 0){var a=document.createElement("div");this._widgetId=i(a,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(a)}this._executeRequested&&this.props.grecaptcha&&this._widgetId!==void 0&&(this._executeRequested=!1,this.execute())},n.componentDidMount=function(){this.explicitRender()},n.componentDidUpdate=function(){this.explicitRender()},n.handleRecaptchaRef=function(i){this.captcha=i},n.render=function(){var i=this.props;i.sitekey,i.onChange,i.theme,i.type,i.tabindex,i.onExpired,i.onErrored,i.size,i.stoken,i.grecaptcha,i.badge,i.hl,i.isolated;var a=Sx(i,bx);return z.createElement("div",Zc({},a,{ref:this.handleRecaptchaRef}))},t}(z.Component);dl.displayName="ReCAPTCHA";dl.propTypes={sitekey:kn.string.isRequired,onChange:kn.func,grecaptcha:kn.object,theme:kn.oneOf(["dark","light"]),type:kn.oneOf(["image","audio"]),tabindex:kn.number,onExpired:kn.func,onErrored:kn.func,size:kn.oneOf(["compact","normal","invisible"]),stoken:kn.string,hl:kn.string,badge:kn.oneOf(["bottomright","bottomleft","inline"]),isolated:kn.bool};dl.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"};var Zu=Gu(),Ex={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Tx={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},xx={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},V0={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Xu={};Xu[Zu.ForwardRef]=xx;Xu[Zu.Memo]=V0;function rh(e){return Zu.isMemo(e)?V0:Xu[e.$$typeof]||Ex}var _x=Object.defineProperty,wx=Object.getOwnPropertyNames,oh=Object.getOwnPropertySymbols,vx=Object.getOwnPropertyDescriptor,Ax=Object.getPrototypeOf,ih=Object.prototype;function z0(e,t,n){if(typeof t!="string"){if(ih){var o=Ax(t);o&&o!==ih&&z0(e,o,n)}var i=wx(t);oh&&(i=i.concat(oh(t)));for(var a=rh(e),s=rh(t),l=0;l<i.length;++l){var c=i[l];if(!Tx[c]&&!(n&&n[c])&&!(s&&s[c])&&!(a&&a[c])){var u=vx(t,c);try{_x(e,c,u)}catch{}}}}return e}var kx=z0;const Lx=Ws(kx);function Kc(){return Kc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Kc.apply(this,arguments)}function Nx(e,t){if(e==null)return{};var n={},o=Object.keys(e),i,a;for(a=0;a<o.length;a++)i=o[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Px(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var sr={},Rx=0;function Dx(e,t){return t=t||{},function(o){var i=o.displayName||o.name||"Component",a=function(l){Px(c,l);function c(h,f){var g;return g=l.call(this,h,f)||this,g.state={},g.__scriptURL="",g}var u=c.prototype;return u.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+Rx++),this.__scriptLoaderID},u.setupScriptURL=function(){return this.__scriptURL=typeof e=="function"?e():e,this.__scriptURL},u.asyncScriptLoaderHandleLoad=function(f){var g=this;this.setState(f,function(){return g.props.asyncScriptOnLoad&&g.props.asyncScriptOnLoad(g.state)})},u.asyncScriptLoaderTriggerOnScriptLoaded=function(){var f=sr[this.__scriptURL];if(!f||!f.loaded)throw new Error("Script is not loaded.");for(var g in f.observers)f.observers[g](f);delete window[t.callbackName]},u.componentDidMount=function(){var f=this,g=this.setupScriptURL(),m=this.asyncScriptLoaderGetScriptLoaderID(),C=t,I=C.globalName,b=C.callbackName,S=C.scriptId;if(I&&typeof window[I]<"u"&&(sr[g]={loaded:!0,observers:{}}),sr[g]){var y=sr[g];if(y&&(y.loaded||y.errored)){this.asyncScriptLoaderHandleLoad(y);return}y.observers[m]=function(E){return f.asyncScriptLoaderHandleLoad(E)};return}var T={};T[m]=function(E){return f.asyncScriptLoaderHandleLoad(E)},sr[g]={loaded:!1,observers:T};var k=document.createElement("script");k.src=g,k.async=!0;for(var A in t.attributes)k.setAttribute(A,t.attributes[A]);S&&(k.id=S);var P=function(M){if(sr[g]){var B=sr[g],w=B.observers;for(var V in w)M(w[V])&&delete w[V]}};b&&typeof window<"u"&&(window[b]=function(){return f.asyncScriptLoaderTriggerOnScriptLoaded()}),k.onload=function(){var E=sr[g];E&&(E.loaded=!0,P(function(M){return b?!1:(M(E),!0)}))},k.onerror=function(){var E=sr[g];E&&(E.errored=!0,P(function(M){return M(E),!0}))},document.body.appendChild(k)},u.componentWillUnmount=function(){var f=this.__scriptURL;if(t.removeOnUnmount===!0)for(var g=document.getElementsByTagName("script"),m=0;m<g.length;m+=1)g[m].src.indexOf(f)>-1&&g[m].parentNode&&g[m].parentNode.removeChild(g[m]);var C=sr[f];C&&(delete C.observers[this.asyncScriptLoaderGetScriptLoaderID()],t.removeOnUnmount===!0&&delete sr[f])},u.render=function(){var f=t.globalName,g=this.props;g.asyncScriptOnLoad;var m=g.forwardedRef,C=Nx(g,["asyncScriptOnLoad","forwardedRef"]);return f&&typeof window<"u"&&(C[f]=typeof window[f]<"u"?window[f]:void 0),C.ref=m,_.createElement(o,C)},c}(_.Component),s=_.forwardRef(function(l,c){return _.createElement(a,Kc({},l,{forwardedRef:c}))});return s.displayName="AsyncScriptLoader("+i+")",s.propTypes={asyncScriptOnLoad:kn.func},Lx(s,o)}}var Qc="onloadcallback",Ox="grecaptcha";function Jc(){return typeof window<"u"&&window.recaptchaOptions||{}}function Mx(){var e=Jc(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+Qc+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+Qc+"&render=explicit"}const Bx=Dx(Mx,{callbackName:Qc,globalName:Ox,attributes:Jc().nonce?{nonce:Jc().nonce}:{}})(dl),Fx="6LdQiIIpAAAAAAkhvhS9zuo5WNS5mAzZrALD9cCa",$0=_.createContext(void 0),W0=({children:e})=>{const t=_.useRef(null);_.useEffect(()=>{typeof window<"u"&&Hx()},[]);const n=async()=>{var o,i;try{const a=await((o=t.current)==null?void 0:o.executeAsync());return(i=t.current)==null||i.reset(),a??null}catch(a){return console.error("executeRecaptcha error:",a),null}};return d.jsxs($0.Provider,{value:{recaptchaRef:t,executeRecaptcha:n},children:[e,d.jsx("div",{style:{visibility:"hidden",opacity:0},children:d.jsx(Bx,{sitekey:Fx,size:"invisible",ref:t,badge:"inline"})})]})},Ku=()=>{const e=_.useContext($0);if(e===void 0)throw new Error("useReCaptcha must be used within a ReCaptchaProvider");return e};function Hx(){var t,n;if(typeof window>"u")return;const e=(n=(t=[...document.getElementsByTagName("iframe")].find(o=>o.src.includes("google.com/recaptcha/api2/bframe")))==null?void 0:t.parentNode)==null?void 0:n.parentNode;e&&new MutationObserver(()=>{(e.style.visibility!=="visible"||e.style.opacity!=="1")&&(e.style.opacity="1",e.style.visibility="visible")}).observe(e,{attributeFilter:["style"]})}var jx=Object.defineProperty,Ux=Object.defineProperties,Vx=Object.getOwnPropertyDescriptors,Fs=Object.getOwnPropertySymbols,q0=Object.prototype.hasOwnProperty,G0=Object.prototype.propertyIsEnumerable,ah=(e,t,n)=>t in e?jx(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zx=(e,t)=>{for(var n in t||(t={}))q0.call(t,n)&&ah(e,n,t[n]);if(Fs)for(var n of Fs(t))G0.call(t,n)&&ah(e,n,t[n]);return e},$x=(e,t)=>Ux(e,Vx(t)),Wx=(e,t)=>{var n={};for(var o in e)q0.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&Fs)for(var o of Fs(e))t.indexOf(o)<0&&G0.call(e,o)&&(n[o]=e[o]);return n};function qx(e){let t=setTimeout(e,0),n=setTimeout(e,10),o=setTimeout(e,50);return[t,n,o]}function Gx(e){let t=z.useRef();return z.useEffect(()=>{t.current=e}),t.current}var Yx=18,Y0=40,Zx=`${Y0}px`,Xx=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function Kx({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:o}){let[i,a]=z.useState(!1),[s,l]=z.useState(!1),[c,u]=z.useState(!1),h=z.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&i&&s,[i,s,n]),f=z.useCallback(()=>{let g=e.current,m=t.current;if(!g||!m||c||n==="none")return;let C=g,I=C.getBoundingClientRect().left+C.offsetWidth,b=C.getBoundingClientRect().top+C.offsetHeight/2,S=I-Yx,y=b;document.querySelectorAll(Xx).length===0&&document.elementFromPoint(S,y)===g||(a(!0),u(!0))},[e,t,c,n]);return z.useEffect(()=>{let g=e.current;if(!g||n==="none")return;function m(){let I=window.innerWidth-g.getBoundingClientRect().right;l(I>=Y0)}m();let C=setInterval(m,1e3);return()=>{clearInterval(C)}},[e,n]),z.useEffect(()=>{let g=o||document.activeElement===t.current;if(n==="none"||!g)return;let m=setTimeout(f,0),C=setTimeout(f,2e3),I=setTimeout(f,5e3),b=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(m),clearTimeout(C),clearTimeout(I),clearTimeout(b)}},[t,o,n,f]),{hasPWMBadge:i,willPushPWMBadge:h,PWM_BADGE_SPACE_WIDTH:Zx}}var Qx=z.createContext({}),Z0=z.forwardRef((e,t)=>{var n=e,{value:o,onChange:i,maxLength:a,textAlign:s="left",pattern:l,placeholder:c,inputMode:u="numeric",onComplete:h,pushPasswordManagerStrategy:f="increase-width",pasteTransformer:g,containerClassName:m,noScriptCSSFallback:C=Jx,render:I,children:b}=n,S=Wx(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),y,T,k,A,P;let[E,M]=z.useState(typeof S.defaultValue=="string"?S.defaultValue:""),B=o??E,w=Gx(B),V=z.useCallback(Te=>{i==null||i(Te),M(Te)},[i]),H=z.useMemo(()=>l?typeof l=="string"?new RegExp(l):l:null,[l]),X=z.useRef(null),W=z.useRef(null),se=z.useRef({value:B,onChange:V,isIOS:typeof window<"u"&&((T=(y=window==null?void 0:window.CSS)==null?void 0:y.supports)==null?void 0:T.call(y,"-webkit-touch-callout","none"))}),Ce=z.useRef({prev:[(k=X.current)==null?void 0:k.selectionStart,(A=X.current)==null?void 0:A.selectionEnd,(P=X.current)==null?void 0:P.selectionDirection]});z.useImperativeHandle(t,()=>X.current,[]),z.useEffect(()=>{let Te=X.current,we=W.current;if(!Te||!we)return;se.current.value!==Te.value&&se.current.onChange(Te.value),Ce.current.prev=[Te.selectionStart,Te.selectionEnd,Te.selectionDirection];function ze(){if(document.activeElement!==Te){pe(null),Z(null);return}let $e=Te.selectionStart,nt=Te.selectionEnd,Tn=Te.selectionDirection,pt=Te.maxLength,un=Te.value,mt=Ce.current.prev,Lt=-1,q=-1,oe;if(un.length!==0&&$e!==null&&nt!==null){let rt=$e===nt,dn=$e===un.length&&un.length<pt;if(rt&&!dn){let Je=$e;if(Je===0)Lt=0,q=1,oe="forward";else if(Je===pt)Lt=Je-1,q=Je,oe="backward";else if(pt>1&&un.length>1){let hn=0;if(mt[0]!==null&&mt[1]!==null){oe=Je<mt[1]?"backward":"forward";let fn=mt[0]===mt[1]&&mt[0]<pt;oe==="backward"&&!fn&&(hn=-1)}Lt=hn+Je,q=hn+Je+1}}Lt!==-1&&q!==-1&&Lt!==q&&X.current.setSelectionRange(Lt,q,oe)}let _e=Lt!==-1?Lt:$e,Ae=q!==-1?q:nt,We=oe??Tn;pe(_e),Z(Ae),Ce.current.prev=[_e,Ae,We]}if(document.addEventListener("selectionchange",ze,{capture:!0}),ze(),document.activeElement===Te&&x(!0),!document.getElementById("input-otp-style")){let $e=document.createElement("style");if($e.id="input-otp-style",document.head.appendChild($e),$e.sheet){let nt="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";Ni($e.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Ni($e.sheet,`[data-input-otp]:autofill { ${nt} }`),Ni($e.sheet,`[data-input-otp]:-webkit-autofill { ${nt} }`),Ni($e.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),Ni($e.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Et=()=>{we&&we.style.setProperty("--root-height",`${Te.clientHeight}px`)};Et();let _t=new ResizeObserver(Et);return _t.observe(Te),()=>{document.removeEventListener("selectionchange",ze,{capture:!0}),_t.disconnect()}},[]);let[be,ve]=z.useState(!1),[Le,x]=z.useState(!1),[ne,pe]=z.useState(null),[L,Z]=z.useState(null);z.useEffect(()=>{qx(()=>{var Te,we,ze,Et;(Te=X.current)==null||Te.dispatchEvent(new Event("input"));let _t=(we=X.current)==null?void 0:we.selectionStart,$e=(ze=X.current)==null?void 0:ze.selectionEnd,nt=(Et=X.current)==null?void 0:Et.selectionDirection;_t!==null&&$e!==null&&(pe(_t),Z($e),Ce.current.prev=[_t,$e,nt])})},[B,Le]),z.useEffect(()=>{w!==void 0&&B!==w&&w.length<a&&B.length===a&&(h==null||h(B))},[a,h,w,B]);let le=Kx({containerRef:W,inputRef:X,pushPasswordManagerStrategy:f,isFocused:Le}),ee=z.useCallback(Te=>{let we=Te.currentTarget.value.slice(0,a);if(we.length>0&&H&&!H.test(we)){Te.preventDefault();return}typeof w=="string"&&we.length<w.length&&document.dispatchEvent(new Event("selectionchange")),V(we)},[a,V,w,H]),Ie=z.useCallback(()=>{var Te;if(X.current){let we=Math.min(X.current.value.length,a-1),ze=X.current.value.length;(Te=X.current)==null||Te.setSelectionRange(we,ze),pe(we),Z(ze)}x(!0)},[a]),Se=z.useCallback(Te=>{var we,ze;let Et=X.current;if(!g&&(!se.current.isIOS||!Te.clipboardData||!Et))return;let _t=Te.clipboardData.getData("text/plain"),$e=g?g(_t):_t;Te.preventDefault();let nt=(we=X.current)==null?void 0:we.selectionStart,Tn=(ze=X.current)==null?void 0:ze.selectionEnd,pt=(nt!==Tn?B.slice(0,nt)+$e+B.slice(Tn):B.slice(0,nt)+$e+B.slice(nt)).slice(0,a);if(pt.length>0&&H&&!H.test(pt))return;Et.value=pt,V(pt);let un=Math.min(pt.length,a-1),mt=pt.length;Et.setSelectionRange(un,mt),pe(un),Z(mt)},[a,V,H,B]),ae=z.useMemo(()=>({position:"relative",cursor:S.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[S.disabled]),ce=z.useMemo(()=>({position:"absolute",inset:0,width:le.willPushPWMBadge?`calc(100% + ${le.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:le.willPushPWMBadge?`inset(0 ${le.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:s,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[le.PWM_BADGE_SPACE_WIDTH,le.willPushPWMBadge,s]),Ue=z.useMemo(()=>z.createElement("input",$x(zx({autoComplete:S.autoComplete||"one-time-code"},S),{"data-input-otp":!0,"data-input-otp-placeholder-shown":B.length===0||void 0,"data-input-otp-mss":ne,"data-input-otp-mse":L,inputMode:u,pattern:H==null?void 0:H.source,"aria-placeholder":c,style:ce,maxLength:a,value:B,ref:X,onPaste:Te=>{var we;Se(Te),(we=S.onPaste)==null||we.call(S,Te)},onChange:ee,onMouseOver:Te=>{var we;ve(!0),(we=S.onMouseOver)==null||we.call(S,Te)},onMouseLeave:Te=>{var we;ve(!1),(we=S.onMouseLeave)==null||we.call(S,Te)},onFocus:Te=>{var we;Ie(),(we=S.onFocus)==null||we.call(S,Te)},onBlur:Te=>{var we;x(!1),(we=S.onBlur)==null||we.call(S,Te)}})),[ee,Ie,Se,u,ce,a,L,ne,S,H==null?void 0:H.source,B]),Q=z.useMemo(()=>({slots:Array.from({length:a}).map((Te,we)=>{var ze;let Et=Le&&ne!==null&&L!==null&&(ne===L&&we===ne||we>=ne&&we<L),_t=B[we]!==void 0?B[we]:null,$e=B[0]!==void 0?null:(ze=c==null?void 0:c[we])!=null?ze:null;return{char:_t,placeholderChar:$e,isActive:Et,hasFakeCaret:Et&&_t===null}}),isFocused:Le,isHovering:!S.disabled&&be}),[Le,be,a,L,ne,S.disabled,B]),Ve=z.useMemo(()=>I?I(Q):z.createElement(Qx.Provider,{value:Q},b),[b,Q,I]);return z.createElement(z.Fragment,null,C!==null&&z.createElement("noscript",null,z.createElement("style",null,C)),z.createElement("div",{ref:W,"data-input-otp-container":!0,style:ae,className:m},Ve,z.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Ue)))});Z0.displayName="Input";function Ni(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var Jx=`
|
|
106
106
|
[data-input-otp] {
|
|
107
107
|
--nojs-bg: white !important;
|
|
108
108
|
--nojs-fg: black !important;
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./builder.cjs.js"),t=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./builder.cjs.js"),t=require("./index-_M52HeAv.cjs");exports.App=e.App;exports.Checkout=e.Checkout;exports.ColorVariables=e.ColorVariables;exports.hotReload=e.hotReload;exports.iconNames=e.iconNames;exports.removeNotification=e.removeNotification;exports.showNotification=e.showNotification;exports.useBuilderPages=e.useBuilderPages;exports.useCreateTicket=e.useCreateTicket;exports.useGeneralInfo=e.useGeneralInfo;exports.ReCaptchaProvider=t.ReCaptchaProvider;exports.aspectRatioOptions=t.aspectRatioOptions;exports.formatPrice=t.formatPrice;exports.parseDraftJsText=t.parseDraftJsText;exports.splitTextIntoSpans=t.splitTextIntoSpans;exports.useAdaptiveStyles=t.useAdaptiveStyles;exports.useCart=t.useCart;exports.useReCaptcha=t.useReCaptcha;
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { App as s, Checkout as t, ColorVariables as o, hotReload as r, iconNames as i, removeNotification as p, showNotification as c, useBuilderPages as u, useCreateTicket as f, useGeneralInfo as n } from "./builder.es.js";
|
|
2
|
-
import { R as C, a as h, f as m, p as R, s as d, c as x, b as v, u as N } from "./index-
|
|
2
|
+
import { R as C, a as h, f as m, p as R, s as d, c as x, b as v, u as N } from "./index-CIkAZ5oH.js";
|
|
3
3
|
export {
|
|
4
4
|
s as App,
|
|
5
5
|
t as Checkout,
|
package/dist/ui.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-CefwbdDT.cjs"),h=require("react");require("react-dom");const dt="_block_kh9z8_8",ut="_title_kh9z8_16",xt="_subtitle_kh9z8_23",mt="_alignmentContent_kh9z8_30",pt="_alignments_kh9z8_39",jt="_alignment_kh9z8_30",ht="_circle_kh9z8_64",gt="_paddings_kh9z8_71",ft="_padding_kh9z8_71",yt="_active_kh9z8_97",z={block:dt,title:ut,subtitle:xt,alignmentContent:mt,alignments:pt,alignment:jt,circle:ht,paddings:gt,padding:ft,active:yt},_t=["topLeft","top","topRight","left","center","right","bottomLeft","bottom","bottomRight"],Et=["left","top","right","bottom"],Rt=u=>{const{alignment:n,padding:r,setPadding:s,setAlignment:a,isAlignment:e=!0,isPadding:x=!0}=u;function d(l){switch(l){case"left":case"topLeft":case"bottomLeft":return"TextAlignLeft";case"right":case"topRight":case"bottomRight":return"TextAlignRight";case"center":case"top":case"bottom":return"TextAlignCenter";default:return"TextAlignCenter"}}function j(l){switch(l){case"left":return"AlignLeft";case"right":return"AlignRight";case"top":return"AlignTop";case"bottom":return"AlignBottom"}}const[f,k]=h.useState(null),[R,c]=h.useState(null);return t.jsxRuntimeExports.jsxs("div",{className:z.layout,children:[t.jsxRuntimeExports.jsx("h3",{className:z.title,children:"Layout (for Desktop version)"}),t.jsxRuntimeExports.jsxs("div",{className:z.alignmentContent,children:[e&&t.jsxRuntimeExports.jsxs("div",{className:z.block,children:[t.jsxRuntimeExports.jsx("h5",{className:z.subtitle,children:"Alignment"}),t.jsxRuntimeExports.jsx("div",{className:z.alignments,children:_t.map(l=>t.jsxRuntimeExports.jsxs("div",{onClick:()=>{a(l)},className:z.alignment,onMouseEnter:()=>{k(l)},onMouseLeave:()=>{k(null)},children:[l!==n&&f!==l&&t.jsxRuntimeExports.jsx("div",{className:z.circle}),l!==n&&f===l&&t.jsxRuntimeExports.jsx(t.Icon,{name:d(f),fill:"#c2c2c2",width:22,height:22}),l===n&&t.jsxRuntimeExports.jsx(t.Icon,{name:d(n),fill:"#FF3F19",width:22,height:22})]},l))})]}),x&&t.jsxRuntimeExports.jsxs("div",{className:z.block,children:[t.jsxRuntimeExports.jsx("h5",{className:z.subtitle,children:"Paddings"}),t.jsxRuntimeExports.jsx("div",{className:z.paddings,children:Et.map(l=>t.jsxRuntimeExports.jsxs("label",{className:t.clx(z.padding,{[z.active]:R===l}),onFocus:()=>{c(l)},onBlur:()=>{c(null)},children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:j(l),width:20,height:20})}),t.jsxRuntimeExports.jsx(t.Input,{type:"number",value:String(r[l]),onChange:y=>s({...r,[l]:Math.min(Number(y),999)}),max:999,paddingless:!0,borderless:!0})]},l))})]})]})]})},bt="_title_82zux_1",vt="_subtitle_82zux_5",It="_productsBlock_82zux_14",St="_top_82zux_26",Nt="_products_82zux_14",Ct="_product_82zux_14",Pt="_button_82zux_80",kt="_disabled_82zux_91",Tt="_buttons_82zux_118",wt="_addButton_82zux_157",Bt="_deleteButton_82zux_179",F={title:bt,subtitle:vt,productsBlock:It,top:St,products:Nt,product:Ct,button:Pt,disabled:kt,buttons:Tt,addButton:wt,deleteButton:Bt};function Mt({id:u,children:n}){const{attributes:r,listeners:s,setNodeRef:a,transform:e,transition:x,isDragging:d}=t.useSortable({id:u}),j={transform:t.CSS.Transform.toString(e),transition:x};return t.jsxRuntimeExports.jsx("div",{ref:a,style:j,className:`${F.product} ${d?F.dragging:""}`,...r,...s,children:n})}const $t=u=>{const{isActiveItems:n,setIsActiveItems:r,items:s,setItems:a,other:e,tags:x,title:d,subtitle:j,draggable:f=!1,withImage:k=!1,addable:R=!0,itemsOptions:c,hasRangeSelector:l=!1,rangeSelectorOptions:y,limit:g,autoScrollInterval:m,deletable:o,aspectRatio:_,setAspectRatio:S}=u,$=t.useSensors(t.useSensor(t.PointerSensor,{activationConstraint:{distance:5}})),A=i=>{const{active:b,over:N}=i;if(N&&b.id!==N.id){const M=s.findIndex(v=>v===b.id),w=s.findIndex(v=>v===N.id);if(M!==-1&&w!==-1){const v=[...s],[Y]=v.splice(M,1);v.splice(w,0,Y),a(v)}}};function V(i){if(k)return i?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${i[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const q=(i,b=!1)=>{const N=c.find(w=>w.id===i);if(!N)return;const M=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[f&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),t.jsxRuntimeExports.jsx(t.Select,{onChange:w=>{const v=[...s],Y=c.find(p=>p.name===w);if(!Y)return;const E=Y.id,O=v.map(p=>p===i?E:p);a([...O])},value:N.name,options:c.filter(w=>!s.find(v=>v===w.id)).map(w=>w.name),leftAddonOptions:c.map(w=>({value:w.name,addon:V(w.images)}))}),b&&t.jsxRuntimeExports.jsx("div",{className:F.buttons,children:t.jsxRuntimeExports.jsx("div",{className:F.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>a(s.filter(w=>w!==i))})})})]});return f?t.jsxRuntimeExports.jsx(Mt,{id:i,children:M},t.v4()):t.jsxRuntimeExports.jsx("div",{className:F.product,children:M},t.v4())};return t.jsxRuntimeExports.jsxs("div",{className:F.productsBlock,children:[(d||n!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:F.top,children:[d&&t.jsxRuntimeExports.jsx("h3",{className:F.title,children:d}),n!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:n,onChange:i=>r==null?void 0:r(i)})]}),l&&y&&t.jsxRuntimeExports.jsx(t.RangeSelector,{...y}),t.jsxRuntimeExports.jsxs("div",{className:F.products,children:[j&&t.jsxRuntimeExports.jsx("h5",{className:F.subtitle,children:j}),f?t.jsxRuntimeExports.jsx(t.DndContext,{sensors:$,onDragEnd:A,children:t.jsxRuntimeExports.jsx(t.SortableContext,{items:s,strategy:t.verticalListSortingStrategy,children:s.map(i=>q(i,o))})}):s.map(i=>q(i,o)),R&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center",gap:5},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:t.clx(F.button,{[F.disabled]:!!(g&&g<=s.length||s.length===c.length)}),size:"s",disabled:!!(g&&g<=s.length||s.length===c.length),onClick:()=>{const i=[...s];let b=null;if(c){for(let N=0;N<c.length;N++)if(!s.find(M=>M===c[N].id)){b=c[N];break}}i.push((b==null?void 0:b.id)||c[0].id),a(i)},style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:F.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]}),_&&S&&t.jsxRuntimeExports.jsx(t.Select,{value:_,label:"Aspect Ratio",options:Object.keys(t.aspectRatio),onChange:i=>S(i),leftAddonOptions:t.aspectRatioOptions}),x!==void 0&&t.jsxRuntimeExports.jsx(t.OtherAndTagsSettings,{tagsTitle:"Tags",items:x}),e!==void 0&&t.jsxRuntimeExports.jsx(t.OtherAndTagsSettings,{otherTitle:"Other",items:e}),m!==void 0&&t.jsxRuntimeExports.jsx(t.Input,{label:"Auto scroll interval",type:"number",value:String(m.scrollInterval),onChange:i=>m.setScrollInterval(Number(i)),min:.1,max:100,style:{width:"100%"},postfix:"sec."})]})},Ot="_title_roi3a_1",At="_subtitle_roi3a_5",qt="_productsBlock_roi3a_14",Dt="_top_roi3a_26",Lt="_products_roi3a_14",Ut="_product_roi3a_14",Ht="_button_roi3a_80",zt="_disabled_roi3a_91",Ft="_buttons_roi3a_118",Vt="_addButton_roi3a_164",Yt="_deleteButton_roi3a_179",H={title:Ot,subtitle:At,productsBlock:qt,top:Dt,products:Lt,product:Ut,button:Ht,disabled:zt,buttons:Ft,addButton:Vt,deleteButton:Yt};function Gt({product:u,children:n}){const{attributes:r,listeners:s,setNodeRef:a,transform:e,transition:x,isDragging:d}=t.useSortable({id:u.id}),j={transform:t.CSS.Transform.toString(e),transition:x};return t.jsxRuntimeExports.jsx("div",{ref:a,style:j,className:`${H.product} ${d?H.dragging:""}`,...r,...s,children:n})}const Wt=u=>{const{isActiveItems:n,setIsActiveItems:r,items:s,setItems:a,title:e,subtitle:x,editable:d=!0,draggable:j=!1,deletable:f=!0,addable:k=!0,itemsType:R,itemsOptions:c,addableOptions:l={},limit:y}=u,[g,m]=h.useState(null),[o,_]=h.useState(null),S=h.useRef(null),$=t.useSensors(t.useSensor(t.PointerSensor,{activationConstraint:{distance:5}}));h.useEffect(()=>{if(g){const i=[...s].map(b=>b.id===g.id?g:b);a(i)}},[g]),h.useEffect(()=>{S.current&&o&&(S.current.getBoundingClientRect().height,o.top)},[S.current,o]);const A=(i,b)=>{i.stopPropagation();const N=i.target.getBoundingClientRect();_({top:N.top+window.scrollY,left:N.left-30}),m(b)},V=i=>{const{active:b,over:N}=i;if(N&&b.id!==N.id){const M=s.findIndex(v=>v.id===b.id),w=s.findIndex(v=>v.id===N.id);if(M!==-1&&w!==-1){const v=[...s],[Y]=v.splice(M,1);v.splice(w,0,Y),a(v)}}},q=(i,b)=>{const N=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[j&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),R==="select"&&c&&t.jsxRuntimeExports.jsx(t.Select,{onChange:M=>{const w=[...s],v=c.find(E=>E.name===M);if(!v)return;const Y=w.map(E=>E.id===i.id?{...v,name:{"en-US":M}}:E);m({...i,name:{"en-US":M}}),a([...Y])},value:i.name,options:c.filter(M=>!s.find(w=>w.name===M.name)).map(M=>M.name)}),t.jsxRuntimeExports.jsxs("div",{className:H.buttons,children:[d&&t.jsxRuntimeExports.jsx("div",{className:H.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:M=>A(M,i)})}),f&&t.jsxRuntimeExports.jsx("div",{className:H.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>a(s.filter(M=>M.id!==i.id))})})]})]});return j?t.jsxRuntimeExports.jsx(Gt,{product:i,index:b,children:N},i.id):t.jsxRuntimeExports.jsx("div",{className:H.product,children:N},i.id)};return t.jsxRuntimeExports.jsxs("div",{className:H.productsBlock,children:[(e||n!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:H.top,children:[e&&t.jsxRuntimeExports.jsx("h3",{className:H.title,children:e}),n!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:n,onChange:i=>r==null?void 0:r(i)})]}),t.jsxRuntimeExports.jsxs("div",{className:H.products,children:[x&&t.jsxRuntimeExports.jsx("h5",{className:H.subtitle,children:x}),j?t.jsxRuntimeExports.jsx(t.DndContext,{sensors:$,onDragEnd:V,children:t.jsxRuntimeExports.jsx(t.SortableContext,{items:s.map(i=>i.id),strategy:t.verticalListSortingStrategy,children:s.map((i,b)=>q(i,b))})}):s.map((i,b)=>q(i,b)),k&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:t.clx(H.button,{[H.disabled]:!!(y&&y<=s.length||s.length===(c==null?void 0:c.length))}),size:"s",disabled:!!(y&&y<=s.length||s.length===(c==null?void 0:c.length)),onClick:()=>{const i=[...s];let b=null;if(c){for(let N=0;N<c.length;N++)if(!s.find(M=>M.id===c[N].id)){b=c[N];break}}R==="select"&&c&&i.push({name:b?b.name:c[0].name,id:(b==null?void 0:b.id)||c[0].id,...l}),a(i)},style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:H.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]})]})};function Xt(u){const{product:n,children:r}=u,{attributes:s,listeners:a,setNodeRef:e,transform:x,transition:d,isDragging:j}=t.useSortable({id:n.id}),f={transform:t.CSS.Transform.toString(x),transition:d};return t.jsxRuntimeExports.jsx("div",{ref:e,style:f,className:`${t.styles.product} ${j?t.styles.dragging:""}`,...s,...a,children:r})}const Qt=u=>{const{isActiveItems:n,setIsActiveItems:r,items:s,setItems:a,other:e,title:x,subtitle:d,editable:j=!0,draggable:f=!1,deletable:k=!0,addable:R=!0,itemsType:c,itemsPlaceholder:l="",itemsOptions:y,hasRangeSelector:g=!1,rangeSelectorOptions:m,modalOptions:o,addableOptions:_={},limit:S}=u,[$,A]=h.useState(null),[V,q]=h.useState({top:0,left:0}),[i,b]=h.useState(null),N=h.useRef(null),[M,w]=h.useState(!1),v=t.useSensors(t.useSensor(t.PointerSensor,{activationConstraint:{distance:5}}));h.useEffect(()=>{const p=()=>{A(null),w(!1)};return document.body.addEventListener("click",p),A(null),w(!1),()=>{A(null),w(!1),document.body.removeEventListener("click",p)}},[]),h.useEffect(()=>{if($){const p=[...s].map(I=>I.id===$.id?$:I);a(p)}},[$]),h.useEffect(()=>{if(N.current&&i){const p=N.current.getBoundingClientRect().height,I=window.innerHeight;let T=i.top;T+p>I+window.scrollY-200&&(T=I+window.scrollY-p-200),T<0&&(T=10),q({top:T,left:i.left})}},[N.current,i]);const Y=(p,I)=>{p.stopPropagation();const T=p.target.getBoundingClientRect();b({top:T.top+window.scrollY,left:T.left-30}),A(I),w(!0)},E=p=>{const{active:I,over:T}=p;if(T&&I.id!==T.id){const P=s.findIndex(L=>L.id===I.id),G=s.findIndex(L=>L.id===T.id);if(P!==-1&&G!==-1){const L=[...s],[U]=L.splice(P,1);L.splice(G,0,U),a(L)}}},O=p=>{var T;const I=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[f&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),c==="select"&&y&&t.jsxRuntimeExports.jsx(t.Select,{onChange:P=>{const L=[...s].map(U=>U.id===p.id?{...p,name:{"en-US":P}}:U);A({...p,name:{"en-US":P}}),a([...L])},value:p.name["en-US"],options:y.filter(P=>!s.find(G=>G.name["en-US"]===P))}),c==="input"&&t.jsxRuntimeExports.jsx(t.Input,{onChange:P=>{const L=[...s].map(U=>U.id===p.id?{...p,name:{"en-US":P}}:U);a([...L])},value:p.name["en-US"],placeholder:l}),c==="image"&&t.jsxRuntimeExports.jsx(t.ChooseImage,{onChange:P=>{const L=[...s].map(U=>U.id===p.id?{...p,images:P}:U);a([...L])},activeImage:(T=s.find(P=>P.id===p.id))==null?void 0:T.images[0]}),t.jsxRuntimeExports.jsxs("div",{className:t.styles.buttons,children:[j&&t.jsxRuntimeExports.jsx("div",{className:t.styles.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:P=>Y(P,p)})}),k&&t.jsxRuntimeExports.jsx("div",{className:t.styles.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>a(s.filter(P=>P.id!==p.id))})})]})]});return f?t.jsxRuntimeExports.jsx(Xt,{product:p,children:I},p.id):t.jsxRuntimeExports.jsx("div",{className:t.styles.product,children:I},p.id)};return t.jsxRuntimeExports.jsxs("div",{className:t.styles.productsBlock,children:[(x||n!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:t.styles.top,children:[x&&t.jsxRuntimeExports.jsx("h3",{className:t.styles.title,children:x}),n!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:n,onChange:p=>r==null?void 0:r(p)})]}),$&&j&&o&&M&&t.jsxRuntimeExports.jsx(t.ItemPopup,{ref:N,activeItem:$,setActiveItem:A,popupPosition:V,modalOptions:o,setIsOpenModal:w}),g&&m&&t.jsxRuntimeExports.jsx(t.RangeSelector,{...m}),t.jsxRuntimeExports.jsxs("div",{className:t.styles.products,children:[d&&t.jsxRuntimeExports.jsx("h5",{className:t.styles.subtitle,children:d}),f?t.jsxRuntimeExports.jsx(t.DndContext,{sensors:v,onDragEnd:E,children:t.jsxRuntimeExports.jsx(t.SortableContext,{items:s.map(p=>p.id),strategy:t.verticalListSortingStrategy,children:s.map(p=>O(p))})}):s.map(p=>O(p)),R&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:t.clx(t.styles.button,{[t.styles.disabled]:!!(S&&S<=s.length)}),size:"s",disabled:!!(S&&S<=s.length),onClick:()=>{const p=[...s];let I=null;if(y){for(let T=0;T<y.length;T++)if(!s.find(P=>P.name["en-US"]===y[T])){I=y[T];break}}c==="select"&&y?p.push({name:{"en-US":I||y[0]},id:t.v4(),..._,maxSymbols:100}):c==="input"?p.push({name:{"en-US":""},id:t.v4(),..._,maxSymbols:100}):p.push({name:{"en-US":`Image ${s.length+1}`},id:t.v4(),..._,maxSymbols:100}),a(p)},style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:t.styles.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]}),e!==void 0&&t.jsxRuntimeExports.jsx(t.OtherAndTagsSettings,{otherTitle:"Other",items:e})]})},Jt="_subtitle_jql1y_1",Kt="_products_jql1y_10",Zt="_product_jql1y_10",te="_button_jql1y_11",ee="_buttons_jql1y_11",se="_addButton_jql1y_150",ne="_deleteButton_jql1y_165",X={subtitle:Jt,products:Kt,product:Zt,button:te,buttons:ee,addButton:se,deleteButton:ne},nt=u=>{const{buttons:n,setButtons:r,deletable:s=!0,addable:a=!0,editableLink:e=!0}=u,{pages:x}=t.usePagesStore(),[d,j]=h.useState(null),[f,k]=h.useState({top:0,left:0}),[R,c]=h.useState(null),l=h.useRef(null);h.useEffect(()=>{if(d){const m=[...n].map(o=>o.id===d.id?d:o);r(m)}},[d]),h.useEffect(()=>{if(l.current&&R){const m=l.current.getBoundingClientRect().height,o=window.innerHeight;let _=R.top;_+m>o+window.scrollY-200&&(_=o+window.scrollY-m-200),_<0&&(_=10),k({top:_,left:R.left})}},[l.current,R]);const y=(m,o)=>{m.stopPropagation();const _=m.target.getBoundingClientRect();c({top:_.top+window.scrollY-70,left:_.left-(a?30:65)}),j(o)},g=(m,o)=>{const _=[...n],S={...m,id:Math.random().toString(36).substr(2,9)};_.splice(o+1,0,S),r(_)};return t.jsxRuntimeExports.jsxs("div",{className:X.products,children:[t.jsxRuntimeExports.jsx("h5",{className:X.subtitle,children:"Button Type"}),n.map((m,o)=>t.jsxRuntimeExports.jsxs("div",{className:X.product,children:[t.jsxRuntimeExports.jsx(t.Select,{onChange:_=>{const $=[...n].map(A=>A.id===m.id?{...m,type:_}:A);r($)},value:m.type,options:["Primary","Secondary","Tertiary"]}),t.jsxRuntimeExports.jsxs("div",{className:X.buttons,children:[t.jsxRuntimeExports.jsx("div",{className:X.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Copy",hoverable:!0,width:20,height:20,onClick:()=>{g(m,o)}})}),t.jsxRuntimeExports.jsx("div",{className:X.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:_=>{y(_,m)}})}),s&&t.jsxRuntimeExports.jsx("div",{className:X.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,onClick:()=>{const _=n.filter(S=>S.id!==m.id);r(_)},width:20,height:20,fill:"#C12A2A"})})]})]},m.id)),d&&t.jsxRuntimeExports.jsx(t.ButtonPopup,{ref:l,activeButton:d,setActiveButton:j,popupPosition:f,editableLink:e}),a&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:X.button,size:"s",onClick:()=>{const m=[...n];e?m.push({type:"Primary",id:t.v4(),typesText:[],text:{"en-US":"Button Name"},destination:"Go to Page",page:x?Object.values(x)[0].path:"/",openInNewTab:!1}):m.push({type:"Primary",id:t.v4(),typesText:[],text:{"en-US":"Create Ticket"},destination:"Go to Page",page:x?Object.values(x)[0].path:"/",openInNewTab:!1}),r(m)},style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:X.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]})},ie=u=>{const{isActiveButtons:n,setIsActiveButtons:r,buttons:s,setButtons:a,editableLink:e=!0,addable:x=!0,deletable:d=!0}=u;return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:t.jsxRuntimeExports.jsxs("div",{className:t.styles$1.buttonsBlock,children:[t.jsxRuntimeExports.jsxs("div",{className:t.styles$1.top,children:[t.jsxRuntimeExports.jsx("h3",{className:t.styles$1.title,children:"Buttons"}),t.jsxRuntimeExports.jsx(t.Switch,{current:n,onChange:j=>r(j)})]}),n&&t.jsxRuntimeExports.jsx(nt,{buttons:s,setButtons:a,editableLink:e,addable:x,deletable:d})]})})};function oe(u){const{product:n,children:r}=u,{attributes:s,listeners:a,setNodeRef:e,transform:x,transition:d,isDragging:j}=t.useSortable({id:String(n.listingId)}),f={transform:t.CSS.Transform.toString(x),transition:d};return t.jsxRuntimeExports.jsx("div",{ref:e,style:f,className:`${t.styles$2.product} ${j?t.styles$2.dragging:""}`,...s,...a,children:r})}const re=u=>{const{isActiveItems:n,setIsActiveItems:r,items:s,setItems:a,other:e,title:x,subtitle:d,editable:j=!0,draggable:f=!1,withImage:k=!1,deletable:R=!0,addable:c=!0,itemsType:l,itemsOptions:y,limit:g,aspectRatio:m,setAspectRatio:o}=u,[_,S]=h.useState(null),[$,A]=h.useState({top:0,left:0}),[V,q]=h.useState(!1),i=t.useSensors(t.useSensor(t.PointerSensor,{activationConstraint:{distance:5}}));h.useEffect(()=>{const E=()=>{S(null),q(!1)};return document.body.addEventListener("click",E),S(null),q(!1),()=>{S(null),q(!1),document.body.removeEventListener("click",E)}},[]),h.useEffect(()=>{if(_){const E=[...s].map(O=>O.listingId===_.listingId?_:O);a(E)}},[_]);const b=(E,O)=>{E.stopPropagation();const p=E.target.getBoundingClientRect(),I=100,T=window.innerHeight;let P=p.top+window.scrollY;P+I>T&&(P=T-I-20),q(!0),A({top:P-80,left:p.left-30}),S(O)};function N(E){if(k)return E?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${E}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const M=E=>{const{active:O,over:p}=E;if(p&&O.id!==p.id){const I=s.findIndex(P=>String(P.listingId)===O.id),T=s.findIndex(P=>String(P.listingId)===p.id);if(I!==-1&&T!==-1){const P=[...s],[G]=P.splice(I,1);P.splice(T,0,G),a(P)}}},w=()=>{q(!1),S(null)},v=E=>{const O=y.find(I=>E.listingId===I.id);if(!O)return null;const p=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[f&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),l==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:I=>{const T=[...s],P=y.find(U=>U.productData.name===I);if(!P)return;const G={listingId:P.id,image:P.productData.images.length>0?P.productData.images[0].cfId:""},L=T.map(U=>U.listingId===E.listingId?G:U);S(G),a([...L])},value:O.productData.name,options:[...y.filter(I=>!s.find(T=>T.listingId===I.id)).map(I=>I.productData.name)],leftAddonOptions:y.map(I=>{var T;return{value:I.productData.name,addon:N(((T=I.productData.images[0])==null?void 0:T.cfId)||"")}})}),t.jsxRuntimeExports.jsxs("div",{className:t.styles$2.buttons,children:[j&&t.jsxRuntimeExports.jsx("div",{className:t.styles$2.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:I=>b(I,E)})}),R&&t.jsxRuntimeExports.jsx("div",{className:t.styles$2.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>a(s.filter(I=>I!==E))})})]})]});return f?t.jsxRuntimeExports.jsx(oe,{product:E,children:p},E.listingId):t.jsxRuntimeExports.jsx("div",{className:t.styles$2.product,children:p},E.listingId)},Y=h.useRef(null);return t.jsxRuntimeExports.jsxs("div",{className:t.styles$2.productsBlock,children:[(x||n!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:t.styles$2.top,children:[x&&t.jsxRuntimeExports.jsx("h3",{className:t.styles$2.title,children:x}),n!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:n,onChange:E=>r==null?void 0:r(E)})]}),V&&_&&t.jsxRuntimeExports.jsx(t.ListingPopup,{ref:Y,activeItem:_,setActiveItem:S,setIsOpenModal:q,popupPosition:$,itemsOptions:y}),n&&t.jsxRuntimeExports.jsxs("div",{className:t.styles$2.products,children:[d&&t.jsxRuntimeExports.jsx("h5",{className:t.styles$2.subtitle,children:d}),f?t.jsxRuntimeExports.jsx(t.DndContext,{sensors:i,onDragEnd:M,onDragStart:w,children:t.jsxRuntimeExports.jsx(t.SortableContext,{items:s.map(E=>String(E.listingId)),strategy:t.verticalListSortingStrategy,children:s.map(E=>v(E))})}):s.map(E=>v(E)),c&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:t.styles$2.button,size:"s",onClick:()=>{const E=[...s];for(let O=0;O<y.length;O++)if(!s.find(p=>p.listingId===y[O].id)){E.push({listingId:y[O].id,image:y[O].productData.images.length>0?y[O].productData.images[0].cfId:""});break}a(E)},disabled:s.length===(g||y.length),style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:t.styles$2.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]}),m&&o&&t.jsxRuntimeExports.jsx(t.Select,{value:m,options:Object.keys(t.aspectRatio),onChange:E=>o(E),leftAddonOptions:t.aspectRatioOptions}),n&&e!==void 0&&t.jsxRuntimeExports.jsx(t.OtherAndTagsSettings,{otherTitle:"Other",items:e})]})},ae="_options_s4lx3_1",ce="_price_s4lx3_18",le="_oldPrice_s4lx3_25",de="_newPrice_s4lx3_34",ue="_animate_s4lx3_42",xe="_meta_s4lx3_60",me="_info_s4lx3_66",pe="_infoRight_s4lx3_75",je="_buttons_s4lx3_82",he="_variants_s4lx3_89",ge="_variant_s4lx3_89",fe="_stock_s4lx3_107",ye="_variantInfo_s4lx3_115",_e="_quantity_s4lx3_122",Ee="_button_s4lx3_82",Re="_activeVariant_s4lx3_168",be="_chargeTypes_s4lx3_172",ve="_charge_s4lx3_172",Ie="_chargeActive_s4lx3_197",Se="_title_s4lx3_205",B={options:ae,price:ce,oldPrice:le,newPrice:de,animate:ue,meta:xe,info:me,infoRight:pe,buttons:je,variants:he,variant:ge,stock:fe,variantInfo:ye,quantity:_e,button:Ee,activeVariant:Re,chargeTypes:be,charge:ve,chargeActive:Ie,title:Se};var Z=(u=>(u.ONE_TIME="One-Time",u.RECURRING="Subscribe & Save",u))(Z||{});const it=u=>{var V,q;const{product:n,setIsOpen:r,isCartEnabled:s=!0}=u,{variants:a}=n,[e,x]=h.useState(a[0]),[d,j]=h.useState(e.chargeTypes?e.chargeTypes[0]:"ONE_TIME"),{notifications:f,setNotifications:k}=t.useNotificationStore(),R=t.useNavigate(),[c,l]=h.useState(1),{cart:y,reset:g,addProductToCart:m}=t.useCart(),[o,_]=h.useState(!1);h.useEffect(()=>{_(!0);const i=setTimeout(()=>_(!1),600);return()=>clearTimeout(i)},[c]);async function S(){try{m({productId:n.id,productVariantId:e.id,chargeType:d,quantity:c}),k([...f,{id:t.v4(),message:"Product added to cart",status:"success"}])}catch(i){k([...f,{id:t.v4(),message:`Product failed to add to cart: ${i}`,status:"error"}])}r==null||r(!1)}function $(){g(),S(),R("/checkout")}function A(i){if(i>=864e5){const v=Math.floor(i/864e5);return`${v} ${v===1?"day":"days"}`}else if(i>=36e5){const v=Math.floor(i/36e5);return`${v} ${v===1?"hour":"hours"}`}else if(i>=6e4){const v=Math.floor(i/6e4);return`${v} ${v===1?"minute":"minutes"}`}else{const v=Math.floor(i/1e3);return`${v} ${v===1?"second":"seconds"}`}}return h.useEffect(()=>{e.quantity&&e.quantity.available===0?l(0):l(1)},[e.quantity.available]),h.useEffect(()=>{e.chargeTypes&&j(e.chargeTypes.includes(d)?d:e.chargeTypes[0])},[e.chargeTypes]),t.jsxRuntimeExports.jsxs("div",{className:B.options,children:[e.chargeTypes&&e.chargeTypes.length>1&&t.jsxRuntimeExports.jsx("div",{className:B.chargeTypes,children:e.chargeTypes.map(i=>t.jsxRuntimeExports.jsx("div",{className:t.clx(B.charge,{[B.chargeActive]:d===i}),onClick:()=>j(i),children:Z[i]},i))}),t.jsxRuntimeExports.jsx("div",{className:B.variants,children:a.filter(i=>{var b;return(b=i.chargeTypes)==null?void 0:b.includes(d)}).map(i=>{var b,N;return t.jsxRuntimeExports.jsxs("div",{className:t.clx(B.variant,{[B.activeVariant]:e.id===i.id}),onClick:()=>{x(i),l(1)},children:[t.jsxRuntimeExports.jsxs("div",{className:B.variantInfo,children:[t.jsxRuntimeExports.jsx("span",{className:B.title,id:"h4",dangerouslySetInnerHTML:{__html:t.splitTextIntoSpans(i.name)}}),t.jsxRuntimeExports.jsxs("span",{id:"md",children:[t.formatPrice({amount:d==="ONE_TIME"?i.price.amount:i.subscriptionSettings?i.subscriptionSettings.price.amount:0,currency:d==="ONE_TIME"?i.price.currency:i.subscriptionSettings?i.subscriptionSettings.price.currency:"USD"})," ",d==="RECURRING"&&i.subscriptionSettings&&` / ${t.normalizeInterval(i.subscriptionSettings.recurringIntervalDays||0)}`]})]}),t.jsxRuntimeExports.jsx("div",{id:"md",children:d==="ONE_TIME"&&t.jsxRuntimeExports.jsxs("span",{className:B.stock,id:"md",children:[(b=i.quantity.restrictions)!=null&&b.max||i.quantity.available!==void 0?((N=i.quantity.restrictions)==null?void 0:N.max)||i.quantity.available:"∞"," ","in stock"]})})]},i.id)})}),d==="ONE_TIME"&&t.jsxRuntimeExports.jsxs("div",{className:B.quantity,id:"md",children:[t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:()=>{c>1?l(i=>i-1):l(1)},className:B.button,disabled:e.quantity.available&&e.quantity.restrictions&&c<=e.quantity.restrictions.min||e.quantity.available===0,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Minus"})}),t.jsxRuntimeExports.jsx(t.Input$1,{type:"number",value:String(c),onChange:i=>{e.quantity.available&&Number(i)>e.quantity.available?l(e.quantity.available):l(Number(i))},max:((V=e.quantity.restrictions)==null?void 0:V.max)||e.quantity.available||Number.POSITIVE_INFINITY,min:((q=e.quantity.restrictions)==null?void 0:q.min)||0,centered:!0,disabled:e.quantity&&e.quantity.available===0||Object.keys(e.quantity.restrictions||{}).length!==0&&c>=e.quantity.restrictions.max}),t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:()=>{l(i=>i+1)},className:B.button,disabled:!!(e.quantity.available&&e.quantity.restrictions&&c>=e.quantity.restrictions.max||e.quantity.available===0||e.quantity.available&&c>=e.quantity.available),children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus"})})]}),t.jsxRuntimeExports.jsxs("div",{className:B.meta,children:[t.jsxRuntimeExports.jsxs("div",{className:B.info,children:[t.jsxRuntimeExports.jsx("span",{id:"md",children:"Delivery"}),t.jsxRuntimeExports.jsxs("div",{className:B.infoRight,children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"Lightning",fill:"var(--text-action)",width:20,height:20}),t.jsxRuntimeExports.jsx("span",{id:"md",children:!e.deliveryTime||e.deliveryTime===0?"Instant":A(e.deliveryTime)})]})]}),t.jsxRuntimeExports.jsxs("div",{className:B.info,children:[t.jsxRuntimeExports.jsx("span",{id:"md",children:"Price"}),t.jsxRuntimeExports.jsx("div",{className:B.infoRight,children:d==="ONE_TIME"?e.compareAtPrice&&(e.compareAtPrice.amount||0)-(e.price.amount||0)>0?t.jsxRuntimeExports.jsxs("div",{className:B.price,id:"md",children:[t.jsxRuntimeExports.jsx("span",{className:t.clx(B.newPrice,{[B.animate]:o}),children:t.formatPrice({amount:e.price.amount*c,currency:e.price.currency})}),t.jsxRuntimeExports.jsx("span",{className:B.oldPrice,id:"md",children:t.formatPrice({amount:e.compareAtPrice.amount*c,currency:e.compareAtPrice.currency})})]}):t.jsxRuntimeExports.jsx("span",{className:t.clx(B.newPrice,{[B.animate]:o}),id:"md",children:t.formatPrice({amount:e.price.amount*c,currency:e.price.currency})}):e.subscriptionSettings&&e.subscriptionSettings.compareAtPrice&&(e.subscriptionSettings.compareAtPrice.amount||0)-(e.subscriptionSettings.price.amount||0)>0?t.jsxRuntimeExports.jsxs("div",{className:B.price,id:"md",children:[t.jsxRuntimeExports.jsx("span",{className:t.clx(B.newPrice,{[B.animate]:o}),id:"md",children:t.formatPrice({amount:e.subscriptionSettings.price.amount*c,currency:e.subscriptionSettings.price.currency})}),t.jsxRuntimeExports.jsx("span",{className:B.oldPrice,id:"md",children:t.formatPrice({amount:e.subscriptionSettings.compareAtPrice.amount*c,currency:e.subscriptionSettings.compareAtPrice.currency})})]}):e.subscriptionSettings&&t.jsxRuntimeExports.jsx("span",{className:t.clx(B.newPrice,{[B.animate]:o}),id:"md",children:t.formatPrice({amount:e.subscriptionSettings.price.amount*c,currency:e.subscriptionSettings.price.currency})})})]})]}),t.jsxRuntimeExports.jsxs("div",{className:B.buttons,children:[t.jsxRuntimeExports.jsx(t.Button$1,{type:"Primary",onClick:()=>$(),disabled:e.quantity&&e.quantity.available===0||c===0,children:d==="ONE_TIME"?"Buy Now":"Subscribe Now"}),d==="ONE_TIME"&&s&&t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:()=>S(),disabled:e.quantity&&e.quantity.available===0||c===0,children:y.parts.some(i=>i.productId===n.id&&i.productVariantId===e.id)?"Add More":"Add to Cart"})]})]})},Ne="_buttons_1uy6y_23",Ce="_modal_1uy6y_32",Pe="_closing_1uy6y_65",ke="_info_1uy6y_114",Te="_top_1uy6y_121",we="_title_1uy6y_132",Be="_clear_1uy6y_139",Me="_activeClear_1uy6y_146",$e="_count_1uy6y_150",Oe="_cart_1uy6y_165",Ae="_empty_1uy6y_173",qe="_product_1uy6y_199",De="_products_1uy6y_208",Le="_image_1uy6y_216",Ue="_productInfo_1uy6y_233",He="_content_1uy6y_240",ze="_name_1uy6y_246",Fe="_price_1uy6y_252",Ve="_productButtons_1uy6y_258",Ye="_productButton_1uy6y_258",Ge="_productCount_1uy6y_275",We="_bottom_1uy6y_292",Xe="_subtotal_1uy6y_300",Qe="_block_1uy6y_308",Je="_shoppingCount_1uy6y_315",Ke="_total_1uy6y_335",Ze="_link_1uy6y_341",ts="_userInfo_1uy6y_348",es="_pagesMobileModal_1uy6y_360",ss="_pagesMobileModalContent_1uy6y_374",ns="_pagesMobileModalHeader_1uy6y_380",is="_pagesMobileModalFooter_1uy6y_390",os="_pageLink_1uy6y_397",rs="_rightButtons_1uy6y_406",C={buttons:Ne,modal:Ce,closing:Pe,info:ke,top:Te,title:we,clear:Be,activeClear:Me,count:$e,cart:Oe,empty:Ae,product:qe,products:De,image:Le,productInfo:Ue,content:He,name:ze,price:Fe,productButtons:Ve,productButton:Ye,productCount:Ge,bottom:We,subtotal:Xe,block:Qe,shoppingCount:Je,total:Ke,link:Ze,userInfo:ts,pagesMobileModal:es,pagesMobileModalContent:ss,pagesMobileModalHeader:ns,pagesMobileModalFooter:is,pageLink:os,rightButtons:rs,delete:"_delete_1uy6y_413"},as=u=>{const{shopping:n,signUp:r,isShowUserInfo:s=!0}=u;return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:(n||s)&&t.jsxRuntimeExports.jsxs("div",{className:C.buttons,children:[n&&t.jsxRuntimeExports.jsx(ot,{}),s&&t.jsxRuntimeExports.jsx(tt,{signUp:r})]})})},ot=()=>{const[u,n]=h.useState(!1),[r,s]=h.useState([]),[a,e]=h.useState(!1),{cart:x,products:d}=t.useCart();h.useEffect(()=>{(async()=>{const c=x.parts.map(g=>String(g.productId)),l=d.filter(g=>c.includes(String(g.id)))||[],y=x.parts.map(g=>{const m=l.find(o=>o.id===g.productId);return m?{...m,activeVariantId:g.productVariantId,quantity:g.quantity,chargeType:g.chargeType}:null}).filter(Boolean);s(y)})()},[x.parts,d]);function j(R){return!R||!(R!=null&&R.variants)?!1:R.chargeType==="RECURRING"}const f=x.parts.length>0&&r.length>0&&!j(r[0]);function k(){e(!1),setTimeout(()=>{n(!1)},300)}return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsxs(t.Button$1,{type:"Secondary",style:{padding:10,position:"relative"},onClick:R=>{R.stopPropagation(),window.location.pathname.includes("/admin/builder")||(n(!0),e(!0))},children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"Handbag"}),f&&t.jsxRuntimeExports.jsx("div",{className:C.shoppingCount,children:x.parts.length})]}),u&&t.jsxRuntimeExports.jsx(t.Modal,{close:k,withAnimation:!1,children:t.jsxRuntimeExports.jsx(rt,{activeProducts:r,isCartNotEmpty:f,isOpen:a,close:k})})]})},rt=u=>{var g,m;const{activeProducts:n,isCartNotEmpty:r,isOpen:s,close:a}=u,{cart:e,reset:x,getTotalAndDiscount:d,updateQuantityOfProduct:j,removeProduct:f}=t.useCart(),k=t.useNavigate();function R(o,_){k(o,{replace:_})}function c(o){o.quantity&&j({productId:o.id,productVariantId:o.activeVariantId,quantity:o.quantity+1,chargeType:o.chargeType})}function l(o){o.quantity&&j({productId:o.id,productVariantId:o.activeVariantId,quantity:o.quantity-1,chargeType:o.chargeType})}function y(o){f({productId:o.id,productVariantId:o.activeVariantId,quantity:o.quantity||1,chargeType:o.chargeType})}return t.jsxRuntimeExports.jsxs("div",{className:t.clx(C.modal,{[C.closing]:!s}),onClick:o=>o.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:C.top,children:[t.jsxRuntimeExports.jsxs("div",{className:C.info,children:[t.jsxRuntimeExports.jsx("span",{className:C.title,id:"h4",children:"Cart"}),r&&t.jsxRuntimeExports.jsx("div",{className:C.count,id:"md",children:e.parts.length})]}),t.jsxRuntimeExports.jsxs("div",{className:C.rightButtons,children:[r&&t.jsxRuntimeExports.jsx("button",{className:t.clx(C.clear,{[C.activeClear]:r}),disabled:!r,onClick:x,id:"md",children:"Clear all"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",onClick:a,hoverable:!0,width:24,height:24,fill:"var(--text-primary)"})]})]}),r?t.jsxRuntimeExports.jsxs("div",{className:C.cart,children:[t.jsxRuntimeExports.jsx("div",{className:C.products,children:n.map(o=>{var _,S;return t.jsxRuntimeExports.jsxs("div",{className:C.product,children:[t.jsxRuntimeExports.jsxs("div",{className:C.productInfo,children:[o.images.length>0?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${o.images[0].cfId}/w=500`,alt:"image",width:"100%",height:"100%",className:C.image}):t.jsxRuntimeExports.jsx("div",{className:C.image,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",fill:"var(--text-secondary)"})}),t.jsxRuntimeExports.jsxs("div",{className:C.content,children:[t.jsxRuntimeExports.jsx("div",{className:C.name,dangerouslySetInnerHTML:{__html:t.splitTextIntoSpans(((_=o.variants.find($=>$.id===o.activeVariantId))==null?void 0:_.name)||o.name)}}),t.jsxRuntimeExports.jsx("div",{className:C.price,children:t.formatPrice({amount:o.variants.find($=>$.id===o.activeVariantId).price.amount*((o==null?void 0:o.quantity)||1),currency:o.variants.find($=>$.id===o.activeVariantId).price.currency})})]})]}),t.jsxRuntimeExports.jsxs("div",{className:C.productButtons,children:[t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:()=>{o.quantity!==1&&l(o)},className:C.productButton,disabled:o.quantity===1,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Minus",fill:"#757575",width:20,height:20})}),t.jsxRuntimeExports.jsx("input",{className:C.productCount,type:"number",value:((S=o.quantity)==null?void 0:S.toString())||"",onChange:$=>{const A=Math.min(Number($.target.value),o.variants.find(V=>V.id===o.activeVariantId).quantity.available||1/0);A<1||j({productId:o.id,productVariantId:o.activeVariantId,quantity:A,chargeType:o.chargeType})},min:1,max:o.variants.find($=>$.id===o.activeVariantId).quantity.available||1/0}),t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:()=>c(o),className:C.productButton,disabled:o.quantity===o.variants.find($=>$.id===o.activeVariantId).quantity.available,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",fill:"#757575",width:20,height:20})}),t.jsxRuntimeExports.jsx("div",{className:C.delete,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",fill:"var(--text-action)",width:20,height:20,onClick:()=>y(o),hoverable:!0})})]})]},o.id)})}),t.jsxRuntimeExports.jsxs("div",{className:C.bottom,children:[t.jsxRuntimeExports.jsxs("div",{className:C.subtotal,children:[t.jsxRuntimeExports.jsxs("div",{className:C.block,children:[t.jsxRuntimeExports.jsx("span",{children:"Subtotal"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Info",width:20,height:20,fill:"#757575"})]}),t.jsxRuntimeExports.jsx("div",{className:C.total,children:t.formatPrice({amount:d().total,currency:e.parts.length>0&&((m=(g=n.find(o=>o.id===e.parts[0].productId))==null?void 0:g.variants.find(o=>o.id===e.parts[0].productVariantId))==null?void 0:m.price.currency)||"USD"})})]}),t.jsxRuntimeExports.jsx(t.Button$1,{onClick:()=>R("/checkout",!1),children:"Checkout"})]})]}):t.jsxRuntimeExports.jsx(at,{})]})},at=()=>t.jsxRuntimeExports.jsxs("div",{className:C.empty,children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Handbag",fill:"var(--text-secondary)"})}),t.jsxRuntimeExports.jsx("span",{id:"h5",children:"Empty Cart"}),t.jsxRuntimeExports.jsxs("span",{id:"md",children:["You don’t have any items in your shopping cart yet,"," ",t.jsxRuntimeExports.jsx("a",{href:"/products",className:C.link,id:"md",children:"view products"})]})]}),tt=({signUp:u,close:n})=>{const{token:r}=t.useStorefrontStore(),s=t.useNavigate(),[a,e]=h.useState("test-email@gmail.com");h.useEffect(()=>{r&&(async()=>{if(!r)return;const j=t.jwtDecode(r);e(j.email)})()},[r]);function x(d){window.location.pathname.includes("/admin/builder")||s(d)}return r?t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",className:C.userInfo,onClick:()=>{x("/customer-dash"),n==null||n()},children:t.jsxRuntimeExports.jsx("div",{children:a||"test-email@gmail.com"})}):t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(t.Button$1,{onClick:()=>{x("/customer-dash"),n==null||n()},type:"Secondary",style:{padding:10},children:"Login"}),u&&t.jsxRuntimeExports.jsx(t.Button$1,{onClick:()=>{x("/customer-dash"),n==null||n()},type:"Primary",style:{padding:10,whiteSpace:"nowrap"},children:"Sign Up"})]})},ct=({logo:u,setIsOpen:n,signUp:r,pages:s})=>{const{setIsOpen:a}=t.useModalStore(),e=()=>{a(!1),setTimeout(()=>{n(!1),a(!0)},300)};return t.jsxRuntimeExports.jsxs("div",{className:C.pagesMobileModal,onClick:x=>x.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:C.pagesMobileModalHeader,children:[t.jsxRuntimeExports.jsx("div",{children:u}),t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:e,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"X"})})]}),t.jsxRuntimeExports.jsx("div",{className:C.pagesMobileModalContent,children:s.length>0&&s.map(x=>t.jsxRuntimeExports.jsx("div",{className:C.pageLink,onClick:e,children:t.jsxRuntimeExports.jsx(et,{path:x.path,children:x.name["en-US"]},x.id)}))}),t.jsxRuntimeExports.jsx("div",{className:C.pagesMobileModalFooter,children:t.jsxRuntimeExports.jsx(tt,{signUp:r,close:e})})]})},cs=({logo:u,signUp:n,pages:r})=>{const[s,a]=h.useState(!1);return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(lt,{setIsOpenModal:a}),s&&t.jsxRuntimeExports.jsx(t.Modal,{close:()=>a(!1),hasPadding:!1,children:t.jsxRuntimeExports.jsx(ct,{logo:u,setIsOpen:a,signUp:n,pages:r})})]})},lt=u=>{const{setIsOpenModal:n}=u;return t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",style:{padding:10},onClick:r=>{r.stopPropagation(),window.location.pathname.includes("/admin/builder")||n(!0)},children:t.jsxRuntimeExports.jsx(t.Icon,{name:"List"})})},ls="_share_onabp_1",ds="_modal_onabp_8",us="_header_onabp_20",xs="_title_onabp_46",ms="_copyWrapper_onabp_53",ps="_copyText_onabp_62",js="_copyTextMobile_onabp_75",hs="_copyTextMiniMobile_onabp_94",Q={share:ls,modal:ds,header:us,title:xs,copyWrapper:ms,copyText:ps,copyTextMobile:js,copyTextMiniMobile:hs},gs=({title:u="Copy Product Link"})=>{const{isOpenModal:n,setIsOpenModal:r}=t.useShareLinkStore();function s(){r(!0)}return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(t.Button$1,{className:Q.share,onClick:a=>{a.stopPropagation(),s()},type:"Secondary",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Share",fill:"#757575",hoverable:!0})}),n&&t.jsxRuntimeExports.jsx(t.Modal,{close:r,children:t.jsxRuntimeExports.jsx(fs,{title:u})})]})},fs=({title:u="Copy Product Link"})=>{const{setIsOpenModal:n}=t.useShareLinkStore(),{notifications:r,setNotifications:s}=t.useNotificationStore(),{setIsOpen:a}=t.useModalStore(),e=window.location.href;function x(){navigator.clipboard.writeText(e),s([...r,{id:t.v4(),message:"Link copied to clipboard",status:"success"}])}function d(){a(!1),setTimeout(()=>{n(!1),a(!0)},300)}function j(f,k){return f.length>k?f.slice(0,k)+"...":f}return t.jsxRuntimeExports.jsxs("div",{className:Q.modal,onClick:f=>f.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:Q.header,children:[t.jsxRuntimeExports.jsx("div",{className:Q.title,id:"h4",children:u}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",fill:"#757575",onClick:d,hoverable:!0})]}),t.jsxRuntimeExports.jsxs("div",{className:Q.copyWrapper,children:[t.jsxRuntimeExports.jsxs(t.Button$1,{type:"Secondary",onClick:x,style:{flex:1},children:[t.jsxRuntimeExports.jsx("div",{className:Q.copyText,id:"md",children:j(e,100)}),t.jsxRuntimeExports.jsx("div",{className:Q.copyTextMobile,id:"md",children:j(e,40)}),t.jsxRuntimeExports.jsx("div",{className:Q.copyTextMiniMobile,id:"md",children:j(e,20)})]}),t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:x,children:r.find(f=>f.message==="Link copied to clipboard")?t.jsxRuntimeExports.jsx(t.Icon,{name:"Check"}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Copy"})})]})]})},ys="_accordion_153d4_1",_s="_header_153d4_12",Es="_icon_153d4_21",Rs="_open_153d4_24",bs="_content_153d4_28",vs="_contentOpen_153d4_36",Is="_contentText_153d4_40",J={accordion:ys,header:_s,icon:Es,open:Rs,content:bs,contentOpen:vs,contentText:Is},Ss=({title:u,content:n,defaultOpen:r=!1})=>{const[s,a]=h.useState(r),[e,x]=h.useState(0),d=h.useRef(null),j=()=>{a(!s)};return h.useEffect(()=>{d.current&&x(s?d.current.scrollHeight:0)},[s]),t.jsxRuntimeExports.jsxs("div",{className:J.accordion,children:[t.jsxRuntimeExports.jsxs("div",{className:J.header,onClick:j,children:[t.jsxRuntimeExports.jsx("h5",{id:"h5",children:u}),t.jsxRuntimeExports.jsx("div",{className:t.clx(J.icon,{[J.open]:s}),children:t.jsxRuntimeExports.jsx(t.Icon,{name:"CaretDown"})})]}),t.jsxRuntimeExports.jsx("div",{className:t.clx(J.content,{[J.contentOpen]:s}),children:t.jsxRuntimeExports.jsx("p",{id:"md",className:J.contentText,ref:d,style:{height:`${e}px`,marginTop:`${e>0?"20px":"0px"}`},children:n})})]})},et=({children:u,path:n,className:r,target:s="_self",id:a})=>{if(window.location.pathname.includes("/admin/builder"))return t.jsxRuntimeExports.jsx("div",{className:r,role:"link",style:{cursor:"pointer"},id:a,children:u});const e=t.useNavigate(),x=/^https?:\/\//.test(n),d=j=>{x||s==="_blank"?s==="_blank"?window.open(n,"_blank"):window.open(n,"_self"):(j.preventDefault(),e(n,{replace:!1}))};return t.jsxRuntimeExports.jsx("div",{onClick:d,className:r,role:"link",style:{cursor:"pointer"},id:a,children:u})},Ns="_buttonsBlock_1x6xf_1",Cs="_cartDisabled_1x6xf_25",st={buttonsBlock:Ns,cartDisabled:Cs},Ps=u=>{var k,R;const{setIsOpen:n,setModalType:r,productId:s,isCartEnabled:a=!0}=u,{cart:e}=t.useCart(),{pageContext:x}=t.usePagesStore(),d=(k=x==null?void 0:x.listings)==null?void 0:k.find(c=>c.id===s);if(!d)return null;const j=(R=x==null?void 0:x.products)==null?void 0:R.find(c=>c.uniquePath===d.productData.uniquePath);if(!j)return null;const f=e.parts.find(c=>c.productId===j.id);return t.jsxRuntimeExports.jsxs("div",{className:t.clx(st.buttonsBlock,{[st.cartDisabled]:!a}),onClick:c=>c.stopPropagation(),children:[a&&t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",style:{width:"100%"},onClick:()=>{r("Add To Cart"),n(!0)},children:f?"Add More":"Add To Cart"}),t.jsxRuntimeExports.jsx(t.Button$1,{type:"Primary",onClick:()=>{r("Buy Now"),n(!0)},style:{width:"100%"},children:"Buy"})]})},ks="_wrapper_27wzz_1",Ts="_logo_27wzz_8",ws="_info_27wzz_12",K={wrapper:ks,logo:Ts,info:ws},Bs=({date:u})=>{const{general:n}=t.useGeneralStore();if(!n)return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{});function r(s){const a=new Date(s),e={month:"short",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1};return a.toLocaleDateString("en-US",e)}return t.jsxRuntimeExports.jsxs("div",{className:K.wrapper,children:[t.jsxRuntimeExports.jsx("div",{className:K.logo,children:n.info.logo?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${n.info.logo.cfId}/w=500,h=500`,alt:"image",style:{objectFit:"contain",width:"48px",height:"48px"}}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:48,height:48})}),t.jsxRuntimeExports.jsxs("div",{className:K.info,children:[t.jsxRuntimeExports.jsx("h3",{id:"h4",children:n.info.name}),t.jsxRuntimeExports.jsx("p",{id:"p",children:r(u)})]})]})},Ms="_variants_18tbu_82",$s="_variant_18tbu_82",Os="_stock_18tbu_100",As="_variantInfo_18tbu_108",qs="_title_18tbu_202",Ds="_modal_18tbu_208",Ls="_header_18tbu_228",Us="_productOptions_18tbu_236",Hs="_loading_18tbu_244",W={variants:Ms,variant:$s,stock:Os,variantInfo:As,title:qs,modal:Ds,header:Ls,productOptions:Us,loading:Hs},zs=u=>{var c;const{pageContext:n}=t.usePagesStore(),r=(c=n==null?void 0:n.listings)==null?void 0:c.find(l=>l.id===u.productId),[s,a]=h.useState(!0),[e,x]=h.useState(null),d=(e==null?void 0:e.variants[0])||null,[j,f]=h.useState("ONE_TIME"),{addProducts:k}=t.useCart(),{setIsOpen:R}=t.useModalStore();return h.useEffect(()=>{(async()=>{a(!0);const y=await t.getDynamicPage(encodeURIComponent(`/product/${r.productData.uniquePath}`));k(y==null?void 0:y.data.products),x(y==null?void 0:y.data.products[0]),a(!1)})()},[]),h.useEffect(()=>{R(!0)},[]),t.jsxRuntimeExports.jsx(t.Modal,{close:u.setIsOpen,children:t.jsxRuntimeExports.jsxs("div",{className:W.modal,onClick:l=>l.stopPropagation(),children:[s&&t.jsxRuntimeExports.jsx("div",{className:W.loading,children:t.jsxRuntimeExports.jsx(t.Loader,{})}),u.type==="Add To Cart"&&u.isCartEnabled&&e&&d&&!s&&t.jsxRuntimeExports.jsx(Fs,{variants:e.variants,activeVariant:d,activeChargeType:j,setActiveChargeType:f,productId:e.id,setIsOpen:u.setIsOpen}),u.type==="Buy Now"&&e&&!s&&t.jsxRuntimeExports.jsx(Vs,{product:e,setIsOpen:u.setIsOpen,isCartEnabled:u.isCartEnabled})]})})},Fs=u=>{const{variants:n,activeChargeType:r,productId:s,setIsOpen:a}=u,{cart:e,addProductToCart:x,addProducts:d,updateQuantityOfProduct:j}=t.useCart(),{notifications:f,setNotifications:k}=t.useNotificationStore(),{pageContext:R}=t.usePagesStore(),{setIsOpen:c}=t.useModalStore(),l=()=>{c(!1),setTimeout(()=>{a(!1)},300)};async function y(g){const m=n.find(S=>S.id===g),o=e.parts.find(S=>S.productId===u.productId&&S.productVariantId===g);if((m==null?void 0:m.quantity.available)&&(m==null?void 0:m.quantity.restrictions)&&((o==null?void 0:o.quantity)||0)+1>(m==null?void 0:m.quantity.restrictions.max)||(m==null?void 0:m.quantity.available)===0||(m==null?void 0:m.quantity.available)&&((o==null?void 0:o.quantity)||0)+1>(m==null?void 0:m.quantity.available)){k([...f,{id:t.v4(),message:"Product is out of stock",status:"error"}]);return}if(o)j({productId:s,productVariantId:g,quantity:o.quantity+1,chargeType:r});else{R!=null&&R.products&&d(R.products);try{x({productId:s,productVariantId:g,quantity:1,chargeType:r}),k([...f,{id:t.v4(),message:"Product added to cart",status:"success"}])}catch(S){k([...f,{id:t.v4(),message:`Product failed to add to cart: ${S}`,status:"error"}])}}}return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsxs("div",{className:W.header,children:[t.jsxRuntimeExports.jsx("div",{id:"h3",children:"Choose a Variant"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",width:24,height:24,fill:"var(--text-secondary)",hoverable:!0,onClick:l})]}),t.jsxRuntimeExports.jsx("div",{className:W.variants,children:n.filter(g=>{var m;return(m=g.chargeTypes)==null?void 0:m.includes(r)}).map(g=>{var m,o,_;return t.jsxRuntimeExports.jsxs("div",{className:t.clx(W.variant),onClick:()=>{y(g.id),a(!1)},children:[t.jsxRuntimeExports.jsxs("div",{className:W.variantInfo,children:[t.jsxRuntimeExports.jsx("span",{className:W.title,id:"h4",children:g.name}),t.jsxRuntimeExports.jsx("span",{id:"md",children:t.formatPrice({amount:r==="ONE_TIME"?g.price.amount:g.subscriptionSettings?g.subscriptionSettings.price.amount:0,currency:r==="ONE_TIME"?g.price.currency:((m=g.subscriptionSettings)==null?void 0:m.price.currency)||"USD"})})]}),t.jsxRuntimeExports.jsx("div",{id:"md",children:r==="ONE_TIME"&&t.jsxRuntimeExports.jsxs("span",{className:W.stock,id:"md",children:[(o=g.quantity.restrictions)!=null&&o.max||g.quantity.available!==void 0?((_=g.quantity.restrictions)==null?void 0:_.max)||g.quantity.available:"∞"," ","in stock"]})})]},g.id)})})]})},Vs=u=>{const{product:n,setIsOpen:r,isCartEnabled:s}=u,{setIsOpen:a}=t.useModalStore(),e=()=>{a(!1),setTimeout(()=>{r(!1)},300)};return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsxs("div",{className:W.header,children:[t.jsxRuntimeExports.jsx("div",{id:"h3",className:W.title,dangerouslySetInnerHTML:{__html:`Buy ${t.splitTextIntoSpans(n.name)}`}}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",width:24,height:24,fill:"var(--text-secondary)",hoverable:!0,onClick:e,style:{minWidth:24,minHeight:24}})]}),t.jsxRuntimeExports.jsx("div",{className:W.productOptions,children:t.jsxRuntimeExports.jsx(it,{product:n,setIsOpen:r,isCartEnabled:s})})]})},Ys="_contentModal_m2tf9_1",Gs="_modalTop_m2tf9_12",Ws="_loading_m2tf9_19",Xs="_modalCards_m2tf9_28",Qs="_modalImage_m2tf9_34",Js="_card_m2tf9_39",Ks="_cardInfo_m2tf9_51",Zs="_cardButtons_m2tf9_58",tn="_title_m2tf9_64",en="_blockImage_m2tf9_71",sn="_short_m2tf9_80",nn="_price_m2tf9_84",on="_oldPrice_m2tf9_91",rn="_newPrice_m2tf9_100",D={contentModal:Ys,modalTop:Gs,loading:Ws,modalCards:Xs,modalImage:Qs,card:Js,cardInfo:Ks,cardButtons:Zs,title:tn,blockImage:en,short:sn,price:nn,oldPrice:on,newPrice:rn},an=u=>{const{setIsOpen:n,pageContext:r,groupData:s,setProductId:a,setIsProductModalOpen:e,setShowDropdown:x}=u,[d,j]=h.useState(null),[f,k]=h.useState(!0),{setIsOpen:R}=t.useModalStore();h.useEffect(()=>{var y;k(!0);const l=(y=r.listings)==null?void 0:y.filter(g=>s.listingIdList.includes(g.id));l&&j([...l]),k(!1)},[r]),h.useEffect(()=>{R(!0)},[]);const c=()=>{R(!1),setTimeout(()=>{n(!1)},300)};return t.jsxRuntimeExports.jsx(t.Modal,{close:()=>n(!1),children:t.jsxRuntimeExports.jsxs("div",{className:D.contentModal,onClick:l=>l.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:D.modalTop,children:[t.jsxRuntimeExports.jsx("span",{className:D.title,id:"h4",dangerouslySetInnerHTML:{__html:t.splitTextIntoSpans(s.name)}}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",hoverable:!0,onClick:c,fill:"var(--text-primary)"})]}),!f&&d&&t.jsxRuntimeExports.jsx("div",{className:D.modalCards,children:d.map(l=>t.jsxRuntimeExports.jsxs("div",{className:D.card,children:[t.jsxRuntimeExports.jsx("div",{children:l.productData.images[0]?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${l.productData.images[0].cfId}/w=500`,alt:"",width:64,height:64,className:D.modalImage}):t.jsxRuntimeExports.jsx("div",{className:t.clx(D.blockImage,D.modalImage),children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Image"})})}),t.jsxRuntimeExports.jsxs("div",{className:D.cardInfo,children:[t.jsxRuntimeExports.jsx("div",{id:"h5",children:l.productData.compareAtPrice&&(l.productData.compareAtPrice.amount||0)-(l.productData.minPrice.amount||0)>0?t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.splitTextIntoSpans(l.productData.name,!1),t.jsxRuntimeExports.jsxs("span",{className:D.price,id:"md",children:[t.jsxRuntimeExports.jsx("span",{className:D.newPrice,id:"md",children:t.formatPrice({amount:l.productData.minPrice.amount,currency:l.productData.minPrice.currency})}),t.jsxRuntimeExports.jsx("span",{className:D.oldPrice,id:"md",children:t.formatPrice({amount:l.productData.compareAtPrice.amount,currency:l.productData.compareAtPrice.currency})})]})]}):t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.splitTextIntoSpans(l.productData.name,!1),t.jsxRuntimeExports.jsx("span",{className:D.newPrice,id:"md",children:t.formatPrice({amount:l.productData.minPrice.amount,currency:l.productData.minPrice.currency})})]})}),l.productData.shortDescription&&t.jsxRuntimeExports.jsx("span",{className:D.short,id:"md",dangerouslySetInnerHTML:{__html:t.splitTextIntoSpans(l.productData.shortDescription)}})]}),t.jsxRuntimeExports.jsxs("div",{className:D.cardButtons,children:[t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:()=>{a(l.id),n(!1),e(!0)},children:"Buy"}),t.jsxRuntimeExports.jsx(et,{path:`/product/${l.productData.uniquePath}`,children:t.jsxRuntimeExports.jsx(t.Button$1,{type:"Primary",style:{whiteSpace:"nowrap"},onClick:()=>{x(!1),c()},children:"View Details"})})]})]},l.id))}),f&&t.jsxRuntimeExports.jsx("div",{className:D.loading,children:t.jsxRuntimeExports.jsx(t.Loader,{})})]})})};exports.AlignText=t.AlignText;exports.Button=t.Button$1;exports.ChooseImage=t.ChooseImage;exports.ChooseImageModal=t.ChooseImageModal;exports.Icon=t.Icon;exports.InputSettings=t.Input;exports.InputUI=t.Input$1;exports.ItemsSettings=t.ItemsSettings;exports.Loader=t.Loader;exports.Modal=t.Modal;exports.RadioUI=t.Radio;exports.RangeSelector=t.RangeSelector;exports.Select=t.Select;exports.SelectInfiniteList=t.SelectInfiniteList;exports.SelectTypeText=t.SelectTypeText;exports.SelectUI=t.Select$1;exports.Switch=t.Switch;exports.TextSettings=t.TextSettings;exports.TextareaSettings=t.Textarea;exports.TextareaUI=t.Textarea$1;exports.TypesText=t.TypesText;exports.Wrapper=t.Wrapper;exports.Accordion=Ss;exports.BurgerMenuButton=lt;exports.ButtonTypeSettings=nt;exports.ButtonsSettings=ie;exports.CategorySettings=$t;exports.ChargeTypes=Z;exports.EmptyCart=at;exports.FormSettings=Qt;exports.GroupCardModal=an;exports.HeaderButtons=as;exports.LayoutSettings=Rt;exports.Link=et;exports.ListingSelector=re;exports.MetaInfoPost=Bs;exports.PagesMobileMenu=cs;exports.PagesMobileModal=ct;exports.PagesSettings=Wt;exports.ProductCardButtons=Ps;exports.ProductCardModal=zs;exports.ProductOptions=it;exports.ShareLink=gs;exports.ShoppingButton=ot;exports.ShoppingModalCart=rt;exports.UserInfo=tt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-_M52HeAv.cjs"),h=require("react");require("react-dom");const dt="_block_kh9z8_8",ut="_title_kh9z8_16",xt="_subtitle_kh9z8_23",mt="_alignmentContent_kh9z8_30",pt="_alignments_kh9z8_39",jt="_alignment_kh9z8_30",ht="_circle_kh9z8_64",gt="_paddings_kh9z8_71",ft="_padding_kh9z8_71",yt="_active_kh9z8_97",z={block:dt,title:ut,subtitle:xt,alignmentContent:mt,alignments:pt,alignment:jt,circle:ht,paddings:gt,padding:ft,active:yt},_t=["topLeft","top","topRight","left","center","right","bottomLeft","bottom","bottomRight"],Et=["left","top","right","bottom"],Rt=u=>{const{alignment:n,padding:r,setPadding:s,setAlignment:a,isAlignment:e=!0,isPadding:x=!0}=u;function d(l){switch(l){case"left":case"topLeft":case"bottomLeft":return"TextAlignLeft";case"right":case"topRight":case"bottomRight":return"TextAlignRight";case"center":case"top":case"bottom":return"TextAlignCenter";default:return"TextAlignCenter"}}function j(l){switch(l){case"left":return"AlignLeft";case"right":return"AlignRight";case"top":return"AlignTop";case"bottom":return"AlignBottom"}}const[f,k]=h.useState(null),[R,c]=h.useState(null);return t.jsxRuntimeExports.jsxs("div",{className:z.layout,children:[t.jsxRuntimeExports.jsx("h3",{className:z.title,children:"Layout (for Desktop version)"}),t.jsxRuntimeExports.jsxs("div",{className:z.alignmentContent,children:[e&&t.jsxRuntimeExports.jsxs("div",{className:z.block,children:[t.jsxRuntimeExports.jsx("h5",{className:z.subtitle,children:"Alignment"}),t.jsxRuntimeExports.jsx("div",{className:z.alignments,children:_t.map(l=>t.jsxRuntimeExports.jsxs("div",{onClick:()=>{a(l)},className:z.alignment,onMouseEnter:()=>{k(l)},onMouseLeave:()=>{k(null)},children:[l!==n&&f!==l&&t.jsxRuntimeExports.jsx("div",{className:z.circle}),l!==n&&f===l&&t.jsxRuntimeExports.jsx(t.Icon,{name:d(f),fill:"#c2c2c2",width:22,height:22}),l===n&&t.jsxRuntimeExports.jsx(t.Icon,{name:d(n),fill:"#FF3F19",width:22,height:22})]},l))})]}),x&&t.jsxRuntimeExports.jsxs("div",{className:z.block,children:[t.jsxRuntimeExports.jsx("h5",{className:z.subtitle,children:"Paddings"}),t.jsxRuntimeExports.jsx("div",{className:z.paddings,children:Et.map(l=>t.jsxRuntimeExports.jsxs("label",{className:t.clx(z.padding,{[z.active]:R===l}),onFocus:()=>{c(l)},onBlur:()=>{c(null)},children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:j(l),width:20,height:20})}),t.jsxRuntimeExports.jsx(t.Input,{type:"number",value:String(r[l]),onChange:y=>s({...r,[l]:Math.min(Number(y),999)}),max:999,paddingless:!0,borderless:!0})]},l))})]})]})]})},bt="_title_82zux_1",vt="_subtitle_82zux_5",It="_productsBlock_82zux_14",St="_top_82zux_26",Nt="_products_82zux_14",Ct="_product_82zux_14",Pt="_button_82zux_80",kt="_disabled_82zux_91",Tt="_buttons_82zux_118",wt="_addButton_82zux_157",Bt="_deleteButton_82zux_179",F={title:bt,subtitle:vt,productsBlock:It,top:St,products:Nt,product:Ct,button:Pt,disabled:kt,buttons:Tt,addButton:wt,deleteButton:Bt};function Mt({id:u,children:n}){const{attributes:r,listeners:s,setNodeRef:a,transform:e,transition:x,isDragging:d}=t.useSortable({id:u}),j={transform:t.CSS.Transform.toString(e),transition:x};return t.jsxRuntimeExports.jsx("div",{ref:a,style:j,className:`${F.product} ${d?F.dragging:""}`,...r,...s,children:n})}const $t=u=>{const{isActiveItems:n,setIsActiveItems:r,items:s,setItems:a,other:e,tags:x,title:d,subtitle:j,draggable:f=!1,withImage:k=!1,addable:R=!0,itemsOptions:c,hasRangeSelector:l=!1,rangeSelectorOptions:y,limit:g,autoScrollInterval:m,deletable:o,aspectRatio:_,setAspectRatio:S}=u,$=t.useSensors(t.useSensor(t.PointerSensor,{activationConstraint:{distance:5}})),A=i=>{const{active:b,over:N}=i;if(N&&b.id!==N.id){const M=s.findIndex(v=>v===b.id),w=s.findIndex(v=>v===N.id);if(M!==-1&&w!==-1){const v=[...s],[Y]=v.splice(M,1);v.splice(w,0,Y),a(v)}}};function V(i){if(k)return i?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${i[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const q=(i,b=!1)=>{const N=c.find(w=>w.id===i);if(!N)return;const M=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[f&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),t.jsxRuntimeExports.jsx(t.Select,{onChange:w=>{const v=[...s],Y=c.find(p=>p.name===w);if(!Y)return;const E=Y.id,O=v.map(p=>p===i?E:p);a([...O])},value:N.name,options:c.filter(w=>!s.find(v=>v===w.id)).map(w=>w.name),leftAddonOptions:c.map(w=>({value:w.name,addon:V(w.images)}))}),b&&t.jsxRuntimeExports.jsx("div",{className:F.buttons,children:t.jsxRuntimeExports.jsx("div",{className:F.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>a(s.filter(w=>w!==i))})})})]});return f?t.jsxRuntimeExports.jsx(Mt,{id:i,children:M},t.v4()):t.jsxRuntimeExports.jsx("div",{className:F.product,children:M},t.v4())};return t.jsxRuntimeExports.jsxs("div",{className:F.productsBlock,children:[(d||n!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:F.top,children:[d&&t.jsxRuntimeExports.jsx("h3",{className:F.title,children:d}),n!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:n,onChange:i=>r==null?void 0:r(i)})]}),l&&y&&t.jsxRuntimeExports.jsx(t.RangeSelector,{...y}),t.jsxRuntimeExports.jsxs("div",{className:F.products,children:[j&&t.jsxRuntimeExports.jsx("h5",{className:F.subtitle,children:j}),f?t.jsxRuntimeExports.jsx(t.DndContext,{sensors:$,onDragEnd:A,children:t.jsxRuntimeExports.jsx(t.SortableContext,{items:s,strategy:t.verticalListSortingStrategy,children:s.map(i=>q(i,o))})}):s.map(i=>q(i,o)),R&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center",gap:5},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:t.clx(F.button,{[F.disabled]:!!(g&&g<=s.length||s.length===c.length)}),size:"s",disabled:!!(g&&g<=s.length||s.length===c.length),onClick:()=>{const i=[...s];let b=null;if(c){for(let N=0;N<c.length;N++)if(!s.find(M=>M===c[N].id)){b=c[N];break}}i.push((b==null?void 0:b.id)||c[0].id),a(i)},style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:F.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]}),_&&S&&t.jsxRuntimeExports.jsx(t.Select,{value:_,label:"Aspect Ratio",options:Object.keys(t.aspectRatio),onChange:i=>S(i),leftAddonOptions:t.aspectRatioOptions}),x!==void 0&&t.jsxRuntimeExports.jsx(t.OtherAndTagsSettings,{tagsTitle:"Tags",items:x}),e!==void 0&&t.jsxRuntimeExports.jsx(t.OtherAndTagsSettings,{otherTitle:"Other",items:e}),m!==void 0&&t.jsxRuntimeExports.jsx(t.Input,{label:"Auto scroll interval",type:"number",value:String(m.scrollInterval),onChange:i=>m.setScrollInterval(Number(i)),min:.1,max:100,style:{width:"100%"},postfix:"sec."})]})},Ot="_title_roi3a_1",At="_subtitle_roi3a_5",qt="_productsBlock_roi3a_14",Dt="_top_roi3a_26",Lt="_products_roi3a_14",Ut="_product_roi3a_14",Ht="_button_roi3a_80",zt="_disabled_roi3a_91",Ft="_buttons_roi3a_118",Vt="_addButton_roi3a_164",Yt="_deleteButton_roi3a_179",H={title:Ot,subtitle:At,productsBlock:qt,top:Dt,products:Lt,product:Ut,button:Ht,disabled:zt,buttons:Ft,addButton:Vt,deleteButton:Yt};function Gt({product:u,children:n}){const{attributes:r,listeners:s,setNodeRef:a,transform:e,transition:x,isDragging:d}=t.useSortable({id:u.id}),j={transform:t.CSS.Transform.toString(e),transition:x};return t.jsxRuntimeExports.jsx("div",{ref:a,style:j,className:`${H.product} ${d?H.dragging:""}`,...r,...s,children:n})}const Wt=u=>{const{isActiveItems:n,setIsActiveItems:r,items:s,setItems:a,title:e,subtitle:x,editable:d=!0,draggable:j=!1,deletable:f=!0,addable:k=!0,itemsType:R,itemsOptions:c,addableOptions:l={},limit:y}=u,[g,m]=h.useState(null),[o,_]=h.useState(null),S=h.useRef(null),$=t.useSensors(t.useSensor(t.PointerSensor,{activationConstraint:{distance:5}}));h.useEffect(()=>{if(g){const i=[...s].map(b=>b.id===g.id?g:b);a(i)}},[g]),h.useEffect(()=>{S.current&&o&&(S.current.getBoundingClientRect().height,o.top)},[S.current,o]);const A=(i,b)=>{i.stopPropagation();const N=i.target.getBoundingClientRect();_({top:N.top+window.scrollY,left:N.left-30}),m(b)},V=i=>{const{active:b,over:N}=i;if(N&&b.id!==N.id){const M=s.findIndex(v=>v.id===b.id),w=s.findIndex(v=>v.id===N.id);if(M!==-1&&w!==-1){const v=[...s],[Y]=v.splice(M,1);v.splice(w,0,Y),a(v)}}},q=(i,b)=>{const N=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[j&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),R==="select"&&c&&t.jsxRuntimeExports.jsx(t.Select,{onChange:M=>{const w=[...s],v=c.find(E=>E.name===M);if(!v)return;const Y=w.map(E=>E.id===i.id?{...v,name:{"en-US":M}}:E);m({...i,name:{"en-US":M}}),a([...Y])},value:i.name,options:c.filter(M=>!s.find(w=>w.name===M.name)).map(M=>M.name)}),t.jsxRuntimeExports.jsxs("div",{className:H.buttons,children:[d&&t.jsxRuntimeExports.jsx("div",{className:H.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:M=>A(M,i)})}),f&&t.jsxRuntimeExports.jsx("div",{className:H.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>a(s.filter(M=>M.id!==i.id))})})]})]});return j?t.jsxRuntimeExports.jsx(Gt,{product:i,index:b,children:N},i.id):t.jsxRuntimeExports.jsx("div",{className:H.product,children:N},i.id)};return t.jsxRuntimeExports.jsxs("div",{className:H.productsBlock,children:[(e||n!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:H.top,children:[e&&t.jsxRuntimeExports.jsx("h3",{className:H.title,children:e}),n!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:n,onChange:i=>r==null?void 0:r(i)})]}),t.jsxRuntimeExports.jsxs("div",{className:H.products,children:[x&&t.jsxRuntimeExports.jsx("h5",{className:H.subtitle,children:x}),j?t.jsxRuntimeExports.jsx(t.DndContext,{sensors:$,onDragEnd:V,children:t.jsxRuntimeExports.jsx(t.SortableContext,{items:s.map(i=>i.id),strategy:t.verticalListSortingStrategy,children:s.map((i,b)=>q(i,b))})}):s.map((i,b)=>q(i,b)),k&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:t.clx(H.button,{[H.disabled]:!!(y&&y<=s.length||s.length===(c==null?void 0:c.length))}),size:"s",disabled:!!(y&&y<=s.length||s.length===(c==null?void 0:c.length)),onClick:()=>{const i=[...s];let b=null;if(c){for(let N=0;N<c.length;N++)if(!s.find(M=>M.id===c[N].id)){b=c[N];break}}R==="select"&&c&&i.push({name:b?b.name:c[0].name,id:(b==null?void 0:b.id)||c[0].id,...l}),a(i)},style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:H.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]})]})};function Xt(u){const{product:n,children:r}=u,{attributes:s,listeners:a,setNodeRef:e,transform:x,transition:d,isDragging:j}=t.useSortable({id:n.id}),f={transform:t.CSS.Transform.toString(x),transition:d};return t.jsxRuntimeExports.jsx("div",{ref:e,style:f,className:`${t.styles.product} ${j?t.styles.dragging:""}`,...s,...a,children:r})}const Qt=u=>{const{isActiveItems:n,setIsActiveItems:r,items:s,setItems:a,other:e,title:x,subtitle:d,editable:j=!0,draggable:f=!1,deletable:k=!0,addable:R=!0,itemsType:c,itemsPlaceholder:l="",itemsOptions:y,hasRangeSelector:g=!1,rangeSelectorOptions:m,modalOptions:o,addableOptions:_={},limit:S}=u,[$,A]=h.useState(null),[V,q]=h.useState({top:0,left:0}),[i,b]=h.useState(null),N=h.useRef(null),[M,w]=h.useState(!1),v=t.useSensors(t.useSensor(t.PointerSensor,{activationConstraint:{distance:5}}));h.useEffect(()=>{const p=()=>{A(null),w(!1)};return document.body.addEventListener("click",p),A(null),w(!1),()=>{A(null),w(!1),document.body.removeEventListener("click",p)}},[]),h.useEffect(()=>{if($){const p=[...s].map(I=>I.id===$.id?$:I);a(p)}},[$]),h.useEffect(()=>{if(N.current&&i){const p=N.current.getBoundingClientRect().height,I=window.innerHeight;let T=i.top;T+p>I+window.scrollY-200&&(T=I+window.scrollY-p-200),T<0&&(T=10),q({top:T,left:i.left})}},[N.current,i]);const Y=(p,I)=>{p.stopPropagation();const T=p.target.getBoundingClientRect();b({top:T.top+window.scrollY,left:T.left-30}),A(I),w(!0)},E=p=>{const{active:I,over:T}=p;if(T&&I.id!==T.id){const P=s.findIndex(L=>L.id===I.id),G=s.findIndex(L=>L.id===T.id);if(P!==-1&&G!==-1){const L=[...s],[U]=L.splice(P,1);L.splice(G,0,U),a(L)}}},O=p=>{var T;const I=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[f&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),c==="select"&&y&&t.jsxRuntimeExports.jsx(t.Select,{onChange:P=>{const L=[...s].map(U=>U.id===p.id?{...p,name:{"en-US":P}}:U);A({...p,name:{"en-US":P}}),a([...L])},value:p.name["en-US"],options:y.filter(P=>!s.find(G=>G.name["en-US"]===P))}),c==="input"&&t.jsxRuntimeExports.jsx(t.Input,{onChange:P=>{const L=[...s].map(U=>U.id===p.id?{...p,name:{"en-US":P}}:U);a([...L])},value:p.name["en-US"],placeholder:l}),c==="image"&&t.jsxRuntimeExports.jsx(t.ChooseImage,{onChange:P=>{const L=[...s].map(U=>U.id===p.id?{...p,images:P}:U);a([...L])},activeImage:(T=s.find(P=>P.id===p.id))==null?void 0:T.images[0]}),t.jsxRuntimeExports.jsxs("div",{className:t.styles.buttons,children:[j&&t.jsxRuntimeExports.jsx("div",{className:t.styles.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:P=>Y(P,p)})}),k&&t.jsxRuntimeExports.jsx("div",{className:t.styles.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>a(s.filter(P=>P.id!==p.id))})})]})]});return f?t.jsxRuntimeExports.jsx(Xt,{product:p,children:I},p.id):t.jsxRuntimeExports.jsx("div",{className:t.styles.product,children:I},p.id)};return t.jsxRuntimeExports.jsxs("div",{className:t.styles.productsBlock,children:[(x||n!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:t.styles.top,children:[x&&t.jsxRuntimeExports.jsx("h3",{className:t.styles.title,children:x}),n!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:n,onChange:p=>r==null?void 0:r(p)})]}),$&&j&&o&&M&&t.jsxRuntimeExports.jsx(t.ItemPopup,{ref:N,activeItem:$,setActiveItem:A,popupPosition:V,modalOptions:o,setIsOpenModal:w}),g&&m&&t.jsxRuntimeExports.jsx(t.RangeSelector,{...m}),t.jsxRuntimeExports.jsxs("div",{className:t.styles.products,children:[d&&t.jsxRuntimeExports.jsx("h5",{className:t.styles.subtitle,children:d}),f?t.jsxRuntimeExports.jsx(t.DndContext,{sensors:v,onDragEnd:E,children:t.jsxRuntimeExports.jsx(t.SortableContext,{items:s.map(p=>p.id),strategy:t.verticalListSortingStrategy,children:s.map(p=>O(p))})}):s.map(p=>O(p)),R&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:t.clx(t.styles.button,{[t.styles.disabled]:!!(S&&S<=s.length)}),size:"s",disabled:!!(S&&S<=s.length),onClick:()=>{const p=[...s];let I=null;if(y){for(let T=0;T<y.length;T++)if(!s.find(P=>P.name["en-US"]===y[T])){I=y[T];break}}c==="select"&&y?p.push({name:{"en-US":I||y[0]},id:t.v4(),..._,maxSymbols:100}):c==="input"?p.push({name:{"en-US":""},id:t.v4(),..._,maxSymbols:100}):p.push({name:{"en-US":`Image ${s.length+1}`},id:t.v4(),..._,maxSymbols:100}),a(p)},style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:t.styles.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]}),e!==void 0&&t.jsxRuntimeExports.jsx(t.OtherAndTagsSettings,{otherTitle:"Other",items:e})]})},Jt="_subtitle_jql1y_1",Kt="_products_jql1y_10",Zt="_product_jql1y_10",te="_button_jql1y_11",ee="_buttons_jql1y_11",se="_addButton_jql1y_150",ne="_deleteButton_jql1y_165",X={subtitle:Jt,products:Kt,product:Zt,button:te,buttons:ee,addButton:se,deleteButton:ne},nt=u=>{const{buttons:n,setButtons:r,deletable:s=!0,addable:a=!0,editableLink:e=!0}=u,{pages:x}=t.usePagesStore(),[d,j]=h.useState(null),[f,k]=h.useState({top:0,left:0}),[R,c]=h.useState(null),l=h.useRef(null);h.useEffect(()=>{if(d){const m=[...n].map(o=>o.id===d.id?d:o);r(m)}},[d]),h.useEffect(()=>{if(l.current&&R){const m=l.current.getBoundingClientRect().height,o=window.innerHeight;let _=R.top;_+m>o+window.scrollY-200&&(_=o+window.scrollY-m-200),_<0&&(_=10),k({top:_,left:R.left})}},[l.current,R]);const y=(m,o)=>{m.stopPropagation();const _=m.target.getBoundingClientRect();c({top:_.top+window.scrollY-70,left:_.left-(a?30:65)}),j(o)},g=(m,o)=>{const _=[...n],S={...m,id:Math.random().toString(36).substr(2,9)};_.splice(o+1,0,S),r(_)};return t.jsxRuntimeExports.jsxs("div",{className:X.products,children:[t.jsxRuntimeExports.jsx("h5",{className:X.subtitle,children:"Button Type"}),n.map((m,o)=>t.jsxRuntimeExports.jsxs("div",{className:X.product,children:[t.jsxRuntimeExports.jsx(t.Select,{onChange:_=>{const $=[...n].map(A=>A.id===m.id?{...m,type:_}:A);r($)},value:m.type,options:["Primary","Secondary","Tertiary"]}),t.jsxRuntimeExports.jsxs("div",{className:X.buttons,children:[t.jsxRuntimeExports.jsx("div",{className:X.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Copy",hoverable:!0,width:20,height:20,onClick:()=>{g(m,o)}})}),t.jsxRuntimeExports.jsx("div",{className:X.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:_=>{y(_,m)}})}),s&&t.jsxRuntimeExports.jsx("div",{className:X.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,onClick:()=>{const _=n.filter(S=>S.id!==m.id);r(_)},width:20,height:20,fill:"#C12A2A"})})]})]},m.id)),d&&t.jsxRuntimeExports.jsx(t.ButtonPopup,{ref:l,activeButton:d,setActiveButton:j,popupPosition:f,editableLink:e}),a&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:X.button,size:"s",onClick:()=>{const m=[...n];e?m.push({type:"Primary",id:t.v4(),typesText:[],text:{"en-US":"Button Name"},destination:"Go to Page",page:x?Object.values(x)[0].path:"/",openInNewTab:!1}):m.push({type:"Primary",id:t.v4(),typesText:[],text:{"en-US":"Create Ticket"},destination:"Go to Page",page:x?Object.values(x)[0].path:"/",openInNewTab:!1}),r(m)},style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:X.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]})},ie=u=>{const{isActiveButtons:n,setIsActiveButtons:r,buttons:s,setButtons:a,editableLink:e=!0,addable:x=!0,deletable:d=!0}=u;return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:t.jsxRuntimeExports.jsxs("div",{className:t.styles$1.buttonsBlock,children:[t.jsxRuntimeExports.jsxs("div",{className:t.styles$1.top,children:[t.jsxRuntimeExports.jsx("h3",{className:t.styles$1.title,children:"Buttons"}),t.jsxRuntimeExports.jsx(t.Switch,{current:n,onChange:j=>r(j)})]}),n&&t.jsxRuntimeExports.jsx(nt,{buttons:s,setButtons:a,editableLink:e,addable:x,deletable:d})]})})};function oe(u){const{product:n,children:r}=u,{attributes:s,listeners:a,setNodeRef:e,transform:x,transition:d,isDragging:j}=t.useSortable({id:String(n.listingId)}),f={transform:t.CSS.Transform.toString(x),transition:d};return t.jsxRuntimeExports.jsx("div",{ref:e,style:f,className:`${t.styles$2.product} ${j?t.styles$2.dragging:""}`,...s,...a,children:r})}const re=u=>{const{isActiveItems:n,setIsActiveItems:r,items:s,setItems:a,other:e,title:x,subtitle:d,editable:j=!0,draggable:f=!1,withImage:k=!1,deletable:R=!0,addable:c=!0,itemsType:l,itemsOptions:y,limit:g,aspectRatio:m,setAspectRatio:o}=u,[_,S]=h.useState(null),[$,A]=h.useState({top:0,left:0}),[V,q]=h.useState(!1),i=t.useSensors(t.useSensor(t.PointerSensor,{activationConstraint:{distance:5}}));h.useEffect(()=>{const E=()=>{S(null),q(!1)};return document.body.addEventListener("click",E),S(null),q(!1),()=>{S(null),q(!1),document.body.removeEventListener("click",E)}},[]),h.useEffect(()=>{if(_){const E=[...s].map(O=>O.listingId===_.listingId?_:O);a(E)}},[_]);const b=(E,O)=>{E.stopPropagation();const p=E.target.getBoundingClientRect(),I=100,T=window.innerHeight;let P=p.top+window.scrollY;P+I>T&&(P=T-I-20),q(!0),A({top:P-80,left:p.left-30}),S(O)};function N(E){if(k)return E?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${E}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const M=E=>{const{active:O,over:p}=E;if(p&&O.id!==p.id){const I=s.findIndex(P=>String(P.listingId)===O.id),T=s.findIndex(P=>String(P.listingId)===p.id);if(I!==-1&&T!==-1){const P=[...s],[G]=P.splice(I,1);P.splice(T,0,G),a(P)}}},w=()=>{q(!1),S(null)},v=E=>{const O=y.find(I=>E.listingId===I.id);if(!O)return null;const p=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[f&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),l==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:I=>{const T=[...s],P=y.find(U=>U.productData.name===I);if(!P)return;const G={listingId:P.id,image:P.productData.images.length>0?P.productData.images[0].cfId:""},L=T.map(U=>U.listingId===E.listingId?G:U);S(G),a([...L])},value:O.productData.name,options:[...y.filter(I=>!s.find(T=>T.listingId===I.id)).map(I=>I.productData.name)],leftAddonOptions:y.map(I=>{var T;return{value:I.productData.name,addon:N(((T=I.productData.images[0])==null?void 0:T.cfId)||"")}})}),t.jsxRuntimeExports.jsxs("div",{className:t.styles$2.buttons,children:[j&&t.jsxRuntimeExports.jsx("div",{className:t.styles$2.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:I=>b(I,E)})}),R&&t.jsxRuntimeExports.jsx("div",{className:t.styles$2.deleteButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>a(s.filter(I=>I!==E))})})]})]});return f?t.jsxRuntimeExports.jsx(oe,{product:E,children:p},E.listingId):t.jsxRuntimeExports.jsx("div",{className:t.styles$2.product,children:p},E.listingId)},Y=h.useRef(null);return t.jsxRuntimeExports.jsxs("div",{className:t.styles$2.productsBlock,children:[(x||n!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:t.styles$2.top,children:[x&&t.jsxRuntimeExports.jsx("h3",{className:t.styles$2.title,children:x}),n!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:n,onChange:E=>r==null?void 0:r(E)})]}),V&&_&&t.jsxRuntimeExports.jsx(t.ListingPopup,{ref:Y,activeItem:_,setActiveItem:S,setIsOpenModal:q,popupPosition:$,itemsOptions:y}),n&&t.jsxRuntimeExports.jsxs("div",{className:t.styles$2.products,children:[d&&t.jsxRuntimeExports.jsx("h5",{className:t.styles$2.subtitle,children:d}),f?t.jsxRuntimeExports.jsx(t.DndContext,{sensors:i,onDragEnd:M,onDragStart:w,children:t.jsxRuntimeExports.jsx(t.SortableContext,{items:s.map(E=>String(E.listingId)),strategy:t.verticalListSortingStrategy,children:s.map(E=>v(E))})}):s.map(E=>v(E)),c&&t.jsxRuntimeExports.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:t.jsxRuntimeExports.jsx(t.Button,{withoutHover:!0,className:t.styles$2.button,size:"s",onClick:()=>{const E=[...s];for(let O=0;O<y.length;O++)if(!s.find(p=>p.listingId===y[O].id)){E.push({listingId:y[O].id,image:y[O].productData.images.length>0?y[O].productData.images[0].cfId:""});break}a(E)},disabled:s.length===(g||y.length),style:{width:"fit-content"},children:t.jsxRuntimeExports.jsxs("div",{className:t.styles$2.addButton,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})})]}),m&&o&&t.jsxRuntimeExports.jsx(t.Select,{value:m,options:Object.keys(t.aspectRatio),onChange:E=>o(E),leftAddonOptions:t.aspectRatioOptions}),n&&e!==void 0&&t.jsxRuntimeExports.jsx(t.OtherAndTagsSettings,{otherTitle:"Other",items:e})]})},ae="_options_s4lx3_1",ce="_price_s4lx3_18",le="_oldPrice_s4lx3_25",de="_newPrice_s4lx3_34",ue="_animate_s4lx3_42",xe="_meta_s4lx3_60",me="_info_s4lx3_66",pe="_infoRight_s4lx3_75",je="_buttons_s4lx3_82",he="_variants_s4lx3_89",ge="_variant_s4lx3_89",fe="_stock_s4lx3_107",ye="_variantInfo_s4lx3_115",_e="_quantity_s4lx3_122",Ee="_button_s4lx3_82",Re="_activeVariant_s4lx3_168",be="_chargeTypes_s4lx3_172",ve="_charge_s4lx3_172",Ie="_chargeActive_s4lx3_197",Se="_title_s4lx3_205",B={options:ae,price:ce,oldPrice:le,newPrice:de,animate:ue,meta:xe,info:me,infoRight:pe,buttons:je,variants:he,variant:ge,stock:fe,variantInfo:ye,quantity:_e,button:Ee,activeVariant:Re,chargeTypes:be,charge:ve,chargeActive:Ie,title:Se};var Z=(u=>(u.ONE_TIME="One-Time",u.RECURRING="Subscribe & Save",u))(Z||{});const it=u=>{var V,q;const{product:n,setIsOpen:r,isCartEnabled:s=!0}=u,{variants:a}=n,[e,x]=h.useState(a[0]),[d,j]=h.useState(e.chargeTypes?e.chargeTypes[0]:"ONE_TIME"),{notifications:f,setNotifications:k}=t.useNotificationStore(),R=t.useNavigate(),[c,l]=h.useState(1),{cart:y,reset:g,addProductToCart:m}=t.useCart(),[o,_]=h.useState(!1);h.useEffect(()=>{_(!0);const i=setTimeout(()=>_(!1),600);return()=>clearTimeout(i)},[c]);async function S(){try{m({productId:n.id,productVariantId:e.id,chargeType:d,quantity:c}),k([...f,{id:t.v4(),message:"Product added to cart",status:"success"}])}catch(i){k([...f,{id:t.v4(),message:`Product failed to add to cart: ${i}`,status:"error"}])}r==null||r(!1)}function $(){g(),S(),R("/checkout")}function A(i){if(i>=864e5){const v=Math.floor(i/864e5);return`${v} ${v===1?"day":"days"}`}else if(i>=36e5){const v=Math.floor(i/36e5);return`${v} ${v===1?"hour":"hours"}`}else if(i>=6e4){const v=Math.floor(i/6e4);return`${v} ${v===1?"minute":"minutes"}`}else{const v=Math.floor(i/1e3);return`${v} ${v===1?"second":"seconds"}`}}return h.useEffect(()=>{e.quantity&&e.quantity.available===0?l(0):l(1)},[e.quantity.available]),h.useEffect(()=>{e.chargeTypes&&j(e.chargeTypes.includes(d)?d:e.chargeTypes[0])},[e.chargeTypes]),t.jsxRuntimeExports.jsxs("div",{className:B.options,children:[e.chargeTypes&&e.chargeTypes.length>1&&t.jsxRuntimeExports.jsx("div",{className:B.chargeTypes,children:e.chargeTypes.map(i=>t.jsxRuntimeExports.jsx("div",{className:t.clx(B.charge,{[B.chargeActive]:d===i}),onClick:()=>j(i),children:Z[i]},i))}),t.jsxRuntimeExports.jsx("div",{className:B.variants,children:a.filter(i=>{var b;return(b=i.chargeTypes)==null?void 0:b.includes(d)}).map(i=>{var b,N;return t.jsxRuntimeExports.jsxs("div",{className:t.clx(B.variant,{[B.activeVariant]:e.id===i.id}),onClick:()=>{x(i),l(1)},children:[t.jsxRuntimeExports.jsxs("div",{className:B.variantInfo,children:[t.jsxRuntimeExports.jsx("span",{className:B.title,id:"h4",dangerouslySetInnerHTML:{__html:t.splitTextIntoSpans(i.name)}}),t.jsxRuntimeExports.jsxs("span",{id:"md",children:[t.formatPrice({amount:d==="ONE_TIME"?i.price.amount:i.subscriptionSettings?i.subscriptionSettings.price.amount:0,currency:d==="ONE_TIME"?i.price.currency:i.subscriptionSettings?i.subscriptionSettings.price.currency:"USD"})," ",d==="RECURRING"&&i.subscriptionSettings&&` / ${t.normalizeInterval(i.subscriptionSettings.recurringIntervalDays||0)}`]})]}),t.jsxRuntimeExports.jsx("div",{id:"md",children:d==="ONE_TIME"&&t.jsxRuntimeExports.jsxs("span",{className:B.stock,id:"md",children:[(b=i.quantity.restrictions)!=null&&b.max||i.quantity.available!==void 0?((N=i.quantity.restrictions)==null?void 0:N.max)||i.quantity.available:"∞"," ","in stock"]})})]},i.id)})}),d==="ONE_TIME"&&t.jsxRuntimeExports.jsxs("div",{className:B.quantity,id:"md",children:[t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:()=>{c>1?l(i=>i-1):l(1)},className:B.button,disabled:e.quantity.available&&e.quantity.restrictions&&c<=e.quantity.restrictions.min||e.quantity.available===0,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Minus"})}),t.jsxRuntimeExports.jsx(t.Input$1,{type:"number",value:String(c),onChange:i=>{e.quantity.available&&Number(i)>e.quantity.available?l(e.quantity.available):l(Number(i))},max:((V=e.quantity.restrictions)==null?void 0:V.max)||e.quantity.available||Number.POSITIVE_INFINITY,min:((q=e.quantity.restrictions)==null?void 0:q.min)||0,centered:!0,disabled:e.quantity&&e.quantity.available===0||Object.keys(e.quantity.restrictions||{}).length!==0&&c>=e.quantity.restrictions.max}),t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:()=>{l(i=>i+1)},className:B.button,disabled:!!(e.quantity.available&&e.quantity.restrictions&&c>=e.quantity.restrictions.max||e.quantity.available===0||e.quantity.available&&c>=e.quantity.available),children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus"})})]}),t.jsxRuntimeExports.jsxs("div",{className:B.meta,children:[t.jsxRuntimeExports.jsxs("div",{className:B.info,children:[t.jsxRuntimeExports.jsx("span",{id:"md",children:"Delivery"}),t.jsxRuntimeExports.jsxs("div",{className:B.infoRight,children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"Lightning",fill:"var(--text-action)",width:20,height:20}),t.jsxRuntimeExports.jsx("span",{id:"md",children:!e.deliveryTime||e.deliveryTime===0?"Instant":A(e.deliveryTime)})]})]}),t.jsxRuntimeExports.jsxs("div",{className:B.info,children:[t.jsxRuntimeExports.jsx("span",{id:"md",children:"Price"}),t.jsxRuntimeExports.jsx("div",{className:B.infoRight,children:d==="ONE_TIME"?e.compareAtPrice&&(e.compareAtPrice.amount||0)-(e.price.amount||0)>0?t.jsxRuntimeExports.jsxs("div",{className:B.price,id:"md",children:[t.jsxRuntimeExports.jsx("span",{className:t.clx(B.newPrice,{[B.animate]:o}),children:t.formatPrice({amount:e.price.amount*c,currency:e.price.currency})}),t.jsxRuntimeExports.jsx("span",{className:B.oldPrice,id:"md",children:t.formatPrice({amount:e.compareAtPrice.amount*c,currency:e.compareAtPrice.currency})})]}):t.jsxRuntimeExports.jsx("span",{className:t.clx(B.newPrice,{[B.animate]:o}),id:"md",children:t.formatPrice({amount:e.price.amount*c,currency:e.price.currency})}):e.subscriptionSettings&&e.subscriptionSettings.compareAtPrice&&(e.subscriptionSettings.compareAtPrice.amount||0)-(e.subscriptionSettings.price.amount||0)>0?t.jsxRuntimeExports.jsxs("div",{className:B.price,id:"md",children:[t.jsxRuntimeExports.jsx("span",{className:t.clx(B.newPrice,{[B.animate]:o}),id:"md",children:t.formatPrice({amount:e.subscriptionSettings.price.amount*c,currency:e.subscriptionSettings.price.currency})}),t.jsxRuntimeExports.jsx("span",{className:B.oldPrice,id:"md",children:t.formatPrice({amount:e.subscriptionSettings.compareAtPrice.amount*c,currency:e.subscriptionSettings.compareAtPrice.currency})})]}):e.subscriptionSettings&&t.jsxRuntimeExports.jsx("span",{className:t.clx(B.newPrice,{[B.animate]:o}),id:"md",children:t.formatPrice({amount:e.subscriptionSettings.price.amount*c,currency:e.subscriptionSettings.price.currency})})})]})]}),t.jsxRuntimeExports.jsxs("div",{className:B.buttons,children:[t.jsxRuntimeExports.jsx(t.Button$1,{type:"Primary",onClick:()=>$(),disabled:e.quantity&&e.quantity.available===0||c===0,children:d==="ONE_TIME"?"Buy Now":"Subscribe Now"}),d==="ONE_TIME"&&s&&t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:()=>S(),disabled:e.quantity&&e.quantity.available===0||c===0,children:y.parts.some(i=>i.productId===n.id&&i.productVariantId===e.id)?"Add More":"Add to Cart"})]})]})},Ne="_buttons_1uy6y_23",Ce="_modal_1uy6y_32",Pe="_closing_1uy6y_65",ke="_info_1uy6y_114",Te="_top_1uy6y_121",we="_title_1uy6y_132",Be="_clear_1uy6y_139",Me="_activeClear_1uy6y_146",$e="_count_1uy6y_150",Oe="_cart_1uy6y_165",Ae="_empty_1uy6y_173",qe="_product_1uy6y_199",De="_products_1uy6y_208",Le="_image_1uy6y_216",Ue="_productInfo_1uy6y_233",He="_content_1uy6y_240",ze="_name_1uy6y_246",Fe="_price_1uy6y_252",Ve="_productButtons_1uy6y_258",Ye="_productButton_1uy6y_258",Ge="_productCount_1uy6y_275",We="_bottom_1uy6y_292",Xe="_subtotal_1uy6y_300",Qe="_block_1uy6y_308",Je="_shoppingCount_1uy6y_315",Ke="_total_1uy6y_335",Ze="_link_1uy6y_341",ts="_userInfo_1uy6y_348",es="_pagesMobileModal_1uy6y_360",ss="_pagesMobileModalContent_1uy6y_374",ns="_pagesMobileModalHeader_1uy6y_380",is="_pagesMobileModalFooter_1uy6y_390",os="_pageLink_1uy6y_397",rs="_rightButtons_1uy6y_406",C={buttons:Ne,modal:Ce,closing:Pe,info:ke,top:Te,title:we,clear:Be,activeClear:Me,count:$e,cart:Oe,empty:Ae,product:qe,products:De,image:Le,productInfo:Ue,content:He,name:ze,price:Fe,productButtons:Ve,productButton:Ye,productCount:Ge,bottom:We,subtotal:Xe,block:Qe,shoppingCount:Je,total:Ke,link:Ze,userInfo:ts,pagesMobileModal:es,pagesMobileModalContent:ss,pagesMobileModalHeader:ns,pagesMobileModalFooter:is,pageLink:os,rightButtons:rs,delete:"_delete_1uy6y_413"},as=u=>{const{shopping:n,signUp:r,isShowUserInfo:s=!0}=u;return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:(n||s)&&t.jsxRuntimeExports.jsxs("div",{className:C.buttons,children:[n&&t.jsxRuntimeExports.jsx(ot,{}),s&&t.jsxRuntimeExports.jsx(tt,{signUp:r})]})})},ot=()=>{const[u,n]=h.useState(!1),[r,s]=h.useState([]),[a,e]=h.useState(!1),{cart:x,products:d}=t.useCart();h.useEffect(()=>{(async()=>{const c=x.parts.map(g=>String(g.productId)),l=d.filter(g=>c.includes(String(g.id)))||[],y=x.parts.map(g=>{const m=l.find(o=>o.id===g.productId);return m?{...m,activeVariantId:g.productVariantId,quantity:g.quantity,chargeType:g.chargeType}:null}).filter(Boolean);s(y)})()},[x.parts,d]);function j(R){return!R||!(R!=null&&R.variants)?!1:R.chargeType==="RECURRING"}const f=x.parts.length>0&&r.length>0&&!j(r[0]);function k(){e(!1),setTimeout(()=>{n(!1)},300)}return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsxs(t.Button$1,{type:"Secondary",style:{padding:10,position:"relative"},onClick:R=>{R.stopPropagation(),window.location.pathname.includes("/admin/builder")||(n(!0),e(!0))},children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"Handbag"}),f&&t.jsxRuntimeExports.jsx("div",{className:C.shoppingCount,children:x.parts.length})]}),u&&t.jsxRuntimeExports.jsx(t.Modal,{close:k,withAnimation:!1,children:t.jsxRuntimeExports.jsx(rt,{activeProducts:r,isCartNotEmpty:f,isOpen:a,close:k})})]})},rt=u=>{var g,m;const{activeProducts:n,isCartNotEmpty:r,isOpen:s,close:a}=u,{cart:e,reset:x,getTotalAndDiscount:d,updateQuantityOfProduct:j,removeProduct:f}=t.useCart(),k=t.useNavigate();function R(o,_){k(o,{replace:_})}function c(o){o.quantity&&j({productId:o.id,productVariantId:o.activeVariantId,quantity:o.quantity+1,chargeType:o.chargeType})}function l(o){o.quantity&&j({productId:o.id,productVariantId:o.activeVariantId,quantity:o.quantity-1,chargeType:o.chargeType})}function y(o){f({productId:o.id,productVariantId:o.activeVariantId,quantity:o.quantity||1,chargeType:o.chargeType})}return t.jsxRuntimeExports.jsxs("div",{className:t.clx(C.modal,{[C.closing]:!s}),onClick:o=>o.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:C.top,children:[t.jsxRuntimeExports.jsxs("div",{className:C.info,children:[t.jsxRuntimeExports.jsx("span",{className:C.title,id:"h4",children:"Cart"}),r&&t.jsxRuntimeExports.jsx("div",{className:C.count,id:"md",children:e.parts.length})]}),t.jsxRuntimeExports.jsxs("div",{className:C.rightButtons,children:[r&&t.jsxRuntimeExports.jsx("button",{className:t.clx(C.clear,{[C.activeClear]:r}),disabled:!r,onClick:x,id:"md",children:"Clear all"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",onClick:a,hoverable:!0,width:24,height:24,fill:"var(--text-primary)"})]})]}),r?t.jsxRuntimeExports.jsxs("div",{className:C.cart,children:[t.jsxRuntimeExports.jsx("div",{className:C.products,children:n.map(o=>{var _,S;return t.jsxRuntimeExports.jsxs("div",{className:C.product,children:[t.jsxRuntimeExports.jsxs("div",{className:C.productInfo,children:[o.images.length>0?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${o.images[0].cfId}/w=500`,alt:"image",width:"100%",height:"100%",className:C.image}):t.jsxRuntimeExports.jsx("div",{className:C.image,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",fill:"var(--text-secondary)"})}),t.jsxRuntimeExports.jsxs("div",{className:C.content,children:[t.jsxRuntimeExports.jsx("div",{className:C.name,dangerouslySetInnerHTML:{__html:t.splitTextIntoSpans(((_=o.variants.find($=>$.id===o.activeVariantId))==null?void 0:_.name)||o.name)}}),t.jsxRuntimeExports.jsx("div",{className:C.price,children:t.formatPrice({amount:o.variants.find($=>$.id===o.activeVariantId).price.amount*((o==null?void 0:o.quantity)||1),currency:o.variants.find($=>$.id===o.activeVariantId).price.currency})})]})]}),t.jsxRuntimeExports.jsxs("div",{className:C.productButtons,children:[t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:()=>{o.quantity!==1&&l(o)},className:C.productButton,disabled:o.quantity===1,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Minus",fill:"#757575",width:20,height:20})}),t.jsxRuntimeExports.jsx("input",{className:C.productCount,type:"number",value:((S=o.quantity)==null?void 0:S.toString())||"",onChange:$=>{const A=Math.min(Number($.target.value),o.variants.find(V=>V.id===o.activeVariantId).quantity.available||1/0);A<1||j({productId:o.id,productVariantId:o.activeVariantId,quantity:A,chargeType:o.chargeType})},min:1,max:o.variants.find($=>$.id===o.activeVariantId).quantity.available||1/0}),t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:()=>c(o),className:C.productButton,disabled:o.quantity===o.variants.find($=>$.id===o.activeVariantId).quantity.available,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",fill:"#757575",width:20,height:20})}),t.jsxRuntimeExports.jsx("div",{className:C.delete,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",fill:"var(--text-action)",width:20,height:20,onClick:()=>y(o),hoverable:!0})})]})]},o.id)})}),t.jsxRuntimeExports.jsxs("div",{className:C.bottom,children:[t.jsxRuntimeExports.jsxs("div",{className:C.subtotal,children:[t.jsxRuntimeExports.jsxs("div",{className:C.block,children:[t.jsxRuntimeExports.jsx("span",{children:"Subtotal"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Info",width:20,height:20,fill:"#757575"})]}),t.jsxRuntimeExports.jsx("div",{className:C.total,children:t.formatPrice({amount:d().total,currency:e.parts.length>0&&((m=(g=n.find(o=>o.id===e.parts[0].productId))==null?void 0:g.variants.find(o=>o.id===e.parts[0].productVariantId))==null?void 0:m.price.currency)||"USD"})})]}),t.jsxRuntimeExports.jsx(t.Button$1,{onClick:()=>R("/checkout",!1),children:"Checkout"})]})]}):t.jsxRuntimeExports.jsx(at,{})]})},at=()=>t.jsxRuntimeExports.jsxs("div",{className:C.empty,children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Handbag",fill:"var(--text-secondary)"})}),t.jsxRuntimeExports.jsx("span",{id:"h5",children:"Empty Cart"}),t.jsxRuntimeExports.jsxs("span",{id:"md",children:["You don’t have any items in your shopping cart yet,"," ",t.jsxRuntimeExports.jsx("a",{href:"/products",className:C.link,id:"md",children:"view products"})]})]}),tt=({signUp:u,close:n})=>{const{token:r}=t.useStorefrontStore(),s=t.useNavigate(),[a,e]=h.useState("test-email@gmail.com");h.useEffect(()=>{r&&(async()=>{if(!r)return;const j=t.jwtDecode(r);e(j.email)})()},[r]);function x(d){window.location.pathname.includes("/admin/builder")||s(d)}return r?t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",className:C.userInfo,onClick:()=>{x("/customer-dash"),n==null||n()},children:t.jsxRuntimeExports.jsx("div",{children:a||"test-email@gmail.com"})}):t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(t.Button$1,{onClick:()=>{x("/customer-dash"),n==null||n()},type:"Secondary",style:{padding:10},children:"Login"}),u&&t.jsxRuntimeExports.jsx(t.Button$1,{onClick:()=>{x("/customer-dash"),n==null||n()},type:"Primary",style:{padding:10,whiteSpace:"nowrap"},children:"Sign Up"})]})},ct=({logo:u,setIsOpen:n,signUp:r,pages:s})=>{const{setIsOpen:a}=t.useModalStore(),e=()=>{a(!1),setTimeout(()=>{n(!1),a(!0)},300)};return t.jsxRuntimeExports.jsxs("div",{className:C.pagesMobileModal,onClick:x=>x.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:C.pagesMobileModalHeader,children:[t.jsxRuntimeExports.jsx("div",{children:u}),t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:e,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"X"})})]}),t.jsxRuntimeExports.jsx("div",{className:C.pagesMobileModalContent,children:s.length>0&&s.map(x=>t.jsxRuntimeExports.jsx("div",{className:C.pageLink,onClick:e,children:t.jsxRuntimeExports.jsx(et,{path:x.path,children:x.name["en-US"]},x.id)}))}),t.jsxRuntimeExports.jsx("div",{className:C.pagesMobileModalFooter,children:t.jsxRuntimeExports.jsx(tt,{signUp:r,close:e})})]})},cs=({logo:u,signUp:n,pages:r})=>{const[s,a]=h.useState(!1);return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(lt,{setIsOpenModal:a}),s&&t.jsxRuntimeExports.jsx(t.Modal,{close:()=>a(!1),hasPadding:!1,children:t.jsxRuntimeExports.jsx(ct,{logo:u,setIsOpen:a,signUp:n,pages:r})})]})},lt=u=>{const{setIsOpenModal:n}=u;return t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",style:{padding:10},onClick:r=>{r.stopPropagation(),window.location.pathname.includes("/admin/builder")||n(!0)},children:t.jsxRuntimeExports.jsx(t.Icon,{name:"List"})})},ls="_share_onabp_1",ds="_modal_onabp_8",us="_header_onabp_20",xs="_title_onabp_46",ms="_copyWrapper_onabp_53",ps="_copyText_onabp_62",js="_copyTextMobile_onabp_75",hs="_copyTextMiniMobile_onabp_94",Q={share:ls,modal:ds,header:us,title:xs,copyWrapper:ms,copyText:ps,copyTextMobile:js,copyTextMiniMobile:hs},gs=({title:u="Copy Product Link"})=>{const{isOpenModal:n,setIsOpenModal:r}=t.useShareLinkStore();function s(){r(!0)}return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(t.Button$1,{className:Q.share,onClick:a=>{a.stopPropagation(),s()},type:"Secondary",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Share",fill:"#757575",hoverable:!0})}),n&&t.jsxRuntimeExports.jsx(t.Modal,{close:r,children:t.jsxRuntimeExports.jsx(fs,{title:u})})]})},fs=({title:u="Copy Product Link"})=>{const{setIsOpenModal:n}=t.useShareLinkStore(),{notifications:r,setNotifications:s}=t.useNotificationStore(),{setIsOpen:a}=t.useModalStore(),e=window.location.href;function x(){navigator.clipboard.writeText(e),s([...r,{id:t.v4(),message:"Link copied to clipboard",status:"success"}])}function d(){a(!1),setTimeout(()=>{n(!1),a(!0)},300)}function j(f,k){return f.length>k?f.slice(0,k)+"...":f}return t.jsxRuntimeExports.jsxs("div",{className:Q.modal,onClick:f=>f.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:Q.header,children:[t.jsxRuntimeExports.jsx("div",{className:Q.title,id:"h4",children:u}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",fill:"#757575",onClick:d,hoverable:!0})]}),t.jsxRuntimeExports.jsxs("div",{className:Q.copyWrapper,children:[t.jsxRuntimeExports.jsxs(t.Button$1,{type:"Secondary",onClick:x,style:{flex:1},children:[t.jsxRuntimeExports.jsx("div",{className:Q.copyText,id:"md",children:j(e,100)}),t.jsxRuntimeExports.jsx("div",{className:Q.copyTextMobile,id:"md",children:j(e,40)}),t.jsxRuntimeExports.jsx("div",{className:Q.copyTextMiniMobile,id:"md",children:j(e,20)})]}),t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:x,children:r.find(f=>f.message==="Link copied to clipboard")?t.jsxRuntimeExports.jsx(t.Icon,{name:"Check"}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Copy"})})]})]})},ys="_accordion_153d4_1",_s="_header_153d4_12",Es="_icon_153d4_21",Rs="_open_153d4_24",bs="_content_153d4_28",vs="_contentOpen_153d4_36",Is="_contentText_153d4_40",J={accordion:ys,header:_s,icon:Es,open:Rs,content:bs,contentOpen:vs,contentText:Is},Ss=({title:u,content:n,defaultOpen:r=!1})=>{const[s,a]=h.useState(r),[e,x]=h.useState(0),d=h.useRef(null),j=()=>{a(!s)};return h.useEffect(()=>{d.current&&x(s?d.current.scrollHeight:0)},[s]),t.jsxRuntimeExports.jsxs("div",{className:J.accordion,children:[t.jsxRuntimeExports.jsxs("div",{className:J.header,onClick:j,children:[t.jsxRuntimeExports.jsx("h5",{id:"h5",children:u}),t.jsxRuntimeExports.jsx("div",{className:t.clx(J.icon,{[J.open]:s}),children:t.jsxRuntimeExports.jsx(t.Icon,{name:"CaretDown"})})]}),t.jsxRuntimeExports.jsx("div",{className:t.clx(J.content,{[J.contentOpen]:s}),children:t.jsxRuntimeExports.jsx("p",{id:"md",className:J.contentText,ref:d,style:{height:`${e}px`,marginTop:`${e>0?"20px":"0px"}`},children:n})})]})},et=({children:u,path:n,className:r,target:s="_self",id:a})=>{if(window.location.pathname.includes("/admin/builder"))return t.jsxRuntimeExports.jsx("div",{className:r,role:"link",style:{cursor:"pointer"},id:a,children:u});const e=t.useNavigate(),x=/^https?:\/\//.test(n),d=j=>{x||s==="_blank"?s==="_blank"?window.open(n,"_blank"):window.open(n,"_self"):(j.preventDefault(),e(n,{replace:!1}))};return t.jsxRuntimeExports.jsx("div",{onClick:d,className:r,role:"link",style:{cursor:"pointer"},id:a,children:u})},Ns="_buttonsBlock_1x6xf_1",Cs="_cartDisabled_1x6xf_25",st={buttonsBlock:Ns,cartDisabled:Cs},Ps=u=>{var k,R;const{setIsOpen:n,setModalType:r,productId:s,isCartEnabled:a=!0}=u,{cart:e}=t.useCart(),{pageContext:x}=t.usePagesStore(),d=(k=x==null?void 0:x.listings)==null?void 0:k.find(c=>c.id===s);if(!d)return null;const j=(R=x==null?void 0:x.products)==null?void 0:R.find(c=>c.uniquePath===d.productData.uniquePath);if(!j)return null;const f=e.parts.find(c=>c.productId===j.id);return t.jsxRuntimeExports.jsxs("div",{className:t.clx(st.buttonsBlock,{[st.cartDisabled]:!a}),onClick:c=>c.stopPropagation(),children:[a&&t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",style:{width:"100%"},onClick:()=>{r("Add To Cart"),n(!0)},children:f?"Add More":"Add To Cart"}),t.jsxRuntimeExports.jsx(t.Button$1,{type:"Primary",onClick:()=>{r("Buy Now"),n(!0)},style:{width:"100%"},children:"Buy"})]})},ks="_wrapper_27wzz_1",Ts="_logo_27wzz_8",ws="_info_27wzz_12",K={wrapper:ks,logo:Ts,info:ws},Bs=({date:u})=>{const{general:n}=t.useGeneralStore();if(!n)return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{});function r(s){const a=new Date(s),e={month:"short",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1};return a.toLocaleDateString("en-US",e)}return t.jsxRuntimeExports.jsxs("div",{className:K.wrapper,children:[t.jsxRuntimeExports.jsx("div",{className:K.logo,children:n.info.logo?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${n.info.logo.cfId}/w=500,h=500`,alt:"image",style:{objectFit:"contain",width:"48px",height:"48px"}}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:48,height:48})}),t.jsxRuntimeExports.jsxs("div",{className:K.info,children:[t.jsxRuntimeExports.jsx("h3",{id:"h4",children:n.info.name}),t.jsxRuntimeExports.jsx("p",{id:"p",children:r(u)})]})]})},Ms="_variants_18tbu_82",$s="_variant_18tbu_82",Os="_stock_18tbu_100",As="_variantInfo_18tbu_108",qs="_title_18tbu_202",Ds="_modal_18tbu_208",Ls="_header_18tbu_228",Us="_productOptions_18tbu_236",Hs="_loading_18tbu_244",W={variants:Ms,variant:$s,stock:Os,variantInfo:As,title:qs,modal:Ds,header:Ls,productOptions:Us,loading:Hs},zs=u=>{var c;const{pageContext:n}=t.usePagesStore(),r=(c=n==null?void 0:n.listings)==null?void 0:c.find(l=>l.id===u.productId),[s,a]=h.useState(!0),[e,x]=h.useState(null),d=(e==null?void 0:e.variants[0])||null,[j,f]=h.useState("ONE_TIME"),{addProducts:k}=t.useCart(),{setIsOpen:R}=t.useModalStore();return h.useEffect(()=>{(async()=>{a(!0);const y=await t.getDynamicPage(encodeURIComponent(`/product/${r.productData.uniquePath}`));k(y==null?void 0:y.data.products),x(y==null?void 0:y.data.products[0]),a(!1)})()},[]),h.useEffect(()=>{R(!0)},[]),t.jsxRuntimeExports.jsx(t.Modal,{close:u.setIsOpen,children:t.jsxRuntimeExports.jsxs("div",{className:W.modal,onClick:l=>l.stopPropagation(),children:[s&&t.jsxRuntimeExports.jsx("div",{className:W.loading,children:t.jsxRuntimeExports.jsx(t.Loader,{})}),u.type==="Add To Cart"&&u.isCartEnabled&&e&&d&&!s&&t.jsxRuntimeExports.jsx(Fs,{variants:e.variants,activeVariant:d,activeChargeType:j,setActiveChargeType:f,productId:e.id,setIsOpen:u.setIsOpen}),u.type==="Buy Now"&&e&&!s&&t.jsxRuntimeExports.jsx(Vs,{product:e,setIsOpen:u.setIsOpen,isCartEnabled:u.isCartEnabled})]})})},Fs=u=>{const{variants:n,activeChargeType:r,productId:s,setIsOpen:a}=u,{cart:e,addProductToCart:x,addProducts:d,updateQuantityOfProduct:j}=t.useCart(),{notifications:f,setNotifications:k}=t.useNotificationStore(),{pageContext:R}=t.usePagesStore(),{setIsOpen:c}=t.useModalStore(),l=()=>{c(!1),setTimeout(()=>{a(!1)},300)};async function y(g){const m=n.find(S=>S.id===g),o=e.parts.find(S=>S.productId===u.productId&&S.productVariantId===g);if((m==null?void 0:m.quantity.available)&&(m==null?void 0:m.quantity.restrictions)&&((o==null?void 0:o.quantity)||0)+1>(m==null?void 0:m.quantity.restrictions.max)||(m==null?void 0:m.quantity.available)===0||(m==null?void 0:m.quantity.available)&&((o==null?void 0:o.quantity)||0)+1>(m==null?void 0:m.quantity.available)){k([...f,{id:t.v4(),message:"Product is out of stock",status:"error"}]);return}if(o)j({productId:s,productVariantId:g,quantity:o.quantity+1,chargeType:r});else{R!=null&&R.products&&d(R.products);try{x({productId:s,productVariantId:g,quantity:1,chargeType:r}),k([...f,{id:t.v4(),message:"Product added to cart",status:"success"}])}catch(S){k([...f,{id:t.v4(),message:`Product failed to add to cart: ${S}`,status:"error"}])}}}return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsxs("div",{className:W.header,children:[t.jsxRuntimeExports.jsx("div",{id:"h3",children:"Choose a Variant"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",width:24,height:24,fill:"var(--text-secondary)",hoverable:!0,onClick:l})]}),t.jsxRuntimeExports.jsx("div",{className:W.variants,children:n.filter(g=>{var m;return(m=g.chargeTypes)==null?void 0:m.includes(r)}).map(g=>{var m,o,_;return t.jsxRuntimeExports.jsxs("div",{className:t.clx(W.variant),onClick:()=>{y(g.id),a(!1)},children:[t.jsxRuntimeExports.jsxs("div",{className:W.variantInfo,children:[t.jsxRuntimeExports.jsx("span",{className:W.title,id:"h4",children:g.name}),t.jsxRuntimeExports.jsx("span",{id:"md",children:t.formatPrice({amount:r==="ONE_TIME"?g.price.amount:g.subscriptionSettings?g.subscriptionSettings.price.amount:0,currency:r==="ONE_TIME"?g.price.currency:((m=g.subscriptionSettings)==null?void 0:m.price.currency)||"USD"})})]}),t.jsxRuntimeExports.jsx("div",{id:"md",children:r==="ONE_TIME"&&t.jsxRuntimeExports.jsxs("span",{className:W.stock,id:"md",children:[(o=g.quantity.restrictions)!=null&&o.max||g.quantity.available!==void 0?((_=g.quantity.restrictions)==null?void 0:_.max)||g.quantity.available:"∞"," ","in stock"]})})]},g.id)})})]})},Vs=u=>{const{product:n,setIsOpen:r,isCartEnabled:s}=u,{setIsOpen:a}=t.useModalStore(),e=()=>{a(!1),setTimeout(()=>{r(!1)},300)};return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsxs("div",{className:W.header,children:[t.jsxRuntimeExports.jsx("div",{id:"h3",className:W.title,dangerouslySetInnerHTML:{__html:`Buy ${t.splitTextIntoSpans(n.name)}`}}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",width:24,height:24,fill:"var(--text-secondary)",hoverable:!0,onClick:e,style:{minWidth:24,minHeight:24}})]}),t.jsxRuntimeExports.jsx("div",{className:W.productOptions,children:t.jsxRuntimeExports.jsx(it,{product:n,setIsOpen:r,isCartEnabled:s})})]})},Ys="_contentModal_m2tf9_1",Gs="_modalTop_m2tf9_12",Ws="_loading_m2tf9_19",Xs="_modalCards_m2tf9_28",Qs="_modalImage_m2tf9_34",Js="_card_m2tf9_39",Ks="_cardInfo_m2tf9_51",Zs="_cardButtons_m2tf9_58",tn="_title_m2tf9_64",en="_blockImage_m2tf9_71",sn="_short_m2tf9_80",nn="_price_m2tf9_84",on="_oldPrice_m2tf9_91",rn="_newPrice_m2tf9_100",D={contentModal:Ys,modalTop:Gs,loading:Ws,modalCards:Xs,modalImage:Qs,card:Js,cardInfo:Ks,cardButtons:Zs,title:tn,blockImage:en,short:sn,price:nn,oldPrice:on,newPrice:rn},an=u=>{const{setIsOpen:n,pageContext:r,groupData:s,setProductId:a,setIsProductModalOpen:e,setShowDropdown:x}=u,[d,j]=h.useState(null),[f,k]=h.useState(!0),{setIsOpen:R}=t.useModalStore();h.useEffect(()=>{var y;k(!0);const l=(y=r.listings)==null?void 0:y.filter(g=>s.listingIdList.includes(g.id));l&&j([...l]),k(!1)},[r]),h.useEffect(()=>{R(!0)},[]);const c=()=>{R(!1),setTimeout(()=>{n(!1)},300)};return t.jsxRuntimeExports.jsx(t.Modal,{close:()=>n(!1),children:t.jsxRuntimeExports.jsxs("div",{className:D.contentModal,onClick:l=>l.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:D.modalTop,children:[t.jsxRuntimeExports.jsx("span",{className:D.title,id:"h4",dangerouslySetInnerHTML:{__html:t.splitTextIntoSpans(s.name)}}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",hoverable:!0,onClick:c,fill:"var(--text-primary)"})]}),!f&&d&&t.jsxRuntimeExports.jsx("div",{className:D.modalCards,children:d.map(l=>t.jsxRuntimeExports.jsxs("div",{className:D.card,children:[t.jsxRuntimeExports.jsx("div",{children:l.productData.images[0]?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${l.productData.images[0].cfId}/w=500`,alt:"",width:64,height:64,className:D.modalImage}):t.jsxRuntimeExports.jsx("div",{className:t.clx(D.blockImage,D.modalImage),children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Image"})})}),t.jsxRuntimeExports.jsxs("div",{className:D.cardInfo,children:[t.jsxRuntimeExports.jsx("div",{id:"h5",children:l.productData.compareAtPrice&&(l.productData.compareAtPrice.amount||0)-(l.productData.minPrice.amount||0)>0?t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.splitTextIntoSpans(l.productData.name,!1),t.jsxRuntimeExports.jsxs("span",{className:D.price,id:"md",children:[t.jsxRuntimeExports.jsx("span",{className:D.newPrice,id:"md",children:t.formatPrice({amount:l.productData.minPrice.amount,currency:l.productData.minPrice.currency})}),t.jsxRuntimeExports.jsx("span",{className:D.oldPrice,id:"md",children:t.formatPrice({amount:l.productData.compareAtPrice.amount,currency:l.productData.compareAtPrice.currency})})]})]}):t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.splitTextIntoSpans(l.productData.name,!1),t.jsxRuntimeExports.jsx("span",{className:D.newPrice,id:"md",children:t.formatPrice({amount:l.productData.minPrice.amount,currency:l.productData.minPrice.currency})})]})}),l.productData.shortDescription&&t.jsxRuntimeExports.jsx("span",{className:D.short,id:"md",dangerouslySetInnerHTML:{__html:t.splitTextIntoSpans(l.productData.shortDescription)}})]}),t.jsxRuntimeExports.jsxs("div",{className:D.cardButtons,children:[t.jsxRuntimeExports.jsx(t.Button$1,{type:"Secondary",onClick:()=>{a(l.id),n(!1),e(!0)},children:"Buy"}),t.jsxRuntimeExports.jsx(et,{path:`/product/${l.productData.uniquePath}`,children:t.jsxRuntimeExports.jsx(t.Button$1,{type:"Primary",style:{whiteSpace:"nowrap"},onClick:()=>{x(!1),c()},children:"View Details"})})]})]},l.id))}),f&&t.jsxRuntimeExports.jsx("div",{className:D.loading,children:t.jsxRuntimeExports.jsx(t.Loader,{})})]})})};exports.AlignText=t.AlignText;exports.Button=t.Button$1;exports.ChooseImage=t.ChooseImage;exports.ChooseImageModal=t.ChooseImageModal;exports.Icon=t.Icon;exports.InputSettings=t.Input;exports.InputUI=t.Input$1;exports.ItemsSettings=t.ItemsSettings;exports.Loader=t.Loader;exports.Modal=t.Modal;exports.RadioUI=t.Radio;exports.RangeSelector=t.RangeSelector;exports.Select=t.Select;exports.SelectInfiniteList=t.SelectInfiniteList;exports.SelectTypeText=t.SelectTypeText;exports.SelectUI=t.Select$1;exports.Switch=t.Switch;exports.TextSettings=t.TextSettings;exports.TextareaSettings=t.Textarea;exports.TextareaUI=t.Textarea$1;exports.TypesText=t.TypesText;exports.Wrapper=t.Wrapper;exports.Accordion=Ss;exports.BurgerMenuButton=lt;exports.ButtonTypeSettings=nt;exports.ButtonsSettings=ie;exports.CategorySettings=$t;exports.ChargeTypes=Z;exports.EmptyCart=at;exports.FormSettings=Qt;exports.GroupCardModal=an;exports.HeaderButtons=as;exports.LayoutSettings=Rt;exports.Link=et;exports.ListingSelector=re;exports.MetaInfoPost=Bs;exports.PagesMobileMenu=cs;exports.PagesMobileModal=ct;exports.PagesSettings=Wt;exports.ProductCardButtons=Ps;exports.ProductCardModal=zs;exports.ProductOptions=it;exports.ShareLink=gs;exports.ShoppingButton=ot;exports.ShoppingModalCart=rt;exports.UserInfo=tt;
|
package/dist/ui.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as t, I as j, d as U, e as Ct, g as mt, h as pt, P as gt, S as lt, i as Pt, D as ft, k as xt, v as _t, B as dt, l as ot, a as wt, m as Tt, O as ht, n as J, o as yt, C as jt, q as V, r as At, t as Dt, w as bt, x as Et, y as It, z as W, L as Rt, A as St, E as vt, b as ct, s as at, f as Q, F as Lt, G as R, H as Ut, M as ut, J as Ht, K as rt, N as zt, Q as Mt, T as Ft, U as Bt, V as Vt } from "./index-
|
|
2
|
-
import { a1 as si, a5 as ni, $ as ii, Z as ai, a4 as oi, a3 as ci, Y as ri, _ as li, W as di, X as ui, a0 as hi, a2 as mi } from "./index-
|
|
1
|
+
import { j as t, I as j, d as U, e as Ct, g as mt, h as pt, P as gt, S as lt, i as Pt, D as ft, k as xt, v as _t, B as dt, l as ot, a as wt, m as Tt, O as ht, n as J, o as yt, C as jt, q as V, r as At, t as Dt, w as bt, x as Et, y as It, z as W, L as Rt, A as St, E as vt, b as ct, s as at, f as Q, F as Lt, G as R, H as Ut, M as ut, J as Ht, K as rt, N as zt, Q as Mt, T as Ft, U as Bt, V as Vt } from "./index-CIkAZ5oH.js";
|
|
2
|
+
import { a1 as si, a5 as ni, $ as ii, Z as ai, a4 as oi, a3 as ci, Y as ri, _ as li, W as di, X as ui, a0 as hi, a2 as mi } from "./index-CIkAZ5oH.js";
|
|
3
3
|
import f from "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
const Yt = "_block_kh9z8_8", Gt = "_title_kh9z8_16", Wt = "_subtitle_kh9z8_23", Xt = "_alignmentContent_kh9z8_30", Qt = "_alignments_kh9z8_39", Jt = "_alignment_kh9z8_30", Kt = "_circle_kh9z8_64", Zt = "_paddings_kh9z8_71", te = "_padding_kh9z8_71", ee = "_active_kh9z8_97", G = {
|