(() => { var e=Object.defineProperty,t=(t,o,r)=>(((t,o,r)=>{o in t?e(t,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[o]=r})(t,"symbol"!=typeof o?o+"":o,r),r);!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();var o,r,n,i,a,l,s,c,d,u,p,h={},m=[],f=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function v(e,t){for(var o in t)e[o]=t[o];return e}function _(e){var t=e.parentNode;t&&t.removeChild(e)}function y(e,t,r){var n,i,a,l={};for(a in t)"key"==a?n=t[a]:"ref"==a?i=t[a]:l[a]=t[a];if(arguments.length>2&&(l.children=arguments.length>3?o.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===l[a]&&(l[a]=e.defaultProps[a]);return w(e,l,n,i,null)}function w(e,t,o,i,a){var l={type:e,props:t,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==a?++n:a,__i:-1,__u:0};return null==a&&null!=r.vnode&&r.vnode(l),l}function x(){return{current:null}}function b(e){return e.children}function C(e,t){this.props=e,this.context=t}function k(e,t){if(null==t)return e.__?k(e.__,e.__i+1):null;for(var o;tt&&i.sort(s));$.__r=0}function P(e,t,o,r,n,i,a,l,s,c,d){var u,p,f,v,_,y=r&&r.__k||m,x=t.length;for(o.__d=s,function(e,t,o){var r,n,i,a,l,s=t.length,c=o.length,d=c,u=0;for(e.__k=[],r=0;r0?w(n.type,n.props,n.key,n.ref?n.ref:null,n.__v):n)?(n.__=e,n.__b=e.__b+1,l=R(n,o,a,d),n.__i=l,i=null,-1!==l&&(d--,(i=o[l])&&(i.__u|=131072)),null==i||null===i.__v?(-1==l&&u--,"function"!=typeof n.type&&(n.__u|=65536)):l!==a&&(l==a-1?u--:l==a+1?u++:l>a?d>s-a?u+=l-a:u--:l(null==s||131072&s.__u?0:1))for(;a>=0||l=0){if((s=t[a])&&!(131072&s.__u)&&n==s.key&&i===s.type)return a;a--}if(l2&&(s.children=arguments.length>3?o.call(arguments,2):r),w(e.type,s,n||e.key,i||e.ref,null)}function q(e,t){var o={__c:t="__cC"+p++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var o,r;return this.getChildContext||(o=[],(r={})[t]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){o=null},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&o.some((function(e){e.__e=!0,T(e)}))},this.sub=function(e){o.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){o&&o.splice(o.indexOf(e),1),t&&t.call(e)}}),e.children}};return o.Provider.__=o.Consumer.contextType=o}o=m.slice,r={__e:function(e,t,o,r){for(var n,i,a;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&null!=i.getDerivedStateFromError&&(n.setState(i.getDerivedStateFromError(e)),a=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e,r||{}),a=n.__d),a)return n.__E=n}catch(l){e=l}throw e}},n=0,C.prototype.setState=function(e,t){var o;o=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=v({},this.state),"function"==typeof e&&(e=e(v({},o),this.props)),e&&v(o,e),null!=e&&this.__v&&(t&&this._sb.push(t),T(this))},C.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),T(this))},C.prototype.render=b,i=[],l="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,s=function(e,t){return e.__v.__b-t.__v.__b},$.__r=0,c=0,d=E(!1),u=E(!0),p=0;var W,U,V,G,Y=0,Q=[],X=r,K=X.__b,J=X.__r,Z=X.diffed,ee=X.__c,te=X.unmount,oe=X.__;function re(e,t){X.__h&&X.__h(U,e,Y||t),Y=0;var o=U.__H||(U.__H={__:[],__h:[]});return e>=o.__.length&&o.__.push({}),o.__[e]}function ne(e){return Y=1,ie(xe,e)}function ie(e,t,o){var r=re(W++,2);if(r.t=e,!r.__c&&(r.__=[o?o(t):xe(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],o=r.t(t,e);t!==o&&(r.__N=[o,r.__[1]],r.__c.setState({}))}],r.__c=U,!U.u)){var n=function(e,t,o){if(!r.__c.__H)return!0;var n=r.__c.__H.__.filter((function(e){return!!e.__c}));if(n.every((function(e){return!e.__N})))return!i||i.call(this,e,t,o);var a=!1;return n.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}})),!(!a&&r.__c.props===e)&&(!i||i.call(this,e,t,o))};U.u=!0;var i=U.shouldComponentUpdate,a=U.componentWillUpdate;U.componentWillUpdate=function(e,t,o){if(this.__e){var r=i;i=void 0,n(e,t,o),i=r}a&&a.call(this,e,t,o)},U.shouldComponentUpdate=n}return r.__N||r.__}function ae(e,t){var o=re(W++,3);!X.__s&&we(o.__H,t)&&(o.__=e,o.i=t,U.__H.__h.push(o))}function le(e,t){var o=re(W++,4);!X.__s&&we(o.__H,t)&&(o.__=e,o.i=t,U.__h.push(o))}function se(e){return Y=5,de((function(){return{current:e}}),[])}function ce(e,t,o){Y=6,le((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==o?o:o.concat(e))}function de(e,t){var o=re(W++,7);return we(o.__H,t)&&(o.__=e(),o.__H=t,o.__h=e),o.__}function ue(e,t){return Y=8,de((function(){return e}),t)}function pe(e){var t=U.context[e.__c],o=re(W++,9);return o.c=e,t?(null==o.__&&(o.__=!0,t.sub(U)),t.props.value):e.__}function he(e,t){X.useDebugValue&&X.useDebugValue(t?t(e):e)}function me(){var e=re(W++,11);if(!e.__){for(var t=U.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var o=t.__m||(t.__m=[0,0]);e.__="P"+o[0]+"-"+o[1]++}return e.__}function fe(){for(var e;e=Q.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(_e),e.__H.__h.forEach(ye),e.__H.__h=[]}catch(t){e.__H.__h=[],X.__e(t,e.__v)}}X.__b=function(e){U=null,K&&K(e)},X.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),oe&&oe(e,t)},X.__r=function(e){J&&J(e),W=0;var t=(U=e.__c).__H;t&&(V===U?(t.__h=[],U.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0}))):(t.__h.forEach(_e),t.__h.forEach(ye),t.__h=[],W=0)),V=U},X.diffed=function(e){Z&&Z(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Q.push(t)&&G===X.requestAnimationFrame||((G=X.requestAnimationFrame)||ve)(fe)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.i=void 0}))),V=U=null},X.__c=function(e,t){t.some((function(e){try{e.__h.forEach(_e),e.__h=e.__h.filter((function(e){return!e.__||ye(e)}))}catch(o){t.some((function(e){e.__h&&(e.__h=[])})),t=[],X.__e(o,e.__v)}})),ee&&ee(e,t)},X.unmount=function(e){te&&te(e);var t,o=e.__c;o&&o.__H&&(o.__H.__.forEach((function(e){try{_e(e)}catch(o){t=o}})),o.__H=void 0,t&&X.__e(t,o.__v))};var ge="function"==typeof requestAnimationFrame;function ve(e){var t,o=function(){clearTimeout(r),ge&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(o,100);ge&&(t=requestAnimationFrame(o))}function _e(e){var t=U,o=e.__c;"function"==typeof o&&(e.__c=void 0,o()),U=t}function ye(e){var t=U;e.__c=e.__(),U=t}function we(e,t){return!e||e.length!==t.length||t.some((function(t,o){return t!==e[o]}))}function xe(e,t){return"function"==typeof t?t(e):t}function be(e,t){for(var o in t)e[o]=t[o];return e}function Ce(e,t){for(var o in e)if("__source"!==o&&!(o in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function ke(e,t){this.props=e,this.context=t}function Se(e,t){function o(e){var o=this.props.ref,r=o==e.ref;return!r&&o&&(o.call?o(null):o.current=null),t?!t(this.props,e)||!r:Ce(this.props,e)}function r(t){return this.shouldComponentUpdate=o,y(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(ke.prototype=new C).isPureReactComponent=!0,ke.prototype.shouldComponentUpdate=function(e,t){return Ce(this.props,e)||Ce(this.state,t)};var Te=r.__b;r.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Te&&Te(e)};var $e="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Pe(e){function t(t){var o=be({},t);return delete o.ref,e(o,t.ref||null)}return t.$$typeof=$e,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ae=function(e,t){return null==e?null:I(I(e).map(t))},Ie={map:Ae,forEach:Ae,count:function(e){return e?I(e).length:0},only:function(e){var t=I(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:I},Re=r.__e;r.__e=function(e,t,o,r){if(e.then)for(var n,i=t;i=i.__;)if((n=i.__c)&&n.__c)return null==t.__e&&(t.__e=o.__e,t.__k=o.__k),n.__c(e,t);Re(e,t,o,r)};var Ne=r.unmount;function Oe(e,t,o){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=be({},e)).__c&&(e.__c.__P===o&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Oe(e,t,o)}))),e}function Ee(e,t,o){return e&&o&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Ee(e,t,o)})),e.__c&&e.__c.__P===t&&(e.__e&&o.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=o)),e}function De(){this.__u=0,this.t=null,this.__b=null}function Le(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Me(e){var t,o,r;function n(n){if(t||(t=e()).then((function(e){o=e.default||e}),(function(e){r=e})),r)throw r;if(!o)throw t;return y(o,n)}return n.displayName="Lazy",n.__f=!0,n}function Be(){this.u=null,this.o=null}r.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Ne&&Ne(e)},(De.prototype=new C).__c=function(e,t){var o=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(o);var n=Le(r.__v),i=!1,a=function(){i||(i=!0,o.__R=null,n?n(l):l())};o.__R=a;var l=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Ee(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},De.prototype.componentWillUnmount=function(){this.t=[]},De.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var o=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Oe(this.__b,o,r.__O=r.__P)}this.__b=null}var n=t.__a&&y(b,null,e.fallback);return n&&(n.__u&=-33),[y(b,null,t.__a?null:e.children),n]};var He=function(e,t,o){if(++o[1]===o[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(o=e.u;o;){for(;o.length>3;)o.pop()();if(o[1]>>1,1),t.i.removeChild(e)}}),z(y(ze,{context:t.context},e.__v),t.l)}function Fe(e,t){var o=y(je,{__v:e,i:t});return o.containerInfo=t,o}(Be.prototype=new C).__a=function(e){var t=this,o=Le(t.__v),r=t.o.get(e);return r[0]++,function(n){var i=function(){t.props.revealOrder?(r.push(n),He(t,e,r)):n()};o?o(i):i()}},Be.prototype.render=function(e){this.u=null,this.o=new Map;var t=I(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var o=t.length;o--;)this.o.set(t[o],this.u=[1,0,this.u]);return e.children},Be.prototype.componentDidUpdate=Be.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,o){He(e,o,t)}))};var qe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,We=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Ue=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ve=/[A-Z0-9]/g,Ge="undefined"!=typeof document,Ye=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function Qe(e,t,o){return null==t.__k&&(t.textContent=""),z(e,t),"function"==typeof o&&o(),e?e.__c:null}function Xe(e,t,o){return j(e,t),"function"==typeof o&&o(),e?e.__c:null}C.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(C.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var Ke=r.event;function Je(){}function Ze(){return this.cancelBubble}function et(){return this.defaultPrevented}r.event=function(e){return Ke&&(e=Ke(e)),e.persist=Je,e.isPropagationStopped=Ze,e.isDefaultPrevented=et,e.nativeEvent=e};var tt,ot={enumerable:!1,configurable:!0,get:function(){return this.class}},rt=r.vnode;r.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,o=e.type,r={},n=-1===o.indexOf("-");for(var i in t){var a=t[i];if(!("value"===i&&"defaultValue"in t&&null==a||Ge&&"children"===i&&"noscript"===o||"class"===i||"className"===i)){var l=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===a?a="":"translate"===l&&"no"===a?a=!1:"o"===l[0]&&"n"===l[1]?"ondoubleclick"===l?i="ondblclick":"onchange"!==l||"input"!==o&&"textarea"!==o||Ye(t.type)?"onfocus"===l?i="onfocusin":"onblur"===l?i="onfocusout":Ue.test(i)&&(i=l):l=i="oninput":n&&We.test(i)?i=i.replace(Ve,"-$&").toLowerCase():null===a&&(a=void 0),"oninput"===l&&r[i=l]&&(i="oninputCapture"),r[i]=a}}"select"==o&&r.multiple&&Array.isArray(r.value)&&(r.value=I(t.children).forEach((function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)}))),"select"==o&&null!=r.defaultValue&&(r.value=I(t.children).forEach((function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value}))),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",ot)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=qe,rt&&rt(e)};var nt=r.__r;r.__r=function(e){nt&&nt(e),tt=e.__c};var it=r.diffed;r.diffed=function(e){it&&it(e);var t=e.props,o=e.__e;null!=o&&"textarea"===e.type&&"value"in t&&t.value!==o.value&&(o.value=null==t.value?"":t.value),tt=null};var at={ReactCurrentDispatcher:{current:{readContext:function(e){return tt.__n[e.__c].props.value},useCallback:ue,useContext:pe,useDebugValue:he,useDeferredValue:_t,useEffect:ae,useId:me,useImperativeHandle:ce,useInsertionEffect:wt,useLayoutEffect:le,useMemo:de,useReducer:ie,useRef:se,useState:ne,useSyncExternalStore:bt,useTransition:yt}}};function lt(e){return y.bind(null,e)}function st(e){return!!e&&e.$$typeof===qe}function ct(e){return st(e)&&e.type===b}function dt(e){return!!e&&!!e.displayName&&("string"==typeof e.displayName||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function ut(e){return st(e)?F.apply(null,arguments):e}function pt(e){return!!e.__k&&(z(null,e),!0)}function ht(e){return e&&(e.base||1===e.nodeType&&e)||null}var mt=function(e,t){return e(t)},ft=function(e,t){return e(t)},gt=b;function vt(e){e()}function _t(e){return e}function yt(){return[!1,vt]}var wt=le,xt=st;function bt(e,t){var o=t(),r=ne({h:{__:o,v:t}}),n=r[0].h,i=r[1];return le((function(){n.__=o,n.v=t,Ct(n)&&i({h:n})}),[e,o,t]),ae((function(){return Ct(n)&&i({h:n}),e((function(){Ct(n)&&i({h:n})}))}),[e]),o}function Ct(e){var t,o,r=e.v,n=e.__;try{var i=r();return!((t=n)===(o=i)&&(0!==t||1/t==1/o)||t!=t&&o!=o)}catch(a){return!0}}var kt={useState:ne,useId:me,useReducer:ie,useEffect:ae,useLayoutEffect:le,useInsertionEffect:wt,useTransition:yt,useDeferredValue:_t,useSyncExternalStore:bt,startTransition:vt,useRef:se,useImperativeHandle:ce,useMemo:de,useCallback:ue,useContext:pe,useDebugValue:he,version:"17.0.2",Children:Ie,render:Qe,hydrate:Xe,unmountComponentAtNode:pt,createPortal:Fe,createElement:y,createContext:q,createFactory:lt,cloneElement:ut,createRef:x,Fragment:b,isValidElement:st,isElement:xt,isFragment:ct,isMemo:dt,findDOMNode:ht,Component:C,PureComponent:ke,memo:Se,forwardRef:Pe,flushSync:ft,unstable_batchedUpdates:mt,StrictMode:gt,Suspense:De,SuspenseList:Be,lazy:Me,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:at};const St=Object.freeze(Object.defineProperty({__proto__:null,Children:Ie,Component:C,Fragment:b,PureComponent:ke,StrictMode:gt,Suspense:De,SuspenseList:Be,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:at,cloneElement:ut,createContext:q,createElement:y,createFactory:lt,createPortal:Fe,createRef:x,default:kt,findDOMNode:ht,flushSync:ft,forwardRef:Pe,hydrate:Xe,isElement:xt,isFragment:ct,isMemo:dt,isValidElement:st,lazy:Me,memo:Se,render:Qe,startTransition:vt,unmountComponentAtNode:pt,unstable_batchedUpdates:mt,useCallback:ue,useContext:pe,useDebugValue:he,useDeferredValue:_t,useEffect:ae,useErrorBoundary:function(e){var t=re(W++,10),o=ne();return t.__=e,U.componentDidCatch||(U.componentDidCatch=function(e,r){t.__&&t.__(e,r),o[1](e)}),[o[0],function(){o[1](void 0)}]},useId:me,useImperativeHandle:ce,useInsertionEffect:wt,useLayoutEffect:le,useMemo:de,useReducer:ie,useRef:se,useState:ne,useSyncExternalStore:bt,useTransition:yt,version:"17.0.2"},Symbol.toStringTag,{value:"Module"})),Tt=e=>{let t;const o=new Set,r=(e,r)=>{const n="function"==typeof e?e(t):e;if(!Object.is(n,t)){const e=t;t=(null!=r?r:"object"!=typeof n||null===n)?n:Object.assign({},t,n),o.forEach((o=>o(t,e)))}},n=()=>t,i={setState:r,getState:n,getInitialState:()=>a,subscribe:e=>(o.add(e),()=>o.delete(e)),destroy:()=>{o.clear()}},a=t=e(r,n,i);return i};function $t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Pt(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var o=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};o.prototype=t.prototype}else o={};return Object.defineProperty(o,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),o}var At={exports:{}},It={};const Rt=Pt(St);var Nt={exports:{}},Ot={},Et=Rt;var Dt="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Lt=Et.useState,Mt=Et.useEffect,Bt=Et.useLayoutEffect,Ht=Et.useDebugValue;function zt(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!Dt(e,o)}catch(r){return!0}}var jt="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var o=t(),r=Lt({inst:{value:o,getSnapshot:t}}),n=r[0].inst,i=r[1];return Bt((function(){n.value=o,n.getSnapshot=t,zt(n)&&i({inst:n})}),[e,o,t]),Mt((function(){return zt(n)&&i({inst:n}),e((function(){zt(n)&&i({inst:n})}))}),[e]),Ht(o),o};Ot.useSyncExternalStore=void 0!==Et.useSyncExternalStore?Et.useSyncExternalStore:jt,Nt.exports=Ot;var Ft=Rt,qt=Nt.exports; /** * @license React * use-sync-external-store-shim/with-selector.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Wt="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Ut=qt.useSyncExternalStore,Vt=Ft.useRef,Gt=Ft.useEffect,Yt=Ft.useMemo,Qt=Ft.useDebugValue;It.useSyncExternalStoreWithSelector=function(e,t,o,r,n){var i=Vt(null);if(null===i.current){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=Yt((function(){function e(e){if(!s){if(s=!0,i=e,e=r(e),void 0!==n&&a.hasValue){var t=a.value;if(n(t,e))return l=t}return l=e}if(t=l,Wt(i,e))return t;var o=r(e);return void 0!==n&&n(t,o)?t:(i=e,l=o)}var i,l,s=!1,c=void 0===o?null:o;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,o,r,n]);var l=Ut(e,i[0],i[1]);return Gt((function(){a.hasValue=!0,a.value=l}),[l]),Qt(l),l},At.exports=It;const Xt=$t(At.exports),{useDebugValue:Kt}=kt,{useSyncExternalStoreWithSelector:Jt}=Xt;const Zt=e=>e;const eo=e=>{const t="function"==typeof e?(e=>e?Tt(e):Tt)(e):e,o=(e,o)=>function(e,t=Zt,o){const r=Jt(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,o);return Kt(r),r}(t,e,o);return Object.assign(o,t),o},to=e=>e?eo(e):eo;function oo(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[o,r]of e)if(!Object.is(r,t.get(o)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const o of e)if(!t.has(o))return!1;return!0}const o=Object.keys(e);if(o.length!==Object.keys(t).length)return!1;for(let r=0;r{const r=new Set;return(n,i,a)=>{const l=(null==o?void 0:o.equalityFn)??oo;if(null==o?void 0:o.keys){const e=o.keys;for(const t of e)r.add(t)}const s=!0!==(null==o?void 0:o.disableProxy)||!!(null==o?void 0:o.keys),c=!0!==(null==o?void 0:o.disableProxy)&&!(null==o?void 0:o.keys),d=(e,o,...i)=>{n((o=>{const n="object"==typeof e?e:e(o);return s&&0!==r.size&&!Object.keys(n).some((e=>r.has(e)))?{...o,...n}:(e=>{const o=new Proxy({...e},{get:(t,o)=>(r.add(o),e[o])}),n=t(c?o:{...e});for(const t of Object.keys(n))l(n[t],e[t])&&(n[t]=e[t]);return{...e,...n}})({...o,...n})}),o,...i)},u=a;u.setState=d;const p=e(d,i,u);return Object.assign({},p,t(p))}},no=to()(ro(((e,t)=>({config:{},setConfig:t=>{e((e=>({config:{...e.config,...t,sections:{...e.config.sections,...t.sections}}})))},setConfigSections:o=>e({config:{...t().config,sections:o}})})),(e=>{var t,o,r,n,i,a,l,s,c,d,u,p,h,m,f,g,v,_,y,w,x,b,C,k,S,T,$,P,A,I,R,N,O,E,D,L;return{isInBuilder:!!(null==(t=e.config)?void 0:t.isInBuilder),version:null==(o=e.config)?void 0:o.version,benefits:null==(n=null==(r=e.config)?void 0:r.sections)?void 0:n.benefits,announcements:null==(a=null==(i=e.config)?void 0:i.sections)?void 0:a.announcement,checkout:null==(s=null==(l=e.config)?void 0:l.sections)?void 0:s.checkout,paymentProviders:null==(d=null==(c=e.config)?void 0:c.sections)?void 0:d.paymentBadges,bulkDiscounts:null==(p=null==(u=e.config)?void 0:u.sections)?void 0:p.bulkDiscounts,general:null==(m=null==(h=e.config)?void 0:h.sections)?void 0:m.general,orderNote:null==(g=null==(f=e.config)?void 0:f.sections)?void 0:g.note,productTip:null==(_=null==(v=e.config)?void 0:v.sections)?void 0:_.tip,crossSell:null==(w=null==(y=e.config)?void 0:y.sections)?void 0:w.recommendations,stickyCheckoutButton:null==(b=null==(x=e.config)?void 0:x.sections)?void 0:b.sticky,freeProduct:null==(k=null==(C=e.config)?void 0:C.sections)?void 0:k.freeProduct,progressBar:null==(T=null==(S=e.config)?void 0:S.sections)?void 0:T.progress,orderDiscount:null==(P=null==($=e.config)?void 0:$.sections)?void 0:P.orderDiscount,discountCode:null==(I=null==(A=e.config)?void 0:A.sections)?void 0:I.discountCode,settings:null==(R=e.config)?void 0:R.settings,currencyCode:null==(N=e.config)?void 0:N.currencyCode,primaryLocale:null==(O=e.config)?void 0:O.primaryLocale,moneyFormat:null==(E=e.config)?void 0:E.moneyFormat,promoBanner:null==(L=null==(D=e.config)?void 0:D.sections)?void 0:L.promoBanner}}))),io=e=>{let t=0;if(no.getState().isInBuilder)return void console.error("Error in cart app",e);const o=r=>{var n;window.parent.Sentry?(null==(n=window.parent.Sentry)||n.captureException(r),console.error("Error in cart app",r)):t<=5?(console.log("Retrying...",t),setTimeout((()=>{t++,o(e)}),2e3)):t>5&&console.error("Error could not be logged.",r)};o(e)};class ao extends C{constructor(){super(...arguments),this.state={hasError:!1,retries:0}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){io(e)}render(){return this.state.hasError?"Sorry, something went wrong. Please reload the page and try again.":this.props.children}}const lo=e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"#ffffff",...e},y("path",{d:"M0 0h24v24H0V0z",fill:"none"}),y("path",{stroke:"ffffff",d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.37-.66-.11-1.48-.87-1.48H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"})),so={},co=function(e,t,o){if(!t||0===t.length)return e();const r=document.getElementsByTagName("link");return Promise.all(t.map((e=>{if((e=function(e){return"/"+e}(e))in so)return;so[e]=!0;const t=e.endsWith(".css"),n=t?'[rel="stylesheet"]':"";if(!!o)for(let o=r.length-1;o>=0;o--){const n=r[o];if(n.href===e&&(!t||"stylesheet"===n.rel))return}else if(document.querySelector(`link[href="${e}"]${n}`))return;const i=document.createElement("link");return i.rel=t?"stylesheet":"modulepreload",t||(i.as="script",i.crossOrigin=""),i.href=e,document.head.appendChild(i),t?new Promise(((t,o)=>{i.addEventListener("load",t),i.addEventListener("error",(()=>o(new Error(`Unable to preload CSS for ${e}`))))})):void 0}))).then((()=>e())).catch((e=>{const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}))},uo={apiUrl:"",sentryKey:"",postHogKey:"",postHogHost:"https://eu.posthog.com",postHogCaptureUrl:"https://eu.i.posthog.com/capture",nodeEnv:"test",cartEventsUrl:"",mode:"test",apiUrl:"https://thunderupsells.com",sentryKey:"0f8c2310a77e8f8f5971908dd31db519",postHogKey:"phc_1H5vNMZVy3lOvdLu30c1wVpC3nPb76JI35VZm2SXE06",postHogHost:"https://eu.posthog.com",postHogCaptureUrl:"https://eu.i.posthog.com/capture",cartEventsUrl:"https://events.thunderupsells.com/cart/events",nodeEnv:"production",mode:"production"},po="cro-cart-app-iframe",ho="cro-cart-sticky-button",mo="2147483650",fo="X-CRO-Cart-Request",go="cro_cart_",vo="cro_cart_";"test"!==uo.nodeEnv&&no.getState().isInBuilder&&co((()=>import("./mocks.js")),[]);const _o=e=>e.includes(window.location.host)||!e.includes("https://"),yo=()=>uo.mode,wo=()=>{return"development"===yo()||"visual"===yo()||!!(null==(e=window.CROCartVisual)?void 0:e.enabled)||no.getState().isInBuilder;var e},xo=async(e,t)=>{const{fetch:o}=window;try{let r;_o(e.toString())&&(r={...t,headers:{...null==t?void 0:t.headers,[fo]:"1"}});return await o(e,r||t)}catch(r){throw console.error(r),r}},bo=async(e,t)=>{var o;const{mocks:r}=await co((()=>import("./mocks.js")),[]),n=`${(null==(o=null==t?void 0:t.method)?void 0:o.toUpperCase())||"GET"}::${e}`;console.warn(`Warning: Mock Ajax API is enabled. Returning mock for key ${n}`);const i=r[Object.keys(r).find((e=>{return t=n,new RegExp("^"+e.split("*").map((e=>e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"))).join(".*")+"$").test(t);var t}))];let a=i;if("function"==typeof i)try{a=i((null==t?void 0:t.body)&&JSON.parse(null==t?void 0:t.body),{resource:e,options:t,resourceKey:n})}catch(l){console.log(l)}return a||console.error(`Mock for resource key ${n} not found. Returning {}.`),new Promise((e=>setTimeout((()=>e(a||{})),500)))},Co=async(e,t)=>{if(wo())return bo(e,t);try{const o=await xo((e=>{var t,o;if(no.getState().isInBuilder)return"/builder/proxy";const r=(null==(o=null==(t=window.Shopify)?void 0:t.routes)?void 0:o.root)||"/";return`${r.endsWith("/")?r:`${r}/`}${e.replace(/^\//,"")}`})(e),((e,t={})=>{var o;return no.getState().isInBuilder?{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({shop:no.getState().config.shopUrl,endpoint:e,body:t.body&&JSON.parse(t.body),method:t.method,token:null==(o=window.parent.CROCart)?void 0:o.storeSessionState.sessionToken})}:t})(e,t));if(o.status>=300){if(o.statusText)return Promise.resolve({error:o.statusText});const e=await o.json();return Promise.resolve({error:e.message})}const r=await o.json();return r.status>=300||"bad_request"===r.status?(console.log(r),Promise.resolve({error:r.message})):r}catch(o){return Promise.resolve({error:o.toString()})}},ko=e=>Co("cart/add.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),So=e=>Co("cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),To=async()=>{var e,t;const o=await Co("cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({line:1})});return{...o,items_added:(null==(e=o.items_changelog)?void 0:e.added)||[],items_removed:(null==(t=o.items_changelog)?void 0:t.removed)||[]}},$o=({handle:e})=>Co(`products/${e}.js`); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */ var Po,Ao,Io=function(){return Io=Object.assign||function(e){for(var t,o=1,r=arguments.length;o{const{text:t,type:o="info",duration:r=3e3}=e,n=new Mo;n[o].call(n,{message:t,duration:r,dismissible:!0,position:{x:"center",y:"bottom"},types:[{type:"error",background:"indianred"},{type:"success",background:"green"},{type:"warning",background:"orange"},{type:"info",background:"blue"}]})},Ho=e=>{try{return new Intl.NumberFormat("en",{style:"currency",currency:String(e||"USD").toUpperCase()}).resolvedOptions().maximumFractionDigits}catch(t){return 2}},zo=(e,t)=>Math.round(e*10**Ho(t)),jo=(e,t)=>e/10**Ho(t),Fo=(e,t,o,r)=>zo(jo(e,t)*r,o),qo=(e,t,o="USD")=>{var r,n;const i=jo(e,o),a=t.includes("_no_decimals")?0:Ho(o);if(t.includes("with_period_and_space_separator")){const e=new Intl.NumberFormat("en-US",{style:"decimal",minimumFractionDigits:a,maximumFractionDigits:a}).format(i).replace(/,/g," "),o=(null==(r=t.match(/\{\{[^}]+\}\}/))?void 0:r[0])||"{{amount}}";return t.replace(o,e)}const l=(e=>e.includes("with_comma_separator")?"de-DE":e.includes("with_space_separator")?"fr-FR":e.includes("with_apostrophe_separator")?"de-CH":"en-US")(t),s=new Intl.NumberFormat(l,{style:"decimal",minimumFractionDigits:a,maximumFractionDigits:a}).format(i),c=(null==(n=t.match(/\{\{[^}]+\}\}/))?void 0:n[0])||"{{amount}}";return t.replace(c,s)},Wo=(e,t="en-US")=>{const o=Ho(e);return(r,n=o)=>{const i=jo(r,e)||0;return e&&((r=o)=>{var n,i;return new Intl.NumberFormat((null==(i=null==(n=window.parent)?void 0:n.Shopify)?void 0:i.locale)||t,{style:"currency",currency:e||"USD",minimumFractionDigits:r,maximumFractionDigits:r})})(n).format(i)}},Uo="cro_debug_logs",Vo={giftTiers:"#9333EA",cart:"#3B82F6",recommendations:"#10B981",recommendationsRules:"#059669",cartTotals:"#8B5CF6",tracking:"#F59E0B",atc:"#EF4444",default:"#6B7280"};const Go=new class{constructor(){this.enabledNamespaces=new Set,this.loadFromStorage()}loadFromStorage(){try{const e=localStorage.getItem(Uo);if(e){const t=JSON.parse(e);this.enabledNamespaces=new Set(t)}}catch(e){}}saveToStorage(){try{localStorage.setItem(Uo,JSON.stringify([...this.enabledNamespaces]))}catch(e){}}enableLogs(e){this.enabledNamespaces.add(e),this.saveToStorage(),console.log(`%c[Debug] Enabled logs for: ${e}`,"color: #10B981; font-weight: bold")}disableLogs(e){this.enabledNamespaces.delete(e),this.saveToStorage(),console.log(`%c[Debug] Disabled logs for: ${e}`,"color: #EF4444; font-weight: bold")}enableAllLogs(){Object.keys(Vo).filter((e=>"default"!==e)).forEach((e=>this.enabledNamespaces.add(e))),this.saveToStorage(),console.log("%c[Debug] Enabled all logs","color: #10B981; font-weight: bold")}disableAllLogs(){this.enabledNamespaces.clear(),this.saveToStorage(),console.log("%c[Debug] Disabled all logs","color: #EF4444; font-weight: bold")}getEnabledLogs(){return[...this.enabledNamespaces]}isEnabled(e){return this.enabledNamespaces.has(e)}log(e,t,o,r){if(!this.isEnabled(e))return;const n=Vo[e]||Vo.default,i=(new Date).toLocaleTimeString(),a=`[${e}]`,l={info:"ℹ️",warn:"⚠️",error:"❌"},s="error"===t?console.error:"warn"===t?console.warn:console.log;void 0!==r?s(`%c${l[t]} ${a} ${i}%c ${o}`,`color: ${n}; font-weight: bold`,"color: inherit",r):s(`%c${l[t]} ${a} ${i}%c ${o}`,`color: ${n}; font-weight: bold`,"color: inherit")}},Yo=e=>({info:(t,o)=>Go.log(e,"info",t,o),warn:(t,o)=>Go.log(e,"warn",t,o),error:(t,o)=>Go.log(e,"error",t,o)});const Qo=new class{isDetected(){var e,t,o;return!!(null==(e=window.parent.document)?void 0:e.querySelector(".ba-chosen"))&&!!(null==(o=null==(t=window.parent.baCurr)?void 0:t.Currency)?void 0:o.convert)}getPresentmentCurrency(){var e;return(null==(e=window.parent.document)?void 0:e.querySelector(".ba-chosen").textContent)||"USD"}convert(e,t){const o=window.parent.baCurr,r=null==o?void 0:o.Currency.convert(e,t,this.getPresentmentCurrency());return o.config.roundPriceStatus?function(e,t,o,r){let n=jo(e,t);return o>0&&(n=Math.ceil(n/o)*o),"removeDecimal"===r&&(n=Math.floor(n)),zo(n,t)}(r,this.getPresentmentCurrency(),o.config.round_dec,o.config.round_style):r}};var Xo=0;function Ko(e,t,o,n,i,a){t||(t={});var l,s,c=t;if("ref"in c)for(s in c={},t)"ref"==s?l=t[s]:c[s]=t[s];var d={type:e,props:c,key:o,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--Xo,__i:-1,__u:0,__source:i,__self:a};if("function"==typeof e&&(l=e.defaultProps))for(s in l)void 0===c[s]&&(c[s]=l[s]);return r.vnode&&r.vnode(d),d}const Jo=({amount:e,decimals:t,...o})=>Ko("span",{...o,dangerouslySetInnerHTML:{__html:e.toFormattedString({decimals:t})}}),Zo=Yo("cartTotals");class er{constructor(e,t){var o,r;this.valueInCents=e,this.currency=t;const n=no.getState(),i=n.isInBuilder?n.primaryLocale??"en-US":(null==(r=null==(o=window.parent)?void 0:o.Shopify)?void 0:r.locale)??"en-US";this.nativeCurrencyFormatter=Wo(t,i)}_getPresentedmentCurrency(){var e,t;if(Qo.isDetected())return Qo.getPresentmentCurrency();const o=no.getState();return o.isInBuilder?o.currencyCode||"USD":(null==(t=null==(e=window.parent.Shopify)?void 0:e.currency)?void 0:t.active)||"USD"}_convertToNativeCurrency(e,t){var o,r;const n=parseFloat(null==(r=null==(o=window.parent.Shopify)?void 0:o.currency)?void 0:r.rate)||1;return Fo(e,this.currency,t,n)}toFormattedString(e){var t,o,r,n,i,a,l,s,c;const d=this._getPresentedmentCurrency(),u=no.getState(),p=u.isInBuilder,h=p?u.primaryLocale??"en-US":(null==(o=null==(t=window.parent)?void 0:t.Shopify)?void 0:o.locale)??"en-US",m=p?u.moneyFormat:null==(n=null==(r=window.parent)?void 0:r.CROCart)?void 0:n.money_format;if(Zo.info("toFormattedString called",{money_format:m,isInBuilder:p,presentmentCurrency:d,primaryLocale:h,valueInCents:this.valueInCents,currency:this.currency,hasParentCROCart:!!(null==(i=window.parent)?void 0:i.CROCart)}),m){if(d===this.currency){const e=qo(this.valueInCents,m,this.currency);return Zo.info("Formatted with Shopify template (native currency)",{formatted:e,money_format:m}),e}{let e=this.valueInCents;if(Qo.isDetected())e=Qo.convert(this.valueInCents,this.currency),Zo.info("Nova currency converter detected",{original:this.valueInCents,converted:e});else{const t=parseFloat(null==(l=null==(a=window.parent.Shopify)?void 0:a.currency)?void 0:l.rate)||1;e=Fo(this.valueInCents,this.currency,d,t),Zo.info("Using exchange rate",{rate:t,converted:e})}const t=qo(e,m,d);return Zo.info("Formatted with Shopify template (converted currency)",{formatted:t,money_format:m}),t}}if(Zo.info("Falling back to Intl.NumberFormat"),d===this.currency){return this.nativeCurrencyFormatter(this.valueInCents,null==e?void 0:e.decimals)}{const t=Wo(d,h);if(Qo.isDetected()){return t(Qo.convert(this.valueInCents,this.currency),null==e?void 0:e.decimals)}const o=parseFloat(null==(c=null==(s=window.parent.Shopify)?void 0:s.currency)?void 0:c.rate)||1;return t(Fo(this.valueInCents,this.currency,d,o),null==e?void 0:e.decimals)}}getNativeCurrency(){return mi.getState().cartCurrency}getAsNativeCurrency(){const e=this.getNativeCurrency();return e!==this.currency?{value:this._convertToNativeCurrency(this.valueInCents,e),currency:e}:{value:this.valueInCents,currency:this.currency}}getAsNativeCurrencyValue(){return this.getAsNativeCurrency().value}static fromCartTotal(e){return new er((null==e?void 0:e.total_price)||0,null==e?void 0:e.currency)}static fromCartSubtotal(e){return new er((null==e?void 0:e.original_total_price)||0,null==e?void 0:e.currency)}static fromCartTotalExcludingGiftCards(e){if(!(null==e?void 0:e.items))return new er(0,(null==e?void 0:e.currency)||"USD");const t=e.items.filter((e=>!e.gift_card)).reduce(((e,t)=>e+t.final_line_price),0);return new er(t,e.currency)}subtract(e){return new er(this.getAsNativeCurrency().value-e.getAsNativeCurrency().value,this.currency)}add(e){return new er(this.getAsNativeCurrency().value+e.getAsNativeCurrency().value,this.currency)}nullify(){return new er(0,this.currency)}gte(e){return this.getAsNativeCurrency().value>=e.getAsNativeCurrency().value}lt(e){return this.getAsNativeCurrency().value((e,t)=>"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon&&"undefined"!=typeof Blob&&navigator.sendBeacon(e,new Blob([t],{type:"application/json"})))(e,t)?Promise.resolve():xo(e,{method:"POST",headers:{"Content-Type":"application/json"},keepalive:!0,body:t}).catch((e=>{console.debug(`${o} analytics capture failed`,e)})),or=(e,t,o)=>{var r=new Date;r.setTime(r.getTime()+60*o*1e3);var n="expires="+r.toUTCString();document.cookie=vo+e+"="+t+"; path=/;"+n},rr=e=>{for(var t=`${vo}${e}=`,o=document.cookie.split(";"),r=0;r"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/(x)|(y)|([-4])/g,(function(e,t,o,r){return t?Math.floor(15*Math.random()).toString(16):o?Math.floor(4*Math.random()+8).toString(16):r})),ir=e=>{const t="string"==typeof e?e:JSON.stringify(e||"");let o=2166136261;for(let r=0;r>>0).toString(16).padStart(8,"0")},ar="cro_cart_session_id",lr=()=>{try{return"undefined"!=typeof window&&!!window.localStorage}catch(e){return!1}},sr=e=>{var t;return e||(null==(t=window.Shopify)?void 0:t.shop)||"unknown_shop"},cr=e=>`cro_cart_session:${sr(e)}`,dr=e=>e?`ct_${ir(e)}`:void 0,ur=e=>{const t=((null==e?void 0:e.items)||[]).map((e=>e.variant_id||e.id)).filter(Boolean).map(String).sort();return t.length?`cf_${ir(t.join("|"))}`:"cf_empty"},pr=e=>{or(ar,e.id,43200),lr()&&window.localStorage.setItem(cr(e.shop),JSON.stringify(e))},hr=({shop:e,cart:t,now:o})=>({id:`cs_${nr().replace(/-/g,"")}`,shop:e,cartTokenHash:dr(null==t?void 0:t.token),cartFingerprint:ur(t),status:"active",createdAt:o.toISOString(),updatedAt:o.toISOString()}),mr=({cart:e,shop:t,now:o=new Date}={})=>{const r=sr(t),n=dr(null==e?void 0:e.token),i=ur(e),a=(e=>{if(lr())try{const t=window.localStorage.getItem(cr(e));return t?JSON.parse(t):void 0}catch(t){return}})(r);let l=!a||((e,t)=>t.getTime()-new Date(e.updatedAt).getTime()>2592e6)(a,o)?hr({shop:r,cart:e,now:o}):{...a,updatedAt:o.toISOString()};const s="checkout_started"!==l.status&&!!l.cartTokenHash&&!!n&&l.cartTokenHash!==n,c="checkout_started"===l.status&&((e=>{var t;return!e||(e.item_count??(null==(t=e.items)?void 0:t.reduce(((e,t)=>e+t.quantity),0))??0)<=0})(e)||!!l.cartTokenHash&&!!n&&l.cartTokenHash!==n||l.cartFingerprint!==i);return s||c?l=hr({shop:r,cart:e,now:o}):(l.cartTokenHash=n||l.cartTokenHash,l.cartFingerprint=i||l.cartFingerprint),pr(l),l},fr=e=>{const t=mr({cart:e});if(t.id)return t.id;const o=rr(ar);return(null==o?void 0:o.startsWith("cs_"))?o:mr({cart:e}).id},gr=e=>null==e?void 0:e.trim().toUpperCase(),vr=e=>{const t=null==e?void 0:String(e).trim();if(t)return t.split("/").pop()},_r=(e,t)=>{if(!e.countryCodes||0===e.countryCodes.length)return!0;const o=gr(t);return!o||e.countryCodes.some((e=>gr(e)===o))},yr=(e,t)=>{return!(!e.marketId||(o=e.marketId,r=t.marketId,!o||!r||o!==r&&vr(o)!==vr(r))||!_r(e,t.countryCode))||!!(e.marketHandle&&t.marketHandle&&e.marketHandle===t.marketHandle&&_r(e,t.countryCode));var o,r},wr=e=>"*"===e.marketId&&!1===e.enabled,xr=(e,t)=>{if(!e||0===e.length)return;const o=e.find((e=>yr(e,t)));if(o)return{row:o,source:"market"};const r=e.find((e=>((e,t)=>{if(!e.countryCodes||0===e.countryCodes.length)return!1;const o=gr(t.countryCode);return!!o&&e.countryCodes.some((e=>gr(e)===o))})(e,t)));if(r)return{row:r,source:"country"};const n=e.find(wr);return n?{row:n,source:"market"}:void 0},br=(e,t)=>zo(e,t),Cr=(e,t,o)=>{var r,n,i;if(!(null==e?void 0:e.freeShippingRuleEnabled))return;const a=(()=>{var e,t,o,r,n,i,a,l;const s=(null==(e=window.parent)?void 0:e.CROCart)||window.CROCart,c=null==s?void 0:s.localization;return{marketId:(null==c?void 0:c.marketId)||(null==(t=null==c?void 0:c.market)?void 0:t.id),marketHandle:(null==c?void 0:c.marketHandle)||(null==(o=null==c?void 0:c.market)?void 0:o.handle),countryCode:(null==c?void 0:c.countryCode)||(null==(r=null==c?void 0:c.country)?void 0:r.isoCode)||(null==(n=null==c?void 0:c.country)?void 0:n.iso_code),currencyCode:(null==c?void 0:c.currencyCode)||(null==(i=null==c?void 0:c.country)?void 0:i.currencyCode)||(null==(l=null==(a=null==c?void 0:c.country)?void 0:a.currency)?void 0:l.iso_code)}})(),l=xr(e.freeShippingThresholds,a);if(l&&(!l.row.enabled||Number(l.row.amount)<0||!Number.isFinite(Number(l.row.amount))))return;const s=l?l.row.alwaysFree?0:Number(l.row.amount):Number(e.freeShippingRule);if(!Number.isFinite(s)||s<0)return;const c=((null==l?void 0:l.row.currencyCode)||o||t)===t?1:Number((null==(i=null==(n=null==(r=window.parent)?void 0:r.Shopify)?void 0:n.currency)?void 0:i.rate)||1);return{thresholdCents:br(s*c,t),currency:t,market:a.countryCode}},kr=({tier:e,cartValueCents:t,currency:o})=>{var r,n,i,a;const l=1===(null==(r=e.fetchedProducts)?void 0:r.length)?e.fetchedProducts[0]:void 0;return{feature_type:"free_gift",feature_id:`free_gift_tier_${e.id}`,tier_id:e.id,surface:"cart_drawer",product_id:Tr(null==l?void 0:l.id),variant_id:Tr(1===(null==(n=null==l?void 0:l.variants)?void 0:n.length)?null==(i=l.variants[0])?void 0:i.id:void 0),threshold_cents:br(e.threshold,o),cart_value_cents:t,remaining_cents:Math.max(0,$r(null==(a=e.remainingAmount)?void 0:a.getAsNativeCurrencyValue())),currency:o,eligible:e.isUnlocked,automatic:e.automatic,selectable:e.selectable,rendered:!0}},Sr={recommendation:"recommendation",pdp_nav_recommendation:"pdp_recommendation",pdp_nav:"pdp_recommendation",free_product:"free_gift",free_product_sync:"free_gift",bulk_discount:"volume_discount",one_click_upsell:"one_click_upsell",quantity_change:"quantity_upsell",cart_quantity:"quantity_upsell"},Tr=e=>null==e||""===e?void 0:String(e),$r=e=>{const t=Number(e||0);return Number.isFinite(t)?Math.round(t):0},Pr=(e,t=[])=>`${e}_${ir([e,...t].join("|"))}`,Ar=(e,t)=>"one_click_upsell"===e?"checkout_one_click_upsell_1":"quantity_upsell"===e?"cart_quantity_controls_1":"volume_discount"===e?"volume_discount_1":"free_gift"===e?(null==t?void 0:t.tier_id)?"free_gift_tiers_1":"free_gift_legacy_1":Tr((null==t?void 0:t.recommendation_id)||Pr(e,[null==t?void 0:t.rule_id,null==t?void 0:t.variant_id])),Ir=e=>Sr[e||""],Rr=e=>{var t,o,r;const n=e.feature_context||{},i=e.acceptedRecommendation||e.accepted_recommendation,a=e.product||(null==(t=e.products)?void 0:t[0])||(null==(o=e.added_products)?void 0:o[0])||{},l=Object.keys(a.properties||{}).join("|"),s=Object.entries((null==(r=e.originalCart)?void 0:r.attributes)||{}).map((([e,t])=>{try{const o="string"==typeof t?JSON.parse(t):t;return{key:e,value:void 0===(null==o?void 0:o.value)?o:o.value}}catch(o){return{key:e,value:void 0}}})),c=String(e.variant_id||a.variant_id||a.id||""),d=s.find((({value:e})=>!c||String((null==e?void 0:e.variant_id)||(null==e?void 0:e.recommended_variant_id)||"")===c)),u=i?"pdp-nav"===i.recommendation_type?"pdp_recommendation":"recommendation":l.includes("free_product")?"free_gift":(null==d?void 0:d.key.includes("one_click_upsell"))?"one_click_upsell":(null==d?void 0:d.key.includes("bulk_upsell"))?"volume_discount":(null==d?void 0:d.key.includes("quantity_change_upsell"))?"quantity_upsell":void 0,p=n.feature_type||Ir(e.source||e.module)||u;if(!p)return;const h=i||(null==d?void 0:d.value)||{};return{feature_type:p,feature_id:Tr(n.feature_id||e.feature_id||h.recommendation_id||Pr(p,[e.rule_id,e.tier_id,e.module])),rule_id:Tr(n.rule_id||e.rule_id||h.rule_id),tier_id:Tr(n.tier_id||e.tier_id||e.gift_tier_id||h.tier_id),surface:n.surface||e.surface||h.surface||("one_click_upsell"===p?"checkout_section":"cart_drawer"),position:Number(n.position||e.position||h.position)||void 0,product_id:Tr(n.product_id||e.product_id||a.product_id||e.recommended_product_id||h.recommended_product_id),variant_id:Tr(n.variant_id||e.variant_id||a.variant_id||a.id||e.recommended_variant_id||h.recommended_variant_id),source_product_id:Tr(n.source_product_id||e.source_product_id||h.source_product_id),source_variant_id:Tr(n.source_variant_id||e.source_variant_id||h.source_variant_id),threshold_cents:Number(n.threshold_cents||e.threshold_cents)||void 0,currency:n.currency||e.currency,market:n.market||e.market,algorithm:n.algorithm||e.algorithm||e.engine_type||h.algorithm||h.engine_type,slot:n.slot||e.slot||h.slot,automatic:"boolean"==typeof n.automatic?n.automatic:"boolean"==typeof e.automatic?e.automatic:void 0,selectable:"boolean"==typeof n.selectable?n.selectable:"boolean"==typeof e.selectable?e.selectable:void 0,discount_type:n.discount_type||e.discount_type,qualifying_quantity:Number(n.qualifying_quantity||e.qualifying_quantity)||void 0}},Nr=e=>{var t,o,r,n,i,a;const l=[],s=Rr(e),c=e.product||(null==(t=e.products)?void 0:t[0])||(null==(o=e.added_products)?void 0:o[0])||{},d=e.acceptedRecommendation||e.accepted_recommendation,u=Number(e.fromQty??e.from_qty??0),p=Number(e.toQty??e.to_qty??(null==(n=null==(r=e.products)?void 0:r[0])?void 0:n.quantity)??(null==(a=null==(i=e.added_products)?void 0:i[0])?void 0:a.quantity)??1);if(s&&l.push({...s,application:p>u,removal:pu,removal:p{var n,i,a;if(!o)return;const l=no.getState(),s=o.currency||l.currencyCode||"USD",c=$r(null==t?void 0:t.total_price),d=$r(o.total_price);if((null==(n=l.progressBar)?void 0:n.isActive)&&(null==(i=l.progressBar)?void 0:i.freeShippingRuleEnabled)){const t=Cr(l.progressBar,s,l.currencyCode);if(t){const o=t.thresholdCents;e.push({feature_type:"free_shipping",feature_id:"progress_free_shipping_1",threshold_cents:o,currency:s,market:t.market,surface:"progress",product_id:null==r?void 0:r.product_id,variant_id:null==r?void 0:r.variant_id,cart_value_before_cents:c,cart_value_after_cents:d,remaining_before_cents:Math.max(0,o-c),remaining_after_cents:Math.max(0,o-d),threshold_crossed:c=o,application:c=o,removal:c>=o&&d=t,discount_applied_before:c>=t,discount_applied_after:d>=t,application:c=t,removal:c>=t&&d{var t,o,r;if(!e)return[];const n=no.getState(),i=e.attributes||{},a=e.currency||n.currencyCode||"USD",l=[],s=new Set,c=e=>{const t=[e.feature_type,e.feature_id,e.tier_id,e.product_id,e.variant_id].join("|");s.has(t)||(s.add(t),l.push(e))};Object.entries(i).forEach((([t,o])=>{var r,i;const l=(e=>{if("string"!=typeof e)return e;try{const t=JSON.parse(e);return void 0===(null==t?void 0:t.value)?t:t.value}catch(t){return}})(o);let s;if(t.includes("accepted_recommendations")){return void(Array.isArray(null==l?void 0:l.contexts)?l.contexts:[]).forEach((e=>c({feature_type:"pdp-nav"===e.recommendation_type?"pdp_recommendation":"recommendation",feature_id:e.recommendation_id,product_id:Tr(e.recommended_product_id),variant_id:Tr(e.recommended_variant_id),source_product_id:Tr(e.source_product_id),source_variant_id:Tr(e.source_variant_id),surface:e.surface,position:Number(e.position)||void 0,algorithm:e.algorithm,slot:e.slot,quantity:Number(e.quantity||0),applied:!0,retained:!e.removed_at,final_value_cents:Number(e.unit_price_cents||0)*Number(e.quantity||0),currency:a})))}if(t.includes("free_product_upsell")?s="free_gift":t.includes("bulk_upsell")?s="volume_discount":t.includes("one_click_upsell")?s="one_click_upsell":t.includes("quantity_change_upsell")?s="quantity_upsell":t.includes("recommendation_upsell")&&(s="pdp-nav"===(null==l?void 0:l.recommendation_type)?"pdp_recommendation":"recommendation"),!s||!l)return;const d=null==(r=e.items)?void 0:r.find((e=>String(e.variant_id)===String(l.variant_id||l.recommended_variant_id))),u=Math.max(0,Number(l.upsellQty||0)),p=Math.max(1,Number((null==d?void 0:d.quantity)||1)),h=Number((null==d?void 0:d.original_line_price)||(null==d?void 0:d.final_line_price)||0)/p,m=Number((null==d?void 0:d.final_line_price)||0)/p,f="volume_discount"===s?p:u,g="volume_discount"===s?Math.round(Number((null==d?void 0:d.original_line_price)||(null==d?void 0:d.final_line_price)||0)):Math.round(h*f),v=Number(l.amtChange),_="volume_discount"===s?Math.round(Number((null==d?void 0:d.final_line_price)||0)):Number.isFinite(v)&&v>=0?Math.round(v):Math.round(m*f),y=[..."volume_discount"===s?((e,t)=>{if(!t)return[];if("all"===(null==e?void 0:e.choiceUpsell))return e.upsellParts||[];const o=String(t.variant_id||t.id||""),r=String(t.product_id||""),n=((null==e?void 0:e.upsellSpecificParts)||[]).find((e=>String(e.id||e.variantId||"")===o||String(e.productId||"")===r));return(null==n?void 0:n.parts)||[]})(n.bulkDiscounts,d):[]].filter((e=>Number(e.count||0)<=Number((null==d?void 0:d.quantity)||0))).sort(((e,t)=>Number(t.count||0)-Number(e.count||0)))[0],w="volume_discount"===s?Pr("volume_discount",[null==(i=n.bulkDiscounts)?void 0:i.choiceUpsell]):Tr(l.rule_id);c({feature_type:s,feature_id:Ar(s,l),rule_id:w,tier_id:Tr(l.tier_id||(y?Pr("volume_discount",[w,null==d?void 0:d.product_id,y.count,y.percentage]):void 0)),product_id:Tr(l.recommended_product_id||(null==d?void 0:d.product_id)),variant_id:Tr(l.recommended_variant_id||l.variant_id||(null==d?void 0:d.variant_id)),source_product_id:Tr(l.source_product_id),source_variant_id:Tr(l.source_variant_id),surface:l.surface,position:Number(l.position)||void 0,algorithm:l.algorithm||l.engine_type,slot:l.slot,automatic:"boolean"==typeof l.automatic?l.automatic:void 0,selectable:"boolean"==typeof l.selectable?l.selectable:void 0,discount_type:l.discount_type,quantity:f,applied:!0,retained:!!d,gross_value_cents:g,discount_cents:"volume_discount"===s?Math.max(0,g-_):void 0,final_value_cents:"free_gift"===s?0:_,currency:a})}));const d=$r(e.total_price);if((null==(t=n.progressBar)?void 0:t.isActive)&&(null==(o=n.progressBar)?void 0:o.freeShippingRuleEnabled)){const e=Cr(n.progressBar,a,n.currencyCode);if(e){const t=e.thresholdCents;c({feature_type:"free_shipping",feature_id:"progress_free_shipping_1",threshold_cents:t,currency:a,market:e.market,applied:d>=t,retained:d>=t})}}if(null==(r=n.orderDiscount)?void 0:r.isActive){const t=br(Number(n.orderDiscount.threshold),a),o=Math.max(0,Number(e.total_discount||0)),r=Math.max(0,Number(e.original_total_price||d+o)),i=Math.round(r*Math.max(0,Number(n.orderDiscount.percentageAmount||0))/100),l=Math.min(o,i);c({feature_type:"order_discount",feature_id:"progress_order_discount_1",rule_id:Pr("order_discount",[t,n.orderDiscount.percentageAmount]),threshold_cents:t,currency:a,discount_type:"percentage",applied:r>=t,retained:r>=t,discount_cents:l,gross_value_cents:r,final_value_cents:Math.max(0,r-l)})}return l.filter((e=>e.applied)).slice(0,30)},Er=["cart_viewed","cart_action","cart_item_changed"],Dr=new Map,Lr=e=>{const t=nr();return e?`${e}_${t.replace(/-/g,"")}`:t},Mr=e=>Er.includes(e),Br=e=>null==e||""===e?void 0:String(e),Hr=e=>{const t=Number(e||0);return Number.isFinite(t)?Math.round(t):0},zr=(e,t=120)=>{if(e)return e.length>t?e.slice(0,t):e},jr=e=>{var t;try{return new URL(e||window.location.href).pathname||"/"}catch(o){return(null==(t=window.location)?void 0:t.pathname)||"/"}},Fr=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},qr=e=>(null==e?void 0:e.newCart)||(null==e?void 0:e.cart)||(null==e?void 0:e.originalCart),Wr=e=>e?`li_${ir(e)}`:void 0,Ur=(e,t={})=>{const o=(null==e?void 0:e.items)||[],r=(null==e?void 0:e.item_count)??o.reduce(((e,t)=>e+(Number(t.quantity)||0)),0),n=t.includeLineItems?o.slice(0,50).map(Vr):void 0;return{item_count:r,unique_product_count:new Set(o.map((e=>Br(e.product_id))).filter(Boolean)).size,subtotal_cents:Hr((null==e?void 0:e.items_subtotal_price)??(null==e?void 0:e.total_price)),total_cents:Hr(null==e?void 0:e.total_price),line_items_count:o.length,...n?{line_items:n,line_items_truncated:o.length>50}:{}}},Vr=e=>({line_item_key_hash:Wr(e.key),product_id:Br(e.product_id),variant_id:Br(e.variant_id||e.id),quantity:Number(e.quantity)||0,unit_price_cents:Hr(e.final_price||e.price),gross_line_cents:Hr(e.original_line_price||e.final_line_price||(Number(e.price||0)||0)*(Number(e.quantity)||1))}),Gr=e=>{const t=(null==e?void 0:e.algorithm)||(null==e?void 0:e.engine_type);return"manual"===t||"rules"===t?"manual_rule":"shopify_recommendations"===t?"automatic":["manual_rule","automatic","product_affinity","fallback","unknown"].includes(t||"")?t:"unknown"},Yr=e=>(null==e?void 0:e.slot)||("one_click_upsell"===(null==e?void 0:e.module)?"product_tip":"cart_recommendations"),Qr=(e,t)=>{var o;const r=[t||(null==(o=window.Shopify)?void 0:o.shop),(null==e?void 0:e.surface)||"cart_drawer",Yr(e),Br(null==e?void 0:e.source_product_id),Br(null==e?void 0:e.source_variant_id),Br(null==e?void 0:e.recommended_product_id),Br(null==e?void 0:e.recommended_variant_id),null==e?void 0:e.rule_id,Gr(e)];return`rec_${ir(r.join("|"))}`},Xr=e=>`rset_${ir(e.join("|"))}`,Kr=({context:e,product:t,position:o,shop:r,currency:n})=>{var i,a,l,s,c,d;const u=Br((null==e?void 0:e.recommended_variant_id)||(null==(a=null==(i=null==t?void 0:t.variants)?void 0:i[0])?void 0:a.id)),p=Br((null==e?void 0:e.recommended_product_id)||(null==t?void 0:t.id)),h={recommendation_view_id:null==e?void 0:e.recommendation_view_id,recommendation_id:(null==e?void 0:e.recommendation_id)||Qr({...e,recommended_product_id:p,recommended_variant_id:u},r),recommendation_set_hash:null==e?void 0:e.recommendation_set_hash,source_product_id:Br(null==e?void 0:e.source_product_id),source_variant_id:Br(null==e?void 0:e.source_variant_id),source_line_item_key_hash:(null==e?void 0:e.source_line_item_key_hash)||Wr(null==e?void 0:e.source_line_key),recommended_product_id:p,recommended_variant_id:u,surface:(null==e?void 0:e.surface)||"cart_drawer",slot:Yr(e),position:o||(null==e?void 0:e.position),rule_id:null==e?void 0:e.rule_id,algorithm:Gr(e)},m=(null==t?void 0:t.price)??(null==(s=null==(l=null==t?void 0:t.variants)?void 0:l[0])?void 0:s.price);return{...h,price_cents:null==m?Hr(null==e?void 0:e.price_cents):"string"==typeof m?zo(Number(m),n||"USD"):Hr(m),available:(null==t?void 0:t.available)??(null==(d=null==(c=null==t?void 0:t.variants)?void 0:c.some)?void 0:d.call(c,(e=>e.available)))??(null==e?void 0:e.available)}},Jr=e=>(Object.keys(e).forEach((t=>{void 0===e[t]&&delete e[t]})),e),Zr=({payload:e,visitorUid:t,cartSessionId:o})=>{var r,n,i,a,l,s,c;const d=qr(e),u=(e=>{try{const t=new URL(e||window.location.href);return t.hash="",t.search="",t.toString().slice(0,500)}catch(t){return String(e||"").split("#")[0].split("?")[0].slice(0,500)}})((null==e?void 0:e.url)||window.location.href),p=(null==(n=null==(r=no.getState())?void 0:r.config)?void 0:n.version)||(null==(i=window.CROCart)?void 0:i.version);return Jr({schema_version:3,event_id:(null==e?void 0:e.event_id)||Lr(),client_timestamp:(null==e?void 0:e.client_timestamp)||(new Date).toISOString(),visitor_uid:t,cart_session_id:o,shop:(null==e?void 0:e.shop)||(null==(a=window.Shopify)?void 0:a.shop),surface:(null==e?void 0:e.surface)||"cart_drawer",url:u,path:jr(u),app_version:p,currency:(null==e?void 0:e.currency)||(null==d?void 0:d.currency)||(null==(s=null==(l=window.Shopify)?void 0:l.currency)?void 0:s.active)||"USD",locale:(null==e?void 0:e.locale)||(null==(c=window.Shopify)?void 0:c.locale)||navigator.language||"unknown",device_class:(null==e?void 0:e.device_class)||Fr(),cart_token_hash:(null==d?void 0:d.token)?`ct_${ir(d.token)}`:void 0,is_builder:!1})},en=(e,t,o)=>{const r=qr(t),n=t.recommendations||[],i=["recommendation","pdp_nav","pdp_nav_recommendation","recommendations"].includes(t.source||t.module||""),a=n.length?n:i&&(t.product||t.recommended_product_id)?[Kr({context:t,product:t.product,shop:o.shop,currency:o.currency})]:[],l=a.slice(0,20),s=l.map((e=>e.recommendation_id)).filter(Boolean),c=t.recommendation_set_hash||Xr(s),d=t.recommendation_view_id||Lr("rv"),u=(t.feature_exposures||((e,t)=>{var o,r,n,i;const a=no.getState(),l=(null==t?void 0:t.currency)||a.currencyCode||"USD",s=$r(null==t?void 0:t.total_price),c=[],d=e=>c.push({...e,rendered:!0}),u=Array.isArray(e.recommendations)?e.recommendations:[];u.forEach((t=>d({feature_type:"pdp-nav"===t.recommendation_type?"pdp_recommendation":"recommendation",feature_id:t.recommendation_id||Pr("recommendation",[t.rule_id,t.recommended_product_id]),rule_id:Tr(t.rule_id),surface:t.surface||e.surface||"cart_drawer",position:Number(t.position)||void 0,product_id:Tr(t.recommended_product_id),variant_id:Tr(t.recommended_variant_id),source_product_id:Tr(t.source_product_id),source_variant_id:Tr(t.source_variant_id),currency:l,eligible:!0,cart_value_cents:s})));const p=e.feature_context,h=(null==p?void 0:p.feature_type)||Ir(e.source||e.module);return h&&!u.length&&d({...p,feature_type:h,feature_id:(null==p?void 0:p.feature_id)||("one_click_upsell"===h?"checkout_one_click_upsell_1":"quantity_upsell"===h?"cart_quantity_controls_1":Pr(h,[null==p?void 0:p.rule_id,null==p?void 0:p.tier_id,null==p?void 0:p.product_id])),product_id:Tr((null==p?void 0:p.product_id)||e.recommended_product_id||(null==(o=e.product)?void 0:o.id)),variant_id:Tr((null==p?void 0:p.variant_id)||e.recommended_variant_id||(null==(i=null==(n=null==(r=e.product)?void 0:r.variants)?void 0:n[0])?void 0:i.id)),surface:(null==p?void 0:p.surface)||e.surface,currency:l,eligible:!1!==(null==p?void 0:p.eligible),cart_value_cents:s}),c.slice(0,20)})(t,r)).slice(0,20),p=ir(u),h=Br(t.exposure_render_id||t.recommendation_view_id),m=["feature_exposed","upsell_impression"].includes(e);let f=u;if(m&&h){const e=`${o.cart_session_id}|${h}`,t=Dr.get(e)||new Map,r=new Map;if(f=u.filter((e=>{const o=ir([e.feature_type,e.feature_id,e.rule_id,e.tier_id,e.product_id||e.recommended_product_id,e.variant_id||e.recommended_variant_id,e.surface,e.position]),n=ir([o,e.qualifying_quantity,e.threshold_cents,e.cart_value_cents,e.remaining_cents,e.eligible,e.automatic,e.selectable]);return r.set(o,n),t.get(o)!==n})),Dr.set(e,r),Dr.size>500){const e=Dr.keys().next().value;e&&Dr.delete(e)}}return m&&!f.length?null:{event:"cart_viewed",payload:Jr({...o,view_reason:t.view_reason||("cart_loaded"===e?"initial_load":"recommendations_changed"),cart:Ur(r,{includeLineItems:!0}),recommendation_view_id:d,recommendation_set_hash:c,recommendations:l.map(((e,t)=>({...e,recommendation_view_id:e.recommendation_view_id||d,recommendation_set_hash:e.recommendation_set_hash||c,position:e.position||t+1}))),recommendations_count:a.length,recommendations_truncated:a.length>20,exposure_render_id:h,feature_exposures:f,feature_exposures_count:f.length,feature_exposures_truncated:(t.feature_exposures||u).length>20,feature_exposures_unchanged:!1,feature_exposure_set_hash:p})}},tn=({event:e,payload:t,visitorUid:o,cartSessionId:r})=>{const n=t||{},i=Zr({payload:n,visitorUid:o,cartSessionId:r});return"cart_viewed"===e?en(e,n,i):Mr(e)?{event:e,payload:Jr({...i,...n,schema_version:3,event_id:n.event_id||i.event_id})}:["cart_loaded","upsell_impression","feature_exposed"].includes(e)?en(e,n,i):["cart_drawer_opened","cart_drawer_closed","checkout_button_clicked","discount_code_attempted","discount_code_failed","discount_code_applied","recommendation_clicked","product_image_clicked","product_title_clicked","cart_item_image_clicked","cart_item_title_clicked","feature_interacted","gift_selected","volume_tier_selected"].includes(e)?((e,t,o)=>{const r=qr(t),n="cart_drawer_opened"===e?"drawer_opened":"cart_drawer_closed"===e?"drawer_closed":"checkout_button_clicked"===e?"checkout_clicked":"discount_code_attempted"===e?"discount_attempted":"discount_code_failed"===e?"discount_failed":"discount_code_applied"===e?"discount_applied":"recommendation_clicked"===e?"recommendation_clicked":"product_image_clicked"===e||"product_title_clicked"===e?t.recommendation_id||t.recommended_product_id||t.source_product_id?"recommendation_clicked":"product_link_clicked":t.action||("feature_interacted"===e?"feature_interacted":"product_link_clicked"),i=t.product||{},a=Kr({context:t,product:i,shop:o.shop,currency:o.currency}),l=Rr("recommendation_clicked"===n?{...t,feature_id:a.recommendation_id,algorithm:a.algorithm,slot:a.slot,surface:a.surface,product_id:a.recommended_product_id,variant_id:a.recommended_variant_id,source_product_id:a.source_product_id,source_variant_id:a.source_variant_id}:t);return{event:"cart_action",payload:Jr({...o,action:n,action_source:"user",target_type:"recommendation_clicked"===n?"recommendation":e.startsWith("discount")?"discount":"cart",target_id:Br(a.recommended_product_id||i.product_id||i.id),click_target:t.click_target||t.click_source||(e.includes("image")?"image":e.includes("title")?"title":void 0),action_detail:zr(t.failure_reason||t.discount_error_code),discount_code_present:t.discount_code_present??(t.code_length>0||!!t.code),discount_code_hash:void t.code,discount_error_code:t.discount_error_code||t.failure_reason,cart:Ur(r),..."recommendation_clicked"===n?a:{},feature_context:l,feature_contexts:l?[l]:void 0,opens_pdp:"recommendation_clicked"===n&&!1!==t.opens_pdp})}})(e,n,i):["product_added","product_qty_changed"].includes(e)?((e,t)=>{var o,r;const n=e.originalCart,i=e.newCart,a=e.product||{},l=(null==(o=e.products)?void 0:o[0])||(null==(r=e.added_products)?void 0:r[0])||{},s=Number(e.fromQty??e.from_qty??0),c=Number(e.toQty??e.to_qty??l.quantity??1),d=0===c?"removed":"product_added"===e.event||"recommendation"===e.source||0===s?"added":c>s?"quantity_increased":"quantity_decreased",u=Kr({context:e,product:e.product,shop:t.shop,currency:t.currency}),p=(e=>"quantity_change"===e?"cart_quantity":"pdp_nav"===e?"pdp_nav_recommendation":e||"unknown")(e.source||(u.recommended_product_id?"recommendation":void 0)),h=e.acceptedRecommendation||e.accepted_recommendation,m=Nr(["recommendation","pdp_nav_recommendation"].includes(p)?{...e,feature_id:u.recommendation_id,algorithm:u.algorithm,slot:u.slot,surface:u.surface,product_id:u.recommended_product_id,variant_id:u.recommended_variant_id,source_product_id:u.source_product_id,source_variant_id:u.source_variant_id}:e),f=m[0];return{event:"cart_item_changed",payload:Jr({...t,mutation_id:e.mutation_id||Lr("mut"),change_type:d,source:p,product_id:Br(e.product_id||a.product_id||e.recommended_product_id),variant_id:Br(e.variant_id||a.variant_id||l.id||e.recommended_variant_id),line_item_key_hash:Wr(a.key),quantity_before:s,quantity_after:c,quantity_delta:Number(e.quantity_delta??c-s),unit_price_cents:Hr(a.final_price||a.price||e.unit_price_cents),gross_delta_cents:Hr(e.cart_delta_cents||e.gross_delta_cents),cart_before:n?Ur(n):void 0,cart_after:i?Ur(i):void 0,...["recommendation","pdp_nav_recommendation"].includes(p)?u:{},feature_context:f,feature_contexts:m.length?m:void 0,accepted_recommendation_removed:!!h,...h||{}})}})({...n,event:e},i):null},on=()=>{let e=rr("uid");return e||(e=nr(),or("uid",e,43200)),e},rn=({event:e,payload:t})=>{if((e=>{var t;return!!(null==(t=null==e?void 0:e.newCart)?void 0:t.error)})(t))return;if(no.getState().isInBuilder)return;if((e=>["upsell_accepted","upsell_removed","product_removed","discount_calculation_mismatch"].includes(e))(e))return;const o=qr(t);mr({cart:o});const r=on(),n=fr(o),i=tn({event:e,payload:t,visitorUid:r,cartSessionId:n});if(i&&Mr(i.event))return(({event:e,payload:t,uid:o})=>{const r={...t||{},...(null==t?void 0:t.event_id)?{$insert_id:t.event_id}:{},schema_version:3,delivery_mode:"dual"},n=JSON.stringify({...uo.postHogKey?{api_key:uo.postHogKey}:{},event:e,properties:r,distinct_id:o}),i=[tr(uo.postHogCaptureUrl,n,"PostHog")];return uo.cartEventsUrl&&i.push(tr(uo.cartEventsUrl,JSON.stringify({event:e,properties:r,distinct_id:o}),"cart-events")),Promise.allSettled(i).then((()=>{}))})({event:i.event,payload:{...i.payload,delivery_mode:"dual"},uid:r});console.debug(`Tracking event [${e}] skipped because it is outside the analytics contract`)},nn="unique_user_identifier",an="one_click_upsell",ln="free_product_upsell",sn="bulk_upsell",cn="recommendation_upsell",dn="pending_recommendation",un="quantity_change_upsell",pn="cart_session_id",hn="visitor_uid",mn="accepted_recommendations",fn="feature_outcomes",gn="free_product_price_rule",vn="free_product_if_then",_n="gift_tier_id",yn="analytics_feature",wn="analytics_context",xn=(e,t=!0)=>`${t?"_":""}${go}${e}`,bn=(e,t)=>((e,t,o=!0)=>({[xn(e,o)]:t}))(e,t,!0),Cn=e=>xn(e,!0),kn=(e,t=!0)=>`${t?"__":""}${go}${e}`,Sn=(e,t)=>((e,t,o=!0)=>({[kn(e,o)]:t}))(e,t,!0),Tn=(e,t)=>{var o;const r=null==(o=null==e?void 0:e.attributes)?void 0:o[(n=t,kn(n,!0))];var n;if(r)try{const e="string"==typeof r?JSON.parse(r):r;return void 0===(null==e?void 0:e.value)?e:e.value}catch(i){return}return r},$n=e=>new er((null==e?void 0:e.total_price)||0,e.currency),Pn=e=>{var t,o;return null==(o=null==(t=null==e?void 0:e.variants)?void 0:t[0])?void 0:o.id},An=({sourceProduct:e,recommendedProduct:t,position:o,engineType:r="shopify_recommendations",surface:n="cart_drawer",module:i="recommendations"})=>({source_product_id:null==e?void 0:e.product_id,source_variant_id:null==e?void 0:e.variant_id,source_title:(null==e?void 0:e.product_title)||(null==e?void 0:e.title),source_line_key:null==e?void 0:e.key,source_line_item_key_hash:Wr(null==e?void 0:e.key),recommended_product_id:null==t?void 0:t.id,recommended_variant_id:Pn(t),recommended_title:null==t?void 0:t.title,position:o,module:i,surface:n,engine_type:r}),In=({product:e,context:t,cartSessionId:o,currency:r,clickedAt:n=(new Date).toISOString()})=>{const i=(null==t?void 0:t.recommended_variant_id)||Pn(e),a=Kr({context:{...t,surface:"pdp_nav",recommended_product_id:(null==t?void 0:t.recommended_product_id)||e.id,recommended_variant_id:i,recommended_title:(null==t?void 0:t.recommended_title)||e.title},product:e,currency:r});return{product_id:e.id,variant_id:a.recommended_variant_id||i,recommended_product_id:a.recommended_product_id||e.id,recommended_variant_id:a.recommended_variant_id||i,source_product_id:a.source_product_id,source_variant_id:a.source_variant_id,source_title:null==t?void 0:t.source_title,recommended_title:(null==t?void 0:t.recommended_title)||e.title,source_line_key:null==t?void 0:t.source_line_key,source_line_item_key_hash:a.source_line_item_key_hash,recommendation_view_id:a.recommendation_view_id,recommendation_id:a.recommendation_id,recommendation_set_hash:a.recommendation_set_hash,slot:a.slot,rule_id:a.rule_id,algorithm:a.algorithm,position:a.position,module:(null==t?void 0:t.module)||"recommendations",surface:"pdp_nav",engine_type:(null==t?void 0:t.engine_type)||"unknown",cart_session_id:o,event_schema_version:1,clicked_at:n,recommendation_type:"pdp-nav"}},Rn=(e={},t)=>{const o=e.recommendation_id||Qr(e,t);return{...e,recommendation_id:o,recommendation_view_id:e.recommendation_view_id,source_line_item_key_hash:e.source_line_item_key_hash||Wr(e.source_line_key)}},Nn=e=>{const t=Tn({attributes:e},mn);return t?{schema_version:1,contexts:Array.isArray(t.contexts)?t.contexts:[],truncated:!!t.truncated}:{schema_version:1,contexts:[],truncated:!1}},On=({context:e,acceptedEventId:t,quantity:o,unitPriceCents:r,acceptedAt:n=(new Date).toISOString()})=>{const i=Kr({context:e});return{accepted_event_id:t||(null==e?void 0:e.accepted_event_id)||Lr(),recommendation_view_id:i.recommendation_view_id,recommendation_id:i.recommendation_id,recommendation_set_hash:i.recommendation_set_hash,source_product_id:i.source_product_id,source_variant_id:i.source_variant_id,source_line_item_key_hash:i.source_line_item_key_hash,recommended_product_id:i.recommended_product_id,recommended_variant_id:i.recommended_variant_id,surface:i.surface,slot:i.slot,position:i.position,rule_id:i.rule_id,algorithm:i.algorithm,accepted_at:n,quantity:o,unit_price_cents:r,removed_at:null,removed_event_id:null}},En=(e,t,o=20)=>{const r=[t,...(e.contexts||[]).filter((e=>e.accepted_event_id!==t.accepted_event_id))];return{schema_version:1,contexts:r.slice(0,o),truncated:!!e.truncated||r.length>o}},Dn=(e,t,o)=>{var r;const n=Nn(e),i=String(t.product_id||""),a=String(t.variant_id||"");if(!(null==(r=null==o?void 0:o.items)?void 0:r.some((e=>String(e.variant_id)===a||String(e.product_id)===i))))return n.contexts.find((e=>!e.removed_at&&(String(e.recommended_variant_id||"")===a||String(e.recommended_product_id||"")===i)))},Ln={recommendation:"recommendation",pdp_nav_recommendation:"pdp_recommendation",one_click_upsell:"one_click_upsell",quantity_change:"quantity_upsell"},Mn={one_click_upsell:"checkout_one_click_upsell_1",quantity_upsell:"cart_quantity_controls_1"},Bn=Cn(wn),Hn=e=>Ln[e||""],zn=(e,t=void 0,o=0,r)=>{const n=Hn(e);if(!n)return{};const i=(e=>{const t=null==e?void 0:e[Bn];if("string"!=typeof t)return[];try{const e=JSON.parse(t);return(Array.isArray(null==e?void 0:e.features)?e.features:(null==e?void 0:e.feature_type)?[e]:[]).filter((e=>null==e?void 0:e.feature_type))}catch(o){return[]}})(r),a=i.find((e=>e.feature_type===n));a?a.quantity=Math.max(0,Number(a.quantity)||0)+o:i.push({feature_type:n,feature_id:(null==t?void 0:t.recommendation_id)||Mn[n],source_product_id:null==t?void 0:t.source_product_id,source_variant_id:null==t?void 0:t.source_variant_id,recommendation_set_hash:null==t?void 0:t.recommendation_set_hash,quantity:o});const l=i[0];return{...bn(yn,l.feature_type),...bn(wn,JSON.stringify({...l,features:i}))}};function jn(e){return void 0!==e.variant_id}const Fn=(e,t,o)=>(t.test(e)||(e=`${o}${e}`),e),qn=(e,t,o)=>{const r=o.discountPercentage/100;return new er(e.original_price*(1-r),t)},Wn=(e,t)=>{var o;return null==(o=null==e?void 0:e.properties)?void 0:o.hasOwnProperty(Cn(t))},Un=(e,t)=>{var o;return null==(o=null==e?void 0:e.properties)?void 0:o[Cn(t)]},Vn=(e,{height:t,width:o})=>{var r;let n=(null==(r=e.featured_image)?void 0:r.url)||e.image;if(!n)return"";if(n.startsWith("data:"))return n;const i=new URL(Fn(n,/^((http|https|ftp):)/,"https:"));return t&&i.searchParams.append("height",`${t}`),o&&i.searchParams.append("width",`${o}`),i.toString()},Gn=(e,t)=>e?new er(e.discounted_price*e.quantity,t):void 0,Yn=(e,t)=>{var o;return!!t&&!!(null==(o=e.discounts)?void 0:o.some((e=>e.title===t)))},Qn=e=>{var t;return!!e&&("available"in e?!!e.available:!!(null==(t=null==e?void 0:e.variants)?void 0:t.some((e=>e.available))))},Xn=(e,t)=>{var o,r;return t?null==(o=null==e?void 0:e.variants)?void 0:o.find((e=>e.available)):null==(r=null==e?void 0:e.variants)?void 0:r[0]},Kn=(e,{height:t,width:o})=>{var r,n;let i="featured_image"in e?e.featured_image:"images"in e?null==(n=null==(r=e.images)?void 0:r[0])?void 0:n.src:null;if(!i)return"";if(i.startsWith("data:"))return i;const a=new URL(Fn(i,/^((http|https|ftp):)/,"https:"));return t&&a.searchParams.append("height",`${t}`),o&&a.searchParams.append("width",`${o}`),a.toString()},Jn=(e,t="USD")=>{var o,r,n,i;if(e&&"variants"in e&&(null==(r=null==(o=e.variants)?void 0:o[0])?void 0:r.id))try{const o=e.variants[0].id,r=window.parent;if(!!(null==(i=null==(n=null==r?void 0:r.igData)?void 0:n.price)?void 0:i.getPriceByVariantId)){const e=r.igData.price.getPriceByVariantId(o);if(e)return zo(Number(e),t)}}catch(l){}const a="price"in e?e.price:e.variants[0].price;return"string"==typeof a?zo(Number(a),t):a||0},Zn=(e,t)=>{var o,r,n,i,a;const l=null==(n=null==(r=null==(o=no.getState())?void 0:o.freeProduct)?void 0:r.buyXGetYConfig)?void 0:n.discountMessage,s=null==(i=null==e?void 0:e.items)?void 0:i.find((e=>(null==e?void 0:e.variant_id)===t.variant_id&&!Yn(e,l)));return s||(null==(a=null==e?void 0:e.items)?void 0:a.find((e=>(null==e?void 0:e.variant_id)===t.variant_id)))};class ei{calcAmtChange(e,t,o){return er.fromCartTotal(t).subtract(er.fromCartTotal(e)).add(new er((null==o?void 0:o.amtChange)||0,t.currency))}handleAdd(e,t,o,r,n){}handleProductPageAdd(e,t,o,r,n){}handleUpdate(e,t,o,r){}handleDelete(e,t,o){}handleCheckout(e){}handleAppLoad(e){}handleManualSideEffects(e,t,o,r){}}const ti=Yo("giftTiers");const oi=[new class extends ei{getAttrKey(){return nn}shouldRun(){return!0}attachUIDToCart(e){const{setHiddenCartAttribute:t}=mi.getState();Tn(e,this.getAttrKey())||t(this.getAttrKey(),{uid:on()})}handleAdd(e,t,o,r){this.attachUIDToCart(r)}handleUpdate(e,t,o,r){this.attachUIDToCart(r)}handleDelete(e,t){this.attachUIDToCart(t)}handleCheckout(){this.attachUIDToCart()}handleAppLoad(e){this.attachUIDToCart(e)}handleManualSideEffects(e,t,o,r){this.attachUIDToCart(r)}},new class extends ei{getAttrKey(){return pn}shouldRun(){return!0}attachCartSessionToCart(e){const{setHiddenCartAttribute:t}=mi.getState(),o={attributes:(null==e?void 0:e.attributes)||{}},r=Tn(o,this.getAttrKey()),n=Tn(o,hn),i=fr(e),a=on();("string"==typeof r?r:null==r?void 0:r.cart_session_id)!==i&&t(this.getAttrKey(),i),n!==a&&t(hn,a)}handleAdd(e,t,o,r){this.attachCartSessionToCart(r)}handleUpdate(e,t,o,r){this.attachCartSessionToCart(r)}handleDelete(e,t){this.attachCartSessionToCart(t)}handleCheckout(e){this.attachCartSessionToCart(e)}handleAppLoad(e){this.attachCartSessionToCart(e)}handleManualSideEffects(e,t,o,r){this.attachCartSessionToCart(r)}},new class extends ei{getAttrKey(e){return`${sn}_vid_${e}`}shouldRun(e){return"bulk_discount"===e}handleAdd(e,t,o,r){}handleUpdate(e,t,o,r){var n,i,a;const l=e.variant_id,s=this.getAttrKey(l),c=Tn(r,s),d=Zn(r,e),{setHiddenCartAttribute:u,removeHiddenCartAttribute:p}=mi.getState();if(c){const e=((null==d?void 0:d.quantity)||t)-c.initialQty;e<=0?p(s):u(s,{...c,upsellQty:e,amtChange:null==(a=null==(i=Gn(d,r.currency))?void 0:i.subtract(new er(c.initialItemAmt,o.currency)))?void 0:a.getAsNativeCurrencyValue()})}else{if((null==d?void 0:d.quantity)`${dn}_${e}`)(e)}getRecommendationAttrKey(e){return`${cn}_pid_${e}`}shouldRun(e){return!0}handleAdd(){}handleProductPageAdd(e,t,o,r,n){var i,a;const l=e.product_id,s=e.variant_id;if(!l||!s)return;const c=this.getPendingAttrKey(l),d=n||Tn(r,c),{setHiddenCartAttribute:u,removeHiddenCartAttribute:p}=mi.getState();if(d){const e=this.getRecommendationAttrKey(l),o=null==(i=r.items)?void 0:i.find((e=>e.variant_id===Number(s))),n=null==(a=r.items_added)?void 0:a.find((e=>e.variant_id===Number(s)));if(!o)return;const h=(null==n?void 0:n.quantity)||t,m=o.quantity-h,f=o.final_line_price/o.quantity,g=f*h;u(e,{...d,product_id:l,variant_id:s,recommended_product_id:d.recommended_product_id||l,recommended_variant_id:d.recommended_variant_id||s,initialQty:m,upsellQty:h,amtChange:g,cart_session_id:d.cart_session_id||fr(),event_schema_version:d.event_schema_version||1,recommendation_type:d.recommendation_type||"pdp-nav"}),u(mn,En(Nn(null==r?void 0:r.attributes),On({context:{...d,surface:"pdp_nav",recommended_product_id:d.recommended_product_id||l,recommended_variant_id:d.recommended_variant_id||s,accepted_event_id:d.accepted_event_id},acceptedEventId:d.accepted_event_id,quantity:h,unitPriceCents:f}))),p(c)}}handleUpdate(e,t,o,r){}handleDelete(e,t){const{removeHiddenCartAttribute:o}=mi.getState();Zn(t,e)||(o(this.getRecommendationAttrKey(e.product_id)),o(this.getPendingAttrKey(e.product_id)))}handleManualSideEffects(e,t,o,r){}handleAppLoad(e){this.cleanupPendingRecommendations(e)}cleanupPendingRecommendations(e){const{removeHiddenCartAttribute:t}=mi.getState();Object.keys((null==e?void 0:e.attributes)||{}).filter((e=>e.includes(dn))).forEach((o=>{const r=e.attributes[o];try{const e=JSON.parse(r),n=(null==e?void 0:e.value)||e;this.isExpired(null==n?void 0:n.clicked_at)&&t(o.replace(/^__cro_cart_/,"").replace(/^hidden_/,""))}catch(n){console.warn(`Failed to parse pending recommendation attribute: ${o}`,n)}}))}isExpired(e){if(!e)return!0;const t=new Date(e).getTime();return Date.now()-t>9e5}},new class extends ei{getAttrKey(e){return`${cn}_vid_${e}`}shouldRun(e){return"recommendation"===e}handleAdd(e,t,o,r,n){var i,a,l;const s=e.id,c=this.getAttrKey(s),{setHiddenCartAttribute:d}=mi.getState(),u=Number((null==(l=null==(a=null==(i=null==r?void 0:r.items)?void 0:i.find)?void 0:a.call(i,(e=>e.variant_id===s)))?void 0:l.final_price)||0),p=On({context:{...n,recommended_variant_id:(null==n?void 0:n.recommended_variant_id)||s},acceptedEventId:null==n?void 0:n.accepted_event_id,quantity:t,unitPriceCents:u}),h=En(Nn(null==r?void 0:r.attributes),p);d(c,{initialQty:0,variant_id:s,recommended_variant_id:(null==n?void 0:n.recommended_variant_id)||s,recommended_product_id:null==n?void 0:n.recommended_product_id,source_variant_id:null==n?void 0:n.source_variant_id,source_product_id:null==n?void 0:n.source_product_id,source_title:null==n?void 0:n.source_title,recommended_title:null==n?void 0:n.recommended_title,source_line_key:null==n?void 0:n.source_line_key,position:null==n?void 0:n.position,module:(null==n?void 0:n.module)||"recommendations",surface:(null==n?void 0:n.surface)||"cart_drawer",engine_type:(null==n?void 0:n.engine_type)||"unknown",cart_session_id:fr(),event_schema_version:1,upsellQty:t,amtChange:$n(r).subtract($n(o)).getAsNativeCurrencyValue()}),d(mn,h)}handleUpdate(e,t,o,r){}handleDelete(e,t){const o=mi.getState(),{removeHiddenCartAttribute:r,setHiddenCartAttribute:n}=o,i=Zn(t,e),a=(null==t?void 0:t.attributes)||o.cartAttributes,l=Dn(a,e,t);if(!Wn(e,gn)&&!Wn(e,vn)&&!i){if(l){const{attribute:e}=((e,t,o=Lr(),r=(new Date).toISOString())=>{let n;const i=e.contexts.map((e=>e.accepted_event_id!==t||e.removed_at?e:(n={...e,removed_at:r,removed_event_id:o},n)));return{attribute:{...e,contexts:i},removedContext:n}})(Nn(a),l.accepted_event_id);n(mn,e)}r(this.getAttrKey(e.variant_id))}}handleManualSideEffects(e,t,o,r){const n=e.variant_id,i=this.getAttrKey(n),{setHiddenCartAttribute:a,removeHiddenCartAttribute:l}=mi.getState(),s=Tn(r,i),c=Zn(r,e),d=(null==c?void 0:c.quantity)-((null==s?void 0:s.initialQty)||0);d<=0?l(i):s&&a(i,{...s,upsellQty:d,amtChange:this.calcAmtChange(o,r,s).getAsNativeCurrencyValue()})}},new class extends ei{getAttrKey(){return an}shouldRun(e){return"one_click_upsell"===e}handleAdd(e,t,o,r){var n;const i=e.id,a=this.getAttrKey(),l=Tn(r,a),s=null==(n=null==o?void 0:o.items)?void 0:n.find((e=>e.variant_id===i)),{setHiddenCartAttribute:c}=mi.getState();c(a,l?{variant_id:i,recommended_variant_id:i,module:"one_click_upsell",surface:"checkout_section",engine_type:"manual",cart_session_id:fr(),event_schema_version:1,initialQty:l.variant_id===i?l.initialQty:(null==s?void 0:s.quantity)||0,upsellQty:t,amtChange:this.calcAmtChange(o,r).getAsNativeCurrencyValue()}:{variant_id:i,recommended_variant_id:i,module:"one_click_upsell",surface:"checkout_section",engine_type:"manual",cart_session_id:fr(),event_schema_version:1,initialQty:(null==s?void 0:s.quantity)||0,upsellQty:t,amtChange:this.calcAmtChange(o,r).getAsNativeCurrencyValue()})}handleUpdate(e,t,o,r){}handleDelete(e,t){const o=this.getAttrKey(),r=Tn(t,o),n=Zn(t,e),{removeHiddenCartAttribute:i}=mi.getState();Wn(e,gn)||Wn(e,vn)||n||(null==r?void 0:r.variant_id)===e.variant_id&&i(this.getAttrKey())}handleManualSideEffects(e,t,o,r){const n=this.getAttrKey(),{setHiddenCartAttribute:i,removeHiddenCartAttribute:a}=mi.getState(),l=Tn(r,n),s=Zn(r,e),c=(null==s?void 0:s.quantity)-((null==l?void 0:l.initialQty)||0);e.variant_id===(null==l?void 0:l.variant_id)&&(c<=0?a(n):l&&i(n,{...l,upsellQty:c,amtChange:this.calcAmtChange(o,r,l).getAsNativeCurrencyValue()}))}},new class extends ei{getAttrKey(e){return`${ln}_vid_${e}`}shouldRun(e){return"free_product"===e}handleAdd(e,t,o,r){const n=e.id,i=this.getAttrKey(n),{setHiddenCartAttribute:a}=mi.getState(),l=Zn(r,{variant_id:e.id}),s=l&&Un(l,_n);a(i,{variant_id:n,product_id:null==l?void 0:l.product_id,tier_id:s?String(s):void 0,initialQty:0,upsellQty:t,amtChange:er.fromCartTotal(r).subtract(er.fromCartTotal(o)).getAsNativeCurrencyValue()})}handleUpdate(e,t,o,r){}handleDelete(e,t,o){const r=Zn(t,e),{removeHiddenCartAttribute:n,setHiddenCartAttribute:i}=mi.getState(),a=Un(e,_n);if(a&&Wn(e,gn)){if("free_product_sync"!==o){const e=`gift_tier_removed_${a}`;ti.info(`[FreeProductCartAttributesHandler] Tracking MANUAL gift removal for tier: ${a}`),i(e,"1")}else ti.info(`[FreeProductCartAttributesHandler] Automatic sync removal for tier: ${a} - NOT tracking as manual removal`)}Wn(e,gn)||Wn(e,vn)||r||n(this.getAttrKey(e.variant_id))}handleManualSideEffects(e,t,o,r){const n=e.variant_id,i=this.getAttrKey(n),{setHiddenCartAttribute:a,removeHiddenCartAttribute:l}=mi.getState(),s=Tn(r,i),c=Zn(r,e),d=(null==c?void 0:c.quantity)-((null==s?void 0:s.initialQty)||0);d<=0?l(i):s&&a(i,{...s,upsellQty:d,amtChange:this.calcAmtChange(o,r,s).getAsNativeCurrencyValue()})}},new class extends ei{shouldRun(e){return!0}handleCheckout(e){const t=Or(e);mi.getState().setHiddenCartAttribute(fn,{schema_version:2,outcomes:t,outcomes_count:t.length,outcomes_truncated:t.length>=30})}}],ri=({operation:e,originalProduct:t,requestedQty:o,originalCart:r,updatedCart:n,source:i,recommendationContext:a})=>{switch(e){case"update":if(!jn(t)||void 0===n.items_added)throw new Error("Type not allowed.");if((e=>{var t,o;if((null==(t=null==e?void 0:e.items_added)?void 0:t.length)>1||(null==(o=null==e?void 0:e.items_removed)?void 0:o.length)>1)throw new Error("Multi-product updates not supported. Amend implementation.")})(n),0===o)return void oi.forEach((e=>e.handleDelete(t,n,i)));oi.forEach((e=>{i?e.shouldRun(i)&&e.handleUpdate(t,o,r,n):e.handleManualSideEffects(t,o,r,n)}));break;case"add":if(jn(t))throw new Error("Type not allowed.");oi.forEach((e=>e.shouldRun(i)&&e.handleAdd(t,o,r,n,a)));break;case"product_page_add":oi.forEach((e=>{var l;e.shouldRun(i)&&(null==(l=e.handleProductPageAdd)||l.call(e,t,o,r,n,a))}));break;case"delete":if(!jn(t))throw new Error("Type not allowed.");oi.forEach((e=>e.handleDelete(t,n,i)));break;case"checkout":oi.forEach((e=>e.shouldRun(i)&&e.handleCheckout(n)));break;case"appLoad":oi.forEach((e=>e.handleAppLoad(n)));break;default:throw new Error("Unknown operation.")}};let ni,ii,ai,li,si=[];const ci=async(e=ii,t=ai,o={})=>{if(ni&&(window.clearTimeout(ni),ni=void 0),!si.length||!e||!t)return;const{queue:r,attributes:n}=(()=>{const e=si;return si=[],{queue:e,attributes:e.reduce(((e,{name:t,value:o})=>({...e,...Sn(t,o?JSON.stringify({value:o}):o)})),{})}})();let i;try{i=await t({attributes:n})}catch(a){if(si=[...r,...si],o.throwOnError)throw a;return{error:a instanceof Error?a.message:String(a)}}if(null==i?void 0:i.error){if(si=[...r,...si],o.throwOnError)throw new Error(`Failed to persist hidden cart attributes: ${i.error}`);return i}return e({cart:i}),i},di=e=>si.push(e),ui=(e,t)=>(ii=e,ai=t,ni&&window.clearTimeout(ni),li=new Promise(((o,r)=>{ni=window.setTimeout((()=>{ci(e,t).then(o).catch(r)}),100)})),li),pi=Yo("cartTotals");let hi={};const mi=to()(ro(((e,t)=>({recommendedProductsByKey:{},refetch:async o=>{var r,n;const i=await To();if(e({cart:i}),null==(r=null==i?void 0:i.items)?void 0:r.length){const t=[],o=await Promise.all(i.items.map((async e=>{var o,r;try{const n=await $o({handle:e.handle});return n.variants=null==(o=n.variants)?void 0:o.filter((t=>t.id===e.variant_id)),null==(r=n.variants)||r.forEach((e=>{t.push({variantId:null==e?void 0:e.id,compareAtPrice:(null==e?void 0:e.compare_at_price)??null})})),e}catch(n){return console.error(`Failed to fetch product for handle: ${e.handle}`,n),e}})));i.items=o,e({cart:i,variantCompareAtPricesList:t})}return(null==o?void 0:o.refetchRecommendations)&&(null==(n=null==i?void 0:i.items)||n.forEach((e=>t().getRecommendedProducts(e)))),i},addProducts:async(e,o)=>{var r,n,i,a,l,s,c,d,u,p;const h=t().cart,m=e.map((e=>{var t,r;return{...e,properties:{...e.properties||{},...zn(null==(t=null==o?void 0:o.track)?void 0:t.source,null==(r=null==o?void 0:o.track)?void 0:r.recommendationContext,e.quantity,e.properties)}}})),f=await ko({items:m});if(f.error){const t=f.error;return Bo({text:t,type:"error"}),void io(new Error(`addProducts failed. Error: ${t}. Request details: ${JSON.stringify({products:e,options:o})}`))}const g=f.items,v=await t().refetch();return rn({event:"product_added",payload:{products:e,added_products:e,originalCart:h,newCart:v,source:null==(r=null==o?void 0:o.track)?void 0:r.source,event_id:null==(i=null==(n=null==o?void 0:o.track)?void 0:n.recommendationContext)?void 0:i.accepted_event_id,...(null==(a=null==o?void 0:o.track)?void 0:a.recommendationContext)||{},cart_delta_cents:((null==v?void 0:v.total_price)||0)-((null==h?void 0:h.total_price)||0),cart_item_count_before:null==h?void 0:h.item_count,cart_item_count_after:null==v?void 0:v.item_count}}),["recommendation","one_click_upsell","free_product"].includes((null==(l=null==o?void 0:o.track)?void 0:l.source)||"")&&rn({event:"upsell_accepted",payload:{originalCart:h,newCart:v,source:null==(s=null==o?void 0:o.track)?void 0:s.source,accepted_qty:e.reduce(((e,t)=>e+t.quantity),0),cart_delta_cents:((null==v?void 0:v.total_price)||0)-((null==h?void 0:h.total_price)||0),accept_source:"add_to_cart",module:"one_click_upsell"===(null==(c=null==o?void 0:o.track)?void 0:c.source)?"one_click_upsell":"free_product"===(null==(d=null==o?void 0:o.track)?void 0:d.source)?"free_product":"recommendations",surface:"one_click_upsell"===(null==(u=null==o?void 0:o.track)?void 0:u.source)?"checkout_section":"cart_drawer",...(null==(p=null==o?void 0:o.track)?void 0:p.recommendationContext)||{}}}),null==g||g.forEach((e=>t().getRecommendedProducts(e))),g},changeProductQty:async(o,r,n)=>{var i,a,l,s,c,d,u,p,h,m;const f=t().cart;let g=await(v={key:o.key,quantity:r},Co("cart/change.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:v.key,quantity:v.quantity,selling_plan:v.selling_plan})}));var v;if(g.error){const e=g.error;return Bo({text:e,type:"error"}),void io(new Error(`changeProductQty failed. Error: ${e}. Request details: ${JSON.stringify({product:o,qty:r,options:n})}`))}if(Hn(null==(i=null==n?void 0:n.track)?void 0:i.source)&&r>o.quantity){const e=null==(a=g.items)?void 0:a.find((e=>String(e.variant_id)===String(o.variant_id)));if(e){const t=await(e=>{if(0===Object.keys(e.properties).length)throw new Error("updateProductProperties(): empty properties object not supported.");return Co("cart/change.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})})({key:e.key,properties:{...e.properties||{},...zn(null==(l=null==n?void 0:n.track)?void 0:l.source,void 0,r-o.quantity,e.properties)}});(null==t?void 0:t.error)||(g=t)}}e({cart:g});const _=0===r?Dn(t().cartAttributes,o,g):void 0;return rn({event:"product_qty_changed",payload:{originalCart:f,newCart:g,product:o,fromQty:o.quantity,toQty:r,from_qty:o.quantity,to_qty:r,quantity_delta:r-o.quantity,product_id:o.product_id,variant_id:o.variant_id,cart_delta_cents:((null==g?void 0:g.total_price)||0)-((null==f?void 0:f.total_price)||0),source:null==(s=null==n?void 0:n.track)?void 0:s.source,acceptedRecommendation:_?{..._}:void 0}}),0===r&&(e((e=>{const t={...e.recommendedProductsByKey};return delete t[o.key],{recommendedProductsByKey:t}})),ri({operation:"delete",originalProduct:o,requestedQty:r,originalCart:f,updatedCart:g,source:null==(c=null==n?void 0:n.track)?void 0:c.source}),rn({event:"product_removed",payload:{originalCart:f,newCart:g,source:null==(d=null==n?void 0:n.track)?void 0:d.source,product_id:o.product_id,variant_id:o.variant_id,removed_qty:o.quantity,was_upsell:["recommendation","one_click_upsell","free_product_sync"].includes(null==(u=null==n?void 0:n.track)?void 0:u.source),upsell_source:null==(p=null==n?void 0:n.track)?void 0:p.source}}),["recommendation","one_click_upsell"].includes(null==(h=null==n?void 0:n.track)?void 0:h.source)&&rn({event:"upsell_removed",payload:{originalCart:f,newCart:g,source:null==(m=null==n?void 0:n.track)?void 0:m.source,product_id:o.product_id,variant_id:o.variant_id,removed_qty:o.quantity,cart_delta_cents:((null==g?void 0:g.total_price)||0)-((null==f?void 0:f.total_price)||0)}})),g},removeMultipleProducts:async(o,r)=>{const n=t().cart,i=o.reduce(((e,t)=>(e[t.key]=0,e)),{}),a=await(e=>Co("cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({updates:e})}))(i);if(a.error){const e=a.error;return Bo({text:e,type:"error"}),void io(new Error(`removeMultipleProducts failed. Error: ${e}. Request details: ${JSON.stringify({items:o,options:r})}`))}return e({cart:a}),o.forEach((o=>{var i,l,s,c,d;const u=Dn(t().cartAttributes,o,a);rn({event:"product_qty_changed",payload:{originalCart:n,newCart:a,product:o,fromQty:o.quantity,toQty:0,from_qty:o.quantity,to_qty:0,quantity_delta:-o.quantity,product_id:o.product_id,variant_id:o.variant_id,cart_delta_cents:((null==a?void 0:a.total_price)||0)-((null==n?void 0:n.total_price)||0),source:null==(i=null==r?void 0:r.track)?void 0:i.source,acceptedRecommendation:u?{...u}:void 0}}),rn({event:"product_removed",payload:{originalCart:n,newCart:a,source:null==(l=null==r?void 0:r.track)?void 0:l.source,product_id:o.product_id,variant_id:o.variant_id,removed_qty:o.quantity,was_upsell:["recommendation","one_click_upsell","free_product_sync"].includes(null==(s=null==r?void 0:r.track)?void 0:s.source),upsell_source:null==(c=null==r?void 0:r.track)?void 0:c.source}}),e((e=>{const t={...e.recommendedProductsByKey};return delete t[o.key],{recommendedProductsByKey:t}})),ri({operation:"delete",originalProduct:o,requestedQty:0,originalCart:n,updatedCart:a,source:null==(d=null==r?void 0:r.track)?void 0:d.source})})),a},changeNote:async t=>{const o=await(r={note:t},Co("cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)}));var r;if(!(null==o?void 0:o.error))return e({cart:o}),o},getRecommendedProducts:async t=>{if(!(({productId:e,variantId:t})=>{var o;const r=null==(o=null==no?void 0:no.getState())?void 0:o.crossSell;return"manual"===(null==r?void 0:r.recommendationChoice)&&(null==r?void 0:r.products).find((e=>{var o;return null==(o=e.variants)?void 0:o.some((e=>e.id.includes(`${t}`)))}))||"automatic"===(null==r?void 0:r.recommendationChoice)||"rules"===(null==r?void 0:r.recommendationChoice)})({productId:t.product_id,variantId:t.variant_id}))return[];const{crossSell:o}=no.getState(),{products:r}=await(({productId:e,intent:t="related",limit:o=5})=>Co(`recommendations/products.json?product_id=${e}&intent=${t}&limit=${o}`))({productId:t.product_id,intent:o.recommendationIntent});return e((e=>({recommendedProductsByKey:{...e.recommendedProductsByKey,[t.key]:r}}))),r},setHiddenCartAttribute:async(t,o)=>(di({name:t,value:o}),ui(e,So)),removeHiddenCartAttribute:async t=>(di({name:t,value:""}),ui(e,So)),flushHiddenCartAttributes:async()=>{const o=await((e=ii,t=ai,o={})=>(li=ci(e,t,o),li))(e,So,{throwOnError:!0});return(e=>{const t=new Date,o={...mr({cart:e,now:t}),status:"checkout_started",checkoutStartedAt:t.toISOString(),updatedAt:t.toISOString()};pr(o),o.id})(o||t().cart),o}})),(e=>{var t,o,r,n,i,a,l,s;const c=e.cart;(null==(t=e.cart)?void 0:t.attributes)&&(hi=null==(o=e.cart)?void 0:o.attributes);const d=(null==(n=null==(r=e.cart)?void 0:r.items)?void 0:n.reduce(((e,t)=>e+t.quantity),0))||0,u=er.fromCartTotal(e.cart),p=(null==(a=null==(i=window.Shopify)?void 0:i.currency)?void 0:a.active)||(null==(l=e.cart)?void 0:l.currency)||"USD";return pi.info("[useCartState] 🔄 Computed state recalculated",{rawCartTotalPrice:null==(s=e.cart)?void 0:s.total_price,itemsCount:d,totalAmountFormatted:u.toFormattedString(),cartCurrency:p}),{automaticRecommendedProducts:(h=Object.entries(e.recommendedProductsByKey).flatMap((([t,o])=>{var r,n;const i=null==(n=null==(r=e.cart)?void 0:r.items)?void 0:n.find((e=>e.key===t));return o.map((e=>((e,t)=>({...e,__croCartRecommendationContext:{...t,recommended_product_id:t.recommended_product_id||e.id,recommended_variant_id:t.recommended_variant_id||Pn(e),recommended_title:t.recommended_title||e.title}}))(e,An({sourceProduct:i,recommendedProduct:e,engineType:"shopify_recommendations",surface:"cart_drawer"}))))})),m="id",(null==h?void 0:h.length)?[...new Map(h.map((e=>[e[m],e]))).values()]:[]),itemsCount:d,totalAmount:u,cartCurrency:p,visibleCart:c,cartAttributes:hi};var h,m}))),fi=e=>{let t;return e?(t=document.createElement("iframe"),t.id=po):t=document.getElementById(po),t},gi=(e,t,o)=>{const r=o||fi();if(t){const e=document.createElement("style");e.type="text/css",Object.keys(t).forEach((o=>{e.innerHTML+=`\n ${o} {\n #${po} ${t[o]}\n `})),document.head.appendChild(e)}return Object.entries(e).forEach((([e,t])=>{r.style[e]=t})),o},vi=200,_i=to(((e,t)=>({isCartDrawerOpen:!1,cartDrawerViewId:Lr("drawer_view"),isVariantDrawerOpen:!1,variantDrawerProduct:null,variantDrawerOptions:{product:null,quantity:1,track:{source:void 0}},variantDrawerPromise:null,variantDrawerPromiseDeferred:null,lastCartOpenTimestamp:Date.now(),closeCartDrawer:()=>{var o;const r=Date.now()-t().lastCartOpenTimestamp;return r<500?Promise.resolve():(gi({transform:"translateX(100%)",transitionDuration:"200ms"}),document.querySelector("body").classList.remove("cro-cart-overflow-lock"),null==(o=t().variantDrawerPromiseDeferred)||o.reject(),t().closeVariantDrawer(),rn({event:"cart_drawer_closed",payload:{cart:mi.getState().cart,close_source:"unknown",drawer_open_duration_ms:r}}),new Promise((t=>{setTimeout((()=>{e({isCartDrawerOpen:!1}),t()}),vi)})))},openCartDrawer:()=>{const o=t().lastCartOpenTimestamp,r=Date.now(),n=Lr("drawer_view");return gi({transform:"translateX(0)",transitionDuration:"200ms"}),e({lastCartOpenTimestamp:r,cartDrawerViewId:n}),document.querySelector("body").classList.add("cro-cart-overflow-lock"),rn({event:"cart_drawer_opened",payload:{cart:mi.getState().cart,exposure_render_id:n,open_source:"unknown",time_since_cart_loaded_ms:o?r-o:void 0}}),new Promise((t=>{setTimeout((()=>{e({isCartDrawerOpen:!0}),t()}),vi)}))},openVariantDrawer:(t,o)=>{e({variantDrawerProduct:t}),e({variantDrawerOptions:o}),e({isVariantDrawerOpen:!0});const r=new Promise((function(t,o){e({variantDrawerPromiseDeferred:{resolve:t,reject:o}})}));return e({variantDrawerPromise:r}),r},closeVariantDrawer:()=>{e({isVariantDrawerOpen:!1})}})));var yi=function(){return yi=Object.assign||function(e){for(var t,o=1,r=arguments.length;o2||aa(Ki)>3?"":" "}function ca(e,t){for(;--t&&oa()&&!(Ki<48||Ki>102||Ki>57&&Ki<65||Ki>70&&Ki<97););return ia(e,na()+(t<6&&32==ra()&&32==oa()))}function da(e){for(;oa();)switch(Ki){case e:return Xi;case 34:case 39:34!==e&&39!==e&&da(Ki);break;case 40:41===e&&da(e);break;case 92:oa()}return Xi}function ua(e,t){for(;oa()&&e+Ki!==57&&(e+Ki!==84||47!==ra()););return"/*"+ia(t,Xi-1)+"*"+Di(47===e?e:oa())}function pa(e){for(;!aa(ra());)oa();return ia(e,Xi)}function ha(e){return function(e){return Ji="",e}(ma("",null,null,null,[""],e=function(e){return Gi=Yi=1,Qi=qi(Ji=e),Xi=0,[]}(e),0,[0],e))}function ma(e,t,o,r,n,i,a,l,s){for(var c=0,d=0,u=a,p=0,h=0,m=0,f=1,g=1,v=1,_=0,y="",w=n,x=i,b=r,C=y;g;)switch(m=_,_=oa()){case 40:if(108!=m&&58==ji(C,u-1)){-1!=zi(C+=Hi(la(_),"&","&\f"),"&\f",Ei(c?l[c-1]:0))&&(v=-1);break}case 34:case 39:case 91:C+=la(_);break;case 9:case 10:case 13:case 32:C+=sa(m);break;case 92:C+=ca(na()-1,7);continue;case 47:switch(ra()){case 42:case 47:Ui(ga(ua(oa(),na()),t,o,s),s);break;default:C+="/"}break;case 123*f:l[c++]=qi(C)*v;case 125*f:case 59:case 0:switch(_){case 0:case 125:g=0;case 59+d:-1==v&&(C=Hi(C,/\f/g,"")),h>0&&qi(C)-u&&Ui(h>32?va(C+";",r,o,u-1,s):va(Hi(C," ","")+";",r,o,u-2,s),s);break;case 59:C+=";";default:if(Ui(b=fa(C,t,o,c,d,n,l,y,w=[],x=[],u,i),i),123===_)if(0===d)ma(C,t,b,b,w,i,u,l,x);else switch(99===p&&110===ji(C,3)?100:p){case 100:case 108:case 109:case 115:ma(e,b,b,r&&Ui(fa(e,b,b,0,0,n,l,y,n,w=[],u,x),x),n,x,u,l,r?w:x);break;default:ma(C,b,b,b,[""],x,0,l,x)}}c=d=h=0,f=v=1,y=C="",u=a;break;case 58:u=1+qi(C),h=m;default:if(f<1)if(123==_)--f;else if(125==_&&0==f++&&125==(Ki=Xi>0?ji(Ji,--Xi):0,Yi--,10===Ki&&(Yi=1,Gi--),Ki))continue;switch(C+=Di(_),_*f){case 38:v=d>0?1:(C+="\f",-1);break;case 44:l[c++]=(qi(C)-1)*v,v=1;break;case 64:45===ra()&&(C+=la(oa())),p=ra(),d=u=qi(y=C+=pa(na())),_++;break;case 45:45===m&&2==qi(C)&&(f=0)}}return i}function fa(e,t,o,r,n,i,a,l,s,c,d,u){for(var p=n-1,h=0===n?i:[""],m=Wi(h),f=0,g=0,v=0;f0?h[_]+" "+y:Hi(y,/&\f/g,h[_])))&&(s[v++]=w);return Zi(e,t,o,0===n?Ai:l,s,c,d,u)}function ga(e,t,o,r){return Zi(e,t,o,Pi,Di(Ki),Fi(e,2,-2),0,r)}function va(e,t,o,r,n){return Zi(e,t,o,Ii,Fi(e,0,r),Fi(e,r+1,-1),r,n)}function _a(e,t,o){switch(function(e,t){return 45^ji(e,0)?(((t<<2^ji(e,0))<<2^ji(e,1))<<2^ji(e,2))<<2^ji(e,3):0}(e,t)){case 5103:return $i+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return $i+e+e;case 4789:return Ti+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return $i+e+Ti+e+Si+e+e;case 5936:switch(ji(e,t+11)){case 114:return $i+e+Si+Hi(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return $i+e+Si+Hi(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return $i+e+Si+Hi(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return $i+e+Si+e+e;case 6165:return $i+e+Si+"flex-"+e+e;case 5187:return $i+e+Hi(e,/(\w+).+(:[^]+)/,$i+"box-$1$2"+Si+"flex-$1$2")+e;case 5443:return $i+e+Si+"flex-item-"+Hi(e,/flex-|-self/g,"")+(Bi(e,/flex-|baseline/)?"":Si+"grid-row-"+Hi(e,/flex-|-self/g,""))+e;case 4675:return $i+e+Si+"flex-line-pack"+Hi(e,/align-content|flex-|-self/g,"")+e;case 5548:return $i+e+Si+Hi(e,"shrink","negative")+e;case 5292:return $i+e+Si+Hi(e,"basis","preferred-size")+e;case 6060:return $i+"box-"+Hi(e,"-grow","")+$i+e+Si+Hi(e,"grow","positive")+e;case 4554:return $i+Hi(e,/([^-])(transform)/g,"$1"+$i+"$2")+e;case 6187:return Hi(Hi(Hi(e,/(zoom-|grab)/,$i+"$1"),/(image-set)/,$i+"$1"),e,"")+e;case 5495:case 3959:return Hi(e,/(image-set\([^]*)/,$i+"$1$`$1");case 4968:return Hi(Hi(e,/(.+:)(flex-)?(.*)/,$i+"box-pack:$3"+Si+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+$i+e+e;case 4200:if(!Bi(e,/flex-|baseline/))return Si+"grid-column-align"+Fi(e,t)+e;break;case 2592:case 3360:return Si+Hi(e,"template-","")+e;case 4384:case 3616:return o&&o.some((function(e,o){return t=o,Bi(e.props,/grid-\w+-end/)}))?~zi(e+(o=o[t].value),"span",0)?e:Si+Hi(e,"-start","")+e+Si+"grid-row-span:"+(~zi(o,"span",0)?Bi(o,/\d+/):+Bi(o,/\d+/)-+Bi(e,/\d+/))+";":Si+Hi(e,"-start","")+e;case 4896:case 4128:return o&&o.some((function(e){return Bi(e.props,/grid-\w+-start/)}))?e:Si+Hi(Hi(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Hi(e,/(.+)-inline(.+)/,$i+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(qi(e)-1-t>6)switch(ji(e,t+1)){case 109:if(45!==ji(e,t+4))break;case 102:return Hi(e,/(.+:)(.+)-([^]+)/,"$1"+$i+"$2-$3$1"+Ti+(108==ji(e,t+3)?"$3":"$2-$3"))+e;case 115:return~zi(e,"stretch",0)?_a(Hi(e,"stretch","fill-available"),t,o)+e:e}break;case 5152:case 5920:return Hi(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,o,r,n,i,a,l){return Si+o+":"+r+l+(n?Si+o+"-span:"+(i?a:+a-+r)+l:"")+e}));case 4949:if(121===ji(e,t+6))return Hi(e,":",":"+$i)+e;break;case 6444:switch(ji(e,45===ji(e,14)?18:11)){case 120:return Hi(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+$i+(45===ji(e,14)?"inline-":"")+"box$3$1"+$i+"$2$3$1"+Si+"$2box$3")+e;case 100:return Hi(e,":",":"+Si)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Hi(e,"scroll-","scroll-snap-")+e}return e}function ya(e,t){for(var o="",r=0;r-1&&!e.return)switch(e.type){case Ii:return void(e.return=_a(e.value,e.length,o));case Ni:return ya([ea(e,{value:Hi(e.value,"@","@"+$i)})],r);case Ai:if(e.length)return function(e,t){return e.map(t).join("")}(o=e.props,(function(t){switch(Bi(t,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":ta(ea(e,{props:[Hi(t,/:(read-\w+)/,":"+Ti+"$1")]})),ta(ea(e,{props:[t]})),Li(e,{props:Vi(o,r)});break;case"::placeholder":ta(ea(e,{props:[Hi(t,/:(plac\w+)/,":"+$i+"input-$1")]})),ta(ea(e,{props:[Hi(t,/:(plac\w+)/,":"+Ti+"$1")]})),ta(ea(e,{props:[Hi(t,/:(plac\w+)/,Si+"input-$1")]})),ta(ea(e,{props:[t]})),Li(e,{props:Vi(o,r)})}return""}))}}var ba={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ca="undefined"!=typeof process&&void 0!==process.env&&({}.REACT_APP_SC_ATTR||{}.SC_ATTR)||"data-styled",ka="active",Sa="data-styled-version",Ta="6.1.8",$a="/*!sc*/\n",Pa="undefined"!=typeof window&&"HTMLElement"in window,Aa=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!=={}.REACT_APP_SC_DISABLE_SPEEDY&&""!=={}.REACT_APP_SC_DISABLE_SPEEDY?"false"!=={}.REACT_APP_SC_DISABLE_SPEEDY&&{}.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!=={}.SC_DISABLE_SPEEDY&&""!=={}.SC_DISABLE_SPEEDY&&("false"!=={}.SC_DISABLE_SPEEDY&&{}.SC_DISABLE_SPEEDY)),Ia={},Ra=Object.freeze([]),Na=Object.freeze({});function Oa(e,t,o){return void 0===o&&(o=Na),e.theme!==o.theme&&e.theme||t||o.theme}var Ea=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),Da=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,La=/(^-|-$)/g;function Ma(e){return e.replace(Da,"-").replace(La,"")}var Ba=/(a)(d)/gi,Ha=52,za=function(e){return String.fromCharCode(e+(e>25?39:97))};function ja(e){var t,o="";for(t=Math.abs(e);t>Ha;t=t/Ha|0)o=za(t%Ha)+o;return(za(t%Ha)+o).replace(Ba,"$1-$2")}var Fa,qa=5381,Wa=function(e,t){for(var o=t.length;o;)e=33*e^t.charCodeAt(--o);return e},Ua=function(e){return Wa(qa,e)};function Va(e){return ja(Ua(e)>>>0)}function Ga(e){return"string"==typeof e&&!0}var Ya="function"==typeof Symbol&&Symbol.for,Qa=Ya?Symbol.for("react.memo"):60115,Xa=Ya?Symbol.for("react.forward_ref"):60112,Ka={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ja={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Za={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},el=((Fa={})[Xa]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Fa[Qa]=Za,Fa);function tl(e){return("type"in(t=e)&&t.type.$$typeof)===Qa?Za:"$$typeof"in e?el[e.$$typeof]:Ka;var t}var ol=Object.defineProperty,rl=Object.getOwnPropertyNames,nl=Object.getOwnPropertySymbols,il=Object.getOwnPropertyDescriptor,al=Object.getPrototypeOf,ll=Object.prototype;function sl(e,t,o){if("string"!=typeof t){if(ll){var r=al(t);r&&r!==ll&&sl(e,r,o)}var n=rl(t);nl&&(n=n.concat(nl(t)));for(var i=tl(e),a=tl(t),l=0;l0?" Args: ".concat(t.join(", ")):""))}var vl=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,o=0;o=this.groupSizes.length){for(var o=this.groupSizes,r=o.length,n=r;e>=n;)if((n<<=1)<0)throw gl(16,"".concat(e));this.groupSizes=new Uint32Array(n),this.groupSizes.set(o),this.length=n;for(var i=r;i=this.length||0===this.groupSizes[e])return t;for(var o=this.groupSizes[e],r=this.indexOfGroup(e),n=r+o,i=r;i=0){var o=document.createTextNode(t);return this.element.insertBefore(o,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e0&&(c+="".concat(e,","))})),r+="".concat(l).concat(s,'{content:"').concat(c,'"}').concat($a)},i=0;i0?".".concat(t):e},d=s.slice();d.push((function(e){e.type===Ai&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(El,o).replace(r,c))})),a.prefix&&d.push(xa),d.push(wa);var u=function(e,n,i,l){void 0===n&&(n=""),void 0===i&&(i=""),void 0===l&&(l="&"),t=l,o=n,r=new RegExp("\\".concat(o,"\\b"),"g");var s=e.replace(Dl,""),c=ha(i||n?"".concat(i," ").concat(n," { ").concat(s," }"):s);a.namespace&&(c=Ll(c,a.namespace));var u,p,h,m=[];return ya(c,(u=d.concat((h=function(e){return m.push(e)},function(e){e.root||(e=e.return)&&h(e)})),p=Wi(u),function(e,t,o,r){for(var n="",i=0;i="A"&&e<="Z"};function Vl(e){for(var t="",o=0;o>>0);if(!t.hasNameForId(this.componentId,i)){var a=o(n,".".concat(i),void 0,this.componentId);t.insertRules(this.componentId,i,a)}r=ul(r,i),this.staticRulesId=i}else{for(var l=Wa(this.baseHash,o.hash),s="",c=0;c>>0);t.hasNameForId(this.componentId,p)||t.insertRules(this.componentId,p,o(s,".".concat(p),void 0,this.componentId)),r=ul(r,p)}}return r},e}(),Zl=kt.createContext(void 0);Zl.Consumer;var es={};function ts(e,t,o){var r,n=dl(e),i=e,a=!Ga(e),l=t.attrs,s=void 0===l?Ra:l,c=t.componentId,d=void 0===c?function(e,t){var o="string"!=typeof e?"sc":Ma(e);es[o]=(es[o]||0)+1;var r="".concat(o,"-").concat(Va(Ta+o+es[o]));return t?"".concat(t,"-").concat(r):r}(t.displayName,t.parentComponentId):c,u=t.displayName,p=void 0===u?Ga(r=e)?"styled.".concat(r):"Styled(".concat(function(e){return e.displayName||e.name||"Component"}(r),")"):u,h=t.displayName&&t.componentId?"".concat(Ma(t.displayName),"-").concat(t.componentId):t.componentId||d,m=n&&i.attrs?i.attrs.concat(s).filter(Boolean):s,f=t.shouldForwardProp;if(n&&i.shouldForwardProp){var g=i.shouldForwardProp;if(t.shouldForwardProp){var v=t.shouldForwardProp;f=function(e,t){return g(e,t)&&v(e,t)}}else f=g}var _=new Jl(o,h,n?i.componentStyle:void 0);function w(e,t){return function(e,t,o){var r=e.attrs,n=e.componentStyle,i=e.defaultProps,a=e.foldedComponentIds,l=e.styledComponentId,s=e.target,c=kt.useContext(Zl),d=Fl(),u=e.shouldForwardProp||d.shouldForwardProp,p=Oa(t,c,i)||Na,h=function(e,t,o){for(var r,n=yi(yi({},t),{className:void 0,theme:o}),i=0;i2&&Ol.registerId(this.componentId+e),this.removeStyles(e,o),this.createStyles(e,t,o,r)},e}();function cs(e){for(var t=[],o=1;o[ns` --hoverBumpPx: 3px; width: 60px; height: 60px; display: flex; justify-content: center; align-items: center; padding: 0; margin: 0; border-radius: 99999px; border: none; z-index: calc(${mo} - 1); position: fixed; cursor: pointer; background-color: ${null==e?void 0:e.backgroundColor}; box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.3); transition: all 200ms; svg { width: 24px; height: 24px; font-size: 24px; path:last-of-type { fill: ${null==e?void 0:e.iconColor}; } } &:hover { transform: translateY(var(--hoverBumpPx)); filter: brightness(1.1); } &:after { box-sizing: inherit; font-size: 10px; font-weight: bold; color: ${null==e?void 0:e.backgroundColor}; content: "${r||0}"; position: absolute; top: 0px; right: 0px; width: 20px; height: 20px; border-radius: 99999px; background: white; display: flex; justify-content: center; align-items: center; } `,"top/right"===t&&ns` top: 20px; right: 20px; `,"center/right"===t&&ns` top: 50%; right: 20px; transform: translateY(-50%); &:hover { transform: translateY(calc(-50% - var(--hoverBumpPx))); } `,"bottom/right"===t&&ns` bottom: 20px; right: 20px; `,"top/left"===t&&ns` top: 20px; left: 20px; `,"center/left"===t&&ns` top: 50%; left: 20px; transform: translateY(-50%); &:hover { transform: translateY(calc(-50% - var(--hoverBumpPx))); } `,"bottom/left"===t&&ns` bottom: 20px; left: 20px; `,"small"===o&&ns` width: 40px; height: 40px; &:after { width: 16px; height: 16px; padding: 3px; } `,"large"===o&&ns` width: 80px; height: 80px; &:after { width: 24px; height: 24px; padding: 8px; } `])),us=()=>{var e,t,o,r;const{stickyCheckoutButton:n,isInBuilder:i}=no(),{isCartDrawerOpen:a,openCartDrawer:l}=_i(),{visibleCart:s,itemsCount:c}=mi(),d=null==(e=null==n?void 0:n.position)?void 0:e.includes("right"),u="medium"===(null==n?void 0:n.size)?"regular":null==n?void 0:n.size,p=n.position;if(!(!i&&("always"===(null==n?void 0:n.showLogic)||"notEmpty"===(null==n?void 0:n.showLogic)&&(null==(t=null==s?void 0:s.items)?void 0:t.length)>0))||d&&a)return null;const h={backgroundColor:null==(o=null==n?void 0:n.backgroundColor)?void 0:o.hex,iconColor:null==(r=null==n?void 0:n.textColor)?void 0:r.hex};return Ko(ds,{id:ho,className:"cro_cart_sticky_button","data-cro-testid":"sticky-checkout-button",colors:h,position:p,size:u,onClick:l,itemsCount:c,children:Ko(lo,{className:"cro_cart_sticky_button__icon"})})},ps=cs(["",""],'@keyframes notyf-fadeinup{0%{opacity:0;transform:translateY(25%)}to{opacity:1;transform:translateY(0)}}@keyframes notyf-fadeinleft{0%{opacity:0;transform:translate(25%)}to{opacity:1;transform:translate(0)}}@keyframes notyf-fadeoutright{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(25%)}}@keyframes notyf-fadeoutdown{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(25%)}}@keyframes ripple{0%{transform:scale(0) translateY(-45%) translate(13%)}to{transform:scale(1) translateY(-45%) translate(13%)}}.notyf{position:fixed;top:0;left:0;height:100%;width:100%;color:#fff;z-index:9999;display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-end;pointer-events:none;box-sizing:border-box;padding:20px}.notyf__icon--error,.notyf__icon--success{height:21px;width:21px;background:#fff;border-radius:50%;display:block;margin:0 auto;position:relative}.notyf__icon--error:after,.notyf__icon--error:before{content:"";background:currentColor;display:block;position:absolute;width:3px;border-radius:3px;left:9px;height:12px;top:5px}.notyf__icon--error:after{transform:rotate(-45deg)}.notyf__icon--error:before{transform:rotate(45deg)}.notyf__icon--success:after,.notyf__icon--success:before{content:"";background:currentColor;display:block;position:absolute;width:3px;border-radius:3px}.notyf__icon--success:after{height:6px;transform:rotate(-45deg);top:9px;left:6px}.notyf__icon--success:before{height:11px;transform:rotate(45deg);top:5px;left:10px}.notyf__toast{display:block;overflow:hidden;pointer-events:auto;animation:notyf-fadeinup .3s ease-in forwards;box-shadow:0 3px 7px #00000040;position:relative;padding:0 15px;border-radius:2px;max-width:300px;transform:translateY(25%);box-sizing:border-box;flex-shrink:0}.notyf__toast--disappear{transform:translateY(0);animation:notyf-fadeoutdown .3s forwards;animation-delay:.25s}.notyf__toast--disappear .notyf__icon,.notyf__toast--disappear .notyf__message{animation:notyf-fadeoutdown .3s forwards;opacity:1;transform:translateY(0)}.notyf__toast--disappear .notyf__dismiss{animation:notyf-fadeoutright .3s forwards;opacity:1;transform:translate(0)}.notyf__toast--disappear .notyf__message{animation-delay:.05s}.notyf__toast--upper{margin-bottom:20px}.notyf__toast--lower{margin-top:20px}.notyf__toast--dismissible .notyf__wrapper{padding-right:30px}.notyf__ripple{height:400px;width:400px;position:absolute;transform-origin:bottom right;right:0;top:0;border-radius:50%;transform:scale(0) translateY(-51%) translate(13%);z-index:5;animation:ripple .4s ease-out forwards}.notyf__wrapper{display:flex;align-items:center;padding-top:17px;padding-bottom:17px;padding-right:15px;border-radius:3px;position:relative;z-index:10}.notyf__icon{width:22px;text-align:center;font-size:1.3em;opacity:0;animation:notyf-fadeinup .3s forwards;animation-delay:.3s;margin-right:13px}.notyf__dismiss{position:absolute;top:0;right:0;height:100%;width:26px;margin-right:-15px;animation:notyf-fadeinleft .3s forwards;animation-delay:.35s;opacity:0}.notyf__dismiss-btn{background-color:#00000040;border:none;cursor:pointer;transition:opacity .2s ease,background-color .2s ease;outline:none;opacity:.35;height:100%;width:100%}.notyf__dismiss-btn:after,.notyf__dismiss-btn:before{content:"";background:#fff;height:12px;width:2px;border-radius:3px;position:absolute;left:calc(50% - 1px);top:calc(50% - 5px)}.notyf__dismiss-btn:after{transform:rotate(-45deg)}.notyf__dismiss-btn:before{transform:rotate(45deg)}.notyf__dismiss-btn:hover{opacity:.7;background-color:#00000026}.notyf__dismiss-btn:active{opacity:.8}.notyf__message{vertical-align:middle;position:relative;opacity:0;animation:notyf-fadeinup .3s forwards;animation-delay:.25s;line-height:1.5em}@media only screen and (max-width:480px){.notyf{padding:0}.notyf__ripple{height:600px;width:600px;animation-duration:.5s}.notyf__toast{max-width:none;border-radius:0;box-shadow:0 -2px 7px #00000021;width:100%}.notyf__dismiss{width:56px}}.notyf{z-index:999999999999999}.notyf__toast--error{background:indianred}.notyf__toast--success{background:green}.notyf__toast--info{background:blue}.notyf__toast--warning{background:orange}\n'),hs=e=>{var t;if("default title"!==(null==(t=null==e?void 0:e.title)?void 0:t.toLowerCase()))return null==e?void 0:e.title},ms=(e,t="USD")=>"string"==typeof(null==e?void 0:e.price)?zo(Number(e.price),t):(null==e?void 0:e.price)||0;const fs="gid://shopify/ProductVariant/",gs=[{label:"Neometric Light",value:"NeometricLight",type:"remote",hidden:!0,definition:{src:"https://gentleandrose.com/cdn/shop/t/53/assets/NeometricLightRegular.bb414ac.woff?v=37518945530125405751668694681",format:"woff2","font-weight":400,"font-style":"normal"}},{label:"Inter",value:"Inter",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"}},{label:"Acme",value:"Acme",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Acme&display=swap"}},{label:"Courier",value:"Courier Prime",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400;1,700&display=swap"}},{label:"EB Garamond",value:"EB Garamond",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400..800;1,400..800&display=swap"}},{label:"Lato",value:"Lato",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap"}},{label:"Barlow",value:"Barlow",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"}},{label:"Montserrat",value:"Montserrat",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap"}},{label:"Oswald",value:"Oswald",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Oswald:wght@200..700&display=swap"}},{label:"Merriweather",value:"Merriweather",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900&display=swap"}},{label:"Merriweather Sans",value:"Merriweather Sans",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Merriweather+Sans:ital,wght@0,300..800;1,300..800&display=swap"}},{label:"Playfair Display",value:"Playfair Display",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap"}},{label:"Rubik",value:"Rubik",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap"}},{label:"Cinzel",value:"Cinzel",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Cinzel:wght@400..900&display=swap"}},{label:"Raleway",value:"Raleway",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap"}},{label:"Roboto",value:"Roboto",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"}},{label:"Cabin",value:"Cabin",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Cabin:ital,wght@0,400..700;1,400..700&display=swap"}},{label:"Lora",value:"Lora",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400..700;1,400..700&display=swap"}},{label:"Open Sans",value:"Open Sans",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap"}},{label:"Rokkit",value:"Rokkit",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Rokkitt:ital,wght@0,100..900;1,100..900&display=swap"}},{label:"Alegreya",value:"Alegreya",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Alegreya:ital,wght@0,400..900;1,400..900&display=swap"}},{label:"Berkshire Swash",value:"Berkshire Swash",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Berkshire+Swash&display=swap"}},{label:"League Spartan",value:"League Spartan",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=League+Spartan:wght@100..900&display=swap"}},{label:"Cormorant",value:"Cormorant",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Cormorant:ital,wght@0,300..700;1,300..700&display=swap"}},{label:"Dancing Script",value:"Dancing Script",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400..700&display=swap"}},{label:"Bitter",value:"Bitter",type:"google",definition:{src:"https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,100..900;1,100..900&display=swap"}}],vs=(e,t)=>(null==e?void 0:e.id)===`${fs}${t}`,_s=e=>(null==e?void 0:e.id)?parseInt(e.id.replace(fs,"")):void 0,ys=e=>e.replace("gid://shopify/Product/",""),ws=(e,t)=>{var o,r;if(null==(o=e.variants)?void 0:o.length)return e.variants.some((e=>ws(e,t)));if(e.id&&e.product){const o=`gid://shopify/ProductVariant/${t.variant_id}`;if(e.id===o)return!0;if((null==(r=e.product)?void 0:r.id)&&t.product_id){if(ys(e.product.id)===t.product_id.toString())return!0}if(e.displayName&&t.title){if(e.displayName.split(" - ")[0].toLowerCase().trim()===t.title.toLowerCase().trim())return!0}}if(e.id&&!e.variants&&t.product_id){if(ys(e.id)===t.product_id.toString())return!0}return!1},xs=async(e,t)=>{try{const o=(e=>{var t,o,r;return e.handle?e.handle:(null==(o=null==(t=e.variants)?void 0:t[0])?void 0:o.handle)?e.variants[0].handle:(null==(r=e.product)?void 0:r.handle)?e.product.handle:null})(e);if(!o)return!1;const r=await $o({handle:o});return!(r.error||!r)&&((e,t)=>{var o;if(e.id===t.product_id)return!0;if(e.handle===t.handle)return!0;if(e.title&&t.title&&e.title.toLowerCase().trim()===t.title.toLowerCase().trim())return!0;return!!(null==(o=e.variants)?void 0:o.length)&&e.variants.some((e=>e.id===t.variant_id))})(r,t)}catch(o){return!1}},bs=async(e,t)=>{var o;const r=[];if(!e.sections.freeProduct.isActive)return r;const n=e.sections.freeProduct.freeProduct,i="priceRule"===e.sections.freeProduct.logic&&e.sections.freeProduct.priceRule&&e.sections.freeProduct.freeProduct,a="ifThen"===e.sections.freeProduct.logic&&(null==(o=e.sections.freeProduct.couples)?void 0:o.length);if(i){const o=(e=>{if(0===e.length)return null;let t=e[0];for(const o of e)o.variants[0].price>t.variants[0].price&&(t=o);return t})(t.filter((e=>e.handle!==n.handle))),i=Xn(o,!0);if(i){const t=e.currencyCode||"USD",o=Math.floor(zo(+e.sections.freeProduct.priceRule,t)/ms(i,t))+1;r.push({id:i.id,quantity:o})}}else if(a){const{logicItem:t}=e.sections.freeProduct.couples[0],o=await $o({handle:t.handle});if(o.error)return r;const n=Xn(o,!0);n&&r.push({id:n.id,quantity:1})}return r},Cs=async(e,t)=>{const o=[];if(!e.sections.bulkDiscounts.isActive)return o;if("all"===e.sections.bulkDiscounts.choiceUpsell){const e=Xn(t[0],!0),r=Xn(t[1],!0);e&&o.push({id:e.id,quantity:1}),r&&o.push({id:r.id,quantity:1})}else{const r=e.sections.bulkDiscounts.upsellSpecificParts,n=_s(r[0]);n&&o.push({id:n,quantity:1});const i=t.filter((e=>{var t;return!(null==(t=e.variants)?void 0:t.some((e=>e.id===n)))})),a=Xn(i[0],!0);a&&o.push({id:a.id,quantity:1})}return o},ks=async(e,t)=>{if(!(!e.sections.bulkDiscounts.isActive&&!e.sections.freeProduct.isActive))return[];const o=Xn(t[0],!0);return o?[{id:o.id,quantity:1}]:[]},Ss=async e=>{var t,o;if(null==(o=null==(t=window.parent.CROCart)?void 0:t.storeSessionState)?void 0:o.isStorePasswordProtected)return;await So({attributes:{}}),await Co("cart/clear.js",{method:"POST",headers:{"Content-Type":"application/json"}});const{products:r}=await Co("products.json"),n=null==r?void 0:r.filter((e=>{var t;return null==(t=e.variants)?void 0:t.some((e=>e.available))}));if(!n||0===(null==n?void 0:n.length))return;const i=[...await bs(e,n),...await Cs(e,n),...await ks(e,n)];i.length&&await ko({items:i})},Ts=e=>localStorage.setItem("counter.timeLeft",e.toString()),$s=(e,t)=>{let o=null;return(...r)=>{window.clearTimeout(o),o=window.setTimeout((()=>{e.apply(null,r)}),t)}},Ps=to(((e,t)=>({initialTimeLeft:0,timeLeft:0,setTimeLeft:t=>{e((()=>({timeLeft:t})))},decrementTimeLeft:$s((()=>{e((e=>{const t=Math.max(e.timeLeft-1,0);return Ts(t),{timeLeft:t}}))}),500),resetTimeLeft:()=>{Ts(t().initialTimeLeft),t().setTimeLeft(t().initialTimeLeft)}})));no.subscribe(((e,t)=>{var o,r,n,i,a,l;if(!(null==(o=t.announcements)?void 0:o.time)&&(null==(r=e.announcements)?void 0:r.time)){const t=60*(parseInt(null==(i=null==(n=e.announcements)?void 0:n.time)?void 0:i.minutes)||0)+(parseInt(null==(l=null==(a=e.announcements)?void 0:a.time)?void 0:l.seconds)||0);Ps.setState({initialTimeLeft:t});const o=localStorage.getItem("counter.timeLeft");o?Ps.getState().setTimeLeft(+o):Ps.getState().resetTimeLeft()}})),mi.subscribe(((e,t)=>{var o,r,n;void 0!==(null==(o=t.cart)?void 0:o.item_count)&&(null==(r=e.cart)?void 0:r.item_count)>(null==(n=t.cart)?void 0:n.item_count)&&Ps.getState().resetTimeLeft()})),no.subscribe(((e,t)=>{var o,r,n,i,a,l,s,c,d,u,p,h,m;if((null==(o=t.announcements)?void 0:o.time)&&no.getState().isInBuilder&&((null==(n=null==(r=e.announcements)?void 0:r.time)?void 0:n.minutes)!==(null==(a=null==(i=t.announcements)?void 0:i.time)?void 0:a.minutes)||(null==(s=null==(l=e.announcements)?void 0:l.time)?void 0:s.seconds)!==(null==(d=null==(c=t.announcements)?void 0:c.time)?void 0:d.seconds))){const t=60*(parseInt(null==(p=null==(u=e.announcements)?void 0:u.time)?void 0:p.minutes)||0)+(parseInt(null==(m=null==(h=e.announcements)?void 0:h.time)?void 0:m.seconds)||0);Ps.setState({initialTimeLeft:t}),Ps.getState().resetTimeLeft()}})),Ps.subscribe(((e,t)=>{0===e.timeLeft&&no.getState().isInBuilder&&Ps.getState().resetTimeLeft()}));var As=(e=>(e.SESSION_RECORDING="session_recording",e))(As||{});const Is=()=>window.parent.posthog;let Rs=!1;_i.subscribe((async(e,t)=>{e.isCartDrawerOpen&&!t.isCartDrawerOpen&&!Rs&&await(async e=>{let t=0;const o=()=>{const e=Is();return!e&&t<1?(t++,console.debug("Retry FF loading..."),new Promise((e=>{setTimeout((()=>{e()}),3e3)})).then((()=>o()))):e},r=await o();return new Promise((t=>{r?r.onFeatureFlags((()=>{t(r.isFeatureEnabled(e))})):t(!1)}))})(As.SESSION_RECORDING)&&((e=>{if(Is()){const t=e?{sampling:!0}:void 0;Is().startSessionRecording(t)}})(!0),Rs=!0)})),no.subscribe(((e,t)=>{var o;!t.isInBuilder&&e.isInBuilder&&(null==(o=_i.getState())||o.openCartDrawer())}));const Ns=e=>{Ss(e).then((()=>mi.getState().refetch()))};no.subscribe(((e,t)=>{var o,r,n,i,a,l,s,c,d,u,p,h,m,f,g,v,_,y,w,x,b,C,k,S,T,$;if(null==e?void 0:e.isInBuilder){if(!1===(null==(o=null==t?void 0:t.bulkDiscounts)?void 0:o.isActive)&&e.bulkDiscounts.isActive){if("all"===e.bulkDiscounts.choiceUpsell&&(null==(r=e.bulkDiscounts.upsellParts)?void 0:r.length))return Ns(e.config);if(["specific","collections"].includes(e.bulkDiscounts.choiceUpsell)&&(null==(n=e.bulkDiscounts.upsellSpecificParts)?void 0:n.length))return Ns(e.config)}if(e.bulkDiscounts.isActive&&(null==(i=null==t?void 0:t.bulkDiscounts)?void 0:i.choiceUpsell)&&(null==(a=null==t?void 0:t.bulkDiscounts)?void 0:a.choiceUpsell)!==e.bulkDiscounts.choiceUpsell&&"all"===e.bulkDiscounts.choiceUpsell)return Ns(e.config);const P=null==(l=null==t?void 0:t.bulkDiscounts)?void 0:l.upsellSpecificParts,A=e.bulkDiscounts.upsellSpecificParts;if(e.bulkDiscounts.isActive&&(null==(s=null==t?void 0:t.bulkDiscounts)?void 0:s.choiceUpsell)&&["specific","collections"].includes(e.bulkDiscounts.choiceUpsell)&&((null==(c=null==P?void 0:P[0])?void 0:c.id)!==(null==(d=null==A?void 0:A[0])?void 0:d.id)||(null==P?void 0:P[0])&&(null==(u=null==A?void 0:A[0])?void 0:u.id)))return Ns(e.config);if(!1===(null==(p=null==t?void 0:t.freeProduct)?void 0:p.isActive)&&e.freeProduct.isActive){if("priceRule"===e.freeProduct.logic&&e.freeProduct.freeProduct)return Ns(e.config);if("ifThen"===e.freeProduct.logic&&(null==(f=null==(m=null==(h=e.freeProduct.couples)?void 0:h[0])?void 0:m.logicItem)?void 0:f.handle))return Ns(e.config)}if(e.freeProduct.isActive&&"priceRule"===e.freeProduct.logic&&(null==(v=null==(g=null==t?void 0:t.freeProduct)?void 0:g.freeProduct)?void 0:v.handle)!==(null==(y=null==(_=e.freeProduct)?void 0:_.freeProduct)?void 0:y.handle))return Ns(e.config);if(e.freeProduct.isActive&&"ifThen"===e.freeProduct.logic&&(null==(C=null==(b=null==(x=null==(w=t.freeProduct)?void 0:w.couples)?void 0:x[0])?void 0:b.logicItem)?void 0:C.handle)!==(null==(T=null==(S=null==(k=e.freeProduct.couples)?void 0:k[0])?void 0:S.logicItem)?void 0:T.handle))return Ns(e.config);if(!0===(null==($=null==t?void 0:t.freeProduct)?void 0:$.isActive)&&!e.freeProduct.isActive)return Ns(e.config)}}));const Os=[{url:"/cart/add",method:"POST"},{url:"/cart/add.js",method:"POST"},{url:"/cart/change.js",method:"POST"},{url:"/cart/change",method:"POST"},{url:"/cart/update.js",method:"POST"},{url:"/cart/update",method:"POST"},{url:"/cart.js",method:"POST"},{url:"/cart",method:"POST"}],Es=()=>{_i.getState().openCartDrawer(),mi.getState().refetch({refetchRecommendations:!0})},Ds=Yo("atc");var Ls,Ms;Ls=window.XMLHttpRequest.prototype,Ms=Ls.open,Ls.open=function(e,t){var o=this.send;return this.send=function(){var r=this.onreadystatechange;return this.onreadystatechange=function(){return function(e,t,o){var r;if(o.readyState===XMLHttpRequest.DONE){const n=Os.some((o=>t.toString().endsWith(o.url)&&o.method===e.toUpperCase())),i=0===o.status||o.status>=200&&o.status<400,a=Os.some((e=>t.toString().includes(e.url)));a&&(Ds.info("Intercepted XHR request",{url:t.toString(),method:e,status:o.status,statusOk:i,readyState:o.readyState,responseText:null==(r=o.responseText)?void 0:r.substring(0,200)}),Ds.info("XHR Condition checks:",{shouldTrigger:n,statusOk:i,readyState:o.readyState})),n&&i?(Ds.info("✅ Triggering cart update via XHR (shouldTrigger=true, statusOk=true)"),Es()):a&&Ds.info("⏭️ Skipping cart update via XHR",{shouldTrigger:n,statusOk:i})}}(e,t,this),null==r?void 0:r.apply(this,arguments)},o.apply(this,arguments)},Ms.apply(this,arguments)};const Bs=e=>{if("number"==typeof e)return Number.isFinite(e)?e:NaN;if("string"==typeof e){const t=parseInt(e,10);return Number.isNaN(t)?NaN:t}return NaN},Hs=async({productId:e,variantId:t,quantity:o})=>{const r=Bs(e),n=Bs(t),i=Bs(o)||1;if(Number.isNaN(r)||Number.isNaN(n))return;let a={};try{a=await(async()=>To())()}catch(d){console.error("Failed to fetch updated cart:",d)}const l=Tn(a,`${dn}_${r}`),s=Lr();rn({event:"product_added",payload:{event_id:s,newCart:a,products:[{id:n,quantity:i}],product_id:r,variant_id:n,source:l?"pdp_nav_recommendation":"product_page",...l||{},accepted_event_id:s}});const c={operation:"product_page_add",originalProduct:{product_id:r,variant_id:n},requestedQty:i,originalCart:null,updatedCart:a,recommendationContext:l?{...l,accepted_event_id:s}:void 0};await ri(c)},zs=Yo("atc"),{fetch:js}=window;window.fetch=async(...e)=>{let[t,o]=e;t instanceof Request&&(t=t.url,o=t);const r=await js(t,o);return(async()=>{const e=(null==o?void 0:o.headers)||{},n=((null==o?void 0:o.method)||"GET").toUpperCase();let i;try{i=JSON.parse(o.body.toString())}catch(l){i=(null==o?void 0:o.body)instanceof FormData?Object.fromEntries(o.body.entries()):null==o?void 0:o.body}const a=Os.some((e=>r.url.includes(e.url)));if(a&&zs.info("Intercepted fetch request",{url:r.url,method:n,status:r.status,ok:r.ok,body:i,headers:e}),r.ok){const o=Os.some((e=>r.url.endsWith(e.url)&&e.method===n)),s=!e[fo],c="object"==typeof i&&null!==i&&!Array.isArray(i),d=c&&1===Object.keys(i).length&&(i.hasOwnProperty("attributes")||i.hasOwnProperty("note"));let u=!0;if(t.toString().endsWith("/cart/update.js")&&c){if(u=!1,"object"==typeof i.updates){const e=i.updates.variant_id&&["12345678"].includes(i.updates.variant_id.toString()),t=Object.keys(i.updates).some((e=>e.includes("variant_id")||e.includes("product_id"))),o=Object.keys(i.updates).some((e=>/^\d+$/.test(e)));(e||t||o)&&(u=!0)}1===i.line&&(u=!0)}const p=o&&s&&!d&&_o(t.toString())&&u,h=c&&i.attributes&&(i.attributes.__limoniappsdiscountninja||i.attributes.__discounts);if(a&&zs.info("Condition checks:",{isTriggeringRequest:o,isNotCROCartRequest:s,isNoopRequest:d,passesUpdateFilters:u,isResourceOnShopDomain:_o(t.toString()),hasDiscountAttributes:h,shouldTrigger:p}),p)zs.info("✅ Triggering cart update (shouldTrigger=true)"),Es();else if(h){const e=mi.getState().cart,t=e?er.fromCartTotal(e):null;let o=null;try{const e=await r.clone().json();e&&void 0!==e.total_price&&(o=er.fromCartTotal(e))}catch(l){}t&&o&&!t.eq(o)?(zs.info("✅ Triggering cart update (discount attributes changed total)",{currentTotal:null==t?void 0:t.toString(),newTotal:null==o?void 0:o.toString()}),Es()):h&&zs.info("⏭️ Skipping cart update (discount attributes present but total unchanged)",{currentTotal:null==t?void 0:t.toString(),newTotal:null==o?void 0:o.toString()})}else a&&zs.info("⏭️ Skipping cart update (shouldTrigger=false, no discount attributes)");"POST"===n&&r.url.endsWith("/cart/add.js")&&s&&c&&(zs.info("📊 Tracking product page add",{productId:i["product-id"]||i.productId||i.product_id,variantId:i.id||i.variant_id,quantity:i.quantity}),await Hs({productId:i["product-id"]||i.productId||i.product_id,variantId:i.id||i.variant_id,quantity:i.quantity}))}})(),r};const Fs=(e,t,o)=>{if(!e||!t)return"";const r=t.match(/\{\{\s*(\w+)\s*\}\}/);if(!r)return e;const n=r[1],i=new RegExp(`\\{\\{\\s*${n}\\s*\\}\\}`,"g");return e.replace(i,String(o))},qs=(e,t)=>!!(null==e?void 0:e.includes(t)),Ws=(e,t,o)=>{if(!(null==e?void 0:e.includes(t)))return[e];return e.split(new RegExp(`(${t})`,"g")).map((e=>e===t?o:e))},Us=({text:e})=>{const{decrementTimeLeft:t,timeLeft:o}=Ps(),r=new Date(1e3*o).toISOString().slice(14,19);return ae((()=>{const e=setInterval((()=>{t()}),1e3);return()=>{clearInterval(e)}}),[]),Ko(b,{children:Ko("span",{dangerouslySetInnerHTML:{__html:Fs(e,"{{time}}",r)}})})},Vs=()=>{var e,t;const{general:o}=no(),r=(null==o?void 0:o.enableTranslations)?null==(t=null==(e=window.parent)?void 0:e.CROCart)?void 0:t.translations:null;return{upsellHeaderText:(null==r?void 0:r.upsellHeaderText)||"",generalHeaderText:(null==r?void 0:r.generalHeaderText)||"",continueShoppingText:(null==r?void 0:r.continueShoppingText)||"",cartIsEmptyText:(null==r?void 0:r.cartIsEmptyText)||"",addToCartText:(null==r?void 0:r.addToCartText)||"",discountText:(null==r?void 0:r.discountText)||"",addText:(null==r?void 0:r.addText)||"",quantityShortText:(null==r?void 0:r.quantityShortText)||"",outOfStockText:(null==r?void 0:r.outOfStockText)||"",chooseText:(null==r?void 0:r.chooseText)||"",saveText:(null==r?void 0:r.saveText)||"",checkoutText:(null==r?void 0:r.checkoutText)||"",infoText:(null==r?void 0:r.infoText)||"",oneClickUpsellText:(null==r?void 0:r.oneClickUpsellText)||"",addExpressShippingText:(null==r?void 0:r.addExpressShippingText)||"",shippingAndTaxText:(null==r?void 0:r.shippingAndTaxText)||"",deliveryText:(null==r?void 0:r.deliveryText)||"",subtotalText:(null==r?void 0:r.subtotalText)||"",totalText:(null==r?void 0:r.totalText)||"",savingsText:(null==r?void 0:r.savingsText)||"",belowThresholdCustomText:(null==r?void 0:r.belowThresholdCustomText)||"",customShippingMessage:(null==r?void 0:r.customShippingMessage)||"",progressTextBefore:(null==r?void 0:r.progressTextBefore)||"",progressTextAfter:(null==r?void 0:r.progressTextAfter)||"",progressTextToNextOption:(null==r?void 0:r.progressTextToNextOption)||"",freeGiftText:(null==r?void 0:r.freeGiftText)||"",freeShippingText:(null==r?void 0:r.freeShippingText)||"",progressDiscountText:(null==r?void 0:r.progressDiscountText)||"",freeDiscountMessage:(null==r?void 0:r.freeDiscountMessage)||"",freeTextBefore:(null==r?void 0:r.freeTextBefore)||"",freeTextAfter:(null==r?void 0:r.freeTextAfter)||"",variantPickerButtonText:(null==r?void 0:r.variantPickerButtonText)||"",headlineBeforeFulfilled:(null==r?void 0:r.headlineBeforeFulfilled)||"",bodyBeforeFulfilled:(null==r?void 0:r.bodyBeforeFulfilled)||"",discountedProductsBadgeText:(null==r?void 0:r.discountedProductsBadgeText)||"",bxgyDiscountMessage:(null==r?void 0:r.bxgyDiscountMessage)||"",tier1BeforeThresholdText:(null==r?void 0:r.tier1BeforeThresholdText)||"",tier1AfterThresholdText:(null==r?void 0:r.tier1AfterThresholdText)||"",tier1DiscountMessage:(null==r?void 0:r.tier1DiscountMessage)||"",tier2BeforeThresholdText:(null==r?void 0:r.tier2BeforeThresholdText)||"",tier2AfterThresholdText:(null==r?void 0:r.tier2AfterThresholdText)||"",tier2DiscountMessage:(null==r?void 0:r.tier2DiscountMessage)||"",tier3BeforeThresholdText:(null==r?void 0:r.tier3BeforeThresholdText)||"",tier3AfterThresholdText:(null==r?void 0:r.tier3AfterThresholdText)||"",tier3DiscountMessage:(null==r?void 0:r.tier3DiscountMessage)||"",tipHeaderText:(null==r?void 0:r.tipHeaderText)||"",tipDescriptionText:(null==r?void 0:r.tipDescriptionText)||"",announcementLine1:(null==r?void 0:r.announcementLine1)||"",announcementLine2:(null==r?void 0:r.announcementLine2)||"",announcementLine3:(null==r?void 0:r.announcementLine3)||"",orderNoteText:(null==r?void 0:r.orderNoteText)||"",shareFeedbackText:(null==r?void 0:r.shareFeedbackText)||"",promotionalCodeText:(null==r?void 0:r.promotionalCodeText)||"",promotionalCodePlaceholderText:(null==r?void 0:r.promotionalCodePlaceholderText)||"",confirmText:(null==r?void 0:r.confirmText)||"",upsellDiscountMessage:(null==r?void 0:r.upsellDiscountMessage)||"",benefitsHeaderText:(null==r?void 0:r.benefitsHeaderText)||"",benefitsBadgeTexts:(null==r?void 0:r.benefitsBadgeTexts)||{},paymentHeaderText:(null==r?void 0:r.paymentHeaderText)||""}},Gs=ls.div.withConfig({componentId:"CROCart__sc-r4wavb-0"})((({iconColor:e})=>[{margin:"0.75rem",display:"flex",flexDirection:"column"},e&&{svg:{stroke:e||"#1C1C1E"}}])),Ys=ls(Gs).withConfig({componentId:"CROCart__sc-8az58p-0"})((({withBorders:e,colors:t,noBlockMargin:o})=>[{marginLeft:"0px",marginRight:"0px","--tw-bg-opacity":"1",backgroundColor:"rgb(225 250 241 / var(--tw-bg-opacity))",paddingTop:"0.75rem",paddingBottom:"0.75rem"},o&&{marginTop:"0px",marginBottom:"0px"},ns` :hover { animation-play-state: paused; } `,e&&{borderTopWidth:"1px",borderBottomWidth:"1px","--tw-border-opacity":"0.2",borderColor:"rgb(34 197 94 / var(--tw-border-opacity))"},(null==t?void 0:t.backgroundColor)&&ns` background-color: ${t.backgroundColor}; `,(null==t?void 0:t.textColor)&&ns` color: ${t.textColor}; `,(null==t?void 0:t.borderColor)&&ns` border-color: ${t.borderColor}; `])),Qs=ls.div.withConfig({componentId:"CROCart__sc-8az58p-1"})((({animationDuration:e=30,textWidth:t=0,shouldAnimate:o=!1})=>[{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",willChange:"transform"},ns` @keyframes scroller { 0% { transform: translate3d(100%, 0, 0); } 100% { transform: translate3d(calc(0% - ${t}px), 0, 0); } } `,o&&ns` animation: scroller ${e}s linear infinite; text-align: left; `])),Xs=ls.span.withConfig({componentId:"CROCart__sc-8az58p-2"})((()=>[{marginRight:"5rem",display:"inline-block",flexShrink:"0",whiteSpace:"nowrap","&:last-of-type":{marginRight:"0px"}}])),Ks=()=>{var e,t;const{announcements:o,isInBuilder:r,promoBanner:n}=no(),{itemsCount:i}=mi(),{timeLeft:a}=Ps(),l=Vs(),s=se(),c=de((()=>{const e=(null==o?void 0:o.lines)||[];return[l.announcementLine1,l.announcementLine2,l.announcementLine3].filter(Boolean).length>0?e.map(((e,t)=>(0===t?l.announcementLine1:1===t?l.announcementLine2:l.announcementLine3)||e)):e}),[null==o?void 0:o.lines,l.announcementLine1,l.announcementLine2,l.announcementLine3]),d=null==o?void 0:o.showBorders,u={backgroundColor:null==o?void 0:o.backgroundColor.hex,borderColor:null==o?void 0:o.borderColor.hex,textColor:null==o?void 0:o.textColor.hex},p=null==(e=null==s?void 0:s.current)?void 0:e.scrollWidth,h=null==(t=null==s?void 0:s.current)?void 0:t.clientWidth,m=p/h*10,f=p>h,g=null==c?void 0:c.every((e=>qs(e,"{{time}}")));if(!o||!o.isActive||g&&0===a&&!r)return null;const v=c.map((e=>qs(e,"{{time}}")?a&&!(i<=0)||r?Ko(Xs,{className:"cro_cart_announcements__item cro_cart_announcements__item--timer",children:Ko(Us,{text:e})}):null:Ko(Xs,{className:"cro_cart_announcements__item",dangerouslySetInnerHTML:{__html:e}}))).filter((e=>e));return!!v.length&&Ko(Ys,{className:"cro_cart_announcements",withBorders:d,colors:u,noBlockMargin:n&&"none"===n.imageMargin,"data-cro-testid":"announcement-bar",children:Ko(Qs,{ref:s,className:"cro_cart_announcements__track",textWidth:p,animationDuration:m,shouldAnimate:f,children:v})})},Js=ls.div.withConfig({componentId:"CROCart__sc-8syg4x-0"})((({layout:e="horizontal",colors:t})=>[{display:"flex"},"horizontal"===e&&{flexDirection:"row"},"vertical"===e&&{flexDirection:"column"},"columns"===e&&{flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between",gap:"0.5rem"},t.backgroundColor&&ns` background-color: ${t.backgroundColor}; `,t.textColor&&ns` color: ${t.textColor}; `,t.iconColor&&ns` svg path { stroke: ${t.iconColor}; } `])),Zs=ls.div.withConfig({componentId:"CROCart__sc-8syg4x-1"})((({layout:e="horizontal"})=>[{display:"flex",alignItems:"center",padding:"0.5rem"},"horizontal"===e&&[{flexDirection:"row",justifyContent:"flex-start"},ns` --icon-size: 20px; div { ${{fontSize:"15px",lineHeight:"22px",fontWeight:"400"}} } svg { ${{marginRight:"0.5rem"}}; width: var(--icon-size); height: var(--icon-size); } `],"vertical"===e&&[{flex:"1 1 0%",flexDirection:"column",justifyContent:"flex-start"},ns` --icon-size: 24px; div { ${{textAlign:"center",fontSize:"13px",lineHeight:"20px",fontWeight:"400"}} } .benefit-icon div:first-of-type { ${{marginBottom:"1rem",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(245 245 247 / var(--tw-bg-opacity))",padding:"10px","&::before":{content:"var(--tw-content)",display:"contents"}}} } svg { width: var(--icon-size); height: var(--icon-size); } `],"column"===e&&[{flex:"1 1 0%",flexDirection:"column",alignItems:"center",justifyContent:"flex-start",gap:"0.5rem",padding:"0px",textAlign:"center"},ns` --icon-size: 32px; div { ${{textAlign:"center",fontSize:"13px",lineHeight:"20px",fontWeight:"400"}} } svg { width: var(--icon-size); height: var(--icon-size); } `]])),ec=[{name:"delivery",element:'\n \n\n'},{name:"return",element:'\n \n\n'},{name:"warranty",element:'\n \n\n'},{name:"support",element:'\n\n'},{name:"phone",element:'\n \n\n'},{name:"flight",element:'\n\n'},{name:"premium",element:'\n\n\n'},{name:"military",element:'\n\n'},{name:"rocket",element:'\n \n'},{name:"loyalty",element:'\n\n\n'},{name:"autorenew",element:'\n \n'},{name:"help",element:'\n \n\n'},{name:"paid",element:'\n \n\n'},{name:"lightbulb",element:'\n \n\n'},{name:"favorite",element:'\n \n\n'},{name:"info",element:'\n \n'},{name:"bra",category:"support",element:'\n \n \n \n \n \n \n \n \n \n \n \n \n \n ',preview:'\n \n \n \n \n \n \n \n \n \n \n \n \n \n '},{name:"bottom",category:"support",element:'\n \n \n \n ',preview:'\n \n \n \n '}],tc=()=>{const{benefits:e}=no(),t=Vs();if(!e||!e.isActive)return null;const o=e.designOption,r=2===o?"horizontal":3===o?"columns":"vertical",n=2===o?"vertical":3===o?"column":"horizontal",i=t.benefitsHeaderText||e.benefitsHeaderText,a={backgroundColor:e.backgroundColor.hex,textColor:e.textColor.hex,iconColor:e.iconColor.hex},l=!(null==e?void 0:e.disableAllIcons)||2===e.designOption;return Ko(Gs,{className:"cro_cart_benefits","data-cro-testid":"benefits-badges",children:[(3!==o||!!i)&&Ko(oc,{className:"cro_cart_benefits__title",children:i}),Ko(Js,{className:"cro_cart_benefits__wrapper",layout:r,colors:a,children:e.badges.map(((e,o)=>{var r;const i=(e.textValue?t.benefitsBadgeTexts[e.id]:"")||e.textValue;return Ko(Zs,{className:"cro_cart_benefits__item",layout:n,alt:"Benefit",children:[Ko("div",{className:"cro_cart_benefits__icon benefit-icon",children:l&&!!e.svgKey&&Ko("div",{dangerouslySetInnerHTML:{__html:null==(a=e.svgKey,r=null==ec?void 0:ec.find((e=>e.name===a)))?void 0:r.element}})}),Ko("div",{className:"cro_cart_benefits__text",children:i})]},e.id||o);var a}))})]})};var oc=ls("div").withConfig({componentId:"CROCart__sc-1g3rzrj-0"})({fontSize:"20px",lineHeight:"28px",fontWeight:"600"});const rc=e=>y("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y("path",{d:"M9 14.25L15 8.25M19.5 4.757V21.75L15.75 20.25L12 21.75L8.25 20.25L4.5 21.75V4.757C4.5 3.649 5.306 2.7 6.407 2.572C10.1232 2.14063 13.8768 2.14063 17.593 2.572C18.693 2.7 19.5 3.649 19.5 4.757ZM9.75 9H9.758V9.008H9.75V9ZM10.125 9C10.125 9.09945 10.0855 9.19484 10.0152 9.26516C9.94484 9.33549 9.84946 9.375 9.75 9.375C9.65054 9.375 9.55516 9.33549 9.48483 9.26516C9.41451 9.19484 9.375 9.09945 9.375 9C9.375 8.90054 9.41451 8.80516 9.48483 8.73483C9.55516 8.66451 9.65054 8.625 9.75 8.625C9.84946 8.625 9.94484 8.66451 10.0152 8.73483C10.0855 8.80516 10.125 8.90054 10.125 9ZM14.25 13.5H14.258V13.508H14.25V13.5ZM14.625 13.5C14.625 13.5995 14.5855 13.6948 14.5152 13.7652C14.4448 13.8355 14.3495 13.875 14.25 13.875C14.1505 13.875 14.0552 13.8355 13.9848 13.7652C13.9145 13.6948 13.875 13.5995 13.875 13.5C13.875 13.4005 13.9145 13.3052 13.9848 13.2348C14.0552 13.1645 14.1505 13.125 14.25 13.125C14.3495 13.125 14.4448 13.1645 14.5152 13.2348C14.5855 13.3052 14.625 13.4005 14.625 13.5Z",stroke:"#1C1C1E",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),nc=e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:18,viewBox:"0 0 16 18",fill:"none",...e},y("path",{d:"M10.2833 6.50001L9.995 14M6.005 14L5.71667 6.50001M14.0233 3.82501C14.3083 3.86834 14.5917 3.91417 14.875 3.96334M14.0233 3.82501L13.1333 15.3942C13.097 15.8652 12.8842 16.3051 12.5375 16.626C12.1908 16.9469 11.7358 17.1251 11.2633 17.125H4.73667C4.26425 17.1251 3.80919 16.9469 3.46248 16.626C3.11578 16.3051 2.90299 15.8652 2.86667 15.3942L1.97667 3.82501M14.0233 3.82501C13.0616 3.6796 12.0948 3.56925 11.125 3.49417M1.97667 3.82501C1.69167 3.86751 1.40833 3.91334 1.125 3.96251M1.97667 3.82501C2.93844 3.67961 3.9052 3.56926 4.875 3.49417M11.125 3.49417V2.73084C11.125 1.74751 10.3667 0.927507 9.38333 0.896674C8.46135 0.867206 7.53865 0.867206 6.61667 0.896674C5.63333 0.927507 4.875 1.74834 4.875 2.73084V3.49417M11.125 3.49417C9.04477 3.33341 6.95523 3.33341 4.875 3.49417",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})),ic=ls.span.withConfig({componentId:"CROCart__sc-bmgrpu-0"})((({colors:e,size:t="medium"})=>[{borderRadius:"0.25rem",paddingLeft:"0.25rem",paddingRight:"0.25rem"},ns` & > svg { display: inline-block; width: 18px; margin-right: 5px; path { stroke: currentColor; } } `,"medium"===t&&{padding:"0.25rem"},"large"===t&&{padding:"0.5rem"},(null==e?void 0:e.textColor)&&ns` color: ${e.textColor}; `,(null==e?void 0:e.backgroundColor)&&ns` background-color: ${e.backgroundColor}; `])),ac=({qty:e,discountOptions:t})=>{const o=()=>{let o;return((e,t)=>{const o=[...e];return o.sort(((e,o)=>{const r=e[t],n=o[t];return"number"==typeof r&&"number"==typeof n?r-n:r.toString().localeCompare(n.toString())})),o})(t||[],"qty").forEach((t=>{e>=t.qty&&(o=t)})),o};return{getLargestCheckedDiscountOption:o,isDiscountOptionChecked:e=>{const t=o();return!!t&&e.key===t.key}}},lc=()=>{const{bulkDiscounts:e}=no(),{cartCurrency:t,cart:o}=mi(),r=e=>(null==e?void 0:e.map(((e,t)=>({key:t,qty:e.count,discountPercentage:e.percentage}))))||[],n=e=>{const t=[...e];return t.unshift({key:"oneItem",qty:1,discountPercentage:0}),t},i=de((()=>{const t=r(null==e?void 0:e.upsellParts);return(null==t?void 0:t.length)?t:[]}),[e]),a=ue(((e,r)=>{const{getLargestCheckedDiscountOption:n}=ac({qty:r.quantity,discountOptions:e}),i=n();if((null==i?void 0:i.qty)>1){const e=qn(r,t,i);if(e.eq(new er(r.discounted_price,t)))return;(e=>{const t=`discount_mismatch_${e.variant_id}`;return!rr(t)&&(or(t,1,30),!0)})(r)&&rn({event:"discount_calculation_mismatch",payload:{type:"bulk-discount",discountOption:i,calculatedPrice:e.getAsNativeCurrency().value,currency:e.getAsNativeCurrency().currency,product:r,cart:o}})}}),[t,o]);return{getDiscountOptionsForProduct:ue((t=>{let o=[];if(!(null==e?void 0:e.isActive))return o;if("all"===(null==e?void 0:e.choiceUpsell)&&(null==i?void 0:i.length)&&(o=n(i)),["specific","collections"].includes(null==e?void 0:e.choiceUpsell)){const i=null==e?void 0:e.upsellSpecificParts,a=null==i?void 0:i.find((e=>vs(e,t.variant_id))),l=r((null==a?void 0:a.parts)||[]);(null==l?void 0:l.length)&&(o=n(l))}return a(o,t),o}),[null==e?void 0:e.choiceUpsell,null==e?void 0:e.isActive,null==e?void 0:e.upsellSpecificParts,i,a])}},sc=()=>null,cc=({handle:e})=>Co(`collections/${e}/products.json`),dc=()=>{var e,t,o,r;const[n,i]=ne([]),{cart:a}=mi(),{freeProduct:l}=no();ae((()=>{var e;const t=null==(e=null==l?void 0:l.buyXGetYConfig)?void 0:e.collectionHandles;(async()=>{if(!t||0===t.length)return;const e=[];t.forEach((t=>{e.push(cc({handle:t}))}));const o=await Promise.allSettled(e);let r=[];o.forEach((e=>{var t;"fulfilled"!==e.status||(null==(t=e.value)?void 0:t.error)||(r=r.concat(e.value.products))})),i(r)})()}),[l]);const s=de((()=>{var e;return null==(e=null==l?void 0:l.buyXGetYConfig)?void 0:e.isActive}),[null==l?void 0:l.buyXGetYConfig]),c=de((()=>{var e;return(null==(e=null==a?void 0:a.items)?void 0:e.reduce(((e,t)=>e+(n.find((e=>e.id===t.product_id))?t.quantity:0)),0))||0}),[n,a]);return{isBXGYActive:s,isBXGYFulfilled:de((()=>{var e,t;return c>=(null==(e=null==l?void 0:l.buyXGetYConfig)?void 0:e.thresholdProductCount)+(null==(t=null==l?void 0:l.buyXGetYConfig)?void 0:t.discountedProductCount)}),[c,null==l?void 0:l.buyXGetYConfig]),isBXGYAlmostFulfilled:de((()=>{var e,t,o;return c>=(null==(e=null==l?void 0:l.buyXGetYConfig)?void 0:e.thresholdProductCount)&&c<(null==(t=null==l?void 0:l.buyXGetYConfig)?void 0:t.thresholdProductCount)+(null==(o=null==l?void 0:l.buyXGetYConfig)?void 0:o.discountedProductCount)}),[c,null==l?void 0:l.buyXGetYConfig]),isBXGYProduct:e=>!!n.find((t=>t.id===e.product_id)),bxgyHeaderText:null==(e=null==l?void 0:l.buyXGetYConfig)?void 0:e.headlineBeforeFulfilled,bxgyBodyText:null==(t=null==l?void 0:l.buyXGetYConfig)?void 0:t.bodyBeforeFulfilled,bxgyDiscountedProductsBadgeText:null==(o=null==l?void 0:l.buyXGetYConfig)?void 0:o.discountedProductsBadgeText,bxgyDiscountTitle:null==(r=null==l?void 0:l.buyXGetYConfig)?void 0:r.discountMessage}},uc=e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},y("path",{d:"M6 18L18 6M6 6L18 18",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),pc=()=>`${_i((e=>e.cartDrawerViewId))}:${de((()=>Lr("render")),[])}`,hc=()=>Ko(mc,{"aria-hidden":"true",role:"status",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[Ko("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"}),Ko("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentColor"})]});var mc=ls("svg").withConfig({componentId:"CROCart__sc-q6yvkr-0"})({position:"absolute",left:"50%",top:"50%",marginLeft:"-5px",marginTop:"-6px",height:"auto",width:"0.875rem","@keyframes spin":{to:{transform:"rotate(360deg)"}},animation:"spin 1s linear infinite"});const fc=ls.button.withConfig({componentId:"CROCart__sc-ux0k4a-0"})((({type:e="default",size:t="regular",buttonColor:o,buttonBackgroundColor:r,buttonTextColor:n})=>[{position:"relative",width:"100%",cursor:"pointer",borderRadius:"0.25rem",borderWidth:"1px",paddingTop:"0.75rem",paddingBottom:"0.75rem",textAlign:"center","&:disabled":{pointerEvents:"none",opacity:"0.25","--tw-saturate":"saturate(0)",filter:"var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)"}},"default"===e&&{"&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(248 250 252 / var(--tw-bg-opacity))"}},"primary"===e&&{"--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))","&:hover":{"--tw-brightness":"brightness(1.25)",filter:"var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)"}},"primary"===e&&ns` & svg { path:first-child { ${{"--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"}}; } } `,"small"===t&&{width:"auto",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.25rem",paddingBottom:"0.25rem"},"large"===t&&{paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"1rem",paddingBottom:"1rem"},"text"===e&&{borderWidth:"0",backgroundImage:"none","--tw-text-opacity":"1",color:"rgb(28 28 30 / var(--tw-text-opacity))",textDecorationLine:"underline",fontSize:"13px",lineHeight:"20px",fontWeight:"400","&:hover":{opacity:"0.8"}},ns` ${r?`background-color: ${r} !important;`:""} ${(()=>{let e="";return r&&("#ffffff"===r.toLowerCase()||"#fff"===r.toLowerCase()||"white"===r.toLowerCase())&&n?e=`border-color: ${n} !important;`:r?e=`border-color: ${r} !important;`:o&&(e=`border-color: ${o} !important;`),e})()} ${n?`color: ${n} !important;`:o&&"primary"!==e?`color: ${o} !important;`:""} & svg { ${n?`color: ${n} !important;`:o&&"primary"!==e?`color: ${o} !important;`:""} } `])),gc=({isLoading:e=!1,size:t,type:o,children:r,onClick:n,onTouchEnd:i,disabled:a,className:l,buttonColor:s,buttonBackgroundColor:c,buttonTextColor:d})=>Ko(fc,{type:o,size:t,onClick:n,onTouchEnd:i,disabled:a,className:l,buttonColor:s,buttonBackgroundColor:c,buttonTextColor:d,children:[Ko(e?vc:"div",{children:r}),e&&Ko(hc,{})]});var vc=ls("div").withConfig({componentId:"CROCart__sc-ux0k4a-1"})({opacity:"0"});const _c=ls.label.withConfig({componentId:"CROCart__sc-1ggtljr-0"})((({colors:e})=>[{marginBottom:"0.5rem",display:"flex",width:"100%",cursor:"pointer",alignItems:"center",justifyContent:"space-between",borderRadius:"0.25rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(225 225 230 / var(--tw-border-opacity))",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.75rem",paddingBottom:"0.75rem",fontSize:"13px",lineHeight:"20px",fontWeight:"400","&:last-of-type":{marginBottom:"0px"},"&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(248 250 252 / var(--tw-bg-opacity))"}},ns` input { ${{marginRight:"0.5rem",height:"1.25rem",width:"1.25rem","--tw-border-opacity":"1",borderColor:"rgb(209 213 219 / var(--tw-border-opacity))","--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity))"}}; accent-color: ${null==e?void 0:e.backgroundColor}; } `,(null==e?void 0:e.itemBackgroundColor)&&ns` background-color: ${e.itemBackgroundColor}; `,(null==e?void 0:e.backgroundColor)&&ns` border-color: ${e.backgroundColor}; input { color: ${e.backgroundColor}; } `,(null==e?void 0:e.textColor)&&ns` color: ${e.textColor}; `])),yc=({key:e,qty:t,discountPercentage:o,isChecked:r,onSelect:n,price:i,colors:a})=>{const{bulkDiscounts:l}=no(),s=Vs().upsellDiscountMessage||l.upsellDiscountMessage;let c=Fs(s,"{{percentage}}",o);return c=Fs(c,"{{count}}",t),Ko(_c,{for:e,colors:a,children:[Ko(wc,{children:[Ko("input",{type:"radio",value:t,name:e,checked:r,onChange:e=>{const t=e.target.value;t&&n(+t)}}),c]}),Ko("div",{children:Ko(Jo,{amount:i})})]})};var wc=ls("div").withConfig({componentId:"CROCart__sc-ii8qgj-0"})({display:"flex",alignItems:"center"});const xc=e=>y("svg",{width:12,height:10,viewBox:"0 0 12 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y("path",{d:"M1 5.5L5 9.5L11 0.5",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round"})),bc=ls.label.withConfig({componentId:"CROCart__sc-tsl6qs-0"})((({isChecked:e,colors:t})=>[{position:"relative",marginRight:"0.5rem",cursor:"pointer",borderRadius:"0.25rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(225 225 230 / var(--tw-border-opacity))","&:last-of-type":{marginRight:"0px"},"&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(248 250 252 / var(--tw-bg-opacity))"}},(null==t?void 0:t.backgroundColor)&&ns` svg.corner-background { fill: ${t.backgroundColor}; } `,(null==t?void 0:t.textColor)&&ns` color: ${t.textColor}; `,(null==t?void 0:t.headerTextColor)&&ns` div:first-of-type { color: ${t.headerTextColor}; } `,e&&ns` border-color: ${t.backgroundColor}; `,(null==t?void 0:t.itemBackgroundColor)&&ns` background-color: ${t.itemBackgroundColor}; `])),Cc=({key:e,qty:t,discountPercentage:o,isChecked:r,onSelect:n,price:i,colors:a})=>{const{bulkDiscounts:l,general:s}=no(),c=Vs().upsellDiscountMessage||l.upsellDiscountMessage;let d=Fs(c,"{{percentage}}",o);return d=Fs(d,"{{count}}",t),Ko(bc,{for:e,isChecked:r,colors:a,children:[Ko(kc,{children:[Ko(Sc,{type:"radio",value:t,name:e,checked:r,onChange:e=>{const t=e.target.value;t&&n(+t)}}),Ko("div",{children:[Ko(Tc,{children:[o,"%"]}),Ko($c,{children:null==s?void 0:s.discountText})]})]}),Ko(Pc,{}),Ko(Ac,{children:d}),r&&Ko(b,{children:[Ko(Ic,{className:"corner-background"}),Ko(Rc,{})]})]})};var kc=ls("div")({display:"flex",alignItems:"center",justifyContent:"flex-start",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.5rem",paddingBottom:"0.5rem"}),Sc=ls("input")({visibility:"hidden",position:"absolute",height:"1.25rem",width:"1.25rem"}),Tc=ls("div")({fontSize:"15px",lineHeight:"22px",fontWeight:"600"}),$c=ls("div")({"--tw-text-opacity":"1",color:"rgb(124 124 128 / var(--tw-text-opacity))",fontSize:"13px",lineHeight:"20px",fontWeight:"400"}),Pc=ls(sc)({marginTop:"0px",marginBottom:"0px"}),Ac=ls("div")({display:"flex",alignItems:"center",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"13px",lineHeight:"20px",fontWeight:"400"}),Ic=ls((e=>y("svg",{viewBox:"0 0 5 10",...e},y("path",{d:"M5 0 V10 L0.8 5.8 Q0 5 0.8 4.2z"}))))({position:"absolute",right:"-14px",top:"-14px",height:"2.5rem",width:"2.5rem","--tw-rotate":"135deg",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",fill:"#3D3DDB"}),Rc=ls(xc).withConfig({componentId:"CROCart__sc-vnquwv-0"})({position:"absolute",right:"1px",top:"1px",height:"0.75rem",width:"0.75rem"});const Nc={width:73.8,height:100},Oc={squareSmall:{width:100,height:100},squareMedium:{width:120,height:120},squareLarge:{width:140,height:140},portraitSmall:{width:65,height:88.05},portraitMedium:{width:73.8,height:100},portraitLarge:{width:110,height:149.05}},Ec={squareSmall:{width:128,height:128},squareMedium:{width:160,height:160},squareLarge:{width:200,height:200},portraitSmall:{width:98,height:132.17},portraitMedium:{width:130,height:176.18},portraitLarge:{width:146,height:197.83}},Dc={small:{width:88,height:76},medium:{width:101,height:87},large:{width:118,height:102}},Lc=(e,t,o,r,n,i)=>{const a=((e,t)=>{return`${e}${o=t,o.charAt(0).toUpperCase()+o.slice(1)}`;var o})(e,t);if(o&&!r)return Ec[a]??Nc;if(i)return Dc[t]??Dc.medium;const l=Oc[a]??Nc;return n?{width:58,height:Math.round(58*l.height*100/l.width)/100}:l},Mc=ls.div.withConfig({componentId:"CROCart__sc-1h45ett-0"})((({ratio:e,imageSize:t,isRecommendedProduct:o,isHorizontal:r,isCompactLineItem:n,isBoxedLineItem:i})=>{const{width:a,height:l}=Lc(e,t,o,r,n,i);return[{overflow:"hidden",borderRadius:"0.25rem"},ns` width: ${a}px; height: ${l}px; img { width: ${a}px; height: ${l}px; object-fit: cover; } `]})),Bc=e=>y("svg",{width:14,height:8,viewBox:"0 0 14 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y("path",{d:"M13.25 0.875L7 7.125L0.75 0.875",stroke:"#1C1C1E",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})),Hc=({onOutsideClick:e})=>{const t=se(null),o=document.getElementById(po).contentDocument;return ae((()=>{function r(o){t.current&&!t.current.contains(o.target)&&e()}return document.addEventListener("mousedown",r,{capture:!0,passive:!0}),o.addEventListener("mousedown",r,{capture:!0,passive:!0}),()=>{document.removeEventListener("mousedown",r),o.removeEventListener("mousedown",r)}}),[t,e]),{ref:t}},zc=({minQty:e=1,maxQty:t=50,initialQty:o=1,qty:r})=>{const[n,i]=ne(o);ae((()=>{i(r)}),[r]);return{constrainedQty:o=>+ot?t:o,internalQty:n,setInternalQty:i}},jc=({qty:e,onQtyChange:t,isLoading:o,minQty:r=0,maxQty:n=50,allowRemove:i=!1,removeText:a="Remove"})=>{const{constrainedQty:l}=zc({minQty:i?0:r,maxQty:n,initialQty:e,qty:e}),{general:s}=no(),[c,d]=ne(!1),u=Array.from({length:n},((e,t)=>t+1)),p=ue((e=>{const o=l(e);t(o,"quantity_change"),d(!1)}),[l,t]),h=ue((()=>{d(!c)}),[c,d]),m=ue((()=>{d(!1)}),[d]),{ref:f}=Hc({onOutsideClick:m});return Ko(Fc,{ref:f,children:[Ko(qc,{onClick:h,children:[Ko(Wc,{children:[null==s?void 0:s.quantityShortText," ",e]}),Ko(Uc,{$_css:[{transitionProperty:"transform",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms"},c&&{"--tw-rotate":"180deg",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))"}]})]}),Ko(Vc,{className:"mt-1s",$_css2:[{visibility:"hidden",position:"absolute",left:"0px",top:"1.5rem",zIndex:"10",maxHeight:"250px",width:"100%",overflowY:"auto",borderRadius:"0.375rem",opacity:"0","--tw-shadow":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"200ms"},c&&{visibility:"visible",opacity:"1"}],children:[i&&Ko(Gc,{onClick:()=>p(0),children:Ko("span",{children:a})},"remove"),u.map((t=>{const o=t===e;return Ko(Yc,{onClick:()=>p(t),$_css3:[{display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",gap:"0.5rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"1rem",lineHeight:"1.5rem",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","&:focus":{outline:"2px solid transparent",outlineOffset:"2px"}},o?{"--tw-bg-opacity":"1",backgroundColor:"rgb(209 213 219 / var(--tw-bg-opacity))",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"}:{"--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity))"}}],children:[Ko("span",{children:t}),o&&Ko(Qc,{})]},t)}))]}),o&&Ko(hc,{})]})};var Fc=ls("div")({position:"relative",display:"flex",flexDirection:"row"}),qc=ls("button")({display:"flex",flexDirection:"row",alignItems:"center"}),Wc=ls("span")({marginRight:"0.5rem",fontSize:"15px",lineHeight:"22px",fontWeight:"600"}),Uc=ls(Bc)`${e=>e.$_css}`,Vc=ls("div")`${e=>e.$_css2}`,Gc=ls("button")({display:"flex",width:"100%",alignItems:"center",justifyContent:"space-between",gap:"0.5rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"1rem",lineHeight:"1.5rem","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(243 244 246 / var(--tw-bg-opacity))"},"&:focus":{outline:"2px solid transparent",outlineOffset:"2px"}}),Yc=ls("button")`${e=>e.$_css3}`,Qc=ls(xc).withConfig({componentId:"CROCart__sc-1bzfxel-0"})({height:"1rem",width:"1rem","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"});const Xc=ls.div.withConfig({componentId:"CROCart__sc-o18wls-0"})((({variant:e,accentColor:t})=>[{position:"relative",display:"flex",width:"max-content",flexDirection:"row",overflow:"hidden",borderRadius:"0.25rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(225 225 230 / var(--tw-border-opacity))"},"pill"===e&&[{alignItems:"center",borderRadius:"9999px"},ns` border: 1.5px solid ${t||"#4A4A4A"}; color: ${t||"#313131"}; padding: 0 6px; input { font-size: 11px; width: 24px; } `]])),Kc=ls.button.withConfig({componentId:"CROCart__sc-o18wls-1"})((({variant:e})=>[{borderRightWidth:"1px",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.25rem",paddingBottom:"0.25rem","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(248 250 252 / var(--tw-bg-opacity))"}},"pill"===e&&{borderRightWidth:"0",paddingLeft:"0.375rem",paddingRight:"0.375rem",paddingTop:"0.125rem",paddingBottom:"0.125rem",fontSize:"14px",fontWeight:"600","&:hover":{backgroundColor:"transparent"}}])),Jc=ls.button.withConfig({componentId:"CROCart__sc-o18wls-2"})((({variant:e})=>[{borderLeftWidth:"1px",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.25rem",paddingBottom:"0.25rem","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(248 250 252 / var(--tw-bg-opacity))"}},"pill"===e&&{borderLeftWidth:"0",paddingLeft:"0.375rem",paddingRight:"0.375rem",paddingTop:"0.125rem",paddingBottom:"0.125rem",fontSize:"14px",fontWeight:"600","&:hover":{backgroundColor:"transparent"}}])),Zc=({qty:e,onQtyChange:t,isLoading:o,minQty:r=0,maxQty:n=50,variant:i,accentColor:a})=>{const{constrainedQty:l,internalQty:s,setInternalQty:c}=zc({minQty:r,maxQty:n,initialQty:e,qty:e}),d=ue($s((async e=>{const o=await t(e,"quantity_change");c(o)}),500),[t]),u=ue((()=>{const e=l(s-1);c(e),d(e)}),[s,c,l,d]),p=ue((()=>{const e=l(s+1);c(e),d(e)}),[s,c,l,d]);return Ko(Xc,{variant:i,accentColor:a,children:[Ko(Kc,{variant:i,onClick:u,children:"-"}),Ko(ed,{children:Ko(td,{type:"number",value:s,onChange:e=>{const t=e.target;if(""===t.value)return;const o=l(+t.value);c(o),d(o),t.value=o.toString()},onBlur:t=>{t.target.value=e.toString()}})}),Ko(Jc,{variant:i,onClick:p,children:"+"}),o&&Ko(hc,{})]})};var ed=ls("div")({display:"flex"}),td=ls("input").withConfig({componentId:"CROCart__sc-1qtfuty-0"})({width:"1.75rem",backgroundColor:"transparent",textAlign:"center",fontSize:"0.875rem",lineHeight:"1.25rem",outline:"2px solid transparent",outlineOffset:"2px",appearance:"textfield","&::-webkit-inner-spin-button":{appearance:"none"},"&::-webkit-outer-spin-button":{appearance:"none"}});const od=ls.div.withConfig({componentId:"CROCart__sc-1tpmv38-0"})((({isSmall:e,className:t,textColor:o})=>[{marginBottom:"0.25rem"},e?{fontSize:"13px",lineHeight:"20px",fontWeight:"400"}:{fontSize:"15px",lineHeight:"22px",fontWeight:"600"},t||"",o&&ns` color: ${o}; `])),rd=ls.div.withConfig({componentId:"CROCart__sc-1tpmv38-1"})((({spreadComponents:e=!0})=>[{display:"flex",flexWrap:"wrap",alignItems:"flex-end",justifyContent:"flex-end",gap:"0.5rem"},e&&{justifyContent:"space-between"}])),nd=ls.div.withConfig({componentId:"CROCart__sc-1tpmv38-2"})((({isCrossedOut:e,lighterWhenCrossedOut:t,className:o,textColor:r})=>[e?{textDecorationLine:"line-through"}:{fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"700"},e&&t&&{"--tw-text-opacity":"1",color:"rgb(124 124 128 / var(--tw-text-opacity))"},o||"",r&&ns` color: ${r}; `])),id=ls.div.withConfig({componentId:"CROCart__sc-1tpmv38-3"})((()=>[{marginBottom:"0.5rem","--tw-text-opacity":"1",color:"rgb(124 124 128 / var(--tw-text-opacity))"}])),ad=ls.div.withConfig({componentId:"CROCart__sc-1tpmv38-4"})(["",""],(({iconColor:e})=>e&&ns` & svg { stroke: ${e}; } `)),ld=ls.div.withConfig({componentId:"CROCart__sc-15zu5qf-0"})((({type:e,childrenCount:t,sectionBackgroundColor:o})=>[{marginTop:"0.5rem"},"square"===e&&{display:"grid",gap:"0.5rem"},"square"===e&&ns` grid-template-columns: repeat(${Math.min(t,3)}, 1fr); & > * { margin: 0; } `,o&&ns` background-color: ${o}; `])),sd=ls.div.withConfig({componentId:"CROCart__sc-15zu5qf-1"})(["",""],(({colors:e})=>(null==e?void 0:e.discountColor)&&ns` color: ${e.discountColor}; `)),cd=({compareAtPrice:e,originalPrice:t,finalPrice:o,cartCurrency:r,hasCompareAtPrice:n,hasDiscount:i,shouldShowComparisonPrices:a,isFreeProduct:l})=>!l&&a&&n?Ko(b,{children:[Ko(ud,{amount:new er(e,r)}),Ko(Jo,{amount:new er(o,r)})]}):!l&&i&&a?Ko(b,{children:[Ko(pd,{amount:new er(t,r)}),Ko(Jo,{amount:new er(o,r)})]}):Ko(Jo,{amount:new er(o,r)}),dd=({product:e,colors:t,onAdd:o,onClose:r,onQtyChange:n,closeIcon:i=Ko(uc,{}),quantityPickerType:a,discountOptions:l=[],discountPickerType:s="horizontal",freeProductPriceText:c="Free",isFreeProduct:d,tags:u,layout:p=1})=>{var h,m,f,g,v,_,y,w,x,b;const[C,k]=ne(!1),[S]=ne((e=>{let t="";const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let r=0;for(;re.isCartDrawerOpen)),{isDiscountOptionChecked:P}=ac({qty:e.quantity,discountOptions:l}),{cartCurrency:A,variantCompareAtPricesList:I}=mi(),{general:R,isInBuilder:N,bulkDiscounts:O}=no(),E=R.lineItemImageRatio||"square",D=R.lineItemImageSize||"small",{shouldShowComparisonPrices:L,showSaveText:M,discountTextColor:B,saveText:H,showDiscountNames:z}=R,j=null==(h=R.discountLabelBackgroundColor)?void 0:h.hex,F=null==(m=R.discountLabelTextColor)?void 0:m.hex;ae((()=>{if(!$||N||d)return;const t=[{feature_type:"quantity_upsell",feature_id:"cart_quantity_controls_1",surface:"cart_line",product_id:e.product_id,variant_id:e.variant_id,currency:A,eligible:!0,rendered:!0}],o=`volume_discount_${ir(["volume_discount",null==O?void 0:O.choiceUpsell].join("|"))}`;l.forEach((r=>t.push({feature_type:"volume_discount",feature_id:"volume_discount_1",rule_id:o,tier_id:`volume_discount_${ir(["volume_discount",o,e.product_id,r.qty,r.discountPercentage].join("|"))}`,surface:"cart_line",product_id:e.product_id,variant_id:e.variant_id,currency:A,eligible:r.qty>e.quantity,qualifying_quantity:r.qty,rendered:!0}))),rn({event:"feature_exposed",payload:{exposure_render_id:T,feature_exposures:t}})}),[null==O?void 0:O.choiceUpsell,A,l,T,d,$,N,e.product_id,e.quantity,e.variant_id]);const q=ue((async()=>{k(!0);try{await o()}finally{k(!1)}}),[o]),W=ue((async()=>{k(!0);try{await r()}finally{k(!1)}}),[r]),U=ue((async(e,t)=>{k(!0);try{const o=await n(e,t);return k(!1),o}finally{k(!1)}}),[n]),V=ue((()=>{N||(rn({event:"cart_item_image_clicked",payload:{product:e}}),window.open(e.url,"_self"))}),[e,N]),G=ue((()=>{N||(rn({event:"cart_item_title_clicked",payload:{product:e}}),window.open(e.url,"_self"))}),[e,N]),Y="dropdown"===a?jc:Zc,Q="horizontal"===s?yc:Cc,X=null==I?void 0:I.find((t=>(null==t?void 0:t.variantId)===(null==e?void 0:e.variant_id))),K=e.original_line_price,J=d?K:e.final_line_price,Z=(null==X?void 0:X.compareAtPrice)?X.compareAtPrice*e.quantity:null,ee=(null==(g=null==(f=e.selling_plan_allocation)?void 0:f.selling_plan)?void 0:g.name)||(null==(v=e.selling_plan_allocation)?void 0:v.name),te=!!e.variant_title&&"Default Title"!==e.variant_title&&!e.product_has_only_default_variant,oe=JJ,ie=re?Z:oe?K:null,le=ie&&ie>J?ie-J:0,se=le>0?Fs(H,"{{amount}}",new er(le,A).toFormattedString()):null,ce=2===p,de=3===p,pe=null==(_=null==t?void 0:t.cartItem)?void 0:_.itemsTextColor,he=!d&&Ko(Y,{qty:e.quantity,onQtyChange:U,allowRemove:ce,variant:"pill"===a?"pill":void 0,accentColor:pe}),me=Ko(nd,{isCrossedOut:d,textColor:null==(y=null==t?void 0:t.cartItem)?void 0:y.itemsTextColor,children:Ko(hd,{children:[Ko(md,{children:cd({compareAtPrice:Z,originalPrice:K,finalPrice:J,cartCurrency:A,hasCompareAtPrice:re,hasDiscount:oe,shouldShowComparisonPrices:L,isFreeProduct:d})}),!d&&M&&le>0&&se&&Ko(fd,{children:Ko(sd,{colors:{discountColor:B.hex},children:["(",Ko("span",{dangerouslySetInnerHTML:{__html:se}}),")"]})}),!d&&z&&(null==(w=null==e?void 0:e.line_level_discount_allocations)?void 0:w.length)>0&&Ko(gd,{"data-cro-testid":"cart-line-discounts",children:e.line_level_discount_allocations.map(((e,t)=>Ko(vd,{"data-cro-testid":"cart-line-discount",$_css2:[{marginTop:"0.25rem",width:"max-content",borderRadius:"0.375rem","--tw-bg-opacity":"1",backgroundColor:"rgb(245 245 247 / var(--tw-bg-opacity))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem"},j&&ns(["background:",";border-radius:999px;padding:5px 11px;"],j)],children:Ko(_d,{children:[!j&&Ko(yd,{}),Ko(wd,{$_css3:[{fontSize:"10px",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(86 93 109 / var(--tw-text-opacity))"},F&&ns(["color:",";"],F),j&&ns(["font-size:11px;"])],children:e.discount_application.title})]})},t)))})]})}),fe=d?Ko(xd,{children:Ko(ic,{size:"large",colors:t.freeProductBadge,children:c})}):null,ge=!d&&Ko(bd,{className:"cro_cart_item__quantity","data-cro-testid":"cart-line-quantity",$_css4:ns(["border:1px solid ",";border-radius:7px;padding:5px 9px;color:",";& button span{font-size:13px;font-weight:500;margin-right:5px;}& svg{width:12px;height:12px;}"],pe?`${pe}33`:"rgba(0, 0, 0, 0.12)",pe?`${pe}B3`:"inherit"),children:he});return Ko(Cd,{className:"cro_cart_item","data-cro-testid":"cart-line-content","data-cro-line-key":e.key,children:[Ko(kd,{$_css5:[{position:"relative",display:"flex",flexDirection:"row"},!ce&&!de&&{minHeight:"100px"}],children:[Ko(Sd,{ratio:E,imageSize:D,isCompactLineItem:ce,isBoxedLineItem:de,onClick:V,className:"cro_cart_item__image",children:Ko(Td,{src:Vn(e,{height:200}),alt:null==(x=e.featured_image)?void 0:x.alt,$_css6:[{height:"100%",width:"100%",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",objectFit:"cover"},{transform:"translateZ(0)",filter:"blur(0)"}]})}),Ko($d,{children:[Ko(Pd,{className:"cro_cart_item__header",children:[Ko("div",{className:"cro_cart_item__info",children:[Ko(Ad,{onClick:G,textColor:null==(b=null==t?void 0:t.cartItem)?void 0:b.itemsTextColor,className:"cro_cart_item__title","data-cro-testid":"cart-line-title",children:e.product_title}),te&&Ko(Id,{className:"cro_cart_item__variant","data-cro-testid":"cart-line-variant",$_css7:[{fontSize:"13px",lineHeight:"20px",fontWeight:"400"},{"--tw-text-opacity":"1",color:"rgb(124 124 128 / var(--tw-text-opacity))"}],children:e.variant_title}),ee&&Ko(Rd,{className:"cro_cart_item__selling_plan",children:[Ko(Nd,{className:"cro_cart_item__selling_plan_icon",$_css8:[{height:"0.75rem",width:"0.75rem",flex:"none"},ns(["path{stroke:currentColor;}"])]}),Ko("span",{children:ee})]})]}),ce||de?Ko(Od,{className:"cro_cart_item__rail",children:[ce&&ge,Ko("div",{className:"cro_cart_item__pricing","data-cro-testid":"cart-line-price",children:d?fe:me})]}):r&&Ko(ad,{iconColor:t.cartItem.itemsIconColor,className:"cro_cart_item__remove",children:Ko(Ed,{onClick:W,children:i})})]}),Ko(Dd,{className:"cro_cart_item__tags",children:(null==u?void 0:u.length)>0&&Ko(Ld,{children:u})}),!ce&&Ko(Md,{className:"cro_cart_item__footer",children:[Ko("div",{className:"cro_cart_item__quantity","data-cro-testid":"cart-line-quantity",children:he}),!de&&Ko(Bd,{className:"cro_cart_item__pricing","data-cro-testid":"cart-line-price",children:Ko(rd,{spreadComponents:!d,children:[o&&!d&&Ko("div",{"data-cro-testid":"cart-line-add-button",children:Ko(gc,{onClick:q,size:"small",isLoading:C,children:Ko(Hd,{children:null==R?void 0:R.addToCartText})})}),me,fe]})})]})]})]}),!d&&!(de&&!(null==l?void 0:l.length))&&Ko(ld,{type:s,childrenCount:(null==l?void 0:l.length)||0,className:"cro_cart_item__discounts",children:l.map(((o,r)=>Ko(Q,{qty:o.qty,discountPercentage:o.discountPercentage,onSelect:e=>{U(e,"bulk_discount")},isChecked:P(o),colors:null==t?void 0:t.bulkDiscounts,price:qn(e,A,o)},`${S}-${r}`)))}),Ko(zd,{$_css9:[{visibility:"hidden",position:"absolute",left:"0px",top:"0px",height:"100%",width:"100%","--tw-bg-opacity":"0.5",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",opacity:"0",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"},C&&{visibility:"visible",opacity:"1"}],children:Ko(hc,{})})]})};var ud=ls(Jo)({fontSize:"0.875rem",lineHeight:"1","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))",textDecorationLine:"line-through"}),pd=ls(Jo)({fontSize:"0.875rem",lineHeight:"1","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))",textDecorationLine:"line-through"}),hd=ls("div")({display:"flex",flexDirection:"column",justifyContent:"flex-end"}),md=ls("div")({display:"flex",maxWidth:"136px",flexWrap:"wrap",alignItems:"center",justifyContent:"flex-end",gap:"0.25rem",whiteSpace:"nowrap",fontSize:"0.875rem",lineHeight:"1"}),fd=ls("span")({whiteSpace:"nowrap",textAlign:"end",fontSize:"13px",lineHeight:"20px",fontWeight:"400"}),gd=ls("div")({marginLeft:"auto",marginRight:"0px",display:"flex",flexWrap:"wrap",alignItems:"center",justifyContent:"flex-end",gap:"0.5rem"}),vd=ls("div")`${e=>e.$_css2}`,_d=ls("div")({display:"flex",alignItems:"center",gap:"0.25rem"}),yd=ls((e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",...e},y("path",{d:"M20.4527 13.7149L13.7214 20.4463C13.547 20.6209 13.3399 20.7593 13.112 20.8538C12.884 20.9483 12.6397 20.997 12.3929 20.997C12.1462 20.997 11.9018 20.9483 11.6739 20.8538C11.446 20.7593 11.2389 20.6209 11.0645 20.4463L3 12.3912V3.00293H12.3882L20.4527 11.0674C20.8025 11.4192 20.9987 11.8951 20.9987 12.3912C20.9987 12.8872 20.8025 13.3631 20.4527 13.7149Z",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),y("path",{d:"M7.68945 7.698H7.70759",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))))({width:"1rem",height:"1rem",stroke:"#565D6D","& path":{stroke:"#565D6D"}}),wd=ls("span")`${e=>e.$_css3}`,xd=ls("div")({marginLeft:"0.5rem",fontSize:"15px",lineHeight:"22px",fontWeight:"600"}),bd=ls("div")`${e=>e.$_css4}`,Cd=ls("div")({position:"relative"}),kd=ls("div")`${e=>e.$_css5}`,Sd=ls(Mc)({cursor:"pointer"}),Td=ls("img")`${e=>e.$_css6}`,$d=ls("div")({marginLeft:"0.75rem",display:"flex",flex:"1 1 0%",flexDirection:"column",justifyContent:"space-between"}),Pd=ls("div")({display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:"6px"}),Ad=ls(od)({cursor:"pointer"}),Id=ls("div")`${e=>e.$_css7}`,Rd=ls("div")({marginTop:"0.25rem",display:"inline-flex",width:"max-content",alignItems:"center",gap:"0.25rem",borderRadius:"0.25rem",borderWidth:"1px",borderStyle:"dashed","--tw-border-opacity":"1",borderColor:"rgb(155 130 110 / var(--tw-border-opacity))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.25rem",paddingBottom:"0.25rem",fontSize:"13px",fontWeight:"600","--tw-text-opacity":"1",color:"rgb(93 81 72 / var(--tw-text-opacity))"}),Nd=ls((e=>y("svg",{width:21,height:18,viewBox:"0 0 21 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y("path",{d:"M14.3564 6.34794H19.3484L16.1674 3.16494C15.1433 2.14081 13.8676 1.40433 12.4686 1.02955C11.0696 0.654757 9.59659 0.654867 8.19765 1.02986C6.79871 1.40486 5.52315 2.14153 4.49918 3.16581C3.47522 4.19009 2.73895 5.46588 2.36438 6.86494M1.31838 16.6439V11.6519M1.31838 11.6519H6.31038M1.31838 11.6519L4.49838 14.8349C5.5225 15.8591 6.79818 16.5955 8.19717 16.9703C9.59617 17.3451 11.0692 17.345 12.4681 16.97C13.8671 16.595 15.1426 15.8584 16.1666 14.8341C17.1905 13.8098 17.9268 12.534 18.3014 11.1349M19.3484 1.35594V6.34594",stroke:"#3D3DDB",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}))))`${e=>e.$_css8}`,Od=ls("div")({display:"flex",flexShrink:"0",flexDirection:"column",alignItems:"flex-end",gap:"0.375rem"}),Ed=ls("button")({position:"relative",minHeight:"24px",width:"max-content","--tw-text-opacity":"1",color:"rgb(61 61 219 / var(--tw-text-opacity))"}),Dd=ls("div")({display:"flex",flex:"1 1 0%",alignItems:"flex-start"}),Ld=ls("div")({display:"flex",flexWrap:"wrap"}),Md=ls("div")({display:"flex",width:"100%",flexWrap:"wrap",alignItems:"flex-end",justifyContent:"space-between",gap:"0.25rem"}),Bd=ls("div")({marginLeft:"auto",marginRight:"0px",marginTop:"0.25rem"}),Hd=ls("span")({fontSize:"13px",lineHeight:"20px",fontWeight:"400"}),zd=ls("div").withConfig({componentId:"CROCart__sc-oddg1w-0"})(["",""],(e=>e.$_css9));const jd=ls.div.withConfig({componentId:"CROCart__sc-1l6tujl-0"})((()=>[{display:"flex",flexDirection:"column",borderRadius:"0.25rem",borderWidth:"1px",padding:"1rem"}])),Fd=ls.div.withConfig({componentId:"CROCart__sc-h3r97b-1"})((()=>[{marginRight:"-24px",display:"flex",width:"max-content",flexDirection:"row",flexWrap:"nowrap"}])),qd=ls(Fd).withConfig({componentId:"CROCart__sc-h3r97b-2"})((()=>[{marginRight:"0px",width:"100%",flexDirection:"column",flexWrap:"wrap",overflowY:"hidden"},ns` & > * { ${{marginTop:"0.5rem",marginBottom:"0.5rem"}} } `])),Wd=ls.div.withConfig({componentId:"CROCart__sc-h3r97b-3"})((()=>[{display:"grid",width:"100%",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",columnGap:"0.75rem",rowGap:"0.5rem",overflow:"visible"}])),Ud=ls(jd).withConfig({componentId:"CROCart__sc-h3r97b-4"})((({colors:e,alignment:t="center"})=>[{marginTop:"0.5rem",marginBottom:"0.5rem"},(null==e?void 0:e.backgroundColor)&&ns` background-color: ${e.backgroundColor}; `,(null==e?void 0:e.titleColor)&&ns` h5 { color: ${e.titleColor}; } `,(null==e?void 0:e.textColor)&&ns` div { color: ${e.textColor}; } `,"left"===t&&ns` text-align: left; `,"center"===t&&ns` text-align: center; `,"right"===t&&ns` text-align: right; `])),Vd=ls(Gs).withConfig({componentId:"CROCart__sc-h3r97b-5"})((({colors:e,compact:t})=>[(null==e?void 0:e.backgroundColor)&&ns` margin: 0; padding: 0.75rem; background-color: ${e.backgroundColor}; `,(null==e?void 0:e.titleColor)&&ns` h4 { color: ${e.titleColor}; } `,t&&ns` h4 { font-size: 16px; } `,(null==e?void 0:e.buttonColor)&&ns` ${Fd} button, ${qd} button { border-color: ${e.buttonColor}; /* Default span color, but will be overridden by button:not(.arrow-button) for action buttons */ span { color: ${e.buttonColor}; } } ${Fd} button:not(.arrow-button), ${qd} button:not(.arrow-button) { ${e.buttonBackgroundColor&&`background-color: ${e.buttonBackgroundColor};`} ${e.actionsTextColor&&`color: ${e.actionsTextColor};`} /* Override span color for action buttons specifically */ span { color: ${e.actionsTextColor||e.buttonColor}; } } ${Wd} .cro_cart_recommendations__grid-add button { ${e.buttonBackgroundColor&&`background-color: ${e.buttonBackgroundColor};`} ${e.buttonBackgroundColor&&`border-color: ${e.buttonBackgroundColor};`} ${e.actionsTextColor&&`color: ${e.actionsTextColor};`} border-radius: 999px; padding: 5px 16px; span { color: ${e.actionsTextColor||e.buttonColor}; font-size: 13px; font-weight: 700; line-height: 20px; } } `,(null==e?void 0:e.itemsBackgroundColor)&&ns` .compact-product, .cro_cart_recommendations__grid-card { background-color: ${e.itemsBackgroundColor}; } `])),Gd=()=>{var e,t,o,r,n,i,a,l,s,c,d,u;const{visibleCart:p,changeProductQty:h,cart:m,cartCurrency:f,cartAttributes:g}=mi(),{bulkDiscounts:v,freeProduct:_,productTip:y,general:w,isInBuilder:x,checkout:C}=no(),{cartIsEmptyText:k,tipHeaderText:S,tipDescriptionText:T}=Vs(),$=S||(null==y?void 0:y.headerText),P=T||(null==y?void 0:y.descriptionText),{getDiscountOptionsForProduct:A}=lc(),{isBXGYActive:I,isBXGYProduct:R,isBXGYAlmostFulfilled:N,isBXGYFulfilled:O,bxgyDiscountedProductsBadgeText:E,bxgyDiscountTitle:D}=dc(),L=(null==v?void 0:v.designOption)||1,M=Tn({attributes:g},an),B=2===(null==C?void 0:C.oneClickUpsellDesignOption)&&0===(null==M?void 0:M.initialQty),H=((null==p?void 0:p.items)||[]).filter((e=>!(B&&e.variant_id===(null==M?void 0:M.variant_id)))),z=Ko(nc,{}),j=1===w.quantityPickerDesign?"incremental":3===w.quantityPickerDesign?"pill":"dropdown",F=1===L?"square":"horizontal",q=3===(w.lineItemDesign||1),[W,U]=ne(new Set),V={bulkDiscounts:{backgroundColor:null==v?void 0:v.upsellColor.hex,textColor:null==v?void 0:v.textColor.hex,headerTextColor:null==v?void 0:v.secondaryTextColor.hex,itemBackgroundColor:null==(e=null==v?void 0:v.itemBackgroundColor)?void 0:e.hex},freeProductBadge:{backgroundColor:null==(t=null==_?void 0:_.borderColor)?void 0:t.hex,textColor:null==(o=null==_?void 0:_.primaryTextColor)?void 0:o.hex},bxgyTagBadge:{backgroundColor:null==(r=null==y?void 0:y.backgroundColor)?void 0:r.hex,textColor:null==(n=null==y?void 0:y.textColor)?void 0:n.hex},cartItem:{itemsTextColor:null==(i=null==w?void 0:w.itemsTextColor)?void 0:i.hex,iconColor:null==(a=null==w?void 0:w.iconColor)?void 0:a.hex,itemsIconColor:null==(l=null==w?void 0:w.itemsIconColor)?void 0:l.hex}},G=ue((async e=>{if(!(null==y?void 0:y.isActive)||"specific"!==y.choiceTip)return!1;const t=null==y?void 0:y.specificTipProducts;if(!(null==t?void 0:t.length))return!1;for(const o of t){if(await xs(o,e))return!0}return t.some((t=>ws(t,e)))}),[y]);ae((()=>{(async()=>{if(!(null==y?void 0:y.isActive)||"specific"!==y.choiceTip||!H.length)return void U(new Set);const e=new Set;for(const t of H){await G(t)&&e.add(t.key)}U(e)})()}),[H,y,G]);const Y={backgroundColor:null==(s=null==y?void 0:y.backgroundColor)?void 0:s.hex,titleColor:null==(c=null==y?void 0:y.textColor)?void 0:c.hex,textColor:null==(d=null==y?void 0:y.innerTextColor)?void 0:d.hex},Q=ue((async(e,t,o)=>{let r;const n=await h(e,t,{track:{source:o}});if(!n)return e.quantity;const i=Zn(n,e);return i&&(r=null==i?void 0:i.quantity),ri({operation:i?"update":"delete",originalProduct:e,requestedQty:t,originalCart:m,updatedCart:n,source:o}),r}),[m,h]),X=ue((e=>{var t;const o=Wn(e,gn)||Wn(e,vn)||Yn(e,D)||Wn(e,"gift_tier_source");if(x)return o;return!(null==(t=Gn(e,f))?void 0:t.getAsNativeCurrencyValue())&&o}),[D,f]),K=ue((e=>{const t=[];return I&&O&&R(e)&&t.push(Ko(Yd,{size:"small",colors:V.bxgyTagBadge,children:[Ko(rc,{}),E]},"bxgy")),t}),[E,V.bxgyTagBadge,I,O,R]),J=ue((e=>!X(e)||Yn(e,D)||Wn(e,"gift_tier_source")?()=>h(e,0,{track:{source:"delete_button"}}):null),[D,h,X]),Z=null==(u=null==w?void 0:w.cartProductsBackgroundColor)?void 0:u.hex;return Ko(b,{children:[Ko(Qd,{className:"cro_cart_products","data-cro-testid":"cart-lines",$_css2:[Z&&ns(["margin:0;padding:0.75rem;background-color:",";"],Z)],children:[!(null==H?void 0:H.length)&&Ko(Xd,{className:"cro_cart_products__empty",children:k||(null==w?void 0:w.cartIsEmptyText)}),Ko("div",{className:"cro_cart_products__list","data-cro-testid":"cart-lines-list",children:H.map((e=>Ko(Kd,{className:"cro_cart_products__item-wrapper","data-cro-testid":"cart-line","data-cro-variant-id":e.variant_id,"data-cro-product-id":e.product_id,$_css3:[{marginBottom:"0.75rem","&:last-of-type":{marginBottom:"0px"}},q&&ns(["border:1px solid #e5e5e5;border-radius:12px;padding:12px;"])],children:[Ko(dd,{product:e,colors:V,onClose:J(e),onQtyChange:(t,o)=>Q(e,t,o),closeIcon:z,quantityPickerType:j,discountOptions:A(e),discountPickerType:F,freeProductPriceText:null==_?void 0:_.textAfter,isFreeProduct:X(e),tags:K(e),layout:w.lineItemDesign||1}),W.has(e.key)&&Ko(Ud,{className:"cro_cart_products__tip",colors:Y,alignment:null==y?void 0:y.textAlignment,"data-cro-testid":"product-tip",children:[Ko(Jd,{className:"cro_cart_products__tip-title",children:$}),Ko(Zd,{className:"cro_cart_products__tip-text",$_css4:[{fontSize:"13px",lineHeight:"20px",fontWeight:"400"},{"--tw-text-opacity":"1",color:"rgb(124 124 128 / var(--tw-text-opacity))"}],children:P})]})]},e.key)))})]}),Ko(sc,{})]})};var Yd=ls(ic)({fontSize:"13px",lineHeight:"20px",fontWeight:"400"}),Qd=ls(Gs)`${e=>e.$_css2}`,Xd=ls("div")({display:"flex",minHeight:"100px",alignItems:"center",justifyContent:"center",textAlign:"center",fontSize:"17px",lineHeight:"24px",fontWeight:"400"}),Kd=ls("div")`${e=>e.$_css3}`,Jd=ls("h5")({fontSize:"15px",lineHeight:"22px",fontWeight:"600"}),Zd=ls("div").withConfig({componentId:"CROCart__sc-8xjcbc-0"})(["",""],(e=>e.$_css4));const eu=e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",width:14,height:18,viewBox:"0 0 14 18",fill:"none",...e},y("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7 0.25C5.83968 0.25 4.72688 0.710936 3.90641 1.53141C3.08594 2.35188 2.625 3.46468 2.625 4.625V7.125C1.96196 7.125 1.32607 7.38839 0.857233 7.85723C0.388392 8.32607 0.125 8.96196 0.125 9.625V15.25C0.125 15.913 0.388392 16.5489 0.857233 17.0178C1.32607 17.4866 1.96196 17.75 2.625 17.75H11.375C12.038 17.75 12.6739 17.4866 13.1428 17.0178C13.6116 16.5489 13.875 15.913 13.875 15.25V9.625C13.875 8.96196 13.6116 8.32607 13.1428 7.85723C12.6739 7.38839 12.038 7.125 11.375 7.125V4.625C11.375 2.20833 9.41667 0.25 7 0.25ZM10.125 7.125V4.625C10.125 3.7962 9.79576 3.00134 9.20971 2.41529C8.62366 1.82924 7.8288 1.5 7 1.5C6.1712 1.5 5.37634 1.82924 4.79029 2.41529C4.20424 3.00134 3.875 3.7962 3.875 4.625V7.125H10.125Z"})),tu=e=>y("svg",{width:21,height:22,viewBox:"0 0 21 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y("path",{d:"M10.667 1.71399C8.40273 3.86422 5.38726 5.04357 2.265 4.99999C1.86783 6.20997 1.66597 7.47549 1.667 8.74899C1.667 14.341 5.491 19.039 10.667 20.372C15.843 19.04 19.667 14.342 19.667 8.74999C19.667 7.43999 19.457 6.17899 19.069 4.99899H18.917C15.721 4.99899 12.817 3.75099 10.667 1.71399Z",fill:"currentColor"}),y("path",{d:"M7.417 11.5L9.917 14L14.167 8.49999",stroke:"#FFFFFF",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),ou=e=>{const t=null==e?void 0:e.trim();return t?Number(t):Number.NaN},ru=(e,t,o,r)=>{if(!(null==e?void 0:e.freeShippingRuleEnabled))return{enabled:!1,source:"disabled"};const n=xr(e.freeShippingThresholds,t);if(n)return((e,t,o)=>{if(!e.enabled)return{enabled:!1,row:e,source:t};const r=e.alwaysFree?0:ou(e.amount);return!Number.isFinite(r)||r<0?{enabled:!1,row:e,source:t}:{enabled:!0,row:e,source:t,amount:new er(br(r,e.currencyCode||o),e.currencyCode||o)}})(n.row,n.source,o);const i=ou(e.freeShippingRule);return!Number.isFinite(i)||i<0?{enabled:!1,source:"default"}:{enabled:!0,source:"default",amount:new er(br(i,r||o),r||o)}},nu=()=>{var e,t,o,r,n,i,a,l;const s=(null==(e=window.parent)?void 0:e.CROCart)||window.CROCart,c=null==s?void 0:s.localization;return{marketId:(null==c?void 0:c.marketId)||(null==(t=null==c?void 0:c.market)?void 0:t.id),marketHandle:(null==c?void 0:c.marketHandle)||(null==(o=null==c?void 0:c.market)?void 0:o.handle),countryCode:(null==c?void 0:c.countryCode)||(null==(r=null==c?void 0:c.country)?void 0:r.isoCode)||(null==(n=null==c?void 0:c.country)?void 0:n.iso_code),currencyCode:(null==c?void 0:c.currencyCode)||(null==(i=null==c?void 0:c.country)?void 0:i.currencyCode)||(null==(l=null==(a=null==c?void 0:c.country)?void 0:a.currency)?void 0:l.iso_code)}};var iu=(e=>(e.CHECKOUT="checkout",e.THEME_OVERRIDE="theme_override",e.TRANSLATE="translate",e))(iu||{});const au=(e,t)=>{var o;const r=null==(o=window.Shopify)?void 0:o.shop;return lu[e](r)},lu={checkout:e=>()=>{var e,t,o;try{if("function"==typeof(null==(o=null==(t=null==(e=window.parent)?void 0:e.SPP)?void 0:t.instance)?void 0:o.openModal))return void window.parent.SPP.instance.openModal()}catch{}window.location.href="/checkout"},theme_override:e=>e=>null,translate:e=>{var t;const o={},r=(null==(t=window.Shopify)?void 0:t.locale)||"en";return"18ba60-2b.myshopify.com"===e&&(o.de={yourBag:"Warenkorb"}),e=>{var t;return null==(t=o[r])?void 0:t[e]}}},su=({onExpandToggle:e,isExpanded:t,text:o,children:r})=>Ko("div",{children:[Ko(cu,{onClick:e,children:[Ko(du,{children:o}),Ko(uu,{$_css:[{margin:"0 0 0 auto",transitionProperty:"transform",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms"},t&&{"--tw-rotate":"180deg",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))"}]})]}),Ko(pu,{$_css2:[{marginTop:"0.5rem",maxHeight:"500px",width:"100%",resize:"none",overflow:"hidden",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"1000ms"},!t&&{marginTop:"0px",maxHeight:"0px",borderWidth:"0"}],children:r})]});var cu=ls("button")({display:"flex",width:"100%",flexDirection:"row",alignItems:"center"}),du=ls("span")({marginRight:"0.5rem",fontSize:"15px",lineHeight:"22px",fontWeight:"600"}),uu=ls(Bc)`${e=>e.$_css}`,pu=ls("div").withConfig({componentId:"CROCart__sc-tp4r1k-0"})(["",""],(e=>e.$_css2));const hu=ls.div.withConfig({componentId:"CROCart__sc-1lq7yhc-0"})((({colors:e})=>[(null==e?void 0:e.titleColor)&&ns` color: ${e.titleColor}; svg path { stroke: ${e.titleColor} !important; } `,(null==e?void 0:e.noteColor)&&ns` textarea { color: ${e.noteColor}; } `])),mu=({value:e,onChange:t})=>{var o,r;const[n,i]=ne(!1),{orderNote:a}=no(),l=Vs(),s=l.orderNoteText||(null==a?void 0:a.orderNoteText),c=l.shareFeedbackText||(null==a?void 0:a.shareFeedbackText),d={titleColor:null==(o=null==a?void 0:a.noteTextColor)?void 0:o.hex,noteColor:null==(r=null==a?void 0:a.noteColor)?void 0:r.hex};return Ko(hu,{className:"cro_cart_order_note",colors:d,"data-cro-testid":"order-note",children:Ko(su,{onExpandToggle:()=>{i(!n)},isExpanded:n,text:s,children:Ko(fu,{onChange:t,className:"cro_cart_order_note__textarea",placeholder:c,value:e,rows:3})})})};var fu=ls("textarea").withConfig({componentId:"CROCart__sc-1l54zbx-0"})({height:"100px",width:"100%",borderRadius:"0.25rem",borderWidth:"1px",padding:"0.5rem",fontSize:"13px",lineHeight:"20px",fontWeight:"400"});const gu=async()=>{const e=await fetch("/cart.js");if(!e.ok)throw new Error("Failed to fetch cart");return await e.json()},vu=async e=>{const t=await fetch("/cart/update.js",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({discount:e})});if(!t.ok){const e=await t.json();throw new Error((null==e?void 0:e.description)||"Failed to update discount codes")}return await t.json()},_u=e=>e.trim().toLowerCase(),yu=ls(Gs).withConfig({componentId:"CROCart__sc-javjvj-0"})((({colors:e,isCheckoutButtonSticky:t})=>[e.backgroundColor&&ns` background-color: ${e.backgroundColor}; `,e.textColor&&ns` color: ${e.textColor}; `,ns` margin: 0; padding: 0.75rem; /* Full-bleed top divider: negative margins cancel the wrapper padding, the block carries it back. */ .cro_cart_summary__protection_block { border-top: 1px solid rgba(0, 0, 0, 0.1); margin: 0 -0.75rem 0.75rem; padding: 0.75rem 0.75rem 0; } .cro_cart_summary__protection_heading { width: 100%; margin: 0 0 0.75rem; font-size: 18px; font-weight: 700; line-height: 1.3; } `])),wu=ls.div.withConfig({componentId:"CROCart__sc-javjvj-1"})((({colors:e,isAnimated:t,animationName:o,isHidden:r})=>[ns` @keyframes glowing { 0% { box-shadow: 0 0 -8px ${e.buttonColor}; } 50% { box-shadow: 0 0 14px ${e.buttonColor}; } 100% { box-shadow: 0 0 -8px ${e.buttonColor}; } } @keyframes shaking { 10%, 90% { transform: translate3d(-1px, 0, 0); } 20%, 80% { transform: translate3d(2px, 0, 0); } 30%, 50%, 70% { transform: translate3d(-3px, 0, 0); } 40%, 60% { transform: translate3d(3px, 0, 0); } } @keyframes pulsating { to { box-shadow: 0 0 0 15px ${e.buttonColor}00; } } `,(null==e?void 0:e.buttonColor)&&ns` button { background-color: ${e.buttonColor}; border-color: ${e.buttonColor}; } `,(null==e?void 0:e.buttonTextColor)&&ns` button { color: ${e.buttonTextColor}; } `,t&&"shaking"===o&&ns` button { animation: ${o} 1.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both infinite; transform: translate3d(0, 0, 0); backface-visibility: hidden; perspective: 1000px; } `,t&&"glowing"===o&&ns` button { animation: glowing 1.7s infinite; } `,t&&"pulsating"===o&&ns` button { box-shadow: 0 0 0 0 ${e.buttonColor}; animation: pulsating 1.25s infinite cubic-bezier(0.66, 0, 0, 1); transition: all 300ms ease-in-out; } `,r&&{display:"none"}])),xu=ls(Gs).withConfig({componentId:"CROCart__sc-javjvj-2"})((({isHidden:e})=>[{position:"sticky",bottom:"0px",margin:"0px","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))"},e&&{display:"none"}])),bu=ls.div.withConfig({componentId:"CROCart__sc-javjvj-3"})(["",""],(({colors:e})=>(null==e?void 0:e.secondaryColor)&&ns` color: ${e.secondaryColor}; `)),Cu=ls.label.withConfig({componentId:"CROCart__sc-javjvj-4"})((({colors:e,isSelected:t,isDisabled:o})=>[{display:"flex",width:"100%",cursor:"pointer",userSelect:"none",alignItems:"center",gap:"0.5rem",fontSize:"16px",lineHeight:"1.25rem"},o&&{pointerEvents:"none",opacity:"0.6"},(null==e?void 0:e.textColor)&&ns` color: ${e.textColor}; `,ns` .cro_cart_summary__protection-input { position: absolute; opacity: 0; pointer-events: none; } .cro_cart_summary__protection-icon { width: 20px; height: 20px; flex: 0 0 20px; color: #12a253; } .cro_cart_summary__protection-label { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; font-weight: 600; white-space: nowrap; } .cro_cart_summary__protection-info { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex: 0 0 16px; border: 1px solid currentColor; border-radius: 999px; font-size: 10px; font-weight: 800; line-height: 1; } .cro_cart_summary__protection-toggle { position: relative; width: 50px; height: 26px; flex: 0 0 50px; border: none; border-radius: 999px; background: ${t?e.buttonColor||"#1c1c1e":"#c9c9c9"}; transition: background 180ms ease; } /* "On" tick lives on the track (left), not inside the knob — the knob stays a plain white dot. */ .cro_cart_summary__protection-toggle::before { content: ""; position: absolute; left: 8px; top: 50%; width: 11px; height: 11px; transform: translateY(-50%); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5 10 17.5 19 7'/%3E%3C/svg%3E") center / contain no-repeat; opacity: ${t?1:0}; transition: opacity 180ms ease; } .cro_cart_summary__protection-toggle-knob { position: absolute; top: 50%; left: ${t?"26px":"3px"}; width: 18px; height: 18px; border-radius: 999px; background: #ffffff; transform: translateY(-50%); transition: left 180ms ease; } .cro_cart_summary__protection-price { min-width: 48px; text-align: right; font-weight: 700; white-space: nowrap; } `])),ku=Yo("cartTotals"),Su=({delivery:e,total:t,showShippingRate:o,infoText:r,savings:n,discountCodes:i,cartLevelDiscountCodes:a})=>{const{checkout:l,general:s,progressBar:c}=no(),{refetch:d}=mi(),u=Vs(),[p,h]=ne(!1),m=se(0);m.current++,ku.info(`[AmountsSummaryV1] Render #${m.current} | Total displayed: "${t}"`);const f=async e=>{if(e)try{h(!0),await(async e=>{try{const t=(await gu()).discount_codes.filter((t=>_u(t.code)!==_u(e))).map((e=>e.code)).join(",");return await vu(t)}catch(t){return console.error("Failed to remove discount code:",t),{error:!0,message:t.message}}})(e),await d()}finally{h(!1)}},g=(null==a?void 0:a.filter((e=>{var t;return"discount_code"===(null==(t=e.discount_application)?void 0:t.type)})))||[],v=(null==i?void 0:i.filter((e=>e.applicable)))||[],_=new Set(g.map((e=>{var t,o;return null==(o=null==(t=e.discount_application)?void 0:t.title)?void 0:o.toLowerCase()}))),y=v.filter((e=>{var t;return!_.has(null==(t=e.code)?void 0:t.toLowerCase())})),w=u.savingsText||l.savingsText,x=u.deliveryText||(null==l?void 0:l.deliveryText),b=u.totalText||(null==l?void 0:l.totalText),C=u.customShippingMessage||l.customShippingMessage,k=u.belowThresholdCustomText||l.belowThresholdCustomText;return Ko("div",{"data-cro-testid":"summary-amounts",children:[l.shouldShowSavingsSummary&&!!n&&Ko(bu,{colors:{secondaryColor:l.summarySavingsColor.hex},children:Ko(Tu,{"data-cro-testid":"summary-savings-row",children:Ko($u,{children:Ko(Pu,{children:Ko(Au,{children:[Ko(Iu,{children:[Ko(Ru,{children:[w,":"]}),Ko(Nu,{children:[s.showDiscountNames&&!!g.length&&g.map(((e,t)=>{var o,r;return Ko(Ou,{className:"code","data-cro-testid":"summary-discount-code",style:{backgroundColor:l.summarySavingsCodesBgColor.hex},children:[null==(o=e.discount_application)?void 0:o.title,Ko(Eu,{onClick:()=>{var t;return f(null==(t=e.discount_application)?void 0:t.title)},"aria-label":"Remove discount code",disabled:p,children:"✕"})]},(null==(r=e.discount_application)?void 0:r.key)||t)})),s.showDiscountNames&&!!y.length&&y.map(((e,t)=>Ko(Du,{className:"code","data-cro-testid":"summary-discount-code",style:{backgroundColor:l.summarySavingsCodesBgColor.hex},children:[e.code.toUpperCase(),Ko(Lu,{onClick:()=>f(e.code),"aria-label":"Remove discount code",disabled:p,children:"✕"})]},e.code||t)))]})]}),Ko(Mu,{children:[Ko("div",{children:"-"}),Ko("span",{dangerouslySetInnerHTML:{__html:n||"--"}})]})]})})})})}),l.isShippingPriceRowActive&&Ko(Bu,{"data-cro-testid":"summary-shipping-row",children:[Ko("div",{children:x}),Ko("div",{children:!(null==c?void 0:c.freeShippingRuleEnabled)&&l.isShippingPriceRowActive?Ko("span",{children:C}):1===l.belowThresholdOption?Ko("span",{dangerouslySetInnerHTML:{__html:e||"-"}}):2===l.belowThresholdOption?Ko("span",{children:k}):null})]}),Ko(Hu,{"data-cro-testid":"summary-total-row",children:[Ko("div",{children:b}),Ko("div",{"data-cro-testid":"summary-total",dangerouslySetInnerHTML:{__html:t}})]}),Ko(zu,{dangerouslySetInnerHTML:{__html:r}})]})};var Tu=ls("div")({marginBottom:"0.5rem",display:"flex",flexDirection:"column",fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"500"}),$u=ls("div")({display:"flex",alignItems:"flex-start",justifyContent:"space-between"}),Pu=ls("div")({display:"flex",width:"100%",flexDirection:"column",gap:"0.5rem"}),Au=ls("div")({display:"flex",width:"100%",alignItems:"flex-start",justifyContent:"space-between",gap:"0.25rem"}),Iu=ls("div")({display:"flex",maxWidth:"60%",flexWrap:"wrap",alignItems:"center",gap:"0.5rem"}),Ru=ls("span")({marginRight:"0.25rem"}),Nu=ls("div")({display:"flex",flexWrap:"wrap",alignItems:"center",columnGap:"0.25rem",rowGap:"2px"}),Ou=ls("div")({display:"flex",height:"max-content",width:"max-content",alignItems:"center",gap:"0.25rem",borderRadius:"9999px",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"600"}),Eu=ls("button")({marginLeft:"0.25rem","&:hover":{opacity:"0.7"}}),Du=ls("div")({display:"flex",height:"max-content",width:"max-content",alignItems:"center",gap:"0.25rem",borderRadius:"9999px",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"600"}),Lu=ls("button")({marginLeft:"0.25rem","&:hover":{opacity:"0.7"}}),Mu=ls("div")({display:"flex",alignItems:"center",gap:"0.25rem"}),Bu=ls("div")({marginBottom:"0.5rem",display:"flex",flexDirection:"row",justifyContent:"space-between",fontSize:"15px",lineHeight:"22px",fontWeight:"400"}),Hu=ls("div")({marginBottom:"0px",display:"flex",flexDirection:"row",justifyContent:"space-between",fontSize:"17px",lineHeight:"24px",fontWeight:"600"}),zu=ls("div").withConfig({componentId:"CROCart__sc-w6j3me-0"})({marginBottom:"0.5rem",display:"flex",flexDirection:"row",justifyContent:"space-between",fontSize:"17px",lineHeight:"24px",fontWeight:"400"});ls("div")({marginTop:"1.25rem",borderTopWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-border-opacity))",paddingBottom:"0.25rem"}),ls("div")({marginBottom:"0.75rem",marginTop:"0.25rem",fontSize:"1.25rem",lineHeight:"1.75rem",fontWeight:"600"}),ls("div")({marginBottom:"0.5rem",display:"flex",flexDirection:"row",justifyContent:"space-between",fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"500"}),ls("div")({marginBottom:"0.5rem",display:"flex",flexDirection:"column",fontSize:"1rem",lineHeight:"1.5rem",fontWeight:"500"}),ls("div")({display:"flex",flexDirection:"row",alignItems:"flex-start",justifyContent:"space-between"}),ls("div")({display:"flex",flexWrap:"wrap",alignItems:"flex-start",gap:"0.5rem",columnGap:"0.25rem",rowGap:"2px"}),ls("span")({marginRight:"0.25rem"}),ls("div")({height:"max-content",width:"max-content",borderRadius:"9999px",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.5rem",paddingBottom:"0.5rem",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"600"}),ls("div")({display:"flex",alignItems:"center",gap:"0.25rem"}),ls("div")({marginBottom:"0.5rem",display:"flex",flexDirection:"row",justifyContent:"space-between",fontSize:"15px",lineHeight:"22px",fontWeight:"400"}),ls("div")({marginBottom:"0.5rem",display:"flex",flexDirection:"row",justifyContent:"space-between"}),ls("label")({cursor:"pointer",userSelect:"none"}),ls("input")({marginRight:"0.5rem"}),ls("div")({fontSize:"15px",lineHeight:"22px",fontWeight:"600"});const ju=Yo("cartTotals"),Fu=()=>{var e,t,o,r,n,i,a,l;const{checkout:s,orderNote:c,isInBuilder:d,general:u}=no(),{cart:p,itemsCount:h,changeNote:m,totalAmount:f,cartCurrency:g,flushHiddenCartAttributes:v}=mi(),{closeCartDrawer:_,lastCartOpenTimestamp:y}=_i(),{shippingRateAsString:w,shippingRateAmount:x}=(()=>{const{progressBar:e,checkout:t,currencyCode:o}=no(),{totalAmount:r,cartCurrency:n}=mi(),i=de((()=>{const i=ru(e,nu(),n,o);let a=new er(zo(+t.shippingRatePrice,n),n);return i.enabled&&r.gte(i.amount)&&(a=a.nullify()),a}),[n,t.shippingRatePrice,o,e,r]),a=de((()=>2===t.belowThresholdOption?null:i.toFormattedString()),[t,i]);return{shippingRateAmount:i,shippingRateAsString:a}})(),{hasOneClickUpsell:C,upsellProduct:k,isUpsellCheckboxSelected:S,isUpsellLoading:T,onUpsellCheckboxChange:$}=(()=>{const{checkout:e}=no(),{cart:t,refetch:o,changeProductQty:r,addProducts:n,cartAttributes:i}=mi(),[a,l]=ne(!1),[s,c]=ne(),d=pc(),u=_i((e=>e.isCartDrawerOpen)),p=null==e?void 0:e.isOutOfStock,h=ue((async()=>{var t;if(!(null==(t=null==e?void 0:e.product)?void 0:t.handle))return;l(!0);const o=await $o({handle:e.product.handle});c(o),l(!1)}),[null==e?void 0:e.product]),m=de((()=>{var e;const o=Tn({attributes:i},an);return null==(e=null==t?void 0:t.items)?void 0:e.find((e=>e.variant_id===(null==o?void 0:o.variant_id)))}),[t,i]),f=de((()=>(null==m?void 0:m.quantity)>0),[m]),g=ue((()=>{var i;e&&(l(!0),rn({event:"feature_interacted",payload:{action:"upsell_toggled",cart:t,feature_context:{feature_type:"one_click_upsell",feature_id:"checkout_one_click_upsell_1",surface:"checkout_section",product_id:null==s?void 0:s.id,variant_id:null==(i=Xn(s))?void 0:i.id,currency:null==t?void 0:t.currency}}}),(async()=>{if(m){const e=Math.max(m.quantity-1,0),o=await r(m,e,{track:{source:"one_click_upsell"}});if(!o)return;ri({operation:"update",originalProduct:m,requestedQty:e,originalCart:t,updatedCart:o,source:"one_click_upsell"})}else{const e=Xn(s);if(!(await n([{id:null==e?void 0:e.id,quantity:1}],{track:{source:"one_click_upsell"}})))return;const r=await o();ri({operation:"add",originalProduct:e,requestedQty:1,originalCart:t,updatedCart:r,source:"one_click_upsell"})}})().then((()=>l(!1))).catch(io))}),[e,m,r,t,s,n,o]);return ae((()=>{h()}),[null==e?void 0:e.product,h]),ae((()=>{if(!u||!s||!(null==e?void 0:e.isProductActive)||!Qn(s)&&!p)return;const o=Xn(s);rn({event:"upsell_impression",payload:{cart:t,exposure_render_id:d,product:s,source:"one_click_upsell",module:"one_click_upsell",surface:"checkout_section",engine_type:"manual",recommended_product_id:s.id,recommended_variant_id:null==o?void 0:o.id,feature_context:{feature_type:"one_click_upsell",feature_id:"checkout_one_click_upsell_1",surface:"checkout_section",product_id:s.id,variant_id:null==o?void 0:o.id,eligible:!0}}})}),[t,null==e?void 0:e.isProductActive,d,u,p,s]),{onUpsellCheckboxChange:g,isUpsellCheckboxSelected:f,isUpsellLoading:a,hasOneClickUpsell:de((()=>{const t=Qn(s);return(null==e?void 0:e.isProductActive)&&s&&(t||!t&&p)}),[e,p,s]),upsellProduct:s}})(),P=Vs(),[A,I]=ne(!1),R=se(0);if(R.current++,!s)return null;const N=s.lockSvgEnabled,O=!!(null==c?void 0:c.isActive),E=s.isShippingPriceRowActive,D=E?f.add(x):f,L=P.checkoutText||s.checkoutText,M=Fs(L,"{{total}}",D.toFormattedString()||""),B=P.infoText||s.infoText,H=s.isContinueButtonActive,z=s.isStickyCheckoutActive,j="none"!==s.infiniteAnimation,F=h<=0,q=s.infiniteAnimation,W=s.oneClickUpsellDesignOption||1;ju.info(`[CartSummary] Render #${R.current} | Checkout Button: "${M.replace(/<[^>]*>/g,"")}" | Total passed to summary: "${D.toFormattedString()}"`);const U={backgroundColor:null==(e=null==s?void 0:s.orderSummaryBackgroundColor)?void 0:e.hex,textColor:null==(t=null==s?void 0:s.orderSummaryTextColor)?void 0:t.hex,buttonColor:null==(o=null==s?void 0:s.buttonColor)?void 0:o.hex,buttonTextColor:null==(r=null==s?void 0:s.buttonTextColor)?void 0:r.hex},V=$s((e=>m(e.target.value)),1e3),G=Su,Y=P.continueShoppingText||(null==u?void 0:u.continueShoppingText),Q=O&&Ko(qu,{className:"cro_cart_summary__order_note",children:Ko(mu,{onChange:V,value:null==p?void 0:p.note})}),X={subtotal:er.fromCartSubtotal(p).toFormattedString(),delivery:w,showShippingRate:E,infoText:B,total:D.toFormattedString(),onOptionalDeliveryChange:e=>{console.log(e.target.value)},savings:(null==p?void 0:p.total_discount)?new er((null==p?void 0:p.total_discount)||0,null==p?void 0:p.currency).toFormattedString():"",discountCodes:(null==p?void 0:p.discount_codes)||[],cartLevelDiscountCodes:(null==p?void 0:p.cart_level_discount_applications)||[]},K=P.oneClickUpsellText||(null==s?void 0:s.oneClickUpsellText),J=null==s?void 0:s.oneClickUpsellHeaderText,Z=C&&2===W,ee=k?new er(k.price,g):null,te=k&&Fs(Fs(K||"{{product}}","{{product}}",k.title),"{{price}}","").trim(),oe=Z?Ko("div",{className:"cro_cart_summary__protection_block",children:[J&&Ko("div",{className:"cro_cart_summary__protection_heading",children:J}),Ko(Cu,{htmlFor:"upsell-checkbox",className:"cro_cart_summary__protection",colors:U,isSelected:S,isDisabled:T,"data-cro-testid":"checkout-upsell",children:[Ko("input",{type:"checkbox",id:"upsell-checkbox",className:"cro_cart_summary__protection-input",checked:S,disabled:T,onChange:$}),Ko(tu,{className:"cro_cart_summary__protection-icon"}),Ko("span",{className:"cro_cart_summary__protection-label",children:[te||k.title,Ko("span",{className:"cro_cart_summary__protection-info",children:"i"})]}),Ko("span",{className:"cro_cart_summary__protection-toggle","aria-hidden":"true",children:Ko("span",{className:"cro_cart_summary__protection-toggle-knob"})}),ee&&Ko(Jo,{className:"cro_cart_summary__protection-price",amount:ee,"data-product-id":null==k?void 0:k.id,"data-variant-id":null==(i=null==(n=null==k?void 0:k.variants)?void 0:n[0])?void 0:i.id})]})]}):C?Ko(Wu,{htmlFor:"upsell-checkbox",className:"cro_cart_summary__upsell",disabled:T,"data-cro-testid":"checkout-upsell",children:[Ko(Uu,{type:"checkbox",id:"upsell-checkbox",className:"cro_cart_summary__upsell-checkbox",checked:S,disabled:T,onChange:$}),Ws(Fs(K,"{{product}}",k.title),"{{price}}",Ko(Jo,{className:"cro_cart_summary__upsell-price",amount:new er(k.price,g),"data-product-id":null==k?void 0:k.id,"data-variant-id":null==(l=null==(a=null==k?void 0:k.variants)?void 0:a[0])?void 0:l.id}))]}):null,re=Ko(wu,{className:"cro_cart_summary__checkout_button_wrapper","data-cro-testid":"checkout-button",isAnimated:j,animationName:q,colors:U,isHidden:F,children:Ko(gc,{className:"cro_cart_summary__checkout_button",type:"primary",disabled:T,onClick:async()=>{var e;I(!0);try{ri({operation:"checkout",source:"checkout",updatedCart:p}),await v()}catch(t){return console.warn("Failed to flush cart attributes before checkout",t),void I(!1)}try{rn({event:"checkout_button_clicked",payload:{cart:p,cart_total_cents:null==p?void 0:p.total_price,cart_item_count:null==p?void 0:p.item_count,has_upsell_items:Object.keys((null==p?void 0:p.attributes)||{}).some((e=>e.includes("upsell"))),active_discount_codes_count:(null==(e=null==p?void 0:p.discount_codes)?void 0:e.filter((e=>e.applicable)).length)||0,time_since_drawer_opened_ms:y?Date.now()-y:void 0}})}catch(t){console.debug("Checkout analytics capture failed",t)}d?I(!1):(au(iu.CHECKOUT)(),setTimeout((()=>{I(!1)}),2e3))},isLoading:A,children:Ko(Vu,{children:[Ko("span",{className:"cro_cart_summary__checkout_text",dangerouslySetInnerHTML:{__html:M}}),N&&Ko(Gu,{className:"cro_cart_summary__checkout_icon",style:{fill:U.buttonTextColor}})]})})}),ie=H&&Ko(Yu,{className:"cro_cart_summary__continue_shopping",children:Ko(gc,{type:"text",size:"small",onClick:()=>{d||_()},children:Y})}),le=Ko("div",{className:"cro_cart_summary__totals",children:h>0&&Ko(G,{...X},X.total)});return z?Ko(b,{children:[Ko(xu,{className:"cro_cart_summary cro_cart_summary__sticky_wrapper",isHidden:F,children:[Ko(yu,{className:"cro_cart_summary__wrapper",colors:U,isCheckoutButtonSticky:z,"data-cro-testid":"summary-totals",children:[Q,Z&&oe,le,!Z&&oe]}),Ko(Qu,{className:"cro_cart_summary__checkout_section",style:{backgroundColor:U.backgroundColor},children:re})]}),ie,Ko(sc,{})]}):Ko("div",{className:"cro_cart_summary",children:[Ko(yu,{className:"cro_cart_summary__wrapper",colors:U,isCheckoutButtonSticky:z,"data-cro-testid":"summary-totals",children:[Q,Z&&oe,le,!Z&&oe]}),Ko(Xu,{className:"cro_cart_summary__checkout_section",style:{backgroundColor:U.backgroundColor},children:re}),ie,Ko(sc,{})]})};var qu=ls("div")({marginBottom:"0.5rem"}),Wu=ls("label")({marginBottom:"0.5rem",cursor:"pointer",userSelect:"none"}),Uu=ls("input")({marginRight:"0.5rem"}),Vu=ls("div")({display:"flex",justifyContent:"center"}),Gu=ls(eu)({marginLeft:"0.5rem"}),Yu=ls("div")({marginTop:"0.5rem",display:"flex",justifyContent:"center"}),Qu=ls("div")({padding:"0.75rem"}),Xu=ls("div").withConfig({componentId:"CROCart__sc-1xuovcd-0"})({padding:"0.75rem"});class Ku extends C{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){const{sectionName:o}=this.props;console.error(`Error in section: ${o}`,e,t),io(new Error(`Section Error [${o}]: ${e.message}`))}render(){return this.state.hasError?null:this.props.children}}const Ju="above_announcement",Zu=[["below_progress","above_products"],["below_products","above_free_gift"],["below_recommendations","above_discount_code"],["below_cart_summary","above_payment_providers"],["below_payment_providers","above_benefits"]],ep=(e,t)=>(e=>{const t=Array.isArray(null==e?void 0:e.customHtmlBlocks)?e.customHtmlBlocks:[],o=(null==e?void 0:e.customHtml)||"";if(0===t.length)return o.trim()?[{id:"legacy-custom-html",position:(null==e?void 0:e.customHtmlPosition)||Ju,html:o}]:[];if(!o.trim())return t;const r=t.findIndex((e=>{var t;return null==(t=e.html)?void 0:t.trim()})),n=-1===r?0:r;return t.map(((t,r)=>r===n?{...t,id:t.id||"legacy-custom-html",position:(null==e?void 0:e.customHtmlPosition)||Ju,html:o}:t))})(e).filter((e=>{var o;return(null==(o=e.html)?void 0:o.trim())&&((e,t)=>{const o=e||Ju;return o===t||Zu.some((e=>e.includes(o)&&e.includes(t)))})(e.position,t)})),tp=({position:e})=>{const{general:t}=no(),o=ep(t,e);return 0===o.length?null:Ko(b,{children:o.map(((t,o)=>Ko("div",{className:"cro_cart_custom_html","data-position":e,"data-actual-position":t.position||Ju,"data-block-id":t.id,dangerouslySetInnerHTML:{__html:t.html||""}},t.id||o)))})},op=e=>y("svg",{xmlns:"http://www.w3.org/2000/svg",width:20,height:20,viewBox:"0 0 20 20",fill:"none",...e},y("path",{d:"M12.9917 11.975C13.1652 12.7092 13.1703 13.4732 13.0066 14.2097C12.843 14.9462 12.5148 15.6361 12.0466 16.2277C11.5784 16.8193 10.9824 17.2973 10.3033 17.6259C9.62415 17.9545 8.87945 18.1251 8.125 18.125V14.125M12.9917 11.975C14.5832 10.8157 15.878 9.29625 16.7701 7.5409C17.6623 5.78556 18.1266 3.84406 18.125 1.875C16.1561 1.87358 14.2148 2.33791 12.4596 3.23006C10.7044 4.12221 9.1851 5.41688 8.02583 7.00834M12.9917 11.975C11.5433 13.0344 9.88359 13.7678 8.125 14.125M8.125 14.125C8.03917 14.1425 7.9525 14.1592 7.86583 14.175C7.10982 13.5755 6.42532 12.891 5.82583 12.135C5.84158 12.0482 5.85741 11.9615 5.875 11.875M8.02583 7.00834C7.29155 6.83467 6.52748 6.82944 5.79089 6.99304C5.0543 7.15664 4.36428 7.48483 3.77256 7.95301C3.18084 8.4212 2.70275 9.01723 2.37412 9.69645C2.0455 10.3757 1.87486 11.1205 1.875 11.875H5.875M8.02583 7.00834C6.96657 8.45651 6.23229 10.1167 5.875 11.875M4.00917 13.8667C3.46098 14.2743 3.03477 14.8241 2.77669 15.4567C2.5186 16.0892 2.43848 16.7802 2.545 17.455C3.21986 17.5614 3.91097 17.4812 4.54348 17.2229C5.17599 16.9647 5.7258 16.5383 6.13333 15.99M13.75 7.5C13.75 7.83152 13.6183 8.14947 13.3839 8.38389C13.1495 8.61831 12.8315 8.75 12.5 8.75C12.1685 8.75 11.8505 8.61831 11.6161 8.38389C11.3817 8.14947 11.25 7.83152 11.25 7.5C11.25 7.16848 11.3817 6.85054 11.6161 6.61612C11.8505 6.3817 12.1685 6.25 12.5 6.25C12.8315 6.25 13.1495 6.3817 13.3839 6.61612C13.6183 6.85054 13.75 7.16848 13.75 7.5Z",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})),rp=()=>{const{refetch:e,visibleCart:t,cart:o}=mi(),[r,n]=ne(),[i,a]=ne(),[l,s]=ne(),[c,d]=ne(!1),u=ue((()=>{a("Discount code applied successfully."),setTimeout((()=>a("")),5e3)}),[a]),p=ue(((e="Discount code could not be applied.")=>{s(e),setTimeout((()=>s("")),5e3)}),[s]),h=ue((async()=>{var i;d(!0),rn({event:"discount_code_attempted",payload:{cart:o,code_length:(null==r?void 0:r.length)||0}});if(null==(i=null==t?void 0:t.discount_codes)?void 0:i.some((e=>e.code===r&&e.applicable)))return rn({event:"discount_code_failed",payload:{cart:o,code_length:(null==r?void 0:r.length)||0,failure_reason:"not_applicable"}}),p("This discount code has already been applied."),void d(!1);await(async({code:e})=>{var t;try{const o=await gu();if(!(null==(t=o.items)?void 0:t.length))throw new Error("Cannot apply discount: cart is empty");const r=o.discount_codes.filter((e=>e.applicable)).map((e=>_u(e.code))),n=_u(e),i=Array.from(new Set([...r,n])).join(",");return await vu(i)}catch(o){return console.error("Failed to apply discount code:",o),{error:!0,message:o.message}}})({code:r});const a=await e();if(a.error)return rn({event:"discount_code_failed",payload:{cart:o,code_length:(null==r?void 0:r.length)||0,failure_reason:"network_error"}}),p(),void d(!1);if(!a.items.some((e=>e.discounts.some((e=>{var t;return(null==(t=e.title)?void 0:t.toLowerCase())===(null==r?void 0:r.toLowerCase())})))))return rn({event:"discount_code_failed",payload:{cart:o,newCart:a,code_length:(null==r?void 0:r.length)||0,failure_reason:"invalid"}}),p(),void d(!1);rn({event:"discount_code_applied",payload:{originalCart:o,newCart:a,code_length:(null==r?void 0:r.length)||0,discount_delta_cents:((null==a?void 0:a.total_discount)||0)-((null==o?void 0:o.total_discount)||0),cart_total_before_cents:null==o?void 0:o.total_price,cart_total_after_cents:null==a?void 0:a.total_price}}),u(),n(""),d(!1)}),[o,r,p,u,e,t]);return{onApplyDiscountCode:h,successMessage:i,errorMessage:l,setDiscountCodeValue:n,discountCodeValue:r,isLoading:c}},np=ls(Gs).withConfig({componentId:"CROCart__sc-17c30qe-0"})((({colors:e})=>[e.buttonColor&&ns` button { background-color: ${e.buttonColor}; border-color: ${e.buttonColor}; } `,e.buttonColor&&ns` button svg { path:last-of-type { fill: white; } } `,e.titleColor&&ns` h5 { color: ${e.titleColor}; } `,e.textColor&&ns` input { color: ${e.textColor}; } `])),ip=()=>{var e,t,o,r;const{discountCode:n}=no(),{cart:i}=mi(),a=Vs(),{setDiscountCodeValue:l,discountCodeValue:s,onApplyDiscountCode:c,isLoading:d,errorMessage:u,successMessage:p}=rp(),h=a.promotionalCodeText||(null==n?void 0:n.promotionalCodeText),m=a.promotionalCodePlaceholderText||(null==n?void 0:n.promotionalCodePlaceholderText),f=a.confirmText||(null==n?void 0:n.confirmText),g={buttonColor:null==(e=null==n?void 0:n.backgroundColor)?void 0:e.hex,titleColor:null==(t=null==n?void 0:n.headerTextColor)?void 0:t.hex,textColor:null==(o=null==n?void 0:n.textColor)?void 0:o.hex};return(null==n?void 0:n.isActive)?Ko(b,{children:!!(null==(r=null==i?void 0:i.items)?void 0:r.length)&&Ko(b,{children:[Ko(ap,{}),Ko(np,{className:"cro_cart_discount_code",colors:g,"data-cro-testid":"discount-code",children:[Ko(lp,{className:"cro_cart_discount_code__header",children:[Ko(op,{className:"cro_cart_discount_code__icon",style:{stroke:g.titleColor}}),Ko(sp,{className:"cro_cart_discount_code__title",children:h})]}),Ko(cp,{className:"cro_cart_discount_code__form",children:[Ko(dp,{className:"cro_cart_discount_code__input",placeholder:m,value:s,onChange:e=>l(e.target.value)}),Ko(gc,{className:"cro_cart_discount_code__button",type:"primary",disabled:!s,onClick:c,isLoading:d,children:f})]}),u&&Ko(up,{className:"cro_cart_discount_code__message cro_cart_discount_code__message--error",children:u}),p&&Ko(pp,{className:"cro_cart_discount_code__message cro_cart_discount_code__message--success",children:p})]})]})}):null};var ap=ls("div")({borderTopWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-border-opacity))",paddingTop:"0.25rem",paddingBottom:"0.25rem"}),lp=ls("div")({marginBottom:"0.5rem",display:"flex",alignItems:"center",gap:"0.5rem"}),sp=ls("h5")({fontSize:"15px",lineHeight:"22px",fontWeight:"600"}),cp=ls("div")({display:"flex"}),dp=ls("input")({marginRight:"0.5rem",flex:"1 1 0%",borderRadius:"0.375rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(225 225 230 / var(--tw-border-opacity))",padding:"0.5rem"}),up=ls("div")({marginTop:"0.5rem","--tw-text-opacity":"1",color:"rgb(225 18 46 / var(--tw-text-opacity))"}),pp=ls("div").withConfig({componentId:"CROCart__sc-rl63cq-0"})({marginTop:"0.5rem","--tw-text-opacity":"1",color:"rgb(0 194 123 / var(--tw-text-opacity))"});const hp=ls.div.withConfig({componentId:"CROCart__sc-srrv9y-0"})((({isSmall:e})=>[{marginBottom:"0.25rem"},e?{fontSize:"13px",lineHeight:"20px",fontWeight:"400"}:{fontSize:"15px",lineHeight:"22px",fontWeight:"600"}])),mp=ls.div.withConfig({componentId:"CROCart__sc-srrv9y-1"})((({spreadComponents:e=!0})=>[{display:"flex",alignItems:"flex-start"},e&&{justifyContent:"space-between"}])),fp=ls.div.withConfig({componentId:"CROCart__sc-srrv9y-2"})((({isCrossedOut:e,lighterWhenCrossedOut:t})=>[e?{textDecorationLine:"line-through"}:{fontSize:"15px",lineHeight:"22px",fontWeight:"600"},e&&t&&{"--tw-text-opacity":"1",color:"rgb(124 124 128 / var(--tw-text-opacity))"}])),gp=ls.div.withConfig({componentId:"CROCart__sc-srrv9y-3"})((()=>[{marginBottom:"0.5rem","--tw-text-opacity":"1",color:"rgb(124 124 128 / var(--tw-text-opacity))"}])),vp=ls.div.withConfig({componentId:"CROCart__sc-srrv9y-4"})(["",""],(({colors:e})=>(null==e?void 0:e.discountColor)&&ns(["color:",";text-align:right;span{color:",";}"],e.discountColor,e.discountColor))),_p=({variant:e,product:t,isFree:o,freeProductPriceText:r,isOutOfStock:n,onAdd:i,imageSize:a="small",imageRatio:l="square",className:s="flex flex-col justify-end max-w-[80%] ml-auto mr-0 mt-1",isFreeProduct:c,onOpenVariantPicker:d,showVariantPicker:u,isFulfilled:p,variantPickerText:h,compact:m=!1,text:f})=>{const[g,v]=ne(!1),{cartCurrency:_}=mi(),{isInBuilder:y,general:w}=no(),{shouldShowComparisonPrices:x,showSaveText:b,discountTextColor:C,saveText:k,addToCartText:S,outOfStockText:T}=w,$=ue((async()=>{v(!0);try{await(null==i?void 0:i())}finally{v(!1)}}),[i]),P=ms(e,_)||Jn(t,_),A=new er(P,_),I=(null==e?void 0:e.compare_at_price)||(null==t?void 0:t.compare_at_price)||0,R=x&&I>P,N=R?I-P:0,O=N>0&&b,E=O?Fs(k,"{{amount}}",new er(N,_).toFormattedString()):null,D=((e,{height:t,width:o})=>{var r;let n=null==(r=null==e?void 0:e.featured_image)?void 0:r.src;if(!n)return"";const i=new URL(Fn(n,/^((http|https|ftp):)/,"https:"));return t&&i.searchParams.append("height",`${t}`),o&&i.searchParams.append("width",`${o}`),i.toString()})(e,{height:200})||Kn(t,{height:200}),L=ue((()=>{y||(rn({event:"product_image_clicked",payload:{product:t}}),window.open("url"in t?t.url:`/products/${t.handle}`,"_self"))}),[t,y]),M=ue((()=>{y||(rn({event:"product_title_clicked",payload:{product:t}}),window.open("url"in t?t.url:`/products/${t.handle}`,"_self"))}),[t,y]);return m&&(t||e)?Ko(yp,{"data-cro-testid":"gift-product","data-cro-product-handle":null==t?void 0:t.handle,"data-cro-variant-id":null==e?void 0:e.id,children:[Ko(Mc,{ratio:l,imageSize:a,isRecommendedProduct:!c,isHorizontal:!0,style:{width:56,height:56,overflow:"hidden"},children:Ko(wp,{children:[Ko(xp,{children:Ko(eu,{style:{fill:"#fff"}})}),Ko(bp,{src:D,alt:null==t?void 0:t.title,style:{width:56,height:56}})]})}),Ko(Cp,{children:[Ko(kp,{children:[Ko(Sp,{onClick:M,"data-cro-testid":"gift-product-title",children:Ko(Tp,{children:null==t?void 0:t.title})}),e&&Ko($p,{children:hs(e)})]}),f&&Ko(Pp,{className:"custom-text",dangerouslySetInnerHTML:{__html:f}})]}),Ko(Ap,{children:[o&&Ko(Ip,{className:"free-text",children:r||Ko(Jo,{amount:new er(0,_)})}),n&&Ko(Rp,{children:T})]})]}):(t||e)&&Ko(Np,{"data-cro-testid":"gift-product","data-cro-product-handle":null==t?void 0:t.handle,"data-cro-variant-id":null==e?void 0:e.id,children:Ko(Op,{children:[Ko(Ep,{onClick:L,children:Ko(Mc,{ratio:l,imageSize:a,isRecommendedProduct:!c,isHorizontal:!0,children:Ko(Dp,{src:D,alt:`Option ${null==t?void 0:t.title}`,$_css:[{height:"100%",width:"100%",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",objectFit:"cover"},{transform:"translateZ(0)",filter:"blur(0)"}]})})}),Ko(Lp,{children:[Ko(Mp,{children:[Ko(Bp,{onClick:M,"data-cro-testid":"gift-product-title",children:[Ko(hp,{children:null==t?void 0:t.title}),!d&&!u&&Ko(Hp,{className:"flex-co1",children:e&&Ko(zp,{children:hs(e)})})]}),u&&d&&Ko(jp,{"data-cro-testid":"gift-variant-picker",children:Ko(gc,{disabled:!p,onClick:d,size:"small",children:h})})]}),Ko(mp,{spreadComponents:!!i,children:!c&&i&&o?Ko(Fp,{children:[Ko("div",{"data-cro-testid":"gift-add-button",children:Ko(gc,{onClick:$,size:"small",isLoading:g,disabled:!Qn(t),children:Ko(qp,{children:S})})}),Ko(Wp,{children:[Ko(Up,{isCrossedOut:!0,className:"free-text",children:Ko(Jo,{amount:A})}),Ko(Vp,{className:"free-text",children:r||Ko(Jo,{amount:new er(0,_)})})]})]}):Ko(Gp,{children:[!c&&i&&Ko("div",{"data-cro-testid":"gift-add-button",children:Ko(gc,{onClick:$,size:"small",isLoading:g,disabled:!Qn(t),children:Ko(Yp,{children:S})})}),Ko("div",{className:s,children:[Ko(Qp,{children:[!c&&R&&Ko(Xp,{children:Ko(Jo,{amount:new er(I,_)})}),Ko(fp,{isCrossedOut:o||n,className:o?"free-text":"",children:Ko(Jo,{amount:A})})]}),!c&&O&&E&&Ko(vp,{colors:{discountColor:C.hex},children:Ko(Kp,{children:["(",Ko("span",{dangerouslySetInnerHTML:{__html:E}}),")"]})})]}),o&&Ko(Jp,{className:"free-text",children:r||Ko(Jo,{amount:new er(0,_)})}),n&&Ko(Zp,{children:T})]})})]})]})})};var yp=ls("div")({display:"flex",alignItems:"center",gap:"0.75rem"}),wp=ls("div")({position:"relative",height:"max-content",width:"max-content",flexShrink:"0"}),xp=ls("div")({position:"absolute",top:"0px",display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center",backgroundColor:"rgb(107 114 128 / 0.4)"}),bp=ls("img")({height:"100%",width:"100%",objectFit:"cover"}),Cp=ls("div")({display:"flex",minWidth:"0px",flex:"1 1 0%",flexDirection:"column"}),kp=ls("div")({display:"flex",alignItems:"flex-start",justifyContent:"space-between"}),Sp=ls("div")({cursor:"pointer"}),Tp=ls("span")({fontSize:"13px",fontWeight:"600"}),$p=ls(gp)({marginBottom:"0px",fontSize:"11px",lineHeight:"16px",fontWeight:"400"}),Pp=ls("div")({marginTop:"0.25rem",fontSize:"12px",fontWeight:"600"}),Ap=ls("div")({marginLeft:"0.5rem",display:"flex",flexShrink:"0",flexDirection:"column",justifyContent:"center","> :not([hidden]) ~ :not([hidden])":{"--tw-space-y-reverse":"0",marginTop:"calc(0.25rem * calc(1 - var(--tw-space-y-reverse)))",marginBottom:"calc(0.25rem * var(--tw-space-y-reverse))"}}),Ip=ls("div")({fontSize:"13px",fontWeight:"500"}),Rp=ls("div")({fontSize:"13px",fontWeight:"500"}),Np=ls("div")({position:"relative"}),Op=ls("div")({position:"relative",marginTop:"0.5rem",display:"flex",minHeight:"100px",flexDirection:"row"}),Ep=ls("div")({cursor:"pointer"}),Dp=ls("img")`${e=>e.$_css}`,Lp=ls("div")({marginLeft:"0.75rem",display:"flex",flex:"1 1 0%",flexDirection:"column",justifyContent:"space-between"}),Mp=ls("div")({display:"flex",flexDirection:"column"}),Bp=ls("div")({cursor:"pointer"}),Hp=ls("div")({display:"flex",alignItems:"center",gap:"0.75rem"}),zp=ls(gp)({fontSize:"13px",lineHeight:"20px",fontWeight:"400"}),jp=ls("div")({maxWidth:"150px"}),Fp=ls("div")({display:"flex",width:"100%",alignItems:"flex-end",justifyContent:"space-between"}),qp=ls("span")({fontSize:"13px",lineHeight:"20px",fontWeight:"400"}),Wp=ls("div")({display:"flex",flexDirection:"column",alignItems:"flex-end"}),Up=ls(fp)({fontSize:"0.875rem",lineHeight:"1"}),Vp=ls("div")({fontSize:"15px",lineHeight:"22px",fontWeight:"600"}),Gp=ls("div")({display:"flex",width:"100%",flexWrap:"wrap",alignItems:"center",justifyContent:"flex-end"}),Yp=ls("span")({fontSize:"13px",lineHeight:"20px",fontWeight:"400"}),Qp=ls("div")({display:"flex",flexDirection:"column",alignItems:"flex-end",justifyContent:"flex-end",whiteSpace:"nowrap",fontSize:"0.875rem !important",lineHeight:"1 !important"}),Xp=ls("span")({whiteSpace:"nowrap",fontSize:"0.875rem",lineHeight:"1","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))",textDecorationLine:"line-through"}),Kp=ls("span")({whiteSpace:"nowrap",textAlign:"end",fontSize:"0.875rem",lineHeight:"1"}),Jp=ls("div")({marginLeft:"0.5rem",fontSize:"15px",lineHeight:"22px",fontWeight:"600"}),Zp=ls("div").withConfig({componentId:"CROCart__sc-13ts18i-0"})({marginLeft:"0.5rem",fontSize:"15px",lineHeight:"22px",fontWeight:"600"});const eh=e=>y("svg",{viewBox:"0 0 320 512",xmlns:"http://www.w3.org/2000/svg",...e},y("path",{d:"M310.6 246.6l-127.1 128C176.4 380.9 168.2 384 160 384s-16.38-3.125-22.63-9.375l-127.1-128C.2244 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75S319.8 237.5 310.6 246.6z"})),th=ls.div.withConfig({componentId:"CROCart__sc-5tqor8-0"})(["position:relative;width:100%;"]),oh=ls.div.withConfig({componentId:"CROCart__sc-5tqor8-1"})(["display:flex;justify-content:space-between;align-items:center;border-radius:6px;padding:15px;background-color:white;border:1px solid #ccc;cursor:pointer;",""],{fontSize:"17px",lineHeight:"24px",fontWeight:"600"}),rh=ls.div.withConfig({componentId:"CROCart__sc-5tqor8-2"})((({isOpen:e})=>[ns` position: absolute; top: 100%; left: 0; width: 100%; max-height: 200px; overflow-y: auto; background-color: white; border: 1px solid #eaeaea; z-index: 1; opacity: 0; transition: opacity 0.1s; box-shadow: 0px 7px 10px rgba(0, 0, 0, 0.1); margin-top: -4px; pointer-events: none; `,e&&{pointerEvents:"auto",opacity:"1"}])),nh=ls.div.withConfig({componentId:"CROCart__sc-5tqor8-3"})(["padding:12px;display:flex;align-items:center;justify-content:center;cursor:pointer;"," &:hover{background-color:#f0f0f0;}"],{fontSize:"17px",lineHeight:"24px",fontWeight:"600"}),ih=ls(eh).withConfig({componentId:"CROCart__sc-5tqor8-4"})((({isOpen:e})=>[ns` width: 12px; transform: ${e?"rotate(180deg)":"rotate(0deg)"}; transition: transform 0.1s; transform-origin: center; path { fill: #b0b0b0; } `])),ah=({options:e,label:t,value:o,onChange:r,className:n})=>{const[i,a]=ne(!1),l=se(null),{general:s}=no(),{ref:c}=Hc({onOutsideClick:()=>a(!1)});ae((()=>{const e=e=>{l.current&&!l.current.contains(e.target)&&a(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}}),[]);const d=e.find((e=>e.value===o));return Ko(th,{ref:l,className:n,children:[Ko(oh,{onClick:()=>{a(!i)},children:[Ko("div",{children:d?`${t}: ${d.label}`:`${null==s?void 0:s.chooseText} ${null==t?void 0:t.toLowerCase()}`}),Ko(ih,{isOpen:i})]}),Ko(rh,{isOpen:i,ref:c,children:e.map((e=>Ko(nh,{onClick:()=>(e=>{r(e.value),a(!1)})(e),children:e.label},e.value)))})]})},lh=ls(jd).withConfig({componentId:"CROCart__sc-v2u8dr-0"})((({isOpen:e})=>[{height:"66.666667%",width:"100%",overflowY:"auto",borderRadius:"0.25rem",borderWidth:"1px","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",paddingTop:"1rem",paddingBottom:"1rem"},ns(["position:absolute;bottom:0;left:0;transform:translateY(100%);transition:transform 0.2s ease-in-out;z-index:2;select{width:100%;min-height:50px;padding:20px;margin-top:20px;cursor:pointer;border-radius:5px;outline:none;}"]),e&&ns(["transform:translateY(0%);"])])),sh=ls.div.withConfig({componentId:"CROCart__sc-v2u8dr-1"})((({isOpen:e})=>[{height:"100%",width:"100%"},ns(["display:block;position:absolute;top:0;left:0;background:rgba(0,0,0,0.3);z-index:1;opacity:0;transition:opacity 0.2s ease-in-out;pointer-events:none;"]),e&&ns(["opacity:1;pointer-events:all;"])])),ch=ls.div.withConfig({componentId:"CROCart__sc-v2u8dr-2"})((({colors:e})=>[{marginTop:"1.25rem"},(null==e?void 0:e.primaryColor)&&ns(["button{border-color:",";color:",";}"],null==e?void 0:e.primaryColor,null==e?void 0:e.primaryColor)])),dh=ls(jd).withConfig({componentId:"CROCart__sc-1ik8p73-0"})((({colors:e,isCompact:t})=>[{borderWidth:"0","--tw-bg-opacity":"1",backgroundColor:"rgb(225 250 241 / var(--tw-bg-opacity))",paddingTop:"0.5rem"},t&&ns` padding: 0.5rem; `,(null==e?void 0:e.backgroundColor)&&ns` background-color: ${e.backgroundColor}; `,(null==e?void 0:e.dividerColor)&&ns` * { border-color: ${e.dividerColor}; } `,(null==e?void 0:e.titleColor)&&ns` ${hp} { color: ${e.titleColor}; } `,(null==e?void 0:e.subtitleColor)&&ns` ${id}, .custom-text, .free-text { color: ${e.subtitleColor}; } `])),uh=Yo("giftTiers"),ph=({activeTier:e,uiDecision:t,giftTiersHeaderText:o,onAdd:r})=>{var n,i,a,l,s,c,d;const{freeProduct:u,general:p}=no(),{openVariantDrawer:h}=_i(),m=Vs(),[f,g]=ne(!1),v=se(0),_=se(e.id),y=m.freeTextAfter||(null==u?void 0:u.textAfter);ae((()=>{uh.info(`[SingleUI] Tier changed to "${e.id}" - resetting auto-add state`),g(!1),v.current=0,_.current=e.id}),[e.id]);const w=u.freeProductImageSize||"small",x=u.freeProductImageRatio||"square",C=de((()=>{if(!e.fetchedProducts||0===e.fetchedProducts.length)return uh.warn("[SingleUI] No fetched products for active tier"),null;const t=e.fetchedProducts[0];return uh.info(`[SingleUI] Gift product: ${t.title}`),t}),[e.fetchedProducts]),k=de((()=>{var t,o,r;if(!C)return null;const n=null==(t=e.gifts)?void 0:t[0],i=(null==n?void 0:n.variantIds)||[];if(1===i.length){const e=i[0],t=(null==(o=C.variants)?void 0:o.find((t=>String(e).includes(String(t.id)))))||Xn(C);return uh.info(`[SingleUI] Selected variant (single): ${(null==t?void 0:t.title)||"Default"}`,{variantId:null==t?void 0:t.id}),t}const a=(null==(r=C.variants)?void 0:r.find((e=>e.available)))||Xn(C);return uh.info(`[SingleUI] Selected variant (first available): ${(null==a?void 0:a.title)||"Default"}`,{variantId:null==a?void 0:a.id}),a}),[C,e.gifts]);ae((()=>{if(uh.info("[SingleUI] Auto-add check:",{shouldAutoAdd:t.shouldAutoAdd,isUnlocked:e.isUnlocked,isSelected:e.isSelected,hasAutoAdded:f,hasProduct:!!C,hasVariant:!!k}),!t.shouldAutoAdd)return void uh.info("[SingleUI] Auto-add skipped: shouldAutoAdd is false");if(!e.isUnlocked)return void uh.info("[SingleUI] Auto-add skipped: tier not unlocked");if(e.isSelected)return void uh.info("[SingleUI] Auto-add skipped: tier already selected");if(f)return void uh.info("[SingleUI] Auto-add skipped: already auto-added for this tier");if(!C||!k)return;if(v.current>=3)return void uh.warn("[SingleUI] Auto-add skipped: reached max attempts (3)");const o=setTimeout((async()=>{const t=e.id;v.current+=1;const o=v.current;uh.info(`[SingleUI] 🎁 AUTO-ADDING gift (attempt ${o}): ${C.title} (${k.title||"Default"}) to tier "${t}"`);await r(C,k,t)?_.current===t?(g(!0),v.current=0,uh.info("[SingleUI] ✓ Auto-add complete")):uh.info(`[SingleUI] Auto-add succeeded but tier changed (${t} → ${_.current}), allowing next tier to auto-add`):uh.warn(`[SingleUI] Auto-add blocked or failed (attempt ${o}), will retry if conditions remain valid`)}),1e3);return()=>clearTimeout(o)}),[t.shouldAutoAdd,e.isUnlocked,e.isSelected,f,C,k,e.id,r]);const S=de((()=>{if(C)return async()=>{var t;const o=null==(t=e.gifts)?void 0:t[0],n=(null==o?void 0:o.variantIds)||[];if(rn({event:"gift_selected",payload:{action:"gift_selected",feature_context:{feature_type:"free_gift",feature_id:"free_gift_tiers_1",tier_id:e.id,surface:"cart_drawer",product_id:C.id,variant_id:null==k?void 0:k.id}}}),uh.info(`[SingleUI] Manual Add button clicked for tier "${e.id}"`),n.length>1){uh.info(`[SingleUI] Opening variant picker (${n.length} variants available)`);try{const t=await h(C,{quantity:1,track:{source:"free_product"},giftTierId:e.id,allowedVariantIds:n});t&&t.length>0?uh.info("[SingleUI] ✓ Variant selected from drawer",t):uh.info("[SingleUI] Variant drawer closed without selection")}catch(i){uh.error("[SingleUI] ✗ Error opening variant drawer",i)}}else k&&(uh.info(`[SingleUI] 🎁 MANUALLY ADDING gift: ${C.title} (${k.title||"Default"})`),await r(C,k,e.id),uh.info("[SingleUI] ✓ Manual add complete"))}}),[C,k,e,h,r]);if(!C||!k)return null;const T={backgroundColor:(null==(n=null==u?void 0:u.borderColor)?void 0:n.hex)||"#F0F0FF",dividerColor:null==(i=null==u?void 0:u.splitLineColor)?void 0:i.hex,titleColor:null==(a=null==u?void 0:u.primaryTextColor)?void 0:a.hex,subtitleColor:null==(l=null==u?void 0:u.secondaryTextColor)?void 0:l.hex},$=2===(null==u?void 0:u.designStyle),P=!k.available,A=e.isUnlocked,I=hs(k);null==(d=null==(c=null==(s=e.gifts)?void 0:s[0])?void 0:c.variantIds)||d.length;const R=Ko(hh,{variant:k,product:C,isFree:A,isOutOfStock:P,onAdd:t.showAddButton&&e.isUnlocked&&!e.isSelected?S:void 0,freeProductPriceText:y,title:void 0,subtitle:I,imageSize:w,imageRatio:x,isFreeProduct:!1,compact:$,text:o,showVariantPicker:!1,onOpenVariantPicker:()=>{},variantPickerText:(null==p?void 0:p.chooseText)||"Choose",isFulfilled:e.isSelected});return Ko(b,{children:[Ko(Gs,{className:"cro_cart_gift_tiers_single","data-cro-testid":"gift-tiers-single","data-cro-tier-id":e.id,children:Ko(dh,{colors:T,isCompact:$,className:"cro_cart_gift_tiers_single__wrapper","data-cro-testid":"gift-tiers-single-wrapper",children:$?Ko(mh,{className:"cro_cart_gift_tiers_single__content cro_cart_gift_tiers_single__content--compact",children:R}):Ko(b,{children:[Ko(fh,{className:"cro_cart_gift_tiers_single__header free-text",style:{color:T.titleColor},dangerouslySetInnerHTML:{__html:o}}),R]})})}),Ko(sc,{})]})};var hh=ls(_p)({marginLeft:"0px",marginRight:"0px",display:"flex",maxWidth:"60%",flexDirection:"column","& div":{justifyContent:"flex-start"}}),mh=ls("div")({display:"flex",alignItems:"center",gap:"0.75rem"}),fh=ls("div").withConfig({componentId:"CROCart__sc-s1f2pa-0"})({borderBottomWidth:"1px","--tw-border-opacity":"0.2",paddingBottom:"0.5rem",paddingTop:"0.25rem",textAlign:"center",fontSize:"15px",lineHeight:"22px",fontWeight:"600"});const gh=ls.div.attrs((({className:e})=>({className:e}))).withConfig({componentId:"CROCart__sc-4ess1m-0"})([""," ",""],{display:"flex",height:"100%",width:"30%",minWidth:"100px",flexDirection:"column",alignItems:"center",borderRadius:"0.5rem","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",textAlign:"center"},(({backgroundColor:e})=>e&&`\n background-color: ${e};\n `)),vh=ls.div.attrs((({className:e})=>({className:e}))).withConfig({componentId:"CROCart__sc-4ess1m-1"})(["",""],{position:"relative",marginBottom:"0.5rem",display:"flex",aspectRatio:"1 / 1",width:"100%",alignItems:"center",justifyContent:"center",alignSelf:"center"}),_h=ls.p.attrs((({className:e})=>({className:e}))).withConfig({componentId:"CROCart__sc-4ess1m-2"})(["",""],{marginBottom:"0.25rem",flexGrow:"1",fontSize:"0.875rem",lineHeight:"1.25",fontWeight:"500","--tw-text-opacity":"1",color:"rgb(17 24 39 / var(--tw-text-opacity))"}),yh=ls.div.attrs((({className:e})=>({className:e}))).withConfig({componentId:"CROCart__sc-4ess1m-3"})(["",""],{marginTop:"auto",display:"flex",flexDirection:"column",alignItems:"flex-start"}),wh=ls.p.withConfig({componentId:"CROCart__sc-4ess1m-4"})(["",""],{fontSize:"0.75rem",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))",textDecorationLine:"line-through"}),xh=ls.p.withConfig({componentId:"CROCart__sc-4ess1m-5"})([""," ",""],{marginBottom:"0.25rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"600"},(({freeTextColor:e})=>e&&`\n color: ${e};\n `)),bh=ls.button.withConfig({componentId:"CROCart__sc-4ess1m-6"})([""," "," ",""],{marginTop:"auto",width:"100%",borderWidth:"1px","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",paddingTop:"0.375rem",paddingBottom:"0.375rem",fontSize:"0.875rem",lineHeight:"1.25rem",fontWeight:"500",transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"150ms","&:hover":{opacity:"0.8"}},(({corners:e})=>{switch(e){case"rounded-full":return{borderRadius:"9999px"};case"rounded-sm":return{borderRadius:"0.125rem"};case"square":return{borderRadius:"0px"};default:return{borderRadius:"0.5rem"}}}),(({buttonColor:e})=>e?`\n background-color: white;\n border-color: ${e};\n color: ${e};\n `:{"--tw-border-opacity":"1",borderColor:"rgb(156 163 175 / var(--tw-border-opacity))","--tw-text-opacity":"1",color:"rgb(31 41 55 / var(--tw-text-opacity))","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity))"}})),Ch=ls.div.withConfig({componentId:"CROCart__sc-4ess1m-7"})([""," ",""],{position:"relative",display:"flex",height:"100%",width:"30%",minWidth:"100px",flexDirection:"column",alignItems:"center",justifyContent:"center",borderRadius:"0.5rem",backgroundColor:"rgb(156 163 175 / 0.3)"},(({backgroundColor:e})=>e&&`\n background-color: ${e};\n `)),kh=ls.div.withConfig({componentId:"CROCart__sc-4ess1m-8"})([""," border-radius:inherit;svg{","}"],{position:"absolute",inset:"0px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgb(55 65 81 / 0.3)"},{width:"1rem",height:"1rem",fill:"#fff","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"}),Sh=ls.p.withConfig({componentId:"CROCart__sc-4ess1m-9"})(["",""],{position:"absolute",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"0.25rem",paddingLeft:"0.75rem",paddingRight:"0.75rem",textAlign:"center",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"700","--tw-text-opacity":"1",color:"rgb(255 255 255 / var(--tw-text-opacity))"}),Th=(e,t)=>new er(br(e,t),t||"USD"),$h=e=>{const t=e.split("/").pop();return t?parseInt(t,10):0},Ph=(e,t)=>zo(parseFloat(e),t),Ah=e=>{var t;const o=new Map;e.options.forEach(((e,t)=>{o.set(e.name,t+1)}));const r=e.variants.nodes.map(((t,r)=>{let n=null,i=null,a=null;return t.selectedOptions.forEach((e=>{const t=o.get(e.name);1===t?n=e.value:2===t?i=e.value:3===t&&(a=e.value)})),{id:$h(t.id),title:t.title,option1:n,option2:i,option3:a,sku:"",requires_shipping:!0,taxable:!0,featured_image:t.image?{id:0,product_id:$h(e.id),position:r+1,created_at:"",updated_at:"",alt:t.image.altText||null,width:0,height:0,src:t.image.url,variant_ids:[$h(t.id)]}:null,available:t.availableForSale,name:`${e.title} - ${t.title}`,public_title:t.title,options:t.selectedOptions.map((e=>e.value)),price:Ph(t.price.amount,t.price.currencyCode),weight:0,compare_at_price:t.compareAtPrice?Ph(t.compareAtPrice.amount,t.compareAtPrice.currencyCode):void 0,inventory_management:null,barcode:"",requires_selling_plan:!1,selling_plan_allocations:[]}})),n=Ph(e.priceRange.minVariantPrice.amount,e.priceRange.minVariantPrice.currencyCode),i=Ph(e.priceRange.maxVariantPrice.amount,e.priceRange.maxVariantPrice.currencyCode);return{id:$h(e.id),title:e.title,handle:e.handle,description:e.description,published_at:"",created_at:"",vendor:"",type:"",tags:[],price:n,price_min:n,price_max:i,available:e.availableForSale,price_varies:n!==i,compare_at_price:void 0,compare_at_price_min:0,compare_at_price_max:0,compare_at_price_varies:!1,variants:r,images:e.images.nodes.map(((t,o)=>({id:o,product_id:$h(e.id),position:o+1,created_at:"",updated_at:"",alt:t.altText||"",width:0,height:0,src:t.url,variant_ids:[]}))),featured_image:(null==(t=e.images.nodes[0])?void 0:t.url)||"",options:e.options.map(((e,t)=>({name:e.name,position:t+1,values:e.values}))),url:`/products/${e.handle}`,media:[],requires_selling_plan:!1,selling_plan_groups:[]}},Ih=e=>new Promise((t=>setTimeout(t,e))),Rh=async e=>{var t,o,r,n;const i=null==(o=null==(t=window.CROCartVisual)?void 0:t.productsByGid)?void 0:o[e];if(i)return structuredClone(i);let a=null;for(let s=1;s<=3;s++)try{const t=await fetch("/api/2025-10/graphql.json",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:"\n query GetProduct($id: ID!) {\n product(id: $id) {\n id\n title\n handle\n description\n availableForSale\n options {\n name\n values\n }\n priceRange {\n minVariantPrice { amount currencyCode }\n maxVariantPrice { amount currencyCode }\n }\n images(first: 10) {\n nodes {\n url\n altText\n }\n }\n variants(first: 100) {\n nodes {\n id\n title\n availableForSale\n price { amount currencyCode }\n compareAtPrice { amount currencyCode }\n image {\n url\n altText\n }\n selectedOptions {\n name\n value\n }\n }\n }\n }\n }\n",variables:{id:e}})});if(!t.ok)throw new Error(`HTTP ${t.status}: ${t.statusText}`);const o=await t.json();if(null==(r=o.errors)?void 0:r.length)throw new Error(o.errors[0].message);return(null==(n=o.data)?void 0:n.product)?Ah(o.data.product):(console.warn(`[Storefront API] Product not found: ${e}`),{error:!0})}catch(l){a=l instanceof Error?l:new Error(String(l)),console.warn(`[Storefront API] Attempt ${s}/3 failed for ${e}:`,a.message),s<3&&await Ih(500*s)}return console.error(`[Storefront API] All 3 attempts failed for ${e}:`,a),{error:!0}},Nh=Yo("giftTiers"),Oh=e=>{var t;return(null==(t=e.productData)?void 0:t.handle)||e.handle},Eh=e=>!!e&&!e.error&&"title"in e,Dh=async e=>{const t=e.productId,o=Oh(e);if(o)try{const e=await $o({handle:o});if(Eh(e))return e;Nh.warn(`Could not fetch localized gift product by handle "${o}", falling back to product ID`,e)}catch(r){Nh.warn(`Exception fetching localized gift product by handle "${o}", falling back to product ID`,r)}return t?Rh(t):(Nh.warn("No productId found for gift product",e),{error:!0})},Lh=Yo("giftTiers"),Mh=()=>{const[e,t]=ne(new Map),{cart:o,cartCurrency:r}=mi(),{freeProduct:n}=no(),i=Vs(),a=ue((e=>0===e?{beforeText:i.tier1BeforeThresholdText||i.freeTextBefore,afterText:i.tier1AfterThresholdText||i.freeTextAfter,discountMessage:i.tier1DiscountMessage}:1===e?{beforeText:i.tier2BeforeThresholdText||i.freeTextBefore,afterText:i.tier2AfterThresholdText||i.freeTextAfter,discountMessage:i.tier2DiscountMessage}:{beforeText:i.tier3BeforeThresholdText||i.freeTextBefore,afterText:i.tier3AfterThresholdText||i.freeTextAfter,discountMessage:i.tier3DiscountMessage}),[i]);ae((()=>{(async()=>{const e=null==n?void 0:n.giftTiers;if(!(null==e?void 0:e.length))return void Lh.info("No gift tiers configured");Lh.info(`Fetching products for ${e.length} gift tier(s)`);const o=new Map;for(const t of e){const e=[],n=t.gifts||[];Lh.info(`Tier "${t.id}" (threshold: $${t.threshold}) has ${n.length} gift(s)`);for(const t of n)try{const o=await Dh(t);Eh(o)?(e.push(o),Lh.info(`✓ Fetched product: ${o.title} (${Oh(t)||t.productId})`)):(Lh.error("✗ Failed to fetch gift product",o),console.warn("Failed to fetch gift product",o))}catch(r){Lh.error("✗ Exception fetching gift product",r),console.warn("Failed to fetch gift product",r)}o.set(t.id,e)}t(o),Lh.info("Gift tier products loaded",{productMap:o})})()}),[null==n?void 0:n.giftTiers]);const l=de((()=>{const e=(null==n?void 0:n.isActive)&&"giftTiers"===(null==n?void 0:n.logic);return Lh.info(`Gift tiers active: ${e}`),e}),[null==n?void 0:n.isActive,null==n?void 0:n.logic]),s=de((()=>{if(!n)return!1;const e=!1===n.isActive||"giftTiers"!==n.logic;return e&&Lh.warn("Gift tiers turned off"),e}),[n]),c=de((()=>{const e=(null==n?void 0:n.excludeGiftCards)?er.fromCartTotalExcludingGiftCards(o):er.fromCartTotal(o);return Lh.info(`Cart total${(null==n?void 0:n.excludeGiftCards)?" (excluding gift cards)":""}: ${e.toFormattedString()}`),e}),[o,null==n?void 0:n.excludeGiftCards]),d=de((()=>{var e;return(null==(e=null==o?void 0:o.items)?void 0:e.filter((e=>"1"===Un(e,gn)&&Wn(e,"gift_tier_source"))))||[]}),[null==o?void 0:o.items]),u=de((()=>{const t=null==n?void 0:n.giftTiers;if(!t)return[];Lh.info(`Calculating status for ${t.length} tier(s)`);return t.map(((t,n)=>{var i,a,l;const s=Th(t.threshold,r),u=c.gte(s),p=u?null:s.subtract(c),h=e.get(t.id)||[],m=h.filter((e=>d.some((o=>{var r;const n=Un(o,_n)===t.id,i=null==(r=e.variants)?void 0:r.some((e=>e.id===o.variant_id));return n&&i})))),f=m.length>0,g=1===(null==(i=t.gifts)?void 0:i.length)&&1===(null==(l=null==(a=t.gifts[0])?void 0:a.variantIds)?void 0:l.length),v="1"===Tn(o,`gift_tier_removed_${t.id}`),_=g&&!v;return Lh.info(`Tier "${t.id}" ($${t.threshold}): ${u?"🔓 UNLOCKED":"🔒 LOCKED"} | ${f?"✓ SELECTED":"○ NOT SELECTED"}`,{threshold:s.toFormattedString(),cartTotal:c.toFormattedString(),remaining:null==p?void 0:p.toFormattedString(),selectedProducts:m.length,totalProducts:h.length}),{...t,fetchedProducts:h,gifts:t.gifts,isUnlocked:u,isSelected:f,selectedProducts:m,remainingAmount:p&&p.getAsNativeCurrencyValue()>0?p:void 0,automatic:_,selectable:!_}}))}),[null==n?void 0:n.giftTiers,c,r,d,e,o]),p=de((()=>{const e=u.find((e=>e.isUnlocked&&!e.isSelected));return e?Lh.info(`Current tier: "${e.id}" ($${e.threshold})`):Lh.info("No current tier (all tiers locked or selected)"),e}),[u]),h=de((()=>{if(!p)return null;const e=u.findIndex((e=>e.id===p.id)),t=u[e+1]||null;return t&&Lh.info(`Next tier: "${t.id}" ($${t.threshold})`),t}),[p,u]),m=de((()=>{if(!u.length)return null;for(let e=0;eu.every((e=>e.isSelected))),[u]),g=de((()=>{var e,t,o;if(!m)return"";const r=(null==(e=null==n?void 0:n.giftTiers)?void 0:e.findIndex((e=>e.id===m.id)))??0,i=a(r);if(m.isUnlocked){const e=i.afterText||m.afterThresholdText||m.afterFulfilledMessage;return Fs(e,"{{money}}",(null==(t=m.remainingAmount)?void 0:t.toFormattedString())||"€0.00")}const l=i.beforeText||m.beforeThresholdText||m.beforeFulfilledMessage;return Fs(l,"{{money}}",(null==(o=m.remainingAmount)?void 0:o.toFormattedString())||"€0.00")}),[m,null==n?void 0:n.giftTiers,a]);return{isGiftTiersActive:l,isGiftTiersTurnedOff:s,giftTiersWithStatus:u,currentTier:p,nextTier:h,activeTier:m,giftTiersHeaderText:g,isGiftTiersFulfilled:f,cartTotal:c}},Bh=Yo("giftTiers");let Hh=!1;const zh=Yo("giftTiers"),jh=Yo("giftTiers"),Fh=({tier:e,product:t,isUnlocked:o,isSelected:r,isProductSelected:n,remainingAmount:i,onAdd:a,onRemove:l,colors:s,imageSize:c,imageRatio:d,maxSelections:u,currentSelections:p,currency:h,corners:m,translations:f})=>{const{openVariantDrawer:g}=_i(),v=Xn(t);if(!v)return null;const _=p>=u;return o?Ko(gh,{backgroundColor:null==s?void 0:s.backgroundColor,buttonColor:null==s?void 0:s.buttonColor,freeTextColor:null==s?void 0:s.freeTextColor,className:"cro_cart_gift_tiers__card cro_cart_gift_tiers__card--unlocked","data-cro-testid":"gift-tier-card","data-cro-tier-id":e.id,"data-cro-tier-state":"unlocked","data-cro-product-handle":t.handle,children:[Ko(vh,{className:"cro_cart_gift_tiers__image-container",children:Ko(Mc,{ratio:d,imageSize:c,isRecommendedProduct:!1,className:"cro_cart_gift_tiers__image",children:t.featured_image?Ko(Yh,{src:t.featured_image,alt:t.title,className:"cro_cart_gift_tiers__image-content",onError:e=>{e.currentTarget.style.display="none"}}):t.images&&t.images.length>0?Ko(Qh,{src:t.images[0].src,alt:t.images[0].alt||t.title,className:"cro_cart_gift_tiers__image-content",onError:e=>{e.currentTarget.style.display="none"}}):Ko(Xh,{className:"cro_cart_gift_tiers__placeholder",children:"📦"})})}),Ko(_h,{className:"cro_cart_gift_tiers__title",children:t.title}),Ko(yh,{className:"cro_cart_gift_tiers__price-container",children:[Ko(wh,{className:"cro_cart_gift_tiers__price",children:Ko(Jo,{amount:new er((null==v?void 0:v.price)||0,h)})}),Ko(xh,{freeTextColor:null==s?void 0:s.freeTextColor,className:"cro_cart_gift_tiers__free-text",children:f.freeTextAfter||"Free"})]}),Ko(bh,{onClick:async()=>{var o,r;const n=null==(o=e.gifts)?void 0:o.find((e=>{var o;return(null==(o=e.productData)?void 0:o.handle)===t.handle})),i=(null==n?void 0:n.variantIds)||[];if(rn({event:"gift_selected",payload:{action:"gift_selected",feature_context:{feature_type:"free_gift",feature_id:"free_gift_tiers_1",tier_id:e.id,surface:"cart_drawer",product_id:t.id,variant_id:v.id,currency:h}}}),jh.info(`[MultiUI] Add button clicked for product "${t.title}" in tier "${e.id}"`),i.length>1){jh.info(`[MultiUI] Opening variant picker (${i.length} variants)`);try{const o=await g(t,{quantity:1,track:{source:"free_product"},giftTierId:e.id,allowedVariantIds:i});o&&o.length>0?jh.info("[MultiUI] ✓ Variant selected from drawer",o):jh.info("[MultiUI] Variant drawer closed without selection")}catch(l){jh.error("[MultiUI] ✗ Error with variant drawer",l)}}else if(1===i.length){const o=(null==(r=t.variants)?void 0:r.find((e=>e.id===i[0])))||v;jh.info(`[MultiUI] 🎁 ADDING gift (single variant): ${t.title} (${(null==o?void 0:o.title)||"Default"})`);await a(t,o,e.id)?jh.info("[MultiUI] ✓ Add complete"):jh.warn("[MultiUI] Add blocked or failed")}else{jh.info(`[MultiUI] 🎁 ADDING gift (fallback variant): ${t.title} (${(null==v?void 0:v.title)||"Default"})`);await a(t,v,e.id)?jh.info("[MultiUI] ✓ Add complete"):jh.warn("[MultiUI] Add blocked or failed")}},buttonColor:null==s?void 0:s.buttonColor,corners:m,disabled:_,className:"cro_cart_gift_tiers__button cro_cart_gift_tiers__button--add","data-cro-testid":"gift-tier-add-button","data-cro-tier-id":e.id,"data-cro-product-handle":t.handle,style:{opacity:_?.5:1,cursor:_?"not-allowed":"pointer"},children:_?"Max Selected":f.addText||"Add"})]}):Ko(Ch,{backgroundColor:null==s?void 0:s.backgroundColor,className:"cro_cart_gift_tiers__card cro_cart_gift_tiers__card--locked","data-cro-testid":"gift-tier-card","data-cro-tier-id":e.id,"data-cro-tier-state":"locked","data-cro-product-handle":t.handle,children:Ko(Wh,{className:"cro_cart_gift_tiers__image-container",children:Ko(Mc,{ratio:d,imageSize:c,isRecommendedProduct:!1,className:"cro_cart_gift_tiers__image",children:[t.featured_image?Ko(Uh,{src:t.featured_image,alt:t.title,className:"cro_cart_gift_tiers__image-content",onError:e=>{e.currentTarget.style.display="none"}}):t.images&&t.images.length>0?Ko(Vh,{src:t.images[0].src,alt:t.images[0].alt||t.title,className:"cro_cart_gift_tiers__image-content",onError:e=>{e.currentTarget.style.display="none"}}):Ko(Gh,{className:"cro_cart_gift_tiers__placeholder",children:"📦"}),Ko(kh,{className:"cro_cart_gift_tiers__lock-overlay",children:Ko(Sh,{className:"cro_cart_gift_tiers__unlock-text",children:[Ko(eu,{className:"cro_cart_gift_tiers__lock-icon"}),"Add ",Ko(Jo,{amount:i||new er(0,h)})," to unlock!"]})})]})})})},qh=()=>{const{cartCurrency:e}=mi(),{freeProduct:t,general:o}=no(),{isGiftTiersActive:r,activeTier:n,giftTiersHeaderText:i}=Mh(),a=(e=>{const{cart:t}=mi();return de((()=>{var o,r;if(!e)return zh.info("UI Decision: No active tier"),{uiType:"new",shouldAutoAdd:!1,showAddButton:!1,hasSingleGift:!1,hasSingleVariant:!1};zh.info(`UI Decision for tier "${e.id}"`);const n=(null==(o=e.gifts)?void 0:o.length)||0,i=1===n;if(zh.info(`Gift count: ${n} (${i?"SINGLE":"MULTIPLE"})`),!i)return zh.info("→ Using NEW UI (multiple gifts with Add buttons)"),{uiType:"new",shouldAutoAdd:!1,showAddButton:!0,hasSingleGift:!1,hasSingleVariant:!1};const a=e.gifts[0],l=(null==(r=null==a?void 0:a.variantIds)?void 0:r.length)||0,s=1===l;if(zh.info(`Variant count: ${l} (${s?"SINGLE":"MULTIPLE"})`),s){const o=t,r=`gift_tier_removed_${e.id}`,n=!!o&&"1"===Tn(o,r);return zh.info("Manual removal status: "+(n?"YES (user removed gift)":"NO")),n?(zh.info("→ Using OLD UI with Add button (single gift/variant but user removed it)"),{uiType:"old",shouldAutoAdd:!1,showAddButton:!0,hasSingleGift:!0,hasSingleVariant:!0}):(zh.info("→ Using OLD UI with AUTO-ADD (single gift/variant, will auto-add)"),{uiType:"old",shouldAutoAdd:!0,showAddButton:!1,hasSingleGift:!0,hasSingleVariant:!0})}return zh.info("→ Using OLD UI with Add button (single gift, multiple variants need selection)"),{uiType:"old",shouldAutoAdd:!1,showAddButton:!0,hasSingleGift:!0,hasSingleVariant:!1}}),[e,t])})(n),{onAdd:l,onRemove:s}=(()=>{const{addProducts:e,cart:t,refetch:o,changeProductQty:r,removeMultipleProducts:n}=mi(),{freeProduct:i}=no();return ae((()=>{(async()=>{var e,o,n;const{freeProduct:i}=no.getState();if((null==i?void 0:i.isActive)&&"giftTiers"===(null==i?void 0:i.logic)){if(null==(o=null==i?void 0:i.giftTiers)?void 0:o.length){const e=i.giftTiers.map((e=>e.id));Bh.info(`[Sync] Checking for orphaned tier products (${e.length} active tiers)`);const o=null==(n=null==t?void 0:t.items)?void 0:n.filter((e=>Wn(e,"gift_tier_source")));if(!(null==o?void 0:o.length))return;for(let t of o){const o=Un(t,_n);o&&!e.includes(o)&&(Bh.info(`[Sync] 🗑️ REMOVING (tier "${o}" no longer exists): ${t.title}`),await r(t,0,{track:{source:"free_product_sync"}}))}}}else{Bh.info("[Sync] Gift tiers turned off - cleaning up cart");const o=null==(e=null==t?void 0:t.items)?void 0:e.filter((e=>Wn(e,"gift_tier_source")));if(!(null==o?void 0:o.length))return void Bh.info("[Sync] No gift tier products to remove");Bh.info(`[Sync] Removing ${o.length} gift tier product(s)`,{items:o.map((e=>e.title))});for(let e of o)Bh.info(`[Sync] 🗑️ REMOVING (feature off): ${e.title}`),await r(e,0,{track:{source:"free_product_sync"}});Bh.info("[Sync] ✓ Cleanup complete")}})()}),[null==t?void 0:t.items,r,i]),ae((()=>{if(Hh)return void Bh.info("[Sync] Threshold check skipped: sync already in progress");const e=setTimeout((async()=>{var e,o;if(Hh)return void Bh.warn("[Sync] Threshold check aborted: sync started by another operation");const{freeProduct:r}=no.getState();if(!(null==r?void 0:r.isActive)||"giftTiers"!==(null==r?void 0:r.logic)||!(null==(e=null==r?void 0:r.giftTiers)?void 0:e.length))return;Bh.info("[Sync] Threshold check: Evaluating gift tier items for auto-removal");const i=null==(o=null==t?void 0:t.items)?void 0:o.filter((e=>Wn(e,"gift_tier_source")));if(!(null==i?void 0:i.length))return void Bh.info("[Sync] No gift tier products in cart");Bh.info(`[Sync] Found ${i.length} gift tier product(s) in cart`);const a=(null==r?void 0:r.excludeGiftCards)?er.fromCartTotalExcludingGiftCards(t):er.fromCartTotal(t);Bh.info(`[Sync] Current cart total${(null==r?void 0:r.excludeGiftCards)?" (excluding gift cards)":""}: ${a.toFormattedString()}`);const l=[],s=[];for(let n of i){const e=Un(n,_n);if(!e){Bh.warn(`[Sync] Cart item "${n.title}" missing tier ID`);continue}const o=r.giftTiers.find((t=>t.id===e));if(!o){Bh.warn(`[Sync] Tier "${e}" not found in config for item "${n.title}"`);continue}const i=Th(o.threshold,t.currency),c=a.gte(i);if(Bh.info(`[Sync] Checking "${n.title}" from tier "${e}" ($${o.threshold}):`,{cartTotal:a.toFormattedString(),threshold:i.toFormattedString(),isUnlocked:c}),!c){l.push(n);const e=` - ${n.title} (${n.variant_title||"Default"}) from Tier ${o.threshold} [Cart: ${a.toFormattedString()} < Threshold: ${i.toFormattedString()}]`;s.push(e),Bh.info(`[Sync] ⚠️ WILL REMOVE: ${e}`)}}if(l.length>0){Hh=!0,Bh.info(`[Sync] 🔒 Sync lock acquired - auto-removing ${l.length} gift(s)`);try{Bh.info(`[Sync] 🗑️ AUTO-REMOVING ${l.length} gift(s) (threshold not met):`),s.forEach((e=>Bh.info(e))),await n(l,{track:{source:"free_product_sync"}}),Bh.info("[Sync] ✓ Auto-removal complete")}catch(c){Bh.error("[Sync] ✗ Auto-removal failed",c)}finally{Hh=!1,Bh.info("[Sync] 🔓 Sync lock released")}}else Bh.info("[Sync] ✓ All gift tier thresholds still met - no removals needed")}),1e3);return()=>clearTimeout(e)}),[t,null==t?void 0:t.items,null==t?void 0:t.total_price,i,n]),{onAdd:ue((async(r,n,i)=>{if(Hh)return Bh.warn("[GiftTiersSync] onAdd blocked: sync already in progress"),!1;Hh=!0,Bh.info(`[GiftTiersSync] 🔒 Sync lock acquired - onAdd: ${r.title} (${n.title||"Default"}) for tier "${i}"`);try{const r=`gift_tier_removed_${i}`;if(!!t&&"1"===Tn(t,r)&&(Bh.info(`[GiftTiersSync] Clearing removal attribute for tier "${i}"`),setTimeout((async()=>{const{removeHiddenCartAttribute:e}=mi.getState();await e(r)}),2e3)),Bh.info("[GiftTiersSync] Adding product to cart with tier properties..."),!(await e([{id:n.id,quantity:1,properties:{...bn(gn,"1"),...bn("gift_tier_source","1"),...bn(_n,i)}}],{track:{source:"free_product"}})))return Bh.error("[GiftTiersSync] ✗ Failed to add product to cart"),!1;Bh.info("[GiftTiersSync] ✓ Product added, refetching cart...");const a=await o(),l=e=>{var t;return!!(null==(t=null==e?void 0:e.items)?void 0:t.some((e=>{if(!e)return!1;const t=e.variant_id===n.id,o=String(Un(e,_n))===String(i),r=Wn(e,"gift_tier_source");return t&&o&&r})))},s=e=>new Promise((t=>setTimeout(t,e)));let c=a,d=l(c);if(!d){Bh.warn("[GiftTiersSync] Gift line missing after refetch – retrying verification");const e=2;for(let t=0;t{var i;if(Hh)Bh.warn("[GiftTiersSync] onRemove blocked: sync already in progress");else{Hh=!0,Bh.info(`[GiftTiersSync] 🔒 Sync lock acquired - onRemove: ${r.title} (${n.title||"Default"})`);try{const r=null==(i=null==t?void 0:t.items)?void 0:i.find((e=>e.variant_id===n.id));if(r)if(Bh.info(`[GiftTiersSync] Removing product from cart (qty: ${r.quantity})...`),await e([{id:n.id,quantity:-r.quantity}],{track:{source:"free_product"}})){Bh.info("[GiftTiersSync] ✓ Product removed, refetching cart...");const e=await o();ri({operation:"delete",originalProduct:r,requestedQty:r.quantity,originalCart:t,updatedCart:e}),Bh.info("[GiftTiersSync] ✓ onRemove complete")}else Bh.error("[GiftTiersSync] ✗ Failed to remove product");else Bh.warn("[GiftTiersSync] Cannot remove: cart item not found")}catch(a){throw Bh.error("[GiftTiersSync] ✗ onRemove failed",a),a}finally{Hh=!1,Bh.info("[GiftTiersSync] 🔓 Sync lock released")}}}),[e,t,o])}})(),c=Vs(),d=t.freeProductImageSize||"small",u=t.freeProductImageRatio||"square",p=null==o?void 0:o.corners,h=de((()=>{var e,o,r,n,i,a;return{backgroundColor:(null==(e=null==t?void 0:t.giftTierBackgroundColor)?void 0:e.hex)||(null==(o=null==t?void 0:t.borderColor)?void 0:o.hex)||"#F0F0FF",dividerColor:null==(r=null==t?void 0:t.splitLineColor)?void 0:r.hex,titleColor:null==(n=null==t?void 0:t.primaryTextColor)?void 0:n.hex,subtitleColor:null==(i=null==t?void 0:t.secondaryTextColor)?void 0:i.hex,buttonColor:(null==(a=null==t?void 0:t.giftTierButtonColor)?void 0:a.hex)||"#22C55E",freeTextColor:"#22C55E"}}),[t]);if(!r||(null==t?void 0:t.hideOfferBox))return null;if(!n||0===n.fetchedProducts.length)return null;const m=2===(null==t?void 0:t.designStyle);return"old"===a.uiType?Ko(ph,{activeTier:n,uiDecision:a,giftTiersHeaderText:i,onAdd:l}):Ko(b,{children:[Ko(Gs,{className:"cro_cart_gift_tiers","data-cro-testid":"gift-tiers",children:Ko(dh,{colors:h,isCompact:m,className:"cro_cart_gift_tiers__wrapper","data-cro-testid":"gift-tiers-wrapper",children:Ko("div",{className:"cro_cart_gift_tiers__content",children:[Ko(Kh,{className:"cro_cart_gift_tiers__header",style:{color:h.titleColor},dangerouslySetInnerHTML:{__html:i}}),Ko(Jh,{className:"cro_cart_gift_tiers__tiers",children:n.fetchedProducts.map((r=>{const i=n.selectedProducts.length,a=n.selectedProducts.some((e=>e.id===r.id));return Ko(Fh,{tier:n,product:r,isUnlocked:n.isUnlocked,isSelected:n.isSelected,isProductSelected:a,remainingAmount:n.remainingAmount,onAdd:l,onRemove:s,colors:h,imageSize:d,imageRatio:u,maxSelections:3,currentSelections:i,currency:e,corners:p,translations:{addText:c.addText||(null==o?void 0:o.addText)||"Add",freeTextAfter:c.freeTextAfter||(null==t?void 0:t.textAfter)||"Free"}},`${n.id}-${r.id}`)}))})]})})}),Ko(sc,{})]})};var Wh=ls("div")({position:"relative",marginBottom:"0.75rem",display:"flex",alignItems:"center",justifyContent:"center"}),Uh=ls("img")({height:"100%",width:"100%",objectFit:"cover",opacity:"0.2"}),Vh=ls("img")({height:"100%",width:"100%",objectFit:"cover",opacity:"0.2"}),Gh=ls("span")({fontSize:"1.875rem",lineHeight:"2.25rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))",opacity:"0.3"}),Yh=ls("img")({height:"100%",width:"100%",objectFit:"cover"}),Qh=ls("img")({height:"100%",width:"100%",objectFit:"cover"}),Xh=ls("span")({fontSize:"0.75rem",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))"}),Kh=ls("div")({paddingBottom:"0.5rem",paddingTop:"0.25rem",textAlign:"left",fontSize:"15px",lineHeight:"22px",fontWeight:"600"}),Jh=ls("div").withConfig({componentId:"CROCart__sc-2vsn71-0"})({display:"flex",flexWrap:"wrap",justifyContent:"center",gap:"0.75rem"});let Zh=!1;const em=()=>{var e,t;const[o,r]=ne([]),{cart:n}=mi(),{freeProduct:i}=no();ae((()=>{(async()=>{var e;if(!(null==(e=null==i?void 0:i.couples)?void 0:e.length))return;const t=[];i.couples.forEach((({freeItem:e,logicItem:o})=>{t.push(new Promise((async(t,r)=>{var n,i;const a=$o({handle:o.handle}),l=$o({handle:e.handle}),s=await Promise.all([a,l]);(null==(n=s[0])?void 0:n.error)||(null==(i=s[1])?void 0:i.error)?r():t({ifProduct:{...s[0],ifVariants:null==o?void 0:o.variants},thenProduct:{...s[1],thenVariant:null==e?void 0:e.variants[0]}})})))}));const o=(await Promise.allSettled(t)).map((e=>"fulfilled"===e.status&&e.value)).filter((e=>e));r(o)})()}),[i]);const a=de((()=>(null==i?void 0:i.isActive)&&"ifThen"===(null==i?void 0:i.logic)),[null==i?void 0:i.isActive,null==i?void 0:i.logic]),l=de((()=>!!i&&(!1===i.isActive||"ifThen"!==i.logic)),[i]),s=de((()=>{var e;if(!o)return;const t=new Map,r=new Set,i=new Set,a=(e,o)=>{return!(n=o,t.has(n)||(r=e.thenProduct.thenVariant,i.has(r.id)));var r,n},l=[];return null==(e=null==n?void 0:n.items)||e.forEach((e=>{o.forEach(((o,n)=>{var s;a(o,n)&&(null==(s=o.ifProduct.ifVariants)||s.forEach((a=>{if(vs(a,e.variant_id)){if(s=e.key,r.has(s))return;t.set(n,e.key),r.add(e.key),i.add(o.thenProduct.thenVariant.id),l.push({...o,activatingIfVariant:a})}var s})))}))})),[l,t]}),[null==n?void 0:n.items,o]),c=de((()=>{const[e,t]=s;return o.filter(((e,o)=>!t.has(o)))}),[s,o]),d=de((()=>0===(null==c?void 0:c.length)),[null==c?void 0:c.length]),u=de((()=>null==c?void 0:c[0]),[c]),p=de((()=>{var e,t;return d?null==(e=null==o?void 0:o[0])?void 0:e.thenProduct:(null==c?void 0:c.length)?null==(t=null==c?void 0:c[0])?void 0:t.ifProduct:void 0}),[o,d,c]),h=de((()=>{if(!d)return null==c?void 0:c[0]}),[d,c]),m=de((()=>{var e,t;if(d)return;let o=Fs(null==i?void 0:i.textBefore,"{{qualifyingProduct}}",null==(e=null==u?void 0:u.ifProduct)?void 0:e.title);return o=Fs(o,"{{giftProduct}}",null==(t=null==u?void 0:u.thenProduct)?void 0:t.title),o}),[null==(e=null==u?void 0:u.ifProduct)?void 0:e.title,null==(t=null==u?void 0:u.thenProduct)?void 0:t.title,null==i?void 0:i.textBefore,d]),{makeFreeProductProperties:f}=(({ifThenProductPairs:e,isIfThenTurnedOff:t,isIfThenActive:o,activeIfThenRulesWithTriggerMap:r,freeProductQty:n})=>{const{cart:i,addProducts:a,changeProductQty:l,refetch:s}=mi(),[c]=r,d=de((()=>o&&!!e&&void 0!==c&&!!(null==i?void 0:i.items)),[o,e,c,null==i?void 0:i.items]),u=e=>({...bn(vn,e)});return ae((()=>{(async()=>{var e;if(t){const t=null==(e=null==i?void 0:i.items)?void 0:e.filter((e=>Wn(e,vn)));if(!t)return;for(let e of t)await l(e,0,{track:{source:"free_product_sync"}})}})()}),[null==i?void 0:i.items,l,t]),ae((()=>{!d||d&&Zh||(async()=>{var e;if(Zh)return;const t=[],o=[];if(c.forEach(((e,o)=>{var r;(null==(r=null==i?void 0:i.items)?void 0:r.find((t=>vs(e.thenProduct.thenVariant,t.variant_id)&&Un(t,vn)===_s(e.activatingIfVariant))))||t.push({ifProductVariantId:_s(e.activatingIfVariant),thenProductVariantId:_s(e.thenProduct.thenVariant)})})),null==(e=null==i?void 0:i.items)||e.forEach((e=>{Un(e,vn)&&c.every((t=>!vs(t.thenProduct.thenVariant,e.variant_id)))&&o.push(e)})),t.length&&(Zh=!0,await a([...t.map((e=>({id:e.thenProductVariantId,quantity:n,properties:u(e.ifProductVariantId)})))],{track:{source:"free_product_sync"}}),await s(),Zh=!1),o.length){Zh=!0;for(let e of o)await l(e,0,{track:{source:"free_product_sync"}})}Zh=!1})()}),[d,null==i?void 0:i.item_count]),{makeFreeProductProperties:u}})({ifThenProductPairs:o,isIfThenActive:a,isIfThenTurnedOff:l,activeIfThenRulesWithTriggerMap:s,freeProductQty:1});return{isIfThenActive:a,isIfThenFulfilled:d,ifThenProduct:p,ifThenHeaderText:m,featuredUnfulfilledIfThenPair:h,makeFreeProductProperties:f,ifThenProductPairs:o,__activeIfThenRulesWithTriggerMap:s,__isIfThenTurnedOff:l}};let tm=!1;const om=()=>{const[e,t]=ne(),{cart:o,cartCurrency:r}=mi(),{freeProduct:n}=no(),i=Vs().freeTextBefore||(null==n?void 0:n.textBefore),a=de((()=>new er(zo(+(null==n?void 0:n.priceRule)||0,r),r)),[n,r]);ae((()=>{(async()=>{var e;if(!(null==(e=null==n?void 0:n.freeProduct)?void 0:e.id))return;const o=await Rh(n.freeProduct.id);o.error||t(o)})()}),[n]);const l=de((()=>{var t;return null==(t=null==e?void 0:e.variants)?void 0:t.find((e=>{var t,o;return vs(null==(o=null==(t=n.freeProduct)?void 0:t.variants)?void 0:o[0],e.id)}))}),[n,e]),s=de((()=>(null==n?void 0:n.isActive)&&"priceRule"===(null==n?void 0:n.logic)),[null==n?void 0:n.isActive,null==n?void 0:n.logic]),c=de((()=>!!n&&(!1===n.isActive||"priceRule"!==n.logic)),[n]),d=de((()=>{const e=(null==n?void 0:n.excludeGiftCards)?er.fromCartTotalExcludingGiftCards(o):er.fromCartTotal(o),t=a.subtract(e);return t&&t.getAsNativeCurrencyValue()>0?t:t.nullify()}),[o,a,null==n?void 0:n.excludeGiftCards]),u=de((()=>{const e=(null==n?void 0:n.excludeGiftCards)?er.fromCartTotalExcludingGiftCards(o):er.fromCartTotal(o);return s&&e.gte(a)}),[o,s,a,null==n?void 0:n.excludeGiftCards]),p=de((()=>!u&&Fs(i,"{{money}}",d.toFormattedString())),[i,u,d]),{syncFreeProduct:h}=(({isPriceRuleFulfilled:e,priceRuleVariant:t,isPriceRuleActive:o,isPriceRuleTurnedOff:r,freeProductQty:n,priceRuleProduct:i})=>{const{cart:a,addProducts:l,changeProductQty:s,refetch:c}=mi(),{freeProduct:d}=no(),{isInBuilder:u}=no(),p=de((()=>o&&!!t&&!!(null==a?void 0:a.items)),[o,t,null==a?void 0:a.items]);ae((()=>{(async()=>{var e;if(r){const t=null==(e=null==a?void 0:a.items)?void 0:e.filter((e=>Wn(e,gn)&&!Wn(e,"gift_tier_source")));if(!t)return;for(let e of t)await s(e,0,{track:{source:"free_product_sync"}})}})()}),[null==a?void 0:a.items,s,r]),ae((()=>{(async()=>{var o;const r=null==(o=null==a?void 0:a.items)?void 0:o.find((e=>e.variant_id===(null==t?void 0:t.id)&&Wn(e,gn)&&!Wn(e,"gift_tier_source")));!e&&r&&await s(r,0,{track:{source:"free_product_sync"}})})()}),[e,null==a?void 0:a.items,t,s]);const h=ue((async t=>{var o;if(tm)return;const r=null==(o=null==a?void 0:a.items)?void 0:o.find((e=>e.variant_id===(null==t?void 0:t.id)&&Wn(e,gn)&&!Wn(e,"gift_tier_source")));tm=!0,e&&!r?(await l([{id:t.id,quantity:n,properties:{...bn(gn,"1")}}],{track:{source:"free_product_sync"}}),await c()):!e&&r&&await s(r,0,{track:{source:"free_product_sync"}}),tm=!1}),[l,null==a?void 0:a.items,s,n,e,c]);return ae((()=>{if(!p||tm)return;const e=setTimeout((()=>{h(t)}),1e3);return()=>clearTimeout(e)}),[p,null==a?void 0:a.item_count,d.freeProduct]),ae((()=>{tm||!u||!i||setTimeout((async()=>{var t,o;const r=null==(t=null==a?void 0:a.items)?void 0:t.find((e=>Wn(e,gn)&&!Wn(e,"gift_tier_source")));if(tm)return;const d=e&&!r,u=!e&&r;tm=!0;try{d?(await l([{id:null==(o=null==i?void 0:i.variants[0])?void 0:o.id,quantity:n,properties:{...bn(gn,"1")}}],{track:{source:"free_product_sync"}}),c()):u&&await s(r,0,{track:{source:"free_product_sync"}})}catch(p){}tm=!1}),1e3)}),[u,e,i,a,l,s,n,c]),{syncFreeProduct:h}})({isPriceRuleFulfilled:u,priceRuleVariant:l,isPriceRuleActive:s,isPriceRuleTurnedOff:c,freeProductQty:1,priceRuleProduct:e});return{isPriceRuleActive:s,isPriceRuleFulfilled:u,priceRuleProduct:e,priceRuleVariant:l,priceRuleHeaderText:p,priceRuleThreshold:a,syncFreeProduct:h}},rm=()=>{const{addProducts:e,cart:t,refetch:o}=mi(),{freeProduct:r,general:n}=no(),i=Vs(),[a,l]=ne(),[s,c]=ne(!1),d=pc(),u=_i((e=>e.isCartDrawerOpen)),{isPriceRuleActive:p,isPriceRuleFulfilled:h,priceRuleProduct:m,priceRuleVariant:f,priceRuleHeaderText:g,priceRuleThreshold:v,syncFreeProduct:_}=om(),{isIfThenActive:y,isIfThenFulfilled:w,ifThenHeaderText:x,featuredUnfulfilledIfThenPair:C,makeFreeProductProperties:k}=em(),{isGiftTiersActive:S,activeTier:T,cartTotal:$}=Mh(),P=r.freeProductImageSize||"small",A=r.freeProductImageRatio||"square",[I,R]=ne(!1),N=(i.freeTextAfter||r.textAfterOfferBox,i.freeTextAfter||(null==r?void 0:r.textAfter)),O=de((()=>p&&m?m:y?w?null==C?void 0:C.thenProduct:null==C?void 0:C.ifProduct:void 0),[C,y,w,p,m]);ae((()=>{var e;if(!O)return;const o=null==(e=null==t?void 0:t.items)?void 0:e.some((e=>e.product_id===O.id&&(Wn(e,gn)||Wn(e,vn))));c(o)}),[t,O]);const E=!1,D=de((()=>{if(!y||!C)return;const r=a||Xn(C.ifProduct),n=a||Xn(C.thenProduct);if(!r||!n)return;return async()=>{var i;rn({event:"gift_selected",payload:{action:"gift_selected",cart:t,feature_context:{feature_type:"free_gift",feature_id:"free_gift_legacy_1",surface:"cart_drawer",product_id:null==(i=C.thenProduct)?void 0:i.id,variant_id:n.id,currency:null==t?void 0:t.currency}}});const a=await e([{id:null==n?void 0:n.id,quantity:1,properties:k(r.id)},{id:null==r?void 0:r.id,quantity:1}],{track:{source:"free_product"}});if(!a)return;const l=await o();return ri({operation:"add",originalProduct:r,requestedQty:1,originalCart:t,updatedCart:l,source:"free_product"}),a}}),[e,t,C,y,k,o,a]),L=de((()=>p&&m?f:y?Xn(w?null==C?void 0:C.thenProduct:null==C?void 0:C.ifProduct):void 0),[null==C?void 0:C.ifProduct,null==C?void 0:C.thenProduct,y,w,p,m,f]),M=!(O&&!s&&!(null==r?void 0:r.hideOfferBox)&&!(p&&h||y&&w));if(ae((()=>{var e;if(!u||!(null==r?void 0:r.isActive)||!S&&M)return;if(S&&(r.hideOfferBox||!T||0===T.fetchedProducts.length))return;const o=O,n=S?[kr({tier:T,cartValueCents:$.getAsNativeCurrencyValue(),currency:(null==t?void 0:t.currency)||"USD"})]:[{feature_type:"free_gift",feature_id:"free_gift_legacy_1",surface:"cart_drawer",product_id:null==o?void 0:o.id,variant_id:null==(e=Xn(o))?void 0:e.id,threshold_cents:p?v.getAsNativeCurrencyValue():void 0,cart_value_cents:$.getAsNativeCurrencyValue(),remaining_cents:p?Math.max(0,v.getAsNativeCurrencyValue()-$.getAsNativeCurrencyValue()):void 0,currency:null==t?void 0:t.currency,eligible:h||w,rendered:!0}];rn({event:"feature_exposed",payload:{cart:t,exposure_render_id:d,feature_exposures:n}})}),[T,t,$,d,O,null==r?void 0:r.hideOfferBox,null==r?void 0:r.isActive,u,S,w,p,h,v,M]),S)return Ko(qh,{});if(M)return null;const B=y?x:g,H={backgroundColor:null==r?void 0:r.borderColor.hex,dividerColor:null==r?void 0:r.splitLineColor.hex,titleColor:null==r?void 0:r.primaryTextColor.hex,subtitleColor:null==r?void 0:r.secondaryTextColor.hex},z=2===(null==r?void 0:r.designStyle),j=L?!(null==L?void 0:L.available):!(null==O?void 0:O.available),F=p||w,q=hs(Xn(O)),W=y?w:h,U=Ko(nm,{variant:L,product:O,isFree:F,isOutOfStock:j,onAdd:D,freeProductPriceText:N,title:false,subtitle:q,imageSize:P,imageRatio:A,isFreeProduct:!0,compact:z,text:B,showVariantPicker:E,onOpenVariantPicker:()=>R(!0),variantPickerText:(null==n?void 0:n.chooseText)||"Choose",isFulfilled:W});return Ko(b,{children:[Ko(Gs,{className:"cro_cart_free_gift","data-cro-testid":"free-gift",children:Ko(dh,{colors:H,isCompact:z,className:"cro_cart_free_gift__wrapper","data-cro-testid":"free-gift-wrapper",children:z?Ko(im,{className:"cro_cart_free_gift__content cro_cart_free_gift__content--compact",children:U}):Ko(b,{children:[Ko(am,{className:"cro_cart_free_gift__header free-text",dangerouslySetInnerHTML:{__html:B}}),U]})})}),Ko(sc,{}),E]})};var nm=ls(_p)({marginLeft:"0px",marginRight:"0px",display:"flex",maxWidth:"60%",flexDirection:"column","& div":{justifyContent:"flex-start"}}),im=ls("div")({display:"flex",alignItems:"center",gap:"0.75rem"}),am=(ls("div")({marginBottom:"0.75rem",borderBottomWidth:"1px","--tw-border-opacity":"0.2",paddingBottom:"0.5rem",paddingTop:"0.25rem",textAlign:"center",fontSize:"15px",lineHeight:"22px",fontWeight:"600"}),ls("div").withConfig({componentId:"CROCart__sc-pry16r-0"})({borderBottomWidth:"1px","--tw-border-opacity":"0.2",paddingBottom:"0.5rem",paddingTop:"0.25rem",textAlign:"center",fontSize:"15px",lineHeight:"22px",fontWeight:"600"}));const lm=()=>{var e,t,o,r,n;const{closeCartDrawer:i}=_i(),{itemsCount:a}=mi(),{general:l,isInBuilder:s}=no(),{generalHeaderText:c}=Vs(),d=c||(null==l?void 0:l.generalHeaderText),u=null==l?void 0:l.isItemsCountActive,p=2===((null==l?void 0:l.headerDesign)||1),h={itemsCountTextColor:null==(e=null==l?void 0:l.itemsCountTextColor)?void 0:e.hex,headerTextColor:null==(t=null==l?void 0:l.headerTextColor)?void 0:t.hex,iconColor:null==(o=null==l?void 0:l.iconColor)?void 0:o.hex,headerBackgroundColor:null==(r=null==l?void 0:l.headerBackgroundColor)?void 0:r.hex,headerRuleColor:null==(n=null==l?void 0:l.headerRuleColor)?void 0:n.hex},m=ue((()=>{s||i()}),[i,s]);return Ko(sm,{iconColor:h.iconColor,className:"cro_cart_header",$_css2:[{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between"},p&&{position:"relative",minHeight:"60px",justifyContent:"center"},h.headerBackgroundColor&&ns(["margin:0;padding:0.75rem;background-color:",";"],h.headerBackgroundColor),h.headerRuleColor&&{position:"relative"}],children:[Ko("div",{className:"cro_cart_header__title",children:Ko(cm,{className:"cro_cart_header__text",$_css3:[{fontSize:"24px",lineHeight:"32px",fontWeight:"600"},{color:h.headerTextColor}],children:[d," ",u&&Ko(dm,{className:"cro_cart_header__count",$_css4:[{"--tw-text-opacity":"1",color:"rgb(124 124 128 / var(--tw-text-opacity))"},{color:h.itemsCountTextColor}],children:["(",a,")"]})]})}),h.headerRuleColor&&Ko(um,{className:"cro_cart_header__rule","aria-hidden":"true",$_css5:ns(["background:",";border-radius:2px;bottom:0;height:5px;left:16px;position:absolute;right:16px;"],h.headerRuleColor)}),Ko(pm,{onClick:m,className:"cro_cart_header__close",$_css6:[p&&ns(["position:absolute;left:14px;top:50%;transform:translateY(-50%);"])],children:Ko(uc,{})})]})};var sm=ls(Gs)`${e=>e.$_css2}`,cm=ls("h4")`${e=>e.$_css3}`,dm=ls("span")`${e=>e.$_css4}`,um=ls("span")`${e=>e.$_css5}`,pm=ls("button").withConfig({componentId:"CROCart__sc-m92ltv-0"})(["",""],(e=>e.$_css6));const hm=ls.div.withConfig({componentId:"CROCart__sc-1q0uzsj-0"})((({size:e,itemColor:t})=>[{display:"flex",maxWidth:"68.2px",alignItems:"center",justifyContent:"center",borderRadius:"0.25rem",borderWidth:"1px",padding:"0.5rem"},ns` svg { width: 100%; height: auto; } `,t&&ns` background-color: ${t}; `,"small"===e&&ns` height: 36px; svg { transform: scale(0.6); } `,"medium"===e&&ns` height: 42px; svg { transform: scale(0.8); } `,"large"===e&&ns` height: 56.28px; `])),mm=ls.div.withConfig({componentId:"CROCart__sc-1q0uzsj-1"})((({alignment:e})=>[{display:"flex",width:"100%",flexWrap:"wrap",gap:"0.5rem"},"left"===e&&{justifyContent:"flex-start"},"center"===e&&{justifyContent:"center"},"right"===e&&{justifyContent:"flex-end"}])),fm=()=>{var e,t;const{paymentProviders:o}=no(),r=Vs();if(!o||!o.isActive)return null;const n=r.paymentHeaderText||(null==o?void 0:o.headerText),i=null==(e=null==o?void 0:o.itemBackgroundColor)?void 0:e.hex;return Ko(b,{children:[Ko(Gs,{className:"cro_cart_payment_providers","data-cro-testid":"payment-methods",children:[Ko(gm,{className:"cro_cart_payment_providers__title",children:n}),Ko(mm,{className:"cro_cart_payment_providers__wrapper",alignment:o.alignment,children:null==(t=o.badges)?void 0:t.map(((e,t)=>Ko(hm,{className:"cro_cart_payment_providers__icon",itemColor:i,xmlns:"http://www.w3.org/2000/svg",dangerouslySetInnerHTML:{__html:e},size:null==o?void 0:o.size},t)))})]}),Ko(sc,{})]})};var gm=ls("div").withConfig({componentId:"CROCart__sc-14m6s9z-0"})({fontSize:"20px",lineHeight:"28px",fontWeight:"600"});const vm=e=>y("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y("path",{d:"M9 14.25L15 8.25M19.5 4.757V21.75L15.75 20.25L12 21.75L8.25 20.25L4.5 21.75V4.757C4.5 3.649 5.306 2.7 6.407 2.572C10.1232 2.14063 13.8768 2.14063 17.593 2.572C18.693 2.7 19.5 3.649 19.5 4.757ZM9.75 9H9.758V9.008H9.75V9ZM10.125 9C10.125 9.09945 10.0855 9.19484 10.0152 9.26516C9.94484 9.33549 9.84946 9.375 9.75 9.375C9.65054 9.375 9.55516 9.33549 9.48483 9.26516C9.41451 9.19484 9.375 9.09945 9.375 9C9.375 8.90054 9.41451 8.80516 9.48483 8.73483C9.55516 8.66451 9.65054 8.625 9.75 8.625C9.84946 8.625 9.94484 8.66451 10.0152 8.73483C10.0855 8.80516 10.125 8.90054 10.125 9ZM14.25 13.5H14.258V13.508H14.25V13.5ZM14.625 13.5C14.625 13.5995 14.5855 13.6948 14.5152 13.7652C14.4448 13.8355 14.3495 13.875 14.25 13.875C14.1505 13.875 14.0552 13.8355 13.9848 13.7652C13.9145 13.6948 13.875 13.5995 13.875 13.5C13.875 13.4005 13.9145 13.3052 13.9848 13.2348C14.0552 13.1645 14.1505 13.125 14.25 13.125C14.3495 13.125 14.4448 13.1645 14.5152 13.2348C14.5855 13.3052 14.625 13.4005 14.625 13.5Z",stroke:"#3D3DDB",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),_m=e=>y("svg",{width:16,height:16,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y("path",{d:"M14 7.5V13C14 13.2652 13.8946 13.5196 13.7071 13.7071C13.5196 13.8946 13.2652 14 13 14H3.5C3.23478 14 2.98043 13.8946 2.79289 13.7071C2.60536 13.5196 2.5 13.2652 2.5 13V7.5M8 3.25C8 2.90388 7.89736 2.56554 7.70507 2.27775C7.51278 1.98997 7.23947 1.76566 6.9197 1.63321C6.59993 1.50076 6.24806 1.4661 5.90859 1.53363C5.56913 1.60115 5.25731 1.76782 5.01256 2.01256C4.76782 2.25731 4.60115 2.56913 4.53363 2.90859C4.4661 3.24806 4.50076 3.59993 4.63321 3.9197C4.76566 4.23947 4.98997 4.51278 5.27775 4.70507C5.56554 4.89736 5.90388 5 6.25 5H8M8 3.25V5M8 3.25C8 2.90388 8.10264 2.56554 8.29493 2.27775C8.48722 1.98997 8.76053 1.76566 9.0803 1.63321C9.40007 1.50076 9.75194 1.4661 10.0914 1.53363C10.4309 1.60115 10.7427 1.76782 10.9874 2.01256C11.2322 2.25731 11.3989 2.56913 11.4664 2.90859C11.5339 3.24806 11.4992 3.59993 11.3668 3.9197C11.2343 4.23947 11.01 4.51278 10.7222 4.70507C10.4345 4.89736 10.0961 5 9.75 5H8M8 5V14M2.25 7.5H14.25C14.664 7.5 15 7.164 15 6.75V5.75C15 5.336 14.664 5 14.25 5H2.25C1.836 5 1.5 5.336 1.5 5.75V6.75C1.5 7.164 1.836 7.5 2.25 7.5Z",stroke:"#3D3DDB",strokeLinecap:"round",strokeLinejoin:"round"})),ym=e=>y("svg",{width:16,height:16,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},y("path",{d:"M8.25002 18.75C8.25002 19.1478 8.09198 19.5294 7.81068 19.8107C7.52937 20.092 7.14784 20.25 6.75002 20.25C6.35219 20.25 5.97066 20.092 5.68936 19.8107C5.40805 19.5294 5.25002 19.1478 5.25002 18.75M8.25002 18.75C8.25002 18.3522 8.09198 17.9707 7.81068 17.6893C7.52937 17.408 7.14784 17.25 6.75002 17.25C6.35219 17.25 5.97066 17.408 5.68936 17.6893C5.40805 17.9707 5.25002 18.3522 5.25002 18.75M8.25002 18.75H14.25M5.25002 18.75H3.37502C3.07665 18.75 2.7905 18.6315 2.57952 18.4205C2.36855 18.2095 2.25002 17.9234 2.25002 17.625V14.25M14.25 18.75H16.5M14.25 18.75V14.25M2.25002 14.25V6.61501C2.24843 6.34118 2.34848 6.07649 2.53081 5.87218C2.71313 5.66787 2.96477 5.53846 3.23702 5.50901C6.57006 5.16303 9.92997 5.16303 13.263 5.50901C13.828 5.56701 14.25 6.04701 14.25 6.61501V7.57301M2.25002 14.25H14.25M19.5 18.75C19.5 19.1478 19.342 19.5294 19.0607 19.8107C18.7794 20.092 18.3978 20.25 18 20.25C17.6022 20.25 17.2207 20.092 16.9394 19.8107C16.6581 19.5294 16.5 19.1478 16.5 18.75M19.5 18.75C19.5 18.3522 19.342 17.9707 19.0607 17.6893C18.7794 17.408 18.3978 17.25 18 17.25C17.6022 17.25 17.2207 17.408 16.9394 17.6893C16.6581 17.9707 16.5 18.3522 16.5 18.75M19.5 18.75H20.625C21.246 18.75 21.754 18.246 21.715 17.626C21.5141 14.3236 20.4019 11.1416 18.502 8.43301C18.3211 8.17929 18.0848 7.97002 17.8111 7.82104C17.5373 7.67205 17.2333 7.58723 16.922 7.57301H14.25M14.25 7.57301V14.25",stroke:"#3D3DDB",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));function wm(e){return Math.abs(Math.floor(e))}function xm(e,t){return Math.random()*(t-e)+e}function bm(e,t){return Math.floor(xm(e,t+1))}function Cm(e,t,o,r){const n=Math.pow;return Math.sqrt(n(e-o,2)+n(t-r,2))}function km(e,t,o=1){if(e>360||e<0)throw new Error(`Expected hue 0-360 range, got \`${e}\``);if(t>100||t<0)throw new Error(`Expected lightness 0-100 range, got \`${t}\``);if(o>1||o<0)throw new Error(`Expected alpha 0-1 range, got \`${o}\``);return`hsla(${e}, 100%, ${t}%, ${o})`}const Sm=e=>{if("object"==typeof e&&null!==e){if("function"==typeof Object.getPrototypeOf){const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}return"[object Object]"===Object.prototype.toString.call(e)}return!1},Tm=["__proto__","constructor","prototype"],$m=(...e)=>e.reduce(((e,t)=>(Object.keys(t).forEach((o=>{Tm.includes(o)||(Array.isArray(e[o])&&Array.isArray(t[o])?e[o]=t[o]:Sm(e[o])&&Sm(t[o])?e[o]=$m(e[o],t[o]):e[o]=t[o])})),e)),{});class Pm{constructor({x:e,y:o,ctx:r,hue:n,decay:i,gravity:a,friction:l,brightness:s,flickering:c,lineWidth:d,explosionLength:u}){for(t(this,"x"),t(this,"y"),t(this,"ctx"),t(this,"hue"),t(this,"friction"),t(this,"gravity"),t(this,"flickering"),t(this,"lineWidth"),t(this,"explosionLength"),t(this,"angle"),t(this,"speed"),t(this,"brightness"),t(this,"coordinates",[]),t(this,"decay"),t(this,"alpha",1),this.x=e,this.y=o,this.ctx=r,this.hue=n,this.gravity=a,this.friction=l,this.flickering=c,this.lineWidth=d,this.explosionLength=u,this.angle=xm(0,2*Math.PI),this.speed=bm(1,10),this.brightness=bm(s.min,s.max),this.decay=xm(i.min,i.max);this.explosionLength--;)this.coordinates.push([e,o])}update(e){this.coordinates.pop(),this.coordinates.unshift([this.x,this.y]),this.speed*=this.friction,this.x+=Math.cos(this.angle)*this.speed,this.y+=Math.sin(this.angle)*this.speed+this.gravity,this.alpha-=this.decay,this.alpha<=this.decay&&e()}draw(){const e=this.coordinates.length-1;this.ctx.beginPath(),this.ctx.lineWidth=this.lineWidth,this.ctx.fillStyle=km(this.hue,this.brightness,this.alpha),this.ctx.moveTo(this.coordinates[e][0],this.coordinates[e][1]),this.ctx.lineTo(this.x,this.y),this.ctx.strokeStyle=km(this.hue,this.flickering?xm(0,this.brightness):this.brightness,this.alpha),this.ctx.stroke()}}class Am{constructor(e,o){t(this,"active",!1),t(this,"x"),t(this,"y"),this.options=e,this.canvas=o,this.pointerDown=this.pointerDown.bind(this),this.pointerUp=this.pointerUp.bind(this),this.pointerMove=this.pointerMove.bind(this)}get mouseOptions(){return this.options.mouse}mount(){this.canvas.addEventListener("pointerdown",this.pointerDown),this.canvas.addEventListener("pointerup",this.pointerUp),this.canvas.addEventListener("pointermove",this.pointerMove)}unmount(){this.canvas.removeEventListener("pointerdown",this.pointerDown),this.canvas.removeEventListener("pointerup",this.pointerUp),this.canvas.removeEventListener("pointermove",this.pointerMove)}usePointer(e,t){const{click:o,move:r}=this.mouseOptions;(o||r)&&(this.x=e.pageX-this.canvas.offsetLeft,this.y=e.pageY-this.canvas.offsetTop,this.active=t)}pointerDown(e){this.usePointer(e,this.mouseOptions.click)}pointerUp(e){this.usePointer(e,!1)}pointerMove(e){this.usePointer(e,this.active)}}class Im{constructor(){t(this,"hue"),t(this,"rocketsPoint"),t(this,"opacity"),t(this,"acceleration"),t(this,"friction"),t(this,"gravity"),t(this,"particles"),t(this,"explosion"),t(this,"mouse"),t(this,"boundaries"),t(this,"sound"),t(this,"delay"),t(this,"brightness"),t(this,"decay"),t(this,"flickering"),t(this,"intensity"),t(this,"traceLength"),t(this,"traceSpeed"),t(this,"lineWidth"),t(this,"lineStyle"),t(this,"autoresize"),this.autoresize=!0,this.lineStyle="round",this.flickering=50,this.traceLength=3,this.traceSpeed=10,this.intensity=30,this.explosion=5,this.gravity=1.5,this.opacity=.5,this.particles=50,this.friction=.95,this.acceleration=1.05,this.hue={min:0,max:360},this.rocketsPoint={min:50,max:50},this.lineWidth={explosion:{min:1,max:3},trace:{min:1,max:2}},this.mouse={click:!1,move:!1,max:1},this.delay={min:30,max:60},this.brightness={min:50,max:80},this.decay={min:.015,max:.03},this.sound={enabled:!1,files:["explosion0.mp3","explosion1.mp3","explosion2.mp3"],volume:{min:4,max:8}},this.boundaries={debug:!1,height:0,width:0,x:50,y:50}}update(e){Object.assign(this,$m(this,e))}}class Rm{constructor(e,o){t(this,"tick",0),t(this,"rafId",0),t(this,"fps",60),t(this,"tolerance",.1),t(this,"now"),this.options=e,this.render=o}mount(){this.now=performance.now();const e=1e3/this.fps,t=o=>{this.rafId=requestAnimationFrame(t);const r=o-this.now;r>=e-this.tolerance&&(this.render(),this.now=o-r%e,this.tick+=r*(this.options.intensity*Math.PI)/1e3)};this.rafId=requestAnimationFrame(t)}unmount(){cancelAnimationFrame(this.rafId)}}class Nm{constructor(e,o,r){t(this,"resizer"),this.options=e,this.updateSize=o,this.container=r}mount(){if(!this.resizer){const e=function(e,t){let o;return(...r)=>{o&&clearTimeout(o),o=setTimeout((()=>e(...r)),t)}}((()=>this.updateSize()),100);this.resizer=new ResizeObserver(e)}this.options.autoresize&&this.resizer.observe(this.container)}unmount(){this.resizer&&this.resizer.unobserve(this.container)}}class Om{constructor(e){t(this,"buffers",[]),t(this,"audioContext"),t(this,"onInit",!1),this.options=e,this.init()}get isEnabled(){return this.options.sound.enabled}get soundOptions(){return this.options.sound}init(){!this.onInit&&this.isEnabled&&(this.onInit=!0,this.audioContext=new(window.AudioContext||window.webkitAudioContext),this.loadSounds())}async loadSounds(){for(const e of this.soundOptions.files){const t=await(await fetch(e)).arrayBuffer();this.audioContext.decodeAudioData(t).then((e=>{this.buffers.push(e)})).catch((e=>{throw e}))}}play(){if(this.isEnabled&&this.buffers.length){const e=this.audioContext.createBufferSource(),t=this.buffers[bm(0,this.buffers.length-1)],o=this.audioContext.createGain();e.buffer=t,o.gain.value=xm(this.soundOptions.volume.min/100,this.soundOptions.volume.max/100),o.connect(this.audioContext.destination),e.connect(o),e.start(0)}else this.init()}}class Em{constructor({x:e,y:o,dx:r,dy:n,ctx:i,hue:a,speed:l,traceLength:s,acceleration:c}){for(t(this,"x"),t(this,"y"),t(this,"sx"),t(this,"sy"),t(this,"dx"),t(this,"dy"),t(this,"ctx"),t(this,"hue"),t(this,"speed"),t(this,"acceleration"),t(this,"traceLength"),t(this,"totalDistance"),t(this,"angle"),t(this,"brightness"),t(this,"coordinates",[]),t(this,"currentDistance",0),this.x=e,this.y=o,this.sx=e,this.sy=o,this.dx=r,this.dy=n,this.ctx=i,this.hue=a,this.speed=l,this.traceLength=s,this.acceleration=c,this.totalDistance=Cm(e,o,r,n),this.angle=Math.atan2(n-o,r-e),this.brightness=bm(50,70);this.traceLength--;)this.coordinates.push([e,o])}update(e){this.coordinates.pop(),this.coordinates.unshift([this.x,this.y]),this.speed*=this.acceleration;const t=Math.cos(this.angle)*this.speed,o=Math.sin(this.angle)*this.speed;this.currentDistance=Cm(this.sx,this.sy,this.x+t,this.y+o),this.currentDistance>=this.totalDistance?e(this.dx,this.dy,this.hue):(this.x+=t,this.y+=o)}draw(){const e=this.coordinates.length-1;this.ctx.beginPath(),this.ctx.moveTo(this.coordinates[e][0],this.coordinates[e][1]),this.ctx.lineTo(this.x,this.y),this.ctx.strokeStyle=km(this.hue,this.brightness),this.ctx.stroke()}}class Dm{constructor(e,o={}){t(this,"target"),t(this,"container"),t(this,"canvas"),t(this,"ctx"),t(this,"width"),t(this,"height"),t(this,"traces",[]),t(this,"explosions",[]),t(this,"waitStopRaf"),t(this,"running",!1),t(this,"opts"),t(this,"sound"),t(this,"resize"),t(this,"mouse"),t(this,"raf"),this.target=e,this.container=e,this.opts=new Im,this.createCanvas(this.target),this.updateOptions(o),this.sound=new Om(this.opts),this.resize=new Nm(this.opts,this.updateSize.bind(this),this.container),this.mouse=new Am(this.opts,this.canvas),this.raf=new Rm(this.opts,this.render.bind(this))}get isRunning(){return this.running}get version(){return"2.10.7"}get currentOptions(){return this.opts}start(){this.running||(this.canvas.isConnected||this.createCanvas(this.target),this.running=!0,this.resize.mount(),this.mouse.mount(),this.raf.mount())}stop(e=!1){!this.running||(this.running=!1,this.resize.unmount(),this.mouse.unmount(),this.raf.unmount(),this.clear(),e&&this.canvas.remove())}async waitStop(e){if(this.running)return new Promise((t=>{this.waitStopRaf=()=>{!this.waitStopRaf||(requestAnimationFrame(this.waitStopRaf),!this.traces.length&&!this.explosions.length&&(this.waitStopRaf=null,this.stop(e),t()))},this.waitStopRaf()}))}pause(){this.running=!this.running,this.running?this.raf.mount():this.raf.unmount()}clear(){!this.ctx||(this.traces=[],this.explosions=[],this.ctx.clearRect(0,0,this.width,this.height))}launch(e=1){for(let t=0;tbm(e.min,e.max)||this.mouse.active&&t.max>this.traces.length)&&(this.createTrace(),this.raf.tick=0)}drawTrace(){let e=this.traces.length;for(;e--;)this.traces[e].draw(),this.traces[e].update(((t,o,r)=>{this.initExplosion(t,o,r),this.sound.play(),this.traces.splice(e,1)}))}initExplosion(e,t,o){const{particles:r,flickering:n,lineWidth:i,explosion:a,brightness:l,friction:s,gravity:c,decay:d}=this.opts;let u=wm(r);for(;u--;)this.explosions.push(new Pm({x:e,y:t,ctx:this.ctx,hue:o,friction:s,gravity:c,flickering:bm(0,100)<=n,lineWidth:xm(i.explosion.min,i.explosion.max),explosionLength:wm(a),brightness:l,decay:d}))}drawExplosion(){let e=this.explosions.length;for(;e--;)this.explosions[e].draw(),this.explosions[e].update((()=>{this.explosions.splice(e,1)}))}}var Lm;Lm={__e:function(e,t,o,r){for(var n,i,a;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&null!=i.getDerivedStateFromError&&(n.setState(i.getDerivedStateFromError(e)),a=n.__d),null!=n.componentDidCatch&&(n.componentDidCatch(e,r||{}),a=n.__d),a)return n.__E=n}catch(l){e=l}throw e}};var Mm=0;const Bm=kt.forwardRef((({children:e,options:t,autostart:o=!0,...r},n)=>{const i=se(null),a=se(null);return ce(n,(()=>({get isRunning(){return a.current.isRunning},get currentOptions(){return a.current.currentOptions},start(){a.current.start()},launch(e){a.current.launch(e)},stop(){a.current.stop()},async waitStop(){await a.current.waitStop()},pause(){a.current.pause()},clear(){a.current.clear()},updateOptions(e){a.current.updateOptions(e)},updateSize(e){a.current.updateSize(e)},updateBoundaries(e){a.current.updateBoundaries(e)}}))),ae((()=>(a.current=new Dm(i.current,t),o&&a.current.start(),()=>{a.current.stop()})),[]),function(e,t,o,r,n){var i,a,l={};for(a in t)"ref"==a?i=t[a]:l[a]=t[a];var s={type:e,props:l,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--Mm,__source:n,__self:r};if("function"==typeof e&&(i=e.defaultProps))for(a in i)void 0===l[a]&&(l[a]=i[a]);return Lm.vnode&&Lm.vnode(s),s}("div",{ref:i,...r,children:e})}));const Hm=ls(jd).withConfig({componentId:"CROCart__sc-1a3j46a-0"})((()=>[{borderRadius:"0.25rem",borderWidth:"0",paddingLeft:"1rem",paddingRight:"1rem",paddingTop:"0.75rem",paddingBottom:"0.75rem"}])),zm=ls(Hm).withConfig({componentId:"CROCart__sc-1a3j46a-1"})((()=>[{borderWidth:"0","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",padding:"1rem",paddingBottom:"1.5rem"},ns` h6 { ${{marginBottom:"0.25rem"}} } `])),jm=ls.div.withConfig({componentId:"CROCart__sc-1a3j46a-2"})((({progress:e,isAnimated:t,isSlim:o})=>[ns` --track-height: ${6}px; width: 100%; height: var(--track-height); border-radius: var(--track-height); &:after { height: var(--track-height); border-radius: var(--track-height); width: ${e}%; } `,t&&ns` &:after { transition: width 0.5s; } `,{position:"relative","--tw-bg-opacity":"1",backgroundColor:"rgb(61 61 219 / var(--tw-bg-opacity))","&::after":{content:"var(--tw-content)",display:"block","--tw-bg-opacity":"1",backgroundColor:"rgb(61 61 219 / var(--tw-bg-opacity))"}},o?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginTop:"1rem",marginBottom:"1rem"}])),Fm=ls(jm).withConfig({componentId:"CROCart__sc-1a3j46a-3"})(["--track-height:","px;"],16),qm=ls.div.withConfig({componentId:"CROCart__sc-1a3j46a-4"})((({isActive:e,positionPercentage:t,colors:o})=>[{position:"absolute",top:"0px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"9999px",borderWidth:"2px","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))"},ns` width: 28px; height: 28px; transform: translateY(calc(-50% + (var(--track-height) / 2))) translateX(-50%); left: ${t}%; border-color: ${null==o?void 0:o.progressBarColor}; svg path { stroke: ${null==o?void 0:o.progressColor}; } p { display: none; } `,e&&ns` border-color: ${null==o?void 0:o.progressColor}; background-color: ${null==o?void 0:o.progressColor}; svg { path { stroke: ${"#FFFFFF"}; } } `])),Wm=ls(qm).withConfig({componentId:"CROCart__sc-1a3j46a-5"})((({isActive:e,colors:t})=>[ns` width: 44px; height: 44px; svg { width: 24px; height: 24px; } p { display: block; position: absolute; bottom: -25px; ${{fontSize:"13px",lineHeight:"20px",fontWeight:"600"}} white-space: nowrap; min-width: max-content; left: 50%; transform: translateX(-50%); } `,e&&ns` background-color: ${"#FFFFFF"}; svg { path { stroke: ${null==t?void 0:t.progressColor}; } } `])),Um=ls(Gs).withConfig({componentId:"CROCart__sc-1a3j46a-6"})((({isSticky:e,colors:t})=>[e&&{position:"sticky",top:"0px",zIndex:"1","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))"},(null==t?void 0:t.backgroundColor)&&ns` ${Hm}, ${zm} { background-color: ${t.backgroundColor}; } `,(null==t?void 0:t.titleColor)&&ns` h5 { color: ${t.titleColor}; } ${Hm} h6 { color: ${t.titleColor}; } `,(null==t?void 0:t.subtitleColor)&&ns` h6 { color: ${t.subtitleColor}; } `,(null==t?void 0:t.highlightTextColor)&&ns` ${Wm} p { color: ${t.highlightTextColor}; } `,(null==t?void 0:t.progressBarColor)&&ns` ${jm}, ${Fm} { background-color: ${t.progressBarColor}; } `,(null==t?void 0:t.progressColor)&&ns` ${jm}, ${Fm} { &::after { background-color: ${t.progressColor}; } } `])),Vm=ls(jd).withConfig({componentId:"CROCart__sc-1a3j46a-7"})((()=>[{borderRadius:"0.375rem",borderWidth:"0","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",paddingLeft:"0.75rem",paddingRight:"0.75rem",paddingTop:"0.75rem",paddingBottom:"0.75rem"}])),Gm=ls.div.withConfig({componentId:"CROCart__sc-1a3j46a-8"})([""," border:1px solid ",";"],{position:"relative",display:"flex",minHeight:"38px",width:"100%",alignItems:"center",overflow:"hidden",borderRadius:"0.375rem"},(({borderColor:e})=>e)),Ym=ls.div.withConfig({componentId:"CROCart__sc-1a3j46a-9"})([""," width:",";background:",";z-index:1;"],{position:"absolute",left:"0px",top:"0px",height:"100%",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"300ms"},(({progress:e})=>`${e+.5}%`),(({filledColor:e})=>e)),Qm=ls.span.withConfig({componentId:"CROCart__sc-1a3j46a-10"})([""," color:",";"],{position:"relative",zIndex:"10",width:"100%",textAlign:"center",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"500"},(({textColor:e})=>e||"#000")),Xm={1:{Wrapper:Hm,Track:jm,Milestone:qm},2:{Wrapper:zm,Track:Fm,Milestone:Wm},3:{Wrapper:Hm,Track:e=>jm({...e,isSlim:!0}),Milestone:qm}},Km=()=>{var e,t,o,r,n,i,a;const{progressBar:l,freeProduct:s,currencyCode:c}=no(),{totalAmount:d,cartCurrency:u,cart:p}=mi(),h=de((()=>(null==s?void 0:s.excludeGiftCards)?er.fromCartTotalExcludingGiftCards(p):d),[p,d,null==s?void 0:s.excludeGiftCards]),{isPriceRuleActive:m,priceRuleThreshold:f}=om(),{isGiftTiersActive:g,giftTiersWithStatus:v}=Mh(),{isOrderDiscountActive:_,orderDiscountAmountThreshold:y,orderDiscountPercentage:w}=(()=>{const{orderDiscount:e}=no(),{cartCurrency:t}=mi(),o=new er(br(+(null==e?void 0:e.threshold)||0,t),t);return{isOrderDiscountActive:!!(null==e?void 0:e.isActive),orderDiscountPercentage:+(null==e?void 0:e.percentageAmount)||void 0,orderDiscountAmountThreshold:o}})(),x=Vs(),C=se(null),k=pc(),S=_i((e=>e.isCartDrawerOpen)),T=x.progressTextBefore||(null==l?void 0:l.textBefore),$=x.progressTextAfter||(null==l?void 0:l.textAfter),P=x.progressTextToNextOption||(null==l?void 0:l.textToNextFreeOption),A=x.freeGiftText||(null==l?void 0:l.freeGiftText),I=x.freeShippingText||(null==l?void 0:l.freeShippingText),R=x.progressDiscountText||(null==l?void 0:l.progressDiscountText),N=(null==l?void 0:l.designOption)||1,O="animated"===(null==l?void 0:l.animatedValue),E=null==l?void 0:l.locked,D=!!(null==l?void 0:l.fireworksEnabled),L=de((()=>ru(l,nu(),u,c)),[u,c,l]),M=L.enabled,B=de((()=>L.enabled?L.amount:new er(0,u)),[u,L]),H={backgroundColor:null==(e=null==l?void 0:l.backgroundColor)?void 0:e.hex,titleColor:null==(t=null==l?void 0:l.textColor)?void 0:t.hex,subtitleColor:null==(o=null==l?void 0:l.secondaryTextColor)?void 0:o.hex,highlightTextColor:null==(r=null==l?void 0:l.highlightTextColor)?void 0:r.hex,progressBarColor:null==(n=null==l?void 0:l.progressBarColor)?void 0:n.hex,progressColor:null==(i=null==l?void 0:l.progressColor)?void 0:i.hex,inlineBarBorderColor:null==(a=null==l?void 0:l.inlineBarBorderColor)?void 0:a.hex};let z,j,F;4!==N&&(z=Xm[N].Wrapper,j=Xm[N].Track,F=Xm[N].Milestone);const q=de((()=>{const e=[];g&&v&&v.length>0?v.forEach(((t,o)=>{const r=(e=>0===e?{beforeThresholdText:x.tier1BeforeThresholdText,afterThresholdText:x.tier1AfterThresholdText,discountMessage:x.tier1DiscountMessage}:1===e?{beforeThresholdText:x.tier2BeforeThresholdText,afterThresholdText:x.tier2AfterThresholdText,discountMessage:x.tier2DiscountMessage}:{beforeThresholdText:x.tier3BeforeThresholdText,afterThresholdText:x.tier3AfterThresholdText,discountMessage:x.tier3DiscountMessage})(o),n=r.beforeThresholdText||t.beforeThresholdText||t.beforeFulfilledMessage,i=r.afterThresholdText||t.afterThresholdText||t.afterFulfilledMessage,a=r.discountMessage||t.discountMessage||A||"Free Gift";var l,s;e.push({type:"gift",title:a,beforeThresholdText:n,afterThresholdText:i,isActive:!0,icon:Ko(_m,{}),amountThreshold:(l=t.threshold,s=u,Th(l,s))})})):m&&e.push({type:"gift",title:A,isActive:!0,icon:Ko(_m,{}),amountThreshold:f});const t=[...e,{type:"truck",title:I,isActive:M,icon:Ko(ym,{}),amountThreshold:B},{type:"discount",title:Fs(R,"{{percentage}}",w),isActive:_,icon:Ko(vm,{}),amountThreshold:y}].filter((e=>e.isActive)),o=[...t].sort(((e,t)=>e.amountThreshold.getAsNativeCurrencyValue()-t.amountThreshold.getAsNativeCurrencyValue())),r=e=>{const o=t.length;return 1===o?95:Math.min((e+1)*(100/o),95)};return o.map(((e,t)=>({...e,positionPercentage:r(t)})))}),[f,B,A,I,R,x,m,g,v,M,_,y,w,u]),W=ue((e=>h.gte(e.amountThreshold)),[h]),U=ue((e=>{let t,o;const r=[...e];return r.forEach((e=>{h.gte(e.amountThreshold)&&(t=e)})),r.reverse(),r.forEach((e=>{h.lt(e.amountThreshold)&&(o=e)})),[t,o]}),[h]),V=de((()=>{var e;const[t,o]=U(q),r=(null==t?void 0:t.positionPercentage)||0,n=(null==o?void 0:o.positionPercentage)||100,i=2===N?.2:.1,a=(null==t?void 0:t.amountThreshold)||new er(0,u);let l=null==o?void 0:o.amountThreshold;t?o||(l=h):l=(null==(e=q[0])?void 0:e.amountThreshold)||new er(0,u);const s=0!==l.subtract(a).getAsNativeCurrencyValue()?h.subtract(a).getAsNativeCurrencyValue()/l.subtract(a).getAsNativeCurrencyValue():1;return r+(n-r)*Math.max(1.102531*s/(.1+s)-i,0)||0}),[U,q,N,u,h]),G=function(e){const t=se();return ae((()=>{t.current=e}),[e]),t.current}(V);ae((()=>{if(!S||!(null==l?void 0:l.isActive)||!q.length)return;const e=q.filter((e=>"truck"===e.type||"discount"===e.type)).map((e=>{const t=e.amountThreshold.getAsNativeCurrencyValue(),o=h.getAsNativeCurrencyValue(),r=Math.max(0,t-o);return{feature_type:"truck"===e.type?"free_shipping":"order_discount",feature_id:"truck"===e.type?"progress_free_shipping_1":"progress_order_discount_1",surface:"progress",threshold_cents:t,cart_value_cents:o,remaining_cents:r,currency:u,eligible:"truck"===e.type?r>0:o{const[e,t]=U(q);return t}),[U,q]),Q=de((()=>{if(Y)return Y.amountThreshold.subtract(h)}),[Y,h]),X=ue(((e,t)=>((e,t,o)=>{const r=Fs(e||"","{{money}}",t);return Fs(r,"{{option}}",o||"")})(e,(null==Q?void 0:Q.toFormattedString())||"€0.00",null==t?void 0:t.title)),[Q]),K=de((()=>X(T,Y)),[X,Y,T]),J=de((()=>{const e="gift"===(null==Y?void 0:Y.type)&&Y.beforeThresholdText?Y.beforeThresholdText:P;return X(e,Y)}),[X,Y,P]),Z=de((()=>{const[e,t]=U(q);if(t)return X($,t);const o="gift"===(null==e?void 0:e.type)&&e.afterThresholdText?e.afterThresholdText:$;return X(o,e)}),[U,X,q,$]),ee=ue((()=>{C.current&&(C.current.isRunning?C.current.stop():C.current.start())}),[C]);return ae((()=>{void 0!==G&&V>=100&&(ee(),setTimeout(ee,3e3))}),[V,ee,G]),(null==l?void 0:l.isActive)&&0!==q.length?4===N?Ko(Vm,{className:"cro_cart_progress cro_cart_progress--inline","data-cro-testid":"progress-bar",children:Ko(Gm,{className:"cro_cart_progress__bar",unfilledColor:H.progressBarColor,borderColor:H.inlineBarBorderColor,role:"progressbar","aria-valuenow":V,"aria-valuemin":0,"aria-valuemax":100,children:[Ko(Ym,{className:"cro_cart_progress__fill",progress:V,filledColor:H.progressColor}),Ko(Qm,{className:"cro_cart_progress__text",textColor:H.titleColor,dangerouslySetInnerHTML:{__html:Y?J:Z}})]})}):Ko(b,{children:[Ko(Um,{className:"cro_cart_progress",isSticky:E,colors:H,"data-cro-testid":"progress-bar",children:Ko(z,{className:"cro_cart_progress__wrapper",children:[1===N&&Y&&Ko(Jm,{className:"cro_cart_progress__title",dangerouslySetInnerHTML:{__html:K}}),(1===N||3===N)&&!Y&&Ko(Zm,{className:"cro_cart_progress__title",dangerouslySetInnerHTML:{__html:Z},$_css:[{fontSize:"17px",lineHeight:"24px",fontWeight:"600"},{textAlign:3===N?"center":"left"}]}),(1===N||3===N)&&Y&&Ko(ef,{className:"cro_cart_progress__subtitle",dangerouslySetInnerHTML:{__html:J},$_css2:[{fontSize:"13px",lineHeight:"20px",fontWeight:"400"},{"--tw-text-opacity":"1",color:"rgb(124 124 128 / var(--tw-text-opacity))"},{textAlign:3===N?"center":"left"}]}),2===N&&Y&&Ko(tf,{className:"cro_cart_progress__subtitle",dangerouslySetInnerHTML:{__html:J},$_css3:[{fontSize:"15px",lineHeight:"22px",fontWeight:"600"},{textAlign:"center","--tw-text-opacity":"1",color:"rgb(28 28 30 / var(--tw-text-opacity))"}]}),2===N&&!Y&&Ko(of,{className:"cro_cart_progress__title",dangerouslySetInnerHTML:{__html:Z},$_css4:[{fontSize:"15px",lineHeight:"22px",fontWeight:"600"},{textAlign:"center","--tw-text-opacity":"1",color:"rgb(28 28 30 / var(--tw-text-opacity))"}]}),Ko(j,{className:"cro_cart_progress__track",progress:V,isAnimated:O,children:3!==N&&q.map(((e,t)=>Ko(F,{className:"cro_cart_progress__milestone"+(W(e)?" cro_cart_progress__milestone--fulfilled":""),isActive:W(e),positionPercentage:e.positionPercentage,colors:H,children:[Ko("span",{className:"cro_cart_progress__milestone-icon",title:e.title,children:e.icon}),Ko("p",{className:"cro_cart_progress__milestone-amount",children:Ko(Jo,{amount:e.amountThreshold,decimals:0})})]},t)))})]})}),Ko(sc,{}),Ko(Bm,{autostart:!1,ref:C,options:{opacity:D?.5:0},style:{top:0,left:0,width:"100%",height:"100%",position:"fixed",pointerEvents:"none"}})]}):null};var Jm=ls("h5")({fontSize:"17px",lineHeight:"24px",fontWeight:"600"}),Zm=ls("h5")`${e=>e.$_css}`,ef=ls("h6")`${e=>e.$_css2}`,tf=ls("h6")`${e=>e.$_css3}`,of=ls("h6").withConfig({componentId:"CROCart__sc-2p1zi0-0"})(["",""],(e=>e.$_css4));const rf=()=>{var e,t,o;const{promoBanner:r}=no(),n=(null==(e=window.CROCartVisual)?void 0:e.enabled)&&(null==(t=null==r?void 0:r.imageUrl)?void 0:t.startsWith("data:image/"));return(null==r?void 0:r.isActive)&&((null==(o=null==r?void 0:r.imageUrl)?void 0:o.startsWith("https://cdn.shopify.com"))||n)?Ko(nf,{src:r.imageUrl,alt:"Promo Banner",className:"cro_cart_promo_banner","data-cro-testid":"promo-banner"}):null};var nf=ls("img").withConfig({componentId:"CROCart__sc-2xmz2o-0"})({height:"auto",maxHeight:"110px",width:"100%",flexShrink:"0",objectFit:"contain"});const af=(e,t,o)=>{const r=o||window;void 0!==r&&(r.CROCart||(r.CROCart={}),r.CROCart[e]=t)},lf=new Set,sf=e=>{"production"!==uo.nodeEnv?(lf.add(e),console.log(`🔴 Error trigger set for section: ${e}`),console.log("Refresh the cart to see the error boundary in action")):console.warn("Error testing is not available in production")},cf=()=>{if("production"===uo.nodeEnv)return;const e=Array.from(lf);lf.clear(),console.log(`✅ Cleared error triggers for sections: ${e.join(", ")||"none"}`)},df=[{name:"Header",description:"Cart header with title and close button"},{name:"PromoBanner",description:"Promotional banner image"},{name:"Announcements",description:"Announcement bar messages"},{name:"Progress",description:"Progress bar for free shipping/rewards"},{name:"CartProducts",description:"List of products in cart"},{name:"FreeProduct",description:"Free product/gift section"},{name:"Recommendations",description:"Product recommendations/upsells"},{name:"DiscountCode",description:"Discount code input field"},{name:"CartSummary",description:"Cart totals and summary"},{name:"PaymentProviders",description:"Payment method buttons"},{name:"Benefits",description:"Benefits/trust badges section"},{name:"VariantDrawer",description:"Variant selection drawer"},{name:"CustomHtml-above_announcement",description:"Custom HTML above announcements"},{name:"CustomHtml-below_announcement",description:"Custom HTML below announcements"},{name:"CustomHtml-above_progress",description:"Custom HTML above progress bar"},{name:"CustomHtml-below_progress",description:"Custom HTML below progress bar"},{name:"CustomHtml-below_products",description:"Custom HTML below products"},{name:"CustomHtml-above_recommendations",description:"Custom HTML above recommendations"},{name:"CustomHtml-below_recommendations",description:"Custom HTML below recommendations"},{name:"CustomHtml-above_cart_summary",description:"Custom HTML above cart summary"},{name:"CustomHtml-above_payment_providers",description:"Custom HTML above payment providers"},{name:"CustomHtml-above_benefits",description:"Custom HTML above benefits"}],uf=()=>{"production"!==uo.nodeEnv&&(console.log("📋 Available sections with error boundaries:"),console.log("=".repeat(60)),df.forEach((({name:e,description:t})=>{const o=lf.has(e)?"🔴 ERROR":"✅ OK";console.log(`${o.padEnd(10)} ${e.padEnd(35)} - ${t}`)})),console.log("=".repeat(60)),console.log("\n💡 Usage:"),console.log(" window.CROCart.debug.triggerSectionError('SectionName')"),console.log(" window.CROCart.debug.clearSectionErrors()"),console.log(" window.CROCart.debug.listSections() // List all section names"),console.log(" window.CROCart.debug.getTriggeredErrors() // See active errors"))},pf=()=>{if("production"!==uo.nodeEnv)return console.log("🏷️ All available section names for error testing:"),console.log("=".repeat(50)),df.forEach((({name:e})=>{console.log(` "${e}"`)})),console.log("=".repeat(50)),console.log("\n💡 Copy any name above and use it with:"),console.log(" window.CROCart.debug.triggerSectionError('name-here')"),df.map((e=>e.name))},hf=async()=>{if("production"===uo.nodeEnv)return void console.warn("Debug tools are not available in production");const{cart:e,removeHiddenCartAttribute:t,refetch:o}=mi.getState(),r=(null==e?void 0:e.attributes)||{},n=Object.keys(r).filter((e=>e.startsWith("_cro_gift_tier_removed_")||e.startsWith("gift_tier_removed_")));if(0!==n.length){console.log(`🗑️ Clearing ${n.length} gift tier removal attribute(s)...`);for(const e of n){const o=e.replace(/^_cro_/,"");console.log(` - Removing: ${e}`),await t(o)}await o(),console.log("✅ Gift tier removals cleared - gifts will auto-add again when thresholds are met"),console.log("💡 Tip: Refresh the cart to see changes: window.CROCart.debug.refreshCart()")}else console.log("✅ No gift tier removal attributes found - all gifts can auto-add")},mf=e=>{const{isInBuilder:t}=no(),o=()=>{if("production"===uo.nodeEnv)return;const o="undefined"!=typeof window?new URLSearchParams(window.location.search):null,r=null==o?void 0:o.has("debug"),n=null==o?void 0:o.has("cro_cart_preview"),i="undefined"!=typeof localStorage&&localStorage.getItem("cro_cart_preview");if((t||("development"===uo.nodeEnv||"dev"===uo.nodeEnv)||r||n||!!i)&&(e=>{if("production"===uo.nodeEnv)return!1;if(lf.has(e))return!0;if("undefined"!=typeof window){const t=new URLSearchParams(window.location.search).get("debug_errors");if(t)return t.split(",").map((e=>e.trim())).includes(e)}return!1})(e))throw console.error(`🔴 Throwing test error for ${e}`),new Error(`[TEST ERROR] Simulated error in ${e} section for testing error boundaries`)};return ae((()=>{o()}),[e]),{checkForError:o}};class ff{constructor(e,t=!1,o){this._rules=[],this._products=[],this._collectionsMap=new Map,this._debug=!1,this._rules=[...e].sort(((e,t)=>e.priority-t.priority)),this._debug=t,this._logger=o,this._log(`RulesEngine initialized with ${this._rules.length} rules`)}setCart(e){var t;return this._log(`Setting cart with ${(null==(t=null==e?void 0:e.items)?void 0:t.length)||0} items and total price ${(null==e?void 0:e.total_price)||0}`),this._cart=e,this}setProducts(e){return this._log(`Setting ${e.length} products`),this._products=e,this}setCollection(e,t){return this._log(`Setting collection '${e}' with ${t.length} products`),this._collectionsMap.set(e,t),this}setDebug(e){return this._debug=e,this._log("Debug logging "+(e?"enabled":"disabled")),this}evaluateOne(e=new Set){try{this._log("[DETAILED] Starting evaluateOne with excludeRulePriorities type: "+typeof e),this._log(`[DETAILED] excludeRulePriorities: ${JSON.stringify(Array.from(e))}`),this._log(`Evaluating rules, excluding priorities: ${Array.from(e).join(", ")}`),this._log(`[DETAILED] About to sort rules. Rules count: ${this._rules.length}`),this._rules.sort(((e,t)=>e.priority-t.priority)),this._log("[DETAILED] Rules sorted successfully");for(const o of this._rules)try{this._log("[DETAILED] Starting rule iteration. Rule type: "+typeof o),this._log(`[DETAILED] Rule object keys: ${Object.keys(o||{})}`),this._log("[DETAILED] About to access rule.priority");const t=o.priority;this._log(`[DETAILED] rule.priority accessed successfully: ${t} (type: ${typeof t})`),this._log(`Checking rule priority ${t}`),this._log(`[DETAILED] About to call excludeRulePriorities.has(${t})`);const r=e.has(t);if(this._log(`[DETAILED] excludeRulePriorities.has() returned: ${r}`),r){this._log(`Skipping rule with priority ${t} (excluded)`);continue}this._log("[DETAILED] About to access rule.conditions");const n=o.conditions;this._log(`[DETAILED] rule.conditions accessed successfully. Length: ${null==n?void 0:n.length}`),this._log("[DETAILED] About to access rule.logic");const i=o.logic;this._log(`[DETAILED] rule.logic accessed successfully: ${i}`),this._log(`Evaluating ${n.length} conditions with logic: ${i}`),this._log("[DETAILED] About to call _evaluateConditions");const a=this._evaluateConditions(n);if(this._log(`[DETAILED] _evaluateConditions returned successfully. Matches: ${a.length}`),"any"===i&&a.length>0)return this._log(`Rule with priority ${t} matches (any logic, ${a.length}/${n.length} conditions matched)`),o;if("all"===i&&a.length===n.length)return this._log(`Rule with priority ${t} matches (all logic, all ${n.length} conditions matched)`),this._log(`Rule: ${JSON.stringify(o)}`),o;this._log(`Rule with priority ${t} does not match (${a.length}/${n.length} conditions matched)`)}catch(t){throw this._log(`[ERROR] Error processing rule: ${t}`),this._log(`[ERROR] Rule object: ${JSON.stringify(o)}`),t}return this._log("No matching rules found"),null}catch(o){throw this._log(`[ERROR] Fatal error in evaluateOne: ${o}`),this._log(`[ERROR] Error stack: ${o.stack}`),o}}getProductsToFetch(){this._log("Determining products to fetch from rules");let e=[];for(const o of this._rules)"manual"===o.recommendations.type&&(e=e.concat(o.recommendations.value));const t=Array.from(new Set(e));return this._log(`Need to fetch ${t.length} unique products: ${t.join(", ")}`),t}getCollectionsToFetch(){this._log("Determining collections to fetch from rules");let e=[];for(const o of this._rules)for(const t of o.conditions)if("cart-item-collection-set"===t.type){const{value:o}=t;this._log(`Found collection-set condition with collections: ${o.join(", ")}`),e=e.concat(o)}const t=Array.from(new Set(e));return this._log(`Need to fetch ${t.length} unique collections: ${t.join(", ")}`),t}_evaluateConditions(e){const t=[];for(const o of e){this._log(`Evaluating condition of type '${o.type}'`);this._evaluateCondition(o)?(this._log(`Condition matched: ${JSON.stringify(o)}`),t.push(o)):this._log(`Condition did not match: ${JSON.stringify(o)}`)}return t}_evaluateCondition(e){if(!this._cart)return this._log("Cannot evaluate condition - cart is not set"),null;const{type:t}=e;switch(this._log(`Evaluating condition of type: ${t}`),t){case"cart-amount":return this._evaluateCartAmountCondition(e);case"cart-item-product-set":return this._evaluateCartItemProductSetCondition(e);case"cart-item-collection-set":return this._evaluateCartItemCollectionSetCondition(e);case"cart-item-tag-set":return this._evaluateCartItemTagCondition(e);default:return this._log(`Unknown condition type: ${t}`),null}}_evaluateCartAmountCondition(e){const{operator:t,value:o}=e,r=jo(this._cart.total_price,this._cart.currency);this._log(`Cart amount condition: ${r} ${t} ${o}`);let n=!1;switch(t){case"lt":n=ro;break;case"lte":n=r<=o;break;case"gte":n=r>=o;break;case"eq":n=r===o;break;case"neq":n=r!==o;break;default:return this._log(`Unknown operator: ${t}`),!1}return this._log(`Cart amount condition result: ${n}`),n}_evaluateCartItemProductSetCondition(e){const{logic:t,value:o}=e,r=this._cart.items||[];this._log(`Cart item product set condition: checking if cart items match products [${o.join(", ")}] with logic "${t}"`);const n=r.filter((e=>{console.log(` Cart item ${e.product_id}: ${e.handle}`),console.log(` Value: ${o}`);const t=o.includes(e.handle);return this._log(` Cart item ${e.product_id}: ${t?"matches":"does not match"}`),t})),i="any"===t?n.length>0:n.length===r.length;return this._log(`Cart item product set condition result: ${i} (${n.length}/${r.length} items matched)`),i}_evaluateCartItemCollectionSetCondition(e){const{logic:t,value:o}=e,r=this._cart.items||[];this._log(`Cart item collection set condition: checking if cart items belong to collections [${o.join(", ")}] with logic "${t}"`);for(const l of o)this._collectionsMap.has(l)||this._log(` Warning: Collection "${l}" not loaded`);const n=new Set(o.map((e=>{const t=this._collectionsMap.get(e);return this._log(` Collection "${e}": ${(null==t?void 0:t.length)||0} products`),t})).filter((e=>e)).flat(1));this._log(` Total unique products in collections: ${n.size}`);const i=r.filter((e=>Array.from(n).some((t=>{const o=t.id===e.product_id;return o&&this._log(` Cart item ${e.product_id} matches product in collection`),o})))),a="any"===t?i.length>0:i.length===r.length;return this._log(`Cart item collection set condition result: ${a} (${i.length}/${r.length} items matched)`),a}_evaluateCartItemTagCondition(e){const{logic:t,operator:o,value:r}=e,n=this._cart.items||[];this._log(`Cart item tag condition: checking for tags [${r.join(", ")}] with operator "${o}" and logic "${t}"`);const i=n.filter((t=>{const o=this._products.find((e=>e.id===t.product_id));if(!o)return this._log(` Cart item ${t.product_id} has no matching product data`),!1;const r=o.tags;this._log(` Cart item ${t.product_id} has tags: [${r.join(", ")}]`);return r.some((t=>{const o=this._tagMatcher(t,e);return o&&this._log(` Tag "${t}" matches condition`),o}))})),a="any"===t?i.length>0:i.length===n.length;return this._log(`Cart item tag condition result: ${a} (${i.length}/${n.length} items matched)`),a}_tagMatcher(e,t){const{operator:o,value:r}=t;let n=!1;switch(o){case"contains":n=r.some((t=>{const o=e.includes(t);return this._log(` Tag matcher: "${e}" contains "${t}"? ${o}`,!1),o}));break;case"starts-with":n=r.some((t=>{const o=e.startsWith(t);return this._log(` Tag matcher: "${e}" starts with "${t}"? ${o}`,!1),o}));break;case"ends-with":n=r.some((t=>{const o=e.endsWith(t);return this._log(` Tag matcher: "${e}" ends with "${t}"? ${o}`,!1),o}));break;default:return this._log(` Unknown operator: ${o}`,!1),!1}return n}_log(e,t=!0){t&&(this._logger?this._logger.info(e):this._debug&&console.log(`[RulesEngine] ${e}`))}}const gf=Yo("recommendationsRules");class vf extends ff{constructor(e,t){const o=no.getState().config.shopUrl;super(e,!1,gf),this._rules=[],this._automaticRecommendedProducts=[],this._fallback="automatic",this._rules=[...e],this._fallback=(null==t?void 0:t.fallback)||"automatic",this._shop=o}getShop(){return this._shop}setAutomaticRecommendedProducts(e){return this._automaticRecommendedProducts=e,this}getCollectionsToFetch(){const e=super.getCollectionsToFetch(),t=this._rules.flatMap((e=>"collections"===e.recommendations.type?e.recommendations.value:[]));return[...new Set([...e,...t])]}getRecommendedProducts(e){const t=new Set;if(!this._cart){this._log("No cart found, returning fallback recommendations");const t=this._returnFallbackRecommendations();return this._log(`Fallback recommendations ${JSON.stringify(t)}`),t.slice(0,e)}for(;;){this._log(`Evaluating rule ${this._rules.length}`);const o=this.evaluateOne(t);if(this._log(`Matched rule ${null==o?void 0:o.priority}`),!o){this._log("No matched rule, returning fallback recommendations");const t=this._returnFallbackRecommendations();return this._log(`Fallback recommendations ${JSON.stringify(t)}`),t.slice(0,e)}this._log(`Getting recommendations for rule ${o.priority}`);let r=this._getRecommendationsForRule(o);if(this._log(`Recommended products ${JSON.stringify(r)}`),r=r.filter((e=>!this._cart.items.some((t=>t.product_id===e.id)))),r.length>0)return this._log("Returning recommended products"),this._log(`Recommended products ${JSON.stringify(r)}`),r.slice(0,e);t.add(o.priority)}}_returnFallbackRecommendations(){return"automatic"===this._fallback?this._automaticRecommendedProducts:[]}_getRecommendationsForRule(e){this._log(`Getting recommendations for rule ${e.priority}`),this._log(`Rule ${JSON.stringify(e)}`);const{recommendations:t,options:o}=e,r=o.matchByTag&&this._ruleHasTagConditions(e);if(this._log(`Use tag matching ${r}`),"manual"===t.type){this._log("Getting manual recommendations");const o=r?this._getManualRecommendationsTagMatched(t.value,e):this._getManualRecommendations(t.value);return this._log(`Manual recommendations ${JSON.stringify(o)}`),o}if("collections"===t.type){this._log("Getting collection recommendations");const o=r?this._getCollectionRecommendationsTagMatched(t.value,e):this._getCollectionRecommendations(t.value);return this._log(`Collection recommendations ${JSON.stringify(o)}`),o}return this._log("No recommendations found"),[]}_ruleHasTagConditions(e){return e.conditions.some((e=>"cart-item-tag-set"===e.type))}_getManualRecommendations(e){this._log(`Getting manual recommendations for handles ${JSON.stringify(e)}`),this._log(`Products ${JSON.stringify(this._products)}`);const t=this._products.filter((t=>(this._log(`filtering ${t.handle} amongs all handles ${JSON.stringify(e)}`),this._log(`fitlering result: ${e.includes(t.handle)}`),e.includes(t.handle))));return this._log(`Result ${JSON.stringify(t)}`),t}_getManualRecommendationsTagMatched(e,t){const o=this._products.filter((t=>e.includes(t.handle))),r=t.conditions.filter((e=>"cart-item-tag-set"===e.type));return o.filter((e=>e.tags.some((e=>r.some((t=>super._tagMatcher(e,t)))))))}_getCollectionRecommendations(e){return e.map((e=>this._collectionsMap.get(e))).filter(Boolean).flat()}_getCollectionRecommendationsTagMatched(e,t){const o=t.conditions.filter((e=>"cart-item-tag-set"===e.type));return e.map((e=>this._collectionsMap.get(e))).filter(Boolean).flat().filter((e=>e.tags.some((e=>o.some((t=>super._tagMatcher(e,t)))))))}}let _f=null;const yf=()=>{var e;const{crossSell:t}=no(),{cart:o,automaticRecommendedProducts:r}=mi(),n=t.recommendationLimit,{recommendedProducts:i}=(()=>{const{crossSell:e}=no(),{cart:t,automaticRecommendedProducts:o}=mi(),[r,n]=ne(!1),i=ue((async()=>{const e=_f.getProductsToFetch(),t=[];for(let o=0;o"fulfilled"===e.status?[e.value]:[]));t.push(...i)}return{products:t}}),[]),a=ue((async e=>{const t=i().then((({products:t})=>{e.setProducts(t)})),o=e.getCollectionsToFetch().map((t=>cc({handle:t}).then((({products:o})=>{e.setCollection(t,o)})))),r=Promise.allSettled([t,...o]);await r,n(!0)}),[i]);ae((()=>{"rules"===e.recommendationChoice&&e.recommendationRules?(_f=new vf(e.recommendationRules,{fallback:e.recommendationRulesNoMatchFallback||"automatic"}),a(_f)):(_f=null,n(!1))}),[e.recommendationChoice,e.recommendationRules,e.recommendationRulesNoMatchFallback,a]);const l=de((()=>_f&&r?(_f.setCart(t),_f.setAutomaticRecommendedProducts(o),_f.getRecommendedProducts(e.recommendationLimit)):null),[t,null==t?void 0:t.item_count,r,o]);return{rulesEngine:_f,recommendedProducts:l}})(),a=ue((()=>{var e;const t=Math.max(Math.floor(n/(null==(e=null==o?void 0:o.items)?void 0:e.length)),1),i=[];return null==r||r.forEach((e=>{i.filter((t=>e.id===t.id)).lengthn?i.slice(0,n):i}),[r,null==(e=null==o?void 0:o.items)?void 0:e.length]),l=ue((()=>{const e=function(e){for(let t=e.length-1;t>=0;t--){const o=Math.floor(Math.random()*(t+1));[e[t],e[o]]=[e[o],e[t]]}return e}([...i||[]]);return e.length>n?e.slice(0,n):e}),[i]);return{recommendedProducts:de((()=>{let e=[];switch(t.recommendationChoice){case"rules":e=l();break;case"automatic":e=a()}return e}),[t.recommendationChoice,a,l])}},wf=e=>{const t=se(!1);return{handleClick:ue((o=>{t.current&&(t.current=!1,0!==o.detail)||null==e||e(o)}),[e]),handleTouchEnd:ue((e=>{e.cancelable&&e.preventDefault(),t.current=!0;const o=new MouseEvent("click",{bubbles:!0,cancelable:!0,detail:0,view:window});e.currentTarget.dispatchEvent(o)}),[])}},xf=Yo("recommendations");var bf=ls("div")({marginBottom:"0.5rem",marginTop:"0.25rem",display:"flex",minHeight:"72px",minWidth:"234px",flexDirection:"row",alignItems:"center",borderRadius:"0.75rem",borderWidth:"1px","--tw-border-opacity":"1",borderColor:"rgb(229 231 235 / var(--tw-border-opacity))",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"0.5rem",paddingBottom:"0.5rem","--tw-shadow":"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)"}),Cf=ls("div")({position:"relative",cursor:"pointer"}),kf=ls("img")`${e=>e.$_css}`,Sf=ls("div")`${e=>e.$_css2}`,Tf=ls("div")({marginLeft:"0.5rem",display:"flex",minWidth:"0px",flex:"1 1 0%",flexDirection:"column",justifyContent:"space-between"}),$f=ls(od)`${e=>e.$_css3}`,Pf=ls(id)({fontSize:"11px"}),Af=ls("div")({marginTop:"0.25rem",display:"flex",alignItems:"flex-end",justifyContent:"space-between",gap:"0.5rem"}),If=ls("div")({display:"flex",flexDirection:"column"}),Rf=ls(Jo)({overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"2",maxWidth:"85px",fontSize:"11px","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))",textDecorationLine:"line-through"}),Nf=ls(nd)({fontSize:"11px",fontWeight:"600"}),Of=ls("span")({maxWidth:"85px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"11px","--tw-text-opacity":"1",color:"rgb(21 128 61 / var(--tw-text-opacity))"}),Ef=ls("span")({maxWidth:"85px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:"11px",fontWeight:"700","--tw-text-opacity":"1",color:"rgb(239 68 68 / var(--tw-text-opacity))"}),Df=ls("span").withConfig({componentId:"CROCart__sc-1sa83z6-0"})({fontSize:"11px",fontWeight:"700"});const Lf=e=>{var t;const o=(null==e?void 0:e.rating)??(null==e?void 0:e.reviewRating)??(null==(t=null==e?void 0:e.reviews)?void 0:t.rating),r=Number(o);return Number.isFinite(r)?Math.max(0,Math.min(r,5)):null},Mf=e=>{var t;const o=(null==e?void 0:e.reviewCount)??(null==e?void 0:e.reviewsCount)??(null==e?void 0:e.reviews_count)??(null==(t=null==e?void 0:e.reviews)?void 0:t.count),r=Number(o);return Number.isFinite(r)?r:null},Bf=ls(Mc)` width: 84px; height: 84px; border-radius: 13px; img { width: 84px; height: 84px; } `;var Hf=ls("div")({display:"flex",minWidth:"0px",flexDirection:"column",alignItems:"center",borderRadius:"16px",paddingLeft:"0.5rem",paddingRight:"0.5rem",paddingTop:"10px",paddingBottom:"10px"}),zf=ls("button")({position:"relative",cursor:"pointer"}),jf=ls("img")`${e=>e.$_css}`,Ff=ls("span")({position:"absolute",right:"-0.5rem",top:"-0.5rem",display:"flex",height:"1.5rem",width:"1.5rem",alignItems:"center",justifyContent:"center",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(239 227 206 / var(--tw-bg-opacity))"}),qf=ls("div")`${e=>e.$_css2}`,Wf=ls("div")({marginTop:"0.5rem",display:"flex",alignItems:"center",justifyContent:"center",gap:"0.25rem",fontSize:"13px",lineHeight:"1"}),Uf=ls("span")({position:"relative",display:"inline-block",whiteSpace:"nowrap",fontSize:"12px",lineHeight:"1",letterSpacing:"1px"}),Vf=ls("span")({"--tw-text-opacity":"1",color:"rgb(217 199 179 / var(--tw-text-opacity))"}),Gf=ls("span")({position:"absolute",left:"0px",top:"0px",overflow:"hidden","--tw-text-opacity":"1",color:"rgb(255 176 0 / var(--tw-text-opacity))"}),Yf=ls("span")({marginLeft:"0.25rem","--tw-text-opacity":"1",color:"rgb(58 42 31 / var(--tw-text-opacity))"}),Qf=ls("button")({marginTop:"0.25rem",minHeight:"30px",width:"100%",cursor:"pointer",textAlign:"center",fontSize:"13px",fontWeight:"600",lineHeight:"17px"}),Xf=ls("div")({marginBottom:"0.5rem",marginTop:"2px",textAlign:"center",fontSize:"14px",fontWeight:"700",lineHeight:"1.25rem"}),Kf=ls("div").withConfig({componentId:"CROCart__sc-10nqch3-0"})({marginTop:"auto",width:"100%",paddingLeft:"0.75rem",paddingRight:"0.75rem"});const Jf=Yo("recommendations");var Zf=ls("div")({position:"relative"}),eg=ls("div")({position:"relative",display:"flex",minHeight:"100px",flexDirection:"row"}),tg=ls(Mc)({position:"relative",cursor:"pointer"}),og=ls("img")`${e=>e.$_css}`,rg=ls("div")`${e=>e.$_css2}`,ng=ls("div")({marginLeft:"0.75rem",display:"flex",flex:"1 1 0%",flexDirection:"column",justifyContent:"space-between"}),ig=ls("div")({display:"flex",alignItems:"flex-start",justifyContent:"space-between"}),ag=ls("div")`${e=>e.$_css3}`,lg=ls(od)({cursor:"pointer"}),sg=ls(id)({fontSize:"13px",lineHeight:"20px",fontWeight:"400"}),cg=ls("div")({display:"flex",width:"100%",flexWrap:"wrap",alignItems:"flex-end",justifyContent:"space-between",gap:"0.5rem"}),dg=ls("span")({fontSize:"13px",lineHeight:"20px",fontWeight:"400"}),ug=ls("div")({marginLeft:"auto",marginRight:"0px",marginTop:"0.25rem",display:"flex",flexDirection:"column",justifyContent:"flex-end"}),pg=ls("div")({marginLeft:"auto",marginRight:"0px",display:"flex",maxWidth:"130px",flexWrap:"wrap",alignItems:"center",justifyContent:"flex-end",gap:"0.25rem",whiteSpace:"nowrap",fontSize:"0.875rem",lineHeight:"1"}),hg=ls(Jo)({whiteSpace:"nowrap",fontSize:"0.875rem",lineHeight:"1","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))",textDecorationLine:"line-through"}),mg=ls("span")({whiteSpace:"nowrap",textAlign:"end",fontSize:"13px",lineHeight:"20px",fontWeight:"400"}),fg=ls("div")({marginLeft:"0.5rem",fontSize:"15px",lineHeight:"22px",fontWeight:"600"}),gg=ls("div").withConfig({componentId:"CROCart__sc-3ncufl-0"})({marginLeft:"0.5rem",fontSize:"15px",lineHeight:"22px",fontWeight:"600"});const vg=Yo("recommendations"),_g=()=>Ko(yg,{viewBox:"0 0 24 24",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:[Ko("circle",{cx:"12",cy:"12",r:"10"}),Ko("path",{d:"M12 7v10M7 12h10",strokeLinecap:"round"})]});var yg=ls("svg")({flex:"none"}),wg=ls("div")`${e=>e.$_css2}`,xg=ls("div")`${e=>e.$_css3}`,bg=ls("img")`${e=>e.$_css4}`,Cg=ls("div")`${e=>e.$_css5}`,kg=ls("div")`${e=>e.$_css6}`,Sg=ls("div")`${e=>e.$_css7}`,Tg=ls("div")`${e=>e.$_css8}`,$g=ls("div")({marginTop:"0.375rem",display:"flex",alignItems:"center",gap:"0.25rem",fontSize:"10.5px",lineHeight:"1"}),Pg=ls("span")({position:"relative",display:"inline-block",whiteSpace:"nowrap",fontSize:"12px",lineHeight:"1",letterSpacing:"1px"}),Ag=ls("span")({color:"#D9C7B3"}),Ig=ls("span")`${e=>e.$_css9}`,Rg=ls("span")((e=>({color:e.$_css10}))),Ng=ls("div")`${e=>e.$_css11}`,Og=ls("div")({marginTop:"0.25rem",display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.25rem"}),Eg=ls(Jo)`${e=>e.$_css12}`,Dg=ls(Jo)`${e=>e.$_css13}`,Lg=ls("div")({marginTop:"0.25rem",fontSize:"15px",lineHeight:"22px",fontWeight:"600"}),Mg=ls("div")`${e=>e.$_css14}`,Bg=ls("span").withConfig({componentId:"CROCart__sc-1vkz8ui-0"})(["",""],(e=>e.$_css15));const Hg=ls.div.withConfig({componentId:"CROCart__sc-1habk4r-0"})(["",""],(({colors:e})=>(null==e?void 0:e.discountColor)&&ns(["color:",";text-align:left;span{color:",";}"],e.discountColor,e.discountColor))),zg=Yo("recommendations");var jg=ls("div")`${e=>e.$_css}`,Fg=ls("div")`${e=>e.$_css2}`,qg=ls("img")`${e=>e.$_css3}`,Wg=ls("div")`${e=>e.$_css4}`,Ug=ls("span")({fontSize:"13px",lineHeight:"20px",fontWeight:"400"}),Vg=ls("div")`${e=>e.$_css5}`,Gg=ls("div")({display:"flex",flexDirection:"column",justifyContent:"flex-end"}),Yg=ls("div")({display:"flex",maxWidth:"100px",flexWrap:"wrap",alignItems:"center",gap:"0.25rem",whiteSpace:"nowrap",fontSize:"0.875rem",lineHeight:"1"}),Qg=ls(Jo)({whiteSpace:"nowrap",fontSize:"13px",lineHeight:"1rem","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))",textDecorationLine:"line-through"}),Xg=ls("div")({fontSize:"13px",fontWeight:"600"}),Kg=ls("span").withConfig({componentId:"CROCart__sc-sb7vo3-0"})({whiteSpace:"nowrap",fontSize:"13px",lineHeight:"20px",fontWeight:"400"});function Jg(...e){return e.filter(Boolean).join(" ")}var Zg={root:"Polaris-Text--root",block:"Polaris-Text--block",truncate:"Polaris-Text--truncate",visuallyHidden:"Polaris-Text--visuallyHidden",start:"Polaris-Text--start",center:"Polaris-Text--center",end:"Polaris-Text--end",justify:"Polaris-Text--justify",success:"Polaris-Text--success",critical:"Polaris-Text--critical",warning:"Polaris-Text--warning",subdued:"Polaris-Text--subdued","text-inverse":"Polaris-Text__text--inverse",headingXs:"Polaris-Text--headingXs",headingSm:"Polaris-Text--headingSm",headingMd:"Polaris-Text--headingMd",headingLg:"Polaris-Text--headingLg",headingXl:"Polaris-Text--headingXl",heading2xl:"Polaris-Text--heading2xl",heading3xl:"Polaris-Text--heading3xl",heading4xl:"Polaris-Text--heading4xl",bodySm:"Polaris-Text--bodySm",bodyMd:"Polaris-Text--bodyMd",bodyLg:"Polaris-Text--bodyLg",regular:"Polaris-Text--regular",medium:"Polaris-Text--medium",semibold:"Polaris-Text--semibold",bold:"Polaris-Text--bold",break:"Polaris-Text--break",numeric:"Polaris-Text--numeric"};const ev=({alignment:e,as:t,breakWord:o,children:r,color:n,fontWeight:i,id:a,numeric:l=!1,truncate:s=!1,variant:c,visuallyHidden:d=!1})=>{const u=t||(d?"span":"p"),p=Jg(Zg.root,c&&Zg[c],i&&Zg[i],(e||s)&&Zg.block,e&&Zg[e],o&&Zg.break,n&&Zg[n],l&&Zg.numeric,s&&Zg.truncate,d&&Zg.visuallyHidden);return kt.createElement(u,Object.assign({className:p},a&&{id:a}),r)};var tv={Icon:"Polaris-Icon",applyColor:"Polaris-Icon--applyColor",hasBackdrop:"Polaris-Icon--hasBackdrop",colorBase:"Polaris-Icon--colorBase",colorSubdued:"Polaris-Icon--colorSubdued",colorCritical:"Polaris-Icon--colorCritical",colorInteractive:"Polaris-Icon--colorInteractive",colorWarning:"Polaris-Icon--colorWarning",colorHighlight:"Polaris-Icon--colorHighlight",colorSuccess:"Polaris-Icon--colorSuccess",colorPrimary:"Polaris-Icon--colorPrimary",colorMagic:"Polaris-Icon--colorMagic",Svg:"Polaris-Icon__Svg",Img:"Polaris-Icon__Img",Placeholder:"Polaris-Icon__Placeholder"};const ov=["base","critical","highlight","success","warning"];function rv({source:e,color:t,backdrop:o,accessibilityLabel:r}){let n;n="function"==typeof e?"function":"placeholder"===e?"placeholder":"external",o&&t&&ov.includes(t);const i=Jg(tv.Icon,t&&tv[(a="color",l=t,`${a}${l.charAt(0).toUpperCase()}${l.slice(1)}`)],t&&tv.applyColor,o&&tv.hasBackdrop);var a,l;const s=e,c={function:kt.createElement(s,{className:tv.Svg,focusable:"false","aria-hidden":"true"}),placeholder:kt.createElement("div",{className:tv.Placeholder}),external:kt.createElement("img",{className:tv.Img,src:`data:image/svg+xml;utf8,${e}`,alt:"","aria-hidden":"true"})};return kt.createElement("span",{className:i},kt.createElement(ev,{as:"span",visuallyHidden:!0},r),c[n])}var nv=function(e){return kt.createElement("svg",Object.assign({viewBox:"0 0 20 20"},e),kt.createElement("path",{fillRule:"evenodd",d:"M11.78 5.47a.75.75 0 0 1 0 1.06l-3.47 3.47 3.47 3.47a.75.75 0 1 1-1.06 1.06l-4-4a.75.75 0 0 1 0-1.06l4-4a.75.75 0 0 1 1.06 0Z"}))};nv.displayName="ChevronLeftMinor";var iv=function(e){return kt.createElement("svg",Object.assign({viewBox:"0 0 20 20"},e),kt.createElement("path",{fillRule:"evenodd",d:"M7.72 14.53a.75.75 0 0 1 0-1.06l3.47-3.47-3.47-3.47a.75.75 0 0 1 1.06-1.06l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0Z"}))};iv.displayName="ChevronRightMinor";const av=ls.div.withConfig({componentId:"CROCart__sc-15md4yj-0"})((({color:e})=>ns(["display:flex;align-items:center;justify-content:center;cursor:pointer;"," .no-scrollbar::-webkit-scrollbar{display:none;}"],e&&ns(["color:",";svg{fill:",";width:20px;height:20px;}"],e,e)))),lv=ls.div.withConfig({componentId:"CROCart__sc-15md4yj-1"})([".arrow-button{@apply opacity-0 transition-all duration-200;}&:hover .arrow-button{opacity:1;}"," ",""],(({isFirstItem:e})=>e&&ns(["&:hover .arrow-prev{opacity:0.5;pointer-events:none;}"])),(({isLastItem:e})=>e&&ns(["&:hover .arrow-next{opacity:0.5;pointer-events:none;}"])));function sv({children:e,compact:t=!1}){var o;const r=kt.Children.count(e),n=se(null),i=se(null),[a,l]=ne(0),[s,c]=ne(!1),[d,u]=ne(!1),[p,h]=ne(0),m=se(0),f=se(0),{crossSell:g}=no(),v=g.recommendedProductImageSize||"small",_=g.recommendedProductImageRatio||"square",y=Lc(_,v,!0),w=t?8:16,x=t?234:y.width+w,C={crossSell:{buttonColor:null==(o=null==g?void 0:g.actionsColor)?void 0:o.hex}},k=kt.Children.toArray(e),S=(e,t=!1)=>{if(i.current){const o=e*x;i.current.style.transition=t?"none":"transform 0.3s ease",i.current.style.transform=`translateX(-${o}px)`}},T=e=>{e<0||e>r-1||(c(!0),l(e),S(e))},$=()=>{s||0===a||T(a-1)},P=()=>{s||a>=r-p||T(a+1)};ae((()=>{const e=i.current;if(!e)return;const t=()=>{c(!1)};return e.addEventListener("transitionend",t),()=>e.removeEventListener("transitionend",t)}),[]),ae((()=>{S(a,!0)}),[r]),ae((()=>{const e=()=>{var e;const t=(null==(e=n.current)?void 0:e.offsetWidth)||0;h(Math.floor(t/x))};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[x]);return ae((()=>{const e=()=>{d&&(u(!1),S(a))},t=()=>{d&&(u(!1),S(a))};return document.addEventListener("touchend",e,{passive:!0}),document.addEventListener("touchcancel",e,{passive:!0}),document.addEventListener("mouseup",t),()=>{document.removeEventListener("touchend",e),document.removeEventListener("touchcancel",e),document.removeEventListener("mouseup",t)}}),[d,a]),ae((()=>{const e=e=>{"ArrowLeft"===e.key&&$(),"ArrowRight"===e.key&&P()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[a,p]),0===r?null:Ko(lv,{isFirstItem:0===a,isLastItem:a>=r-1,children:Ko(cv,{children:[r>p&&Ko(b,{children:Ko(b,t?{children:[Ko("button",{onClick:$,className:"arrow-prev arrow-button","aria-label":"Previous slide",children:Ko(av,{color:C.crossSell.buttonColor,children:Ko(rv,{source:nv,color:"base"})})}),Ko("button",{onClick:P,className:"arrow-next arrow-button","aria-label":"Next slide",children:Ko(av,{color:C.crossSell.buttonColor,children:Ko(rv,{source:iv,color:"base"})})})]}:{children:[Ko(dv,{onClick:$,className:"arrow-prev arrow-button","aria-label":"Previous slide",children:Ko(av,{color:C.crossSell.buttonColor,children:Ko(rv,{source:nv,color:"base"})})}),Ko(uv,{onClick:P,className:"arrow-next arrow-button","aria-label":"Next slide",children:Ko(av,{color:C.crossSell.buttonColor,children:Ko(rv,{source:iv,color:"base"})})})]})}),Ko(pv,{ref:n,onTouchStart:e=>{var t,o;const r=(null==(o=null==(t=null==e?void 0:e.touches)?void 0:t[0])?void 0:o.target)||e.target;var n;(n=r)instanceof HTMLElement&&Boolean(n.closest("button, a, [role='button'], input, select, textarea, [data-slider-ignore-touch='true'], [data-ignore-slider-touch='true']"))||(m.current=e.touches[0].clientX,f.current=0,u(!0),i.current&&(i.current.style.transition="none"))},onTouchMove:e=>{if(!d)return;const t=e.touches[0].clientX;if(f.current=t-m.current,i.current){const e=a*x;i.current.style.transform=`translateX(-${e-f.current}px)`}},onTouchEnd:()=>{if(!d)return;u(!1);const e=x/4;f.current>e?$():f.current<-e?P():S(a)},style:{touchAction:"pan-y"},children:Ko(hv,{ref:i,style:{width:x*k.length+"px",transform:`translateX(-${a*x}px)`},children:k.map(((e,o)=>Ko(mv,{style:{width:`${y.width}px`,marginRight:t?`${w}px`:0},children:e},o)))})})]})})}var cv=ls("div")({position:"relative",marginLeft:"auto",marginRight:"auto",width:"100%"}),dv=ls("button")({position:"absolute",left:"0.25rem",top:"35%",zIndex:"20","--tw-translate-y":"-50%",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",padding:"0.5rem",opacity:"0","--tw-shadow":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"200ms","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity))"},".group:hover &":{opacity:"1"}}),uv=ls("button")({position:"absolute",right:"0.25rem",top:"35%",zIndex:"20","--tw-translate-y":"-50%",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",borderRadius:"9999px","--tw-bg-opacity":"1",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",padding:"0.5rem",opacity:"0","--tw-shadow":"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)","--tw-shadow-colored":"0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color)",boxShadow:"var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"200ms","&:hover":{"--tw-bg-opacity":"1",backgroundColor:"rgb(249 250 251 / var(--tw-bg-opacity))"},".group:hover &":{opacity:"1"}}),pv=ls("div")({overflow:"hidden"}),hv=ls("div")({display:"flex",minWidth:"max-content"}),mv=ls("div").withConfig({componentId:"CROCart__sc-1pajkzv-0"})({minWidth:"max-content",flexShrink:"0"});const fv={1:{ItemsWrapper:e=>sv({...e,compact:!1}),Product:({product:e,onAdd:t,imageSize:o="small",imageRatio:r="square",recommendationContext:n})=>{var i,a,l,s,c;const[d,u]=ne(!1),[p,h]=ne(!1),{cartCurrency:m,setHiddenCartAttribute:f}=mi(),{isInBuilder:g,general:v,crossSell:_}=no(),y=Vs(),{shouldShowComparisonPrices:w,showSaveText:x,discountTextColor:b,saveText:C}=v,k=y.addText||(null==v?void 0:v.addText),S={crossSell:{buttonColor:null==(i=null==_?void 0:_.actionsColor)?void 0:i.hex,buttonBackgroundColor:null==(a=null==_?void 0:_.buttonBackgroundColor)?void 0:a.hex,actionsTextColor:null==(l=null==_?void 0:_.actionsTextColor)?void 0:l.hex,textColor:null==(s=null==_?void 0:_.textColor)?void 0:s.hex}},T=ue((async()=>{zg.info("[Vertical] 🎯 Add button clicked (component handler)",{product:e.title,productId:e.id}),rn({event:"recommendation_clicked",payload:{product:e,click_target:"add_button",opens_pdp:!1,...n||{}}}),u(!0);try{zg.info("[Vertical] ⏳ Calling onAdd handler..."),await t(),zg.info("[Vertical] ✅ onAdd handler completed successfully")}catch(o){throw zg.error("[Vertical] ❌ onAdd handler failed",o),o}finally{u(!1)}}),[t,u,e,n]),$=ue((async t=>{if(g||p)return;rn({event:"recommendation_clicked",payload:{product:e,click_target:t,opens_pdp:!0,...n||{}}}),h(!0);const o="url"in e?e.url:`/products/${e.handle}`;try{e.id&&await f(`pending_recommendation_${e.id}`,In({product:e,context:n,cartSessionId:fr(),currency:m})),window.open(o,"_self")}catch(r){console.error("Failed to set pending recommendation attribute",r),setTimeout((()=>{window.open(o,"_self")}),50)}}),[e,g,p,n,f,m]),P=Jn(e,m),A=(null==e?void 0:e.compare_at_price)||0,I=w&&A>P,R=I?A-P:0,N=R>0&&x,O=new er(R,m).toFormattedString(),E=Fs(C,"{{amount}}",O),D=Lc(r,o,!0),L=wf((()=>{T()}));return e&&Ko(jg,{$_css:[{marginBottom:"0.5rem",marginRight:"1rem",marginTop:"1rem","&:last-of-type":{marginRight:"1.5rem"}},{width:D.width}],children:[Ko(Fg,{onClick:()=>$("image"),$_css2:[{position:"relative",cursor:"pointer",overflow:"hidden",borderRadius:"0.25rem"},{height:"max-content",marginBottom:"small"===o?"8px":"16px",cursor:p?"wait":"pointer"}],children:[Ko(Mc,{ratio:r,imageSize:o,isRecommendedProduct:!0,children:Ko(qg,{src:Kn(e,{height:300}),alt:`Product ${e.title}`,$_css3:[{height:"100%",width:"100%",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",objectFit:"cover"},{transform:"translateZ(0)",filter:"blur(0)"}]})}),Ko(Wg,{$_css4:[{visibility:"hidden",position:"absolute",left:"0px",top:"0px",height:"100%",width:"100%","--tw-bg-opacity":"0.5",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",opacity:"0",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"},p&&{visibility:"visible",opacity:"1"}],children:Ko(hc,{})})]}),Ko(gc,{onClick:L.handleClick,onTouchEnd:L.handleTouchEnd,isLoading:d,disabled:!Qn(e),buttonBackgroundColor:S.crossSell.buttonBackgroundColor,buttonTextColor:S.crossSell.actionsTextColor,buttonColor:S.crossSell.buttonColor,children:Ko(Ug,{children:k})}),Ko(Vg,{onClick:()=>$("title"),$_css5:[{fontSize:"15px",lineHeight:"22px",fontWeight:"600"},{marginTop:"0.5rem",marginBottom:"0.5rem",cursor:"pointer"},{cursor:p?"wait":"pointer",color:S.crossSell.textColor}],children:e.title}),P?Ko(Gg,{children:[Ko(Yg,{children:[I&&Ko(Qg,{amount:new er(A,m)}),Ko(Xg,{"data-product-id":null==e?void 0:e.id,"data-variant-id":null==(c=null==e?void 0:e.variants[0])?void 0:c.id,children:Ko(Jo,{amount:new er(P,m)})})]}),N&&Ko(Hg,{colors:{discountColor:b.hex},children:Ko(Kg,{children:["(",Ko("span",{dangerouslySetInnerHTML:{__html:E}}),")"]})})]}):null]})}},2:{ItemsWrapper:qd,Product:({product:e,onAdd:t,isFree:o,title:r,subtitle:n,freeProductPriceText:i,isOutOfStock:a,imageSize:l="small",imageRatio:s="square",recommendationContext:c})=>{var d,u,p,h;const[m,f]=ne(!1),[g,v]=ne(!1),{cartCurrency:_,setHiddenCartAttribute:y}=mi(),{general:w,isInBuilder:x,crossSell:b}=no(),{shouldShowComparisonPrices:C,showSaveText:k,discountTextColor:S,saveText:T}=w,$={crossSell:{buttonColor:null==(d=null==b?void 0:b.actionsColor)?void 0:d.hex,buttonBackgroundColor:null==(u=null==b?void 0:b.buttonBackgroundColor)?void 0:u.hex,actionsTextColor:null==(p=null==b?void 0:b.actionsTextColor)?void 0:p.hex,textColor:null==(h=null==b?void 0:b.textColor)?void 0:h.hex}},P=ue((async()=>{Jf.info("[Horizontal] 🎯 Add button clicked (component handler)",{product:e.title,productId:e.id}),rn({event:"recommendation_clicked",payload:{product:e,click_target:"add_button",opens_pdp:!1,...c||{}}}),f(!0);try{Jf.info("[Horizontal] ⏳ Calling onAdd handler..."),await t(),Jf.info("[Horizontal] ✅ onAdd handler completed successfully")}catch(o){throw Jf.error("[Horizontal] ❌ onAdd handler failed",o),o}finally{f(!1)}}),[t,f,e,c]),A=ue((async t=>{if(x||g)return;rn({event:"recommendation_clicked",payload:{product:e,click_target:t,opens_pdp:!0,...c||{}}}),v(!0);const o="url"in e?e.url:`/products/${e.handle}`;try{e.id&&await y(`pending_recommendation_${e.id}`,In({product:e,context:c,cartSessionId:fr(),currency:_})),window.open(o,"_self")}catch(r){console.error("Failed to set pending recommendation attribute",r),setTimeout((()=>{window.open(o,"_self")}),50)}}),[e,x,g,c,y,_]),I=Jn(e,_),R=(null==e?void 0:e.compare_at_price)||0,N=C&&R>I,O=N?R-I:0,E=O>0&&k,D=new er(O,_).toFormattedString(),L=Fs(T,"{{amount}}",D),M=wf((()=>{P()}));return e&&Ko(Zf,{children:Ko(eg,{children:[Ko(tg,{ratio:s,imageSize:l,onClick:()=>A("image"),isRecommendedProduct:!0,isHorizontal:!0,style:{cursor:g?"wait":"pointer"},children:[Ko(og,{src:Kn(e,{height:200}),alt:`Product ${e.title}`,$_css:[{height:"100%",width:"100%",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",objectFit:"cover"},{transform:"translateZ(0)",filter:"blur(0)"}]}),Ko(rg,{$_css2:[{visibility:"hidden",position:"absolute",left:"0px",top:"0px",height:"100%",width:"100%","--tw-bg-opacity":"0.5",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",opacity:"0",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"},g&&{visibility:"visible",opacity:"1"}],children:Ko(hc,{})})]}),Ko(ng,{children:[Ko(ig,{children:Ko("div",{children:[r&&Ko(ag,{$_css3:[{fontSize:"15px",lineHeight:"22px",fontWeight:"600"},{marginBottom:"0.25rem"}],children:r}),Ko(lg,{isSmall:!!r,onClick:()=>A("title"),style:{cursor:g?"wait":"pointer",color:$.crossSell.textColor},children:e.title}),Ko(sg,{children:n})]})}),Ko(rd,{spreadComponents:!!t,children:Ko(cg,{children:[t&&Ko(gc,{onClick:M.handleClick,onTouchEnd:M.handleTouchEnd,size:"small",isLoading:m,buttonBackgroundColor:$.crossSell.buttonBackgroundColor,buttonTextColor:$.crossSell.actionsTextColor,buttonColor:$.crossSell.buttonColor,disabled:!Qn(e),children:Ko(dg,{children:null==w?void 0:w.addToCartText})}),I?Ko(ug,{children:[Ko(pg,{children:[N&&Ko(hg,{amount:new er(R,_)}),Ko(nd,{isCrossedOut:o||a,children:Ko(Jo,{amount:new er(I,_)})})]}),E&&Ko(vp,{colors:{discountColor:S.hex},children:Ko(mg,{children:["(",Ko("span",{dangerouslySetInnerHTML:{__html:L}}),")"]})})]}):null,o&&Ko(fg,{children:i||Ko(Jo,{amount:new er(0,_)})}),a&&Ko(gg,{children:null==w?void 0:w.outOfStockText})]})})]})]})})}},3:{ItemsWrapper:e=>sv({...e,compact:!0}),Product:({product:e,onAdd:t,isFree:o,subtitle:r,title:n,isOutOfStock:i,recommendationContext:a})=>{var l,s,c,d;const[u,p]=ne(!1),[h,m]=ne(!1),{cartCurrency:f,setHiddenCartAttribute:g}=mi(),{general:v,isInBuilder:_,crossSell:y}=no(),w=Vs(),{shouldShowComparisonPrices:x,showSaveText:b,discountTextColor:C,saveText:k}=v,S=w.addToCartText||(null==v?void 0:v.addToCartText)||"Add",T={crossSell:{buttonColor:null==(l=null==y?void 0:y.actionsColor)?void 0:l.hex,buttonBackgroundColor:null==(s=null==y?void 0:y.buttonBackgroundColor)?void 0:s.hex,actionsTextColor:null==(c=null==y?void 0:y.actionsTextColor)?void 0:c.hex,textColor:null==(d=null==y?void 0:y.textColor)?void 0:d.hex}},$=ue((async()=>{xf.info("[Compact] 🎯 Add button clicked (component handler)",{product:e.title,productId:e.id}),rn({event:"recommendation_clicked",payload:{product:e,click_target:"add_button",opens_pdp:!1,...a||{}}}),p(!0);try{xf.info("[Compact] ⏳ Calling onAdd handler..."),await t(),xf.info("[Compact] ✅ onAdd handler completed successfully")}catch(o){throw xf.error("[Compact] ❌ onAdd handler failed",o),o}finally{p(!1)}}),[t,p,e,a]),P=ue((async t=>{if(_||h)return;rn({event:"recommendation_clicked",payload:{product:e,click_target:t,opens_pdp:!0,...a||{}}}),m(!0);const o="url"in e?e.url:`/products/${e.handle}`;try{e.id&&await g(`pending_recommendation_${e.id}`,In({product:e,context:a,cartSessionId:fr(),currency:f})),window.open(o,"_self")}catch(r){console.error("Failed to set pending recommendation attribute",r),setTimeout((()=>{window.open(o,"_self")}),50)}}),[e,_,h,a,g,f]),A=Jn(e,f),I=(null==e?void 0:e.compare_at_price)||0,R=x&&I>A,N=R?I-A:0,O=N>0&&b,E=new er(N,f).toFormattedString(),D=Fs(k,"{{amount}}",E),L=wf((()=>{$()}));return e&&Ko(bf,{className:"compact-product",children:[Ko(Cf,{onClick:()=>P("image"),style:{cursor:h?"wait":"pointer",width:64,height:64,borderRadius:8,overflow:"hidden",border:"1px solid #eee"},children:[Ko(kf,{src:Kn(e,{height:128}),alt:`Product ${e.title}`,$_css:[{transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",objectFit:"cover"},{transform:"translateZ(0)",filter:"blur(0)",width:"64px",height:"64px"}]}),Ko(Sf,{$_css2:[{visibility:"hidden",position:"absolute",left:"0px",top:"0px",height:"100%",width:"100%","--tw-bg-opacity":"0.5",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",opacity:"0",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"},h&&{visibility:"visible",opacity:"1"}],children:Ko(hc,{})})]}),Ko(Tf,{children:[Ko($f,{isSmall:!!n,onClick:()=>P("title"),style:{cursor:h?"wait":"pointer",color:T.crossSell.textColor},$_css3:[{cursor:"pointer"},{marginBottom:"0.125rem",overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"2",maxWidth:"143px",textWrap:"wrap",fontSize:"0.75rem",lineHeight:"1rem",fontWeight:"600"}],children:e.title}),Ko(Pf,{children:r}),Ko(Af,{children:[Ko(If,{children:[R&&Ko(Rf,{amount:new er(I,f)}),Ko(Nf,{isCrossedOut:o||i,children:Ko(Jo,{amount:new er(A,f)})}),O&&Ko(vp,{colors:{discountColor:C.hex},children:Ko(Of,{children:["(",Ko("span",{dangerouslySetInnerHTML:{__html:D}}),")"]})}),i&&Ko(Ef,{children:null==v?void 0:v.outOfStockText})]}),t&&Ko(gc,{onClick:L.handleClick,onTouchEnd:L.handleTouchEnd,size:"small",isLoading:u,buttonBackgroundColor:T.crossSell.buttonBackgroundColor,buttonTextColor:T.crossSell.actionsTextColor,buttonColor:T.crossSell.buttonColor,disabled:!Qn(e),children:Ko(Df,{children:S})})]})]})]})}},4:{ItemsWrapper:Wd,Product:({product:e,onAdd:t,imageSize:o="medium",imageRatio:r="square"})=>{var n,i;const[a,l]=ne(!1),[s,c]=ne(!1),{cartCurrency:d,setHiddenCartAttribute:u}=mi(),{general:p,isInBuilder:h,crossSell:m}=no(),f=Vs().addText||(null==p?void 0:p.addText),g=Jn(e,d),v=Lf(e),_=Mf(e),y={textColor:null==(n=null==m?void 0:m.textColor)?void 0:n.hex},w=ue((async()=>{l(!0);try{await t()}finally{l(!1)}}),[t]),x=ue((()=>{if(h||s)return;rn({event:"product_image_clicked",payload:{product:e}}),c(!0);const t="url"in e?e.url:`/products/${e.handle}`;try{e.id&&u(`pending_recommendation_${e.id}`,{product_id:e.id,clicked_at:(new Date).toISOString(),recommendation_type:"pdp-nav"}),window.open(t,"_self")}catch(o){console.error("Failed to set pending recommendation attribute",o),setTimeout((()=>{window.open(t,"_self")}),50)}}),[e,h,s,u]),b=wf((()=>{w()}));return e?Ko(Hf,{className:"cro_cart_recommendations__grid-card",children:[Ko(zf,{className:"cro_cart_recommendations__grid-image",onClick:x,style:{cursor:s?"wait":"pointer"},"aria-label":`Open ${e.title}`,children:[Ko(Bf,{ratio:r,imageSize:o,isRecommendedProduct:!0,children:Ko(jf,{src:Kn(e,{height:300}),alt:`Product ${e.title}`,$_css:[{height:"100%",width:"100%",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))",objectFit:"cover"},{transform:"translateZ(0)",filter:"blur(0)"}]})}),Ko(Ff,{className:"cro_cart_recommendations__grid-open",children:Ko("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#6E6256",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round",children:[Ko("path",{d:"M7 17 17 7"}),Ko("path",{d:"M9 7 17 7 17 15"})]})}),Ko(qf,{$_css2:[{visibility:"hidden",position:"absolute",left:"0px",top:"0px",height:"100%",width:"100%","--tw-bg-opacity":"0.5",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",opacity:"0",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"},s&&{visibility:"visible",opacity:"1"}],children:Ko(hc,{})})]}),null!==v&&Ko(Wf,{className:"cro_cart_recommendations__grid-rating",children:[Ko(Uf,{className:"cro_cart_recommendations__grid-stars","aria-label":`${v} out of 5`,children:[Ko(Vf,{children:"★★★★★"}),Ko(Gf,{style:{width:v/5*100+"%"},"aria-hidden":"true",children:"★★★★★"})]}),null!==_&&Ko(Yf,{children:["(",_,")"]})]}),Ko(Qf,{className:"cro_cart_recommendations__grid-title",style:{color:y.textColor,cursor:s?"wait":"pointer"},onClick:x,children:e.title}),g?Ko(Xf,{className:"cro_cart_recommendations__grid-price","data-product-id":null==e?void 0:e.id,"data-variant-id":null==(i=null==e?void 0:e.variants[0])?void 0:i.id,children:Ko(Jo,{amount:new er(g,d)})}):null,Ko(Kf,{className:"cro_cart_recommendations__grid-add",children:Ko(gc,{onClick:b.handleClick,onTouchEnd:b.handleTouchEnd,isLoading:a,disabled:!Qn(e),children:Ko("span",{children:f})})})]}):null}},5:{ItemsWrapper:qd,Product:({product:e,onAdd:t,isOutOfStock:o})=>{var r,n,i,a,l,s,c,d;const[u,p]=ne(!1),[h,m]=ne(!1),{cartCurrency:f,setHiddenCartAttribute:g}=mi(),{general:v,isInBuilder:_,crossSell:y}=no(),w=Vs(),{shouldShowComparisonPrices:x}=v,b=(null==(r=null==y?void 0:y.textColor)?void 0:r.hex)||"#2E2E2E",C=b,k=null==(n=null==y?void 0:y.itemsBackgroundColor)?void 0:n.hex,S=ue((async()=>{vg.info("[SplitTile] 🎯 Add button clicked",{product:e.title,productId:e.id}),p(!0);try{await t()}finally{p(!1)}}),[t,e]),T=ue((t=>{if(_||h)return;rn({event:`product_${t}_clicked`,payload:{product:e}}),m(!0);const o="url"in e?e.url:`/products/${e.handle}`;try{e.id&&g(`pending_recommendation_${e.id}`,{product_id:e.id,clicked_at:(new Date).toISOString(),recommendation_type:"pdp-nav"}),window.open(o,"_self")}catch(r){console.error("Failed to set pending recommendation attribute",r),setTimeout((()=>{window.open(o,"_self")}),50)}}),[e,_,h,g]),$=wf((()=>{S()})),P=e,A=(P.type||P.product_type||"").trim(),I=((null==(a=null==(i=P.selling_plan_groups)?void 0:i[0])?void 0:a.name)||"").trim(),R=Jn(e,f),N=(null==e?void 0:e.compare_at_price)||0,O=x&&N>R,E=w.addText||w.addToCartText||(null==v?void 0:v.addText)||(null==v?void 0:v.addToCartText),D=Lf(e),L=Mf(e),M=(null==(l=null==y?void 0:y.buttonBackgroundColor)?void 0:l.hex)||"#FFB000";return e&&Ko(wg,{className:"cro_cart_recommendations__split-tile",$_css2:ns(["background:",";border:1.5px solid ",";border-radius:14px;color:",";display:flex;margin-bottom:13px;min-height:207px;overflow:hidden;"],k||"transparent",C,b),children:[Ko(xg,{className:"cro_cart_recommendations__split-image",onClick:()=>T("image"),$_css3:ns(["border-right:1.5px solid ",";cursor:",";flex:none;position:relative;width:38%;"],C,h?"wait":"pointer"),children:[Ko(bg,{src:Kn(e,{height:400}),alt:`Product ${e.title}`,$_css4:[{display:"block",height:"100%",width:"100%",objectFit:"cover"},{transform:"translateZ(0)",filter:"blur(0)"}]}),Ko(Cg,{$_css5:[{visibility:"hidden",position:"absolute",left:"0px",top:"0px",height:"100%",width:"100%","--tw-bg-opacity":"0.5",backgroundColor:"rgb(255 255 255 / var(--tw-bg-opacity))",opacity:"0",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"},h&&{visibility:"visible",opacity:"1"}],children:Ko(hc,{})})]}),Ko(kg,{className:"cro_cart_recommendations__split-content",$_css6:ns(["display:flex;flex:1;flex-direction:column;padding:0 14px 14px;position:relative;"]),children:[A&&Ko(Sg,{className:"cro_cart_recommendations__split-kicker",$_css7:ns(["border-bottom:1.5px solid ",";font-size:9px;font-weight:600;letter-spacing:2px;margin:0 -14px 18px;padding:15px 14px;text-transform:uppercase;"],C),children:A}),Ko(Tg,{className:"cro_cart_recommendations__split-title",onClick:()=>T("title"),$_css8:ns(["cursor:",";font-size:13.5px;font-weight:700;line-height:17px;"],h?"wait":"pointer"),children:e.title}),null!==D&&Ko($g,{className:"cro_cart_recommendations__split-rating",children:[Ko(Pg,{"aria-label":`${D} out of 5`,children:[Ko(Ag,{children:"★★★★★"}),Ko(Ig,{"aria-hidden":"true",$_css9:[{position:"absolute",left:"0px",top:"0px",overflow:"hidden"},{color:M,width:D/5*100+"%"}],children:"★★★★★"})]}),null!==L&&Ko(Rg,{$_css10:M,children:["( ",L," Reviews )"]})]}),I&&Ko(Ng,{className:"cro_cart_recommendations__split-subtitle",$_css11:ns(["font-size:11px;margin-top:4px;opacity:0.75;"]),children:I}),R?Ko(Og,{className:"cro_cart_recommendations__split-price",children:[O&&Ko(Eg,{amount:new er(N,f),$_css12:ns(["color:#8a8a8a;font-size:12px;text-decoration:line-through;"])}),Ko(Dg,{amount:new er(R,f),$_css13:ns(["font-size:13px;font-weight:700;"])})]}):null,o&&Ko(Lg,{children:null==v?void 0:v.outOfStockText}),t&&Ko(Mg,{className:"cro_cart_recommendations__split-add",$_css14:ns(["bottom:12px;position:absolute;right:12px;"]),children:Ko(gc,{onClick:$.handleClick,onTouchEnd:$.handleTouchEnd,size:"small",isLoading:u,buttonBackgroundColor:null==(s=null==y?void 0:y.buttonBackgroundColor)?void 0:s.hex,buttonTextColor:null==(c=null==y?void 0:y.actionsTextColor)?void 0:c.hex,buttonColor:null==(d=null==y?void 0:y.actionsColor)?void 0:d.hex,disabled:!Qn(e),children:Ko(Bg,{$_css15:[{fontSize:"13px",lineHeight:"20px",fontWeight:"400"},{display:"inline-flex",alignItems:"center",gap:"5px"}],children:[E,Ko(_g,{})]})})})]})]})}}},gv=Yo("recommendations"),vv=()=>{var e,t,o,r,n,i,a,l,s,c,d,u,p;const{checkForError:h}=mf("Recommendations");h();const{crossSell:m,productTip:f}=no(),{cart:g,addProducts:v,refetch:_}=mi(),{isCartDrawerOpen:y,openVariantDrawer:w}=_i(),x=pc(),{isBXGYActive:C,isBXGYFulfilled:k,bxgyHeaderText:S,bxgyBodyText:T}=dc(),{recommendedProducts:$}=yf(),{upsellHeaderText:P,tipHeaderText:A,tipDescriptionText:I}=Vs(),R=m.recommendedProductImageSize||"small",N=m.recommendedProductImageRatio||"square",O=(null==m?void 0:m.designOption)||1,E=!!(null==m?void 0:m.isActive)&&!!(null==$?void 0:$.length),D=P||(null==m?void 0:m.upsellHeaderText),L=null==m?void 0:m.isOutOfStock,M=se(),B=null==f?void 0:f.isActive,H=null==(e=null==f?void 0:f.specificTipProducts)?void 0:e.some((e=>{var t;return null==(t=null==g?void 0:g.items)?void 0:t.some((t=>vs(e,t.variant_id)))})),z=C&&!k,j=B&&("all"===f.choiceTip||"specific"===f.choiceTip&&H)||z,F=A||(null==f?void 0:f.headerText),q=I||(null==f?void 0:f.descriptionText),W=z?S:F,U=z?T:q,V=null==f?void 0:f.textAlignment,G={crossSell:{titleColor:null==(t=null==m?void 0:m.headerColor)?void 0:t.hex,buttonColor:null==(o=null==m?void 0:m.actionsColor)?void 0:o.hex,textColor:null==(r=null==m?void 0:m.textColor)?void 0:r.hex,buttonBackgroundColor:null==(n=null==m?void 0:m.buttonBackgroundColor)?void 0:n.hex,actionsTextColor:null==(i=null==m?void 0:m.actionsTextColor)?void 0:i.hex,itemsBackgroundColor:null==(a=null==m?void 0:m.itemsBackgroundColor)?void 0:a.hex,backgroundColor:null==(l=null==m?void 0:m.backgroundColor)?void 0:l.hex},productTip:{backgroundColor:null==(s=null==f?void 0:f.backgroundColor)?void 0:s.hex,titleColor:null==(c=null==f?void 0:f.textColor)?void 0:c.hex,textColor:null==(d=null==f?void 0:f.innerTextColor)?void 0:d.hex}},Y=de((()=>{const e=($||[]).filter((e=>L||Qn(e))).map(((e,t)=>{const o=e.__croCartRecommendationContext||An({recommendedProduct:e,position:t+1,engineType:"rules"===m.recommendationChoice?"rules":"manual",surface:"cart_drawer"});return{product:e,recommendationContext:Rn({...o,position:t+1})}})),t=Lr(`rv_${x}`),o=Xr(e.map((({recommendationContext:e})=>e.recommendation_id)));return e.map((({product:e,recommendationContext:r})=>({product:e,recommendationContext:{...r,recommendation_view_id:t,recommendation_set_hash:o}})))}),[m.recommendationChoice,x,$,L]);ae((()=>{var e,t,o,r;if(!y||!Y.length)return;const n=null==(t=null==(e=Y[0])?void 0:e.recommendationContext)?void 0:t.recommendation_set_hash,i=`${x}:${(null==g?void 0:g.token)||""}:${n}:recommendations_changed`;M.current!==i&&(M.current=i,rn({event:"cart_viewed",payload:{cart:g,exposure_render_id:x,view_reason:"recommendations_changed",recommendation_view_id:null==(r=null==(o=Y[0])?void 0:o.recommendationContext)?void 0:r.recommendation_view_id,recommendation_set_hash:n,recommendations:Y.map((({product:e,recommendationContext:t},o)=>Kr({context:t,product:e,position:o+1,currency:null==g?void 0:g.currency})))}}))}),[g,Y,x,y]);const Q=null==(u=fv[O])?void 0:u.ItemsWrapper,X=null==(p=fv[O])?void 0:p.Product,K=Ko(Q,{className:"cro_cart_recommendations__items",children:Y.map((({product:e,recommendationContext:t},o)=>Ko(X,{imageRatio:N,imageSize:R,product:e,recommendationContext:t,onAdd:()=>(async(e,t)=>{var o,r;const n={...t,accepted_event_id:(null==t?void 0:t.accepted_event_id)||Lr()};if(gv.info(`[onAdd] 🛒 Add button clicked for product: "${e.title}"`,{productId:e.id,variantCount:(null==(o=e.variants)?void 0:o.length)||0,isAvailable:Qn(e)}),(null==(r=e.variants)?void 0:r.length)>1)return gv.info(`[onAdd] 📋 Multi-variant product detected (${e.variants.length} variants) - opening variant drawer`),w(e,{quantity:1,track:{source:"recommendation",recommendationContext:n}});const i=Xn(e);if(!i)return void gv.error(`[onAdd] ❌ No variant found for product "${e.title}"`);gv.info("[onAdd] ➕ Adding single variant to cart:",{variantId:i.id,variantTitle:i.title||"Default",quantity:1});const a=await v([{id:null==i?void 0:i.id,quantity:1}],{track:{source:"recommendation",recommendationContext:n}});if(!a)return void gv.error(`[onAdd] ❌ addProducts failed for "${e.title}"`,{variantId:i.id});gv.info("[onAdd] ✓ addProducts succeeded, refetching cart...");const l=await _({refetchRecommendations:!0});return gv.info("[onAdd] ✓ Cart refetched, managing cart attributes..."),ri({operation:"add",originalProduct:i,requestedQty:1,originalCart:g,updatedCart:l,source:"recommendation",recommendationContext:n}),gv.info(`[onAdd] ✅ Recommendation add complete for "${e.title}"`),a})(e,t).catch((()=>{}))},o)))});return Ko(b,{children:[(E||j)&&Ko(Vd,{colors:G.crossSell,className:"cro_cart_recommendations","data-cro-testid":"recommendations",children:[E&&D&&Ko(_v,{className:"cro_cart_recommendations__title",$_css:[{fontSize:"20px",lineHeight:"28px",fontWeight:"600"},{}],children:D}),j&&"specific"!==f.choiceTip&&Ko(Ud,{colors:G.productTip,alignment:V,className:"cro_cart_recommendations__tip","data-cro-testid":"product-tip",children:[Ko(yv,{className:"cro_cart_recommendations__tip-title",children:W}),Ko(wv,{className:"cro_cart_recommendations__tip-text",$_css2:[{fontSize:"13px",lineHeight:"20px",fontWeight:"400"},{"--tw-text-opacity":"1",color:"rgb(124 124 128 / var(--tw-text-opacity))"}],children:U})]}),E&&Ko(b,{children:K})]}),(E||j)&&Ko(sc,{})]})};var _v=ls("h4")`${e=>e.$_css}`,yv=ls("h5")({fontSize:"15px",lineHeight:"22px",fontWeight:"600"}),wv=ls("div").withConfig({componentId:"CROCart__sc-93chp5-0"})(["",""],(e=>e.$_css2));const xv=()=>{var e;const{isVariantDrawerOpen:t,variantDrawerProduct:o,variantDrawerOptions:r,variantDrawerPromiseDeferred:n,closeVariantDrawer:i}=_i(),{addProducts:a,cart:l,refetch:s}=mi(),{crossSell:c,general:d}=no(),[u,p]=ne(null),[h,m]=ne(null),[f,g]=ne(null),v=c.recommendedProductImageSize||"small",_=c.recommendedProductImageRatio||"square",y=()=>{p(null),m(null),g(null)},w=de((()=>{if(!(null==o?void 0:o.variants))return[];let e=o.variants;r.allowedVariantIds&&r.allowedVariantIds.length>0&&(e=e.filter((e=>{const t=String(e.id);return r.allowedVariantIds.some((e=>String(e).includes(t)))})));return e.filter((e=>e.available))}),[o,r.allowedVariantIds]),x=de((()=>(null==o?void 0:o.options)?o.options.map(((e,t)=>{const o=0===t?"option1":1===t?"option2":"option3";let r=w;0!==t&&u&&(r=r.filter((e=>e.option1===u))),1!==t&&h&&(r=r.filter((e=>e.option2===h))),2!==t&&f&&(r=r.filter((e=>e.option3===f)));const n=new Set(r.map((e=>e[o])).filter(Boolean));return{...e,values:e.values.filter((e=>n.has(e)))}})):[]),[o,w,u,h]),C=de((()=>w.find((e=>e.option1===u&&e.option2===h&&e.option3===f))),[w,u,h,f]),k=ue((async e=>{var t,c,d;if(!e)return;i();const u={id:e.id,quantity:r.quantity,...r.giftTierId&&"free_product"===(null==(t=r.track)?void 0:t.source)&&{properties:{...bn(gn,"1"),...bn("gift_tier_source","1"),...bn(_n,r.giftTierId)}}},p=(({product:e,variant:t,context:o})=>{if(o||e||t)return{...o||{},recommended_product_id:(null==o?void 0:o.recommended_product_id)||(null==e?void 0:e.id),recommended_variant_id:(null==o?void 0:o.recommended_variant_id)||(null==t?void 0:t.id)||Pn(e),recommended_title:(null==o?void 0:o.recommended_title)||(null==e?void 0:e.title)}})({product:o,variant:e,context:null==(c=r.track)?void 0:c.recommendationContext}),h=await a([u],{track:{...r.track,recommendationContext:p}});if(!h)return;const m=await s({refetchRecommendations:!0});ri({operation:"add",originalProduct:e,requestedQty:r.quantity,originalCart:l,updatedCart:m,source:(null==(d=r.track)?void 0:d.source)||"recommendation",recommendationContext:p}),n.resolve(h)}),[a,l,i,s,r,n]);ae((()=>{if(1===w.length&&t){const e=w[0];p(e.option1),m(e.option2),g(e.option3)}}),[w,t,o,r]);const S=o&&Ko("div",{className:"cro_cart_variant_drawer__content",children:[Ko(_p,{className:"cro_cart_variant_drawer__product",variant:C,isOutOfStock:!!C&&!(null==C?void 0:C.available),product:o,imageSize:v,imageRatio:_}),Ko("div",{className:"cro_cart_variant_drawer__options",children:x.map(((e,t)=>0===e.values.length?null:Ko(bv,{className:"cro_cart_variant_drawer__select",label:e.name,value:0===t?u:1===t?h:f,options:e.values.map((e=>({label:e,value:e}))),onChange:e=>{0===t?p(e):1===t?m(e):g(e)}},e.name)))}),Ko(ch,{className:"cro_cart_variant_drawer__button_wrapper",colors:{primaryColor:null==(e=null==c?void 0:c.actionsColor)?void 0:e.hex},children:Ko(gc,{className:"cro_cart_variant_drawer__button",size:"large",disabled:!C,onClick:()=>{k(C),y()},children:null==d?void 0:d.addToCartText})})]});return Ko(b,{children:[Ko(sh,{className:"cro_cart_variant_drawer__overlay",isOpen:t,onClick:()=>{i(),y(),n.reject()}}),Ko(lh,{className:"cro_cart_variant_drawer","data-testid":"variant-drawer","data-cro-testid":"variant-drawer",isOpen:t,children:S})]})};var bv=ls(ah).withConfig({componentId:"CROCart__sc-1u3v5s5-0"})({marginTop:"1.25rem"});const Cv=cs`*, ::before, ::after { box-sizing: border-box; border-width: 0; border-style: solid; border-color: #e5e7eb; --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate: 0; --tw-skew-x: 0; --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-pan-x: var(--tw-empty,/*!*/ /*!*/); --tw-pan-y: var(--tw-empty,/*!*/ /*!*/); --tw-pinch-zoom: var(--tw-empty,/*!*/ /*!*/); --tw-scroll-snap-strictness: proximity; --tw-gradient-from-position: var(--tw-empty,/*!*/ /*!*/); --tw-gradient-via-position: var(--tw-empty,/*!*/ /*!*/); --tw-gradient-to-position: var(--tw-empty,/*!*/ /*!*/); --tw-ordinal: var(--tw-empty,/*!*/ /*!*/); --tw-slashed-zero: var(--tw-empty,/*!*/ /*!*/); --tw-numeric-figure: var(--tw-empty,/*!*/ /*!*/); --tw-numeric-spacing: var(--tw-empty,/*!*/ /*!*/); --tw-numeric-fraction: var(--tw-empty,/*!*/ /*!*/); --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-shadow-colored: 0 0 #0000; --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgb(59 130 246 / 0.5); --tw-blur: var(--tw-empty,/*!*/ /*!*/); --tw-brightness: var(--tw-empty,/*!*/ /*!*/); --tw-contrast: var(--tw-empty,/*!*/ /*!*/); --tw-grayscale: var(--tw-empty,/*!*/ /*!*/); --tw-hue-rotate: var(--tw-empty,/*!*/ /*!*/); --tw-invert: var(--tw-empty,/*!*/ /*!*/); --tw-saturate: var(--tw-empty,/*!*/ /*!*/); --tw-sepia: var(--tw-empty,/*!*/ /*!*/); --tw-drop-shadow: var(--tw-empty,/*!*/ /*!*/); --tw-backdrop-blur: var(--tw-empty,/*!*/ /*!*/); --tw-backdrop-brightness: var(--tw-empty,/*!*/ /*!*/); --tw-backdrop-contrast: var(--tw-empty,/*!*/ /*!*/); --tw-backdrop-grayscale: var(--tw-empty,/*!*/ /*!*/); --tw-backdrop-hue-rotate: var(--tw-empty,/*!*/ /*!*/); --tw-backdrop-invert: var(--tw-empty,/*!*/ /*!*/); --tw-backdrop-opacity: var(--tw-empty,/*!*/ /*!*/); --tw-backdrop-saturate: var(--tw-empty,/*!*/ /*!*/); --tw-backdrop-sepia: var(--tw-empty,/*!*/ /*!*/); --tw-contain-size: var(--tw-empty,/*!*/ /*!*/); --tw-contain-layout: var(--tw-empty,/*!*/ /*!*/); --tw-contain-paint: var(--tw-empty,/*!*/ /*!*/); --tw-contain-style: var(--tw-empty,/*!*/ /*!*/); } ::before, ::after { --tw-content: ''; } html, :host { line-height: 1.5; -webkit-text-size-adjust: 100%; -moz-tab-size: 4; tab-size: 4; font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; font-feature-settings: normal; font-variation-settings: normal; -webkit-tap-highlight-color: transparent; } body { margin: 0; line-height: inherit; } hr { height: 0; color: inherit; border-top-width: 1px; } abbr:where([title]) { text-decoration: underline dotted; } h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; } a { color: inherit; text-decoration: inherit; } b, strong { font-weight: bolder; } code, kbd, samp, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-feature-settings: normal; font-variation-settings: normal; font-size: 1em; } small { font-size: 80%; } sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } sub { bottom: -0.25em; } sup { top: -0.5em; } table { text-indent: 0; border-color: inherit; border-collapse: collapse; } button, input, optgroup, select, textarea { font-family: inherit; font-feature-settings: inherit; font-variation-settings: inherit; font-size: 100%; font-weight: inherit; line-height: inherit; letter-spacing: inherit; color: inherit; margin: 0; padding: 0; } button, select { text-transform: none; } button, input:where([type='button']), input:where([type='reset']), input:where([type='submit']) { -webkit-appearance: button; background-color: transparent; background-image: none; } :-moz-focusring { outline: auto; } :-moz-ui-invalid { box-shadow: none; } progress { vertical-align: baseline; } ::-webkit-inner-spin-button, ::-webkit-outer-spin-button { height: auto; } [type='search'] { -webkit-appearance: textfield; outline-offset: -2px; } ::-webkit-search-decoration { -webkit-appearance: none; } ::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; } summary { display: list-item; } blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre { margin: 0; } fieldset { margin: 0; padding: 0; } legend { padding: 0; } ol, ul, menu { list-style: none; margin: 0; padding: 0; } dialog { padding: 0; } textarea { resize: vertical; } input::placeholder, textarea::placeholder { opacity: 1; color: #9ca3af; } button, [role="button"] { cursor: pointer; } :disabled { cursor: default; } img, svg, video, canvas, audio, iframe, embed, object { display: block; vertical-align: middle; } img, video { max-width: 100%; height: auto; } [hidden] { display: none; } ::backdrop { --tw-border-spacing-x: 0; --tw-border-spacing-y: 0; --tw-translate-x: 0; --tw-translate-y: 0; --tw-rotate: 0; --tw-skew-x: 0; --tw-skew-y: 0; --tw-scale-x: 1; --tw-scale-y: 1; --tw-pan-x: var(--tw-empty,/*!*/ /*!*/); --tw-pan-y: var(--tw-empty,/*!*/ /*!*/); --tw-pinch-zoom: var(--tw-empty,/*!*/ /*!*/); --tw-scroll-snap-strictness: proximity; --tw-gradient-from-position: var(--tw-empty,/*!*/ /*!*/); --tw-gradient-via-position: var(--tw-empty,/*!*/ /*!*/); --tw-gradient-to-position: var(--tw-empty,/*!*/ /*!*/); --tw-ordinal: var(--tw-empty,/*!*/ /*!*/); --tw-slashed-zero: var(--tw-empty,/*!*/ /*!*/); --tw-numeric-figure: var(--tw-empty,/*!*/ /*!*/); --tw-numeric-spacing: var(--tw-empty,/*!*/ /*!*/); --tw-numeric-fraction: var(--tw-empty,/*!*/ /*!*/); --tw-ring-offset-shadow: 0 0 #0000; --tw-ring-shadow: 0 0 #0000; --tw-shadow: 0 0 #0000; --tw-shadow-colored: 0 0 #0000; --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/); --tw-ring-offset-width: 0px; --tw-ring-offset-color: #fff; --tw-ring-color: rgb(59 130 246 / 0.5); --tw-blur: var(--tw-empty,/*!*/ /*!*/); --tw-brightness: var(--tw-empty,/*!*/ /*!*/); --tw-contrast: var(--tw-empty,/*!*/ /*!*/); --tw-grayscale: var(--tw-empty,/*!*/ /*!*/); --tw-hue-rotate: var(--tw-empty,/*!*/ /*!*/); --tw-invert: var(--tw-empty,/*!*/ /*!*/); --tw-saturate: var(--tw-empty,/*!*/ /*!*/); --tw-sepia: var(--tw-empty,/*!*/ /*!*/); --tw-drop-shadow: var(--tw-empty,/*!*/ /*!*/); --tw-backdrop-blur: var(--tw-empty,/*!*/ /*!*/); --tw-backdrop-brightness: var(--tw-empty,/*!*/ /*!*/); --tw-backdrop-contrast: var(--tw-empty,/*!*/ /*!*/); --tw-backdrop-grayscale: var(--tw-empty,/*!*/ /*!*/); --tw-backdrop-hue-rotate: var(--tw-empty,/*!*/ /*!*/); --tw-backdrop-invert: var(--tw-empty,/*!*/ /*!*/); --tw-backdrop-opacity: var(--tw-empty,/*!*/ /*!*/); --tw-backdrop-saturate: var(--tw-empty,/*!*/ /*!*/); --tw-backdrop-sepia: var(--tw-empty,/*!*/ /*!*/); --tw-contain-size: var(--tw-empty,/*!*/ /*!*/); --tw-contain-layout: var(--tw-empty,/*!*/ /*!*/); --tw-contain-paint: var(--tw-empty,/*!*/ /*!*/); --tw-contain-style: var(--tw-empty,/*!*/ /*!*/); } h1 { font-size: 40px; line-height: 48px; font-weight: 700; } h2 { font-size: 34px; line-height: 42px; font-weight: 700; } h3 { font-size: 28px; line-height: 36px; font-weight: 700; }`,kv=cs({body:{WebkitTapHighlightColor:"#a855f7",WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale"}}),Sv=()=>Ko(b,{children:[Ko(Cv,{}),Ko(kv,{})]}),Tv=(e,t)=>"store"===t||""===e?e||"inherit":`"${e}", sans-serif`,$v=ls.div.withConfig({componentId:"CROCart__sc-2lofvu-0"})((({colors:e,fonts:t,corners:o})=>{const r=Tv(t.body,t.source),n=Tv(t.heading,t.source);return[ns` font-family: ${r}; height: 100%; overflow-y: auto; overflow-x: hidden; * { font-family: ${r}; } ${"store"===t.source&&ns` h1, h2, h3, h4, h5, h6, .cro_cart_header__text, .cro_cart_recommendations__title, .cro_cart_summary__protection_heading { font-family: ${n}; } `} `,e.backgroundColor&&ns` background-color: ${e.backgroundColor}; `,(null==e?void 0:e.primaryTextColor)&&ns` color: ${e.primaryTextColor}; `,ns` /* Webkit browsers (Chrome, Safari, Edge) */ ::-webkit-scrollbar { width: 5px; height: 5px; } ::-webkit-scrollbar-track { background-color: ${e.scrollTrackColor||"#f1f1f1"}; } ::-webkit-scrollbar-thumb { background: ${e.scrollBarColor||"#c1c1c1"}; border-radius: 2.5px; } ::-webkit-scrollbar-thumb:window-inactive { background: ${e.scrollBarColor||"#c1c1c1"}; } /* Firefox */ scrollbar-width: thin; scrollbar-color: ${e.scrollBarColor||"#c1c1c1"} ${e.scrollTrackColor||"#f1f1f1"}; `,"rounded-full"===o&&ns` ${fc}, ${jd}, ${ic}, ${Mc}, ${np} input, ${hu} textarea, ${Xc}, ${_c}, ${bc}, ${hm} { border-radius: 20px; } `,"rounded-sm"===o&&ns` ${fc}, ${jd}, ${ic}, ${Mc}, ${np} input, ${hu} textarea, ${Xc}, ${_c}, ${bc}, ${hm} { border-radius: 4px; } `,"square"===o&&ns` ${fc}, ${jd}, ${ic}, ${Mc}, ${np} input, ${hu} textarea, ${Xc}, ${_c}, ${bc}, ${hm} { border-radius: 0px; } `]})),Pv=(e,t)=>"string"!=typeof t||Ci(e),Av=["form[action*='/cart/add'], [data-zp-add-to-cart-form]"],Iv=()=>["form[action*='/cart/add'] button[name='add']","form[action*='/cart/add'] button[data-checkout='same']","form[action*='/cart/add'] button[type='submit']","form[action*='/cart/add'] input[type='submit']","form[action*='/cart/add'] button[data-add-to-cart]","form[action*='/cart/add'] label[role='submit']","form[data-zp-product-url='/cart'] button[type='submit']","form[action*='/cart/add'] a[role='submit']","[data-zp-add-to-cart]","a[href='/cart']","a[href$='/cart']",`a[href='https://${window.location.origin}/cart']`,"a[data-href='/cart']",`a[data-href='https://${window.location.origin}/cart']`],Rv=e=>{var t,o,r,n;if(!e)return!1;if(("classList"in e?Array.from(e.classList||[]):[]).some((e=>e.startsWith("gp-"))))return!0;return!!(e instanceof HTMLElement?Object.keys(e.dataset||{}):[]).some((e=>e.startsWith("gp")))||"querySelector"in e&&Boolean((null==(t=e.querySelector)?void 0:t.call(e,"[class*='gp-']"))||(null==(o=e.querySelector)?void 0:o.call(e,"[gp-data-hidden]"))||(null==(r=e.querySelector)?void 0:r.call(e,"[data-gp-text]"))||(null==(n=e.querySelector)?void 0:n.call(e,"[data-id][data-state]")))},Nv=e=>{var t;return!!e&&(!!(e instanceof HTMLFormElement&&Rv(e))||Boolean(null==(t=e.querySelector)?void 0:t.call(e,"button[class*='gp-'], [gp-data-hidden], [data-gp-text]")))},Ov=e=>{const t=e.target;Nv(t)||(e.stopImmediatePropagation(),e.preventDefault(),Ev(e))},Ev=async e=>{const t=e.target;if(t.action.includes("/cart/add")){e.preventDefault();const o=t.querySelector('[name="id"]'),r=null==o?void 0:o.value,n=t.querySelector('[name="quantity"]'),i=(null==n?void 0:n.value)??1;await Dv({id:r,quantity:i,...Lv(t)})}else console.log("CRO Cart: Cart form could not be automatically handled.")},Dv=({id:e,quantity:t,...o},r=function(){})=>(e=parseInt(e),t=parseInt(t),window.parent.fetch(`${window.location.origin}/cart/add.js`,{headers:{"content-type":"application/json"},body:JSON.stringify({id:e,quantity:t,...o}),method:"POST"}).catch((e=>{console.log(e)}))),Lv=e=>{const t=new FormData(e),o={properties:{}};for(const[r,n]of t.entries())if(r.includes("properties")){const e=r.substring(r.indexOf("[")+1,r.indexOf("]"));o.properties[e]=n}else r.includes("utf")||r.includes("form_type")||(o[r]=n);return o},Mv=e=>{var t,o;const r=e.target,n=r.closest(Av.join(", "));if(!(e=>{var t;if(!e)return!1;const o=null==(t=e.closest)?void 0:t.call(e,"button, [role='button'], a");return Rv(o||e)})(r)&&!Nv(n)&&(e.stopImmediatePropagation(),e.preventDefault(),n)){const e=r.closest("button, [role='button']");null==(t=null==e?void 0:e.setAttribute)||t.call(e,"type","submit"),null==(o=null==e?void 0:e.removeAttribute)||o.call(e,"data-product-id"),Ev({preventDefault:()=>{},stopImmediatePropagation:()=>{},target:n})}},Bv=()=>{const{openCartDrawer:e}=_i(),[t,o]=ne([]),r=ue((()=>{const t=au(iu.THEME_OVERRIDE)(e);return null!==t&&(o(t.clickableThemeSelectors),!0)}),[e]);return ae((()=>{if(r())return;const t=["a[href='/cart']","a[href$='/cart']"];o(t);const n=t=>{t.preventDefault(),e()};t.forEach((e=>{var t;null==(t=document.querySelectorAll(e))||t.forEach((e=>{e.setAttribute("href",""),e.addEventListener("click",n)}))})),(()=>{const e=window.parent.document,t=e=>{e.matches(Av.join(", "))&&e.addEventListener("submit",Ov,!0),e.matches(Iv().join(", "))&&e.addEventListener("click",Mv,!0)};e.querySelectorAll(Av.join(", ")).forEach(t),e.querySelectorAll(Iv().join(", ")).forEach(t),new MutationObserver((e=>{e.forEach((e=>{"childList"===e.type&&e.addedNodes.forEach((e=>{e.nodeType===Node.ELEMENT_NODE&&(t(e),e.querySelectorAll(Av.join(", ")+", "+Iv().join(", ")).forEach(t))}))}))})).observe(e.body,{childList:!0,subtree:!0})})()}),[]),{clickableThemeSelectors:t}},Hv="data-cro-store-font-inheritance",zv=/(fonts\.googleapis|fonts\.shopifycdn|\/cdn\/fonts\/)/i,jv=new Set(["-apple-system","-webkit-body","caption","blinkmacsystemfont","cursive","emoji","fangsong","fantasy","inherit","initial","math","menu","message-box","monospace","revert","sans-serif","serif","small-caption","status-bar","system-ui","ui-monospace","ui-rounded","ui-sans-serif","ui-serif","unset"]),Fv=e=>e.trim().replace(/^["']|["']$/g,""),qv=e=>(null==e?void 0:e.trim().replace(/\s*!important\s*$/i,""))||"",Wv=e=>{const t=(e=>{const t=[];let o="",r=null;for(const n of e)'"'!==n&&"'"!==n||r&&r!==n||(r=r?null:n),","!==n||r?o+=n:(t.push(o.trim()),o="");return o.trim()&&t.push(o.trim()),t})(qv(e)),o=t.findIndex((e=>{const t=Fv(e).toLowerCase();return t&&!jv.has(t)}));return{families:t,index:o,family:o>=0?Fv(t[o]):""}},Uv=(e,t)=>{const{families:o,index:r,family:n}=Wv(e);return n?o.map(((e,t)=>t===r?(e=>`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`)(n):e)).join(", "):t},Vv=e=>{const t=window.getComputedStyle(e),o=e.getBoundingClientRect();return"none"!==t.display&&"hidden"!==t.visibility&&0!==Number(t.opacity)&&o.width>0&&o.height>0},Gv=e=>{const t=window.getComputedStyle(e.documentElement),o=Uv(t.getPropertyValue("--font-body-family")||window.getComputedStyle(e.body).fontFamily,"sans-serif"),r=Uv(t.getPropertyValue("--font-heading-family")||(e=>{const t=Array.from(e.querySelectorAll("h1, h2, h3")).find(Vv);return t?qv(window.getComputedStyle(t).fontFamily):""})(e),o);return Wv(o).family?{bodyStack:o,headingStack:r}:void 0},Yv=e=>{e.querySelectorAll(`[${Hv}]`).forEach((e=>e.remove()))},Qv=(e,t=document)=>{var o;try{Yv(e);const r=Gv(t);if(!r)return;const n=new Set([Wv(r.bodyStack).family.toLowerCase(),Wv(r.headingStack).family.toLowerCase()].filter(Boolean)),{cssTexts:i,readableHrefs:a}=((e,t)=>{const o=[],r=new Set,n=new Set,i=e=>{Array.from(e).forEach((e=>{if(e.type===CSSRule.IMPORT_RULE){const t=e.styleSheet;if(t)try{i(t.cssRules)}catch{}return}if(e.type===CSSRule.FONT_FACE_RULE){const n=e,i=Fv(n.style.getPropertyValue("font-family")).toLowerCase();return void(t.has(i)&&!r.has(n.cssText)&&(r.add(n.cssText),o.push(n.cssText)))}const n=e.cssRules;n&&i(n)}))};return Array.from(e.styleSheets).forEach((e=>{try{i(e.cssRules),e.href&&n.add(e.href)}catch{}})),{cssTexts:o,readableHrefs:n}})(t,n),l=e.createElement("style");return l.setAttribute(Hv,"true"),l.textContent=`${i.join("\n")}\n:root {\n --cro-font-heading: ${r.headingStack};\n --cro-font-body: ${r.bodyStack};\n}`,null==(o=e.head)||o.appendChild(l),((e,t,o)=>{const r=new Set;e.querySelectorAll('link[rel~="stylesheet"]').forEach((e=>{if(!zv.test(e.href)||o.has(e.href)||r.has(e.href))return;const n=t.importNode(e,!0);n.setAttribute(Hv,"true"),t.head.appendChild(n),r.add(e.href)}))})(t,e,a),r}catch{return}};function Xv(){var e,t,o,r,n,i;const{setConfig:a,setConfigSections:l,general:s,isInBuilder:c,promoBanner:d,version:u}=no(),{refetch:p,addProducts:h}=mi(),{closeCartDrawer:m,openCartDrawer:f}=_i(),{clickableThemeSelectors:g}=Bv();var v,_;v=[`#${po}`,`#${ho}`,...g],_=m,ae((()=>{const e=e=>{v.every((t=>Array.from((null==document?void 0:document.querySelectorAll(t))||[]).every((t=>{const o=t.getBoundingClientRect();return!!o&&(e.clientXo.right||e.clientYo.bottom)}))))&&_()};return window.addEventListener("click",e),()=>{window.removeEventListener("click",e)}}),[v]);const y=null==(t=null==(e=document.getElementById(po))?void 0:e.contentDocument)?void 0:t.head,w={backgroundColor:null==(o=null==s?void 0:s.backgroundColor)?void 0:o.hex,primaryTextColor:null==(r=null==s?void 0:s.primaryTextColor)?void 0:r.hex,scrollBarColor:null==(n=null==s?void 0:s.scrollBarColor)?void 0:n.hex,scrollTrackColor:null==(i=null==s?void 0:s.scrollTrackColor)?void 0:i.hex},x=s.fontFamily,b=s.fontSource,C=!c&&"store"===b,k={source:C?"store":"supported",body:C?"var(--cro-font-body, inherit)":x,heading:C?"var(--cro-font-heading, var(--cro-font-body, inherit))":x},S=s.corners;return ae((()=>{((e=!1)=>{var t;const o="development"===uo.nodeEnv||"dev"===uo.nodeEnv;let r=null,n=null;try{"undefined"!=typeof window&&window.parent&&(n=window.parent.location.href,r=new URLSearchParams(window.parent.location.search))}catch(u){}const i=null==r?void 0:r.has("cro_cart_preview"),a="undefined"!=typeof localStorage&&localStorage.getItem("cro_cart_preview"),l=i||!!a,s=null==r?void 0:r.has("debug"),c=e||o||l||s,d=(null==r?void 0:r.has("debug_tools"))||(null==r?void 0:r.has("debug_logs"));if(d&&console.log("🔍 Debug tools initialization check:",{NODE_ENV:uo.nodeEnv,isInBuilder:e,isDevelopment:o,isPreview:l,hasDebugParam:s,willInitialize:c}),c){if(null==(t=window.CROCart)?void 0:t.debug)return void(d&&console.log("🔄 Debug tools already initialized"));af("debug",{triggerSectionError:sf,clearSectionErrors:cf,listErrorBoundaries:uf,listSections:pf,getTriggeredErrors:()=>Array.from(lf),enableLogs:e=>Go.enableLogs(e),disableLogs:e=>Go.disableLogs(e),enableAllLogs:()=>Go.enableAllLogs(),disableAllLogs:()=>Go.disableAllLogs(),getEnabledLogs:()=>Go.getEnabledLogs(),clearGiftTierRemovals:hf,refreshCart:()=>{var e,t;const o=null==(e=window.CROCart)?void 0:e.closeCartDrawer,r=null==(t=window.CROCart)?void 0:t.openCartDrawer;o&&r?(console.log("🔄 Refreshing cart..."),o(),setTimeout((()=>r()),100)):console.log("❌ Cart refresh functions not available")},help:()=>{console.log("📚 Debug Tools Help:"),console.log("=".repeat(70)),console.log("\n🔴 ERROR TESTING:"),console.log(" .listSections() - List all available sections"),console.log(" .triggerSectionError('name') - Trigger error in section"),console.log(" .clearSectionErrors() - Clear all error triggers"),console.log(" .getTriggeredErrors() - See active error triggers"),console.log("\n📝 DEBUG LOGGING:"),console.log(" .enableLogs('namespace') - Enable debug logs for namespace"),console.log(" .disableLogs('namespace') - Disable debug logs for namespace"),console.log(" .enableAllLogs() - Enable all debug logs"),console.log(" .disableAllLogs() - Disable all debug logs"),console.log(" .getEnabledLogs() - See enabled log namespaces"),console.log("\n🎁 GIFT TIERS:"),console.log(" .enableLogs('giftTiers') - Enable gift tiers debug logs"),console.log(" .clearGiftTierRemovals() - Clear 'removed gift' memory (allows auto-add again)"),console.log(" Logs show: tier calculations, auto-add/remove, thresholds, etc."),console.log("\n💰 CART TOTALS LOGGING:"),console.log(" .enableLogs('cartTotals') - Enable cart totals/checkout debug logs"),console.log(" This will show: amount updates, checkout button, totals row sync"),console.log("\n🛒 RECOMMENDATIONS LOGGING:"),console.log(" .enableLogs('recommendations') - Enable recommendation UI interaction logs"),console.log(" .enableLogs('recommendationsRules') - Enable rules engine evaluation logs"),console.log("\n🛍️ ADD TO CART (ATC) LOGGING:"),console.log(" .enableLogs('atc') - Enable ATC detection logs"),console.log(" This will show: intercepted requests, condition checks, cart triggers, duplicates"),console.log("\n⚙️ OTHER:"),console.log(" .refreshCart() - Refresh the cart"),console.log("=".repeat(70)),console.log("\n💡 Available namespaces: giftTiers, cartTotals, recommendations, recommendationsRules, cart, tracking, atc"),console.log("💡 Logs persist across refreshes via localStorage")}}),d&&(console.log("✅ Error testing tools initialized at window.CROCart.debug"),console.log("📚 Try: window.CROCart.debug.listSections()"),console.log("🔴 Trigger error: window.CROCart.debug.triggerSectionError('Recommendations')"),console.log("♻️ How to refresh: window.CROCart.debug.refreshCart()"))}})(c)}),[c]),ae((()=>{var e,t;if(c){const o=null==(t=null==(e=window.parent)?void 0:e.CROCart)?void 0:t.initialState,r=null==o?void 0:o.sections;r&&l(r)}c&&(af("setAppState",(e=>{a(e)})),af("addVariantToPreview",(e=>{h(e.map((e=>({id:e,quantity:1}))))}))),af("closeCartDrawer",m),af("openCartDrawer",f),u&&af("version",u),"development"===uo.mode&&co((()=>import("./mocks.js")),[]).then((({initialConfigMock:e})=>a(e))).catch(io),p({refetchRecommendations:!0}).then((e=>{var t;ri({operation:"appLoad",updatedCart:e}),rn({event:"cart_loaded",payload:{cart:e,cart_has_items:!!(null==(t=null==e?void 0:e.items)?void 0:t.length),cart_attributes_present:!!Object.keys((null==e?void 0:e.attributes)||{}).length,recommendations_prefetched:!0,is_builder:!1}})})).catch(io)}),[]),ae((()=>{if(c){const e=window.parent.CROCart.handlePreviewLoad;e&&e()}}),[]),ae((()=>{gi({},{"@media only screen and (max-width: 768px)":`\n {\n min-width: unset !important;\n width: ${(null==s?void 0:s.fullSizeCartMobile)?"100vw":"min(95vw, 400px)"} !important;\n }\n `})}),[null==s?void 0:s.fullSizeCartMobile]),ae((()=>{var e;const t=document.getElementById(po),o=(null==t?void 0:t.contentDocument)||document,r=o.getElementById("cro-cart-custom-css");if(r&&r.remove(),null==s?void 0:s.customCss){const t=o.createElement("style");t.id="cro-cart-custom-css",t.textContent=s.customCss,null==(e=o.head)||e.appendChild(t)}}),[null==s?void 0:s.customCss]),ae((()=>{var e,t,o;if(C)return;const r=((e=!1)=>e?gs:gs.filter((e=>!e.hidden)))().find((e=>e.value===x)),n=null==(e=fi())?void 0:e.contentDocument;if(!r)return;const i=e=>{var t;const o=null==n?void 0:n.createElement("link");Object.entries(e).forEach((([e,t])=>{o.setAttribute(e,t)})),null==(t=null==n?void 0:n.head)||t.appendChild(o)};if(i({rel:"preconnect",href:"https://fonts.googleapis.com"}),i({rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:""}),"google"===r.type)i({rel:"stylesheet",href:null==(t=r.definition)?void 0:t.src});else if("remote"===r.type){const{src:e,format:t,...i}=r.definition,a=document.createElement("style");a.textContent=`\n @font-face {\n font-family: "${r.value}";\n src: url("${e}") format("${t}");\n ${Object.entries(i).map((([e,t])=>`${e}: ${t};`)).join("\n")}\n }\n `,null==(o=null==n?void 0:n.head)||o.appendChild(a)}}),[x,C]),ae((()=>{var e;const t=null==(e=fi())?void 0:e.contentDocument;if(t)if(C)try{Qv(t)}catch{}else Yv(t)}),[C]),Ko("div",{children:Ko(ql,{target:y,shouldForwardProp:Pv,children:[Ko(Sv,{}),Ko($v,{"data-cro-testid":"cart-drawer",colors:w,fonts:k,corners:S,children:[Ko(Ku,{sectionName:"Header",children:Ko(lm,{})}),"top"===(null==d?void 0:d.imagePosition)&&Ko(Ku,{sectionName:"PromoBanner",children:Ko(rf,{})}),Ko(Ku,{sectionName:"CustomHtml-above_announcement",children:Ko(tp,{position:"above_announcement"})}),Ko(Ku,{sectionName:"Announcements",children:Ko(Ks,{})}),Ko(Ku,{sectionName:"CustomHtml-below_announcement",children:Ko(tp,{position:"below_announcement"})}),"bottom"===(null==d?void 0:d.imagePosition)&&Ko(Ku,{sectionName:"PromoBanner",children:Ko(rf,{})}),Ko(Ku,{sectionName:"CustomHtml-above_progress",children:Ko(tp,{position:"above_progress"})}),Ko(Ku,{sectionName:"Progress",children:Ko(Km,{})}),Ko(Ku,{sectionName:"CustomHtml-below_progress",children:Ko(tp,{position:"below_progress"})}),Ko(Ku,{sectionName:"CartProducts",children:Ko(Gd,{})}),Ko(Ku,{sectionName:"CustomHtml-below_products",children:Ko(tp,{position:"below_products"})}),Ko(Ku,{sectionName:"FreeProduct",children:Ko(rm,{})}),Ko(Ku,{sectionName:"CustomHtml-above_recommendations",children:Ko(tp,{position:"above_recommendations"})}),Ko(Ku,{sectionName:"Recommendations",children:Ko(vv,{})}),Ko(Ku,{sectionName:"CustomHtml-below_recommendations",children:Ko(tp,{position:"below_recommendations"})}),Ko(Ku,{sectionName:"DiscountCode",children:Ko(ip,{})}),Ko(Ku,{sectionName:"CustomHtml-above_cart_summary",children:Ko(tp,{position:"above_cart_summary"})}),Ko(Ku,{sectionName:"CartSummary",children:Ko(Fu,{})}),Ko(Ku,{sectionName:"CustomHtml-above_payment_providers",children:Ko(tp,{position:"above_payment_providers"})}),Ko(Ku,{sectionName:"PaymentProviders",children:Ko(fm,{})}),Ko(Ku,{sectionName:"CustomHtml-above_benefits",children:Ko(tp,{position:"above_benefits"})}),Ko(Ku,{sectionName:"Benefits",children:Ko(tc,{})}),Ko(Ku,{sectionName:"VariantDrawer",children:Ko(xv,{})})]})]})})}const Kv=e=>{const t=document.querySelector("head"),o=document.createElement("style");o.type="text/css",o.textContent=e,t.appendChild(o)},Jv=()=>{const e=document.querySelector("body"),t=fi(!0);Kv(`\n .cro-cart-overflow-lock {\n overflow: hidden !important;\n }\n\n .cro-cart-overflow-lock::after {\n content: '';\n display: block;\n position: fixed;\n top: 0;\n left: 0;\n z-index: calc(${mo} - 100);\n width: 9999px;\n height: 9999px;\n background: rgba(0,0,0,0.5);\n }\n `),((e,t)=>{const o=t||fi();Object.entries(e).forEach((([e,t])=>{o[e]=t}))})({class:"cro_cart","data-cro-testid":"cart-iframe",frameBorder:"0",scrolling:"no"},t),gi({position:"fixed",top:"0",right:"0",width:"20vw",minWidth:"400px",height:"100%",maxHeight:"100dvh",zIndex:mo,transitionProperty:"all",overflow:"hidden",background:"white",boxShadow:"rgba(0, 0, 0, 0.1) 0px 0px 30px",transform:"translateX(100%)"},null,t),null==e||e.append(t);const o=t.contentDocument;return null==o||o.open("text/html","replace"),null==o||o.write('\n \n \n \n \n \n \n
\n \n '),null==o||o.close(),{appIframeDocumentHandle:o,appIframeHandle:t}},initialConfig = { "sections": { "general": { "name": "General", "productPrimaryColor": { "hex": "#1C1C1E" }, "productSecondaryColor": { "hex": "#7C7C80" }, "primaryTextColor": { "hex": "#111827" }, "secondaryTextColor": { "hex": "#7C7C80" }, "backgroundColor": { "hex": "#ffffff" }, "generalHeaderText": "Your bag", "continueShoppingText": "Continue shopping", "cartIsEmptyText": "There are no items in your cart.", "addToCartText": "Add to cart", "discountText": "Discount", "addText": "Add", "quantityShortText": "Qty:", "outOfStockText": "Out of stock", "chooseText": "Choose", "generalHeaderTextColor": { "hex": "#1C1C1E" }, "otherScriptIsUpdatingTheCart": false, "itemsCountTextColor": { "hex": "#7C7C80" }, "scrollBarColor": { "hex": "#e6e6e6" }, "scrollTrackColor": { "hex": "#808080" }, "isBordersActive": false, "isItemsCountActive": true, "shouldShowComparisonPrices": true, "fullSizeCartMobile": true, "corners": "rounded-sm", "lineItemImageRatio": "square", "lineItemImageSize": "medium", "fontSize": "", "fontFamily": "", "recentColors": [ "#868686", "#189d40", "#e7e9eb", "#f5f8f8" ], "quantityPickerDesign": 1, "lineItemDesign": 1, "showSaveText": true, "discountTextColor": { "hex": "#868686" }, "saveText": "Save {{amount}}", "showDiscountNames": true, "headerTextColor": { "hex": "#1C1C1E" }, "headerDesign": 1, "iconColor": { "hex": "#1C1C1E" }, "itemsTextColor": { "hex": "#1C1C1E" }, "itemsIconColor": { "hex": "#7C7C80" }, "customCss": ".sticky-add-to-cart__bar {\n display: none !important;\n}", "customHtml": "", "customHtmlPosition": "above_announcement", "customHtmlBlocks": [], "enableTranslations": false }, "promoBanner": { "isActive": false, "imageUrl": "", "imagePosition": "top", "imageMargin": "none" }, "announcement": { "name": "Announcement Bar", "isActive": true, "backgroundColor": { "hex": "#F5F5F7" }, "borderColor": { "hex": "#F5F5F7" }, "textColor": { "hex": "#1C1C1E" }, "annPosition": 1, "showBorders": false, "lines": [ "Your bag will be lost after {{time}}" ], "time": { "minutes": "10", "seconds": "0" } }, "progress": { "name": "Progress", "isActive": true, "backgroundColor": { "hex": "#1C1C1E1A" }, "textColor": { "hex": "#1C1C1E" }, "progressColor": { "hex": "#1C1C1E" }, "progressBarColor": { "hex": "#f5f8f8" }, "highlightTextColor": { "hex": "#1C1C1E" }, "secondaryTextColor": { "hex": "#7C7C80" }, "textBefore": "Get Free Shipping", "textAfter": "You unlocked your free shipping", "freeGiftText": "A free gift", "freeShippingText": "Free shipping", "progressDiscountText": "A {{percentage}}% discount", "designOption": 1, "textToNextFreeOption": "Spend {{money}} more to unlock {{option}}", "freeShippingRuleEnabled": true, "locked": true, "fireworksEnabled": true, "freeShippingRule": "99", "freeShippingThresholds": [], "markersChoice": "text", "animatedValue": "animated", "inlineBarBorderColor": { "hex": "#1c1c1e" } }, "tip": { "name": "Tip", "isActive": false, "backgroundColor": { "hex": "#1C1C1E1A" }, "textColor": { "hex": "#1C1C1E" }, "innerTextColor": { "hex": "#7C7C80" }, "headerText": "Recommended Pro Tip", "descriptionText": "Your educational tip here", "choiceTip": "all", "specificTipProducts": [], "textAlignment": "center" }, "freeProduct": { "name": "Free", "isActive": false, "logic": "priceRule", "priceRule": "99", "freeDiscountMessage": "Free Car Air Freshener", "borderColor": { "hex": "#F5F5F7" }, "splitLineColor": { "hex": "#1c1c1e" }, "primaryTextColor": { "hex": "#1C1C1E" }, "secondaryTextColor": { "hex": "#7C7C80" }, "textBefore": "Spend {{money}} more to get a free car air freshener!", "textAfter": "FREE 🎉", "hideOfferBox": false, "freeProduct": { "handle": "example", "descriptionHtml": "", "isFromOnBoarding": true }, "discountsIds": [ "gid://shopify/DiscountAutomaticNode/1544720777527" ], "couples": [], "buyXGetYConfig": { "isActive": false, "collectionHandles": [], "collectionData": [], "thresholdProductCount": 2, "discountedProductCount": 1, "headlineBeforeFulfilled": "Almost there! Get a free product below", "bodyBeforeFulfilled": "Buy another item from the collection to get a free product", "discountedProductsBadgeText": "Buy2Get1Free", "discountMessage": "Buy 2, Get 1 Free" }, "isBlinking": false, "freeProductImageRatio": "square", "freeProductImageSize": "medium", "textVariantPickerButton": "Add to cart", "textAfterOfferBox": "You’ve unlocked a free product. Pick a variant to claim it! 🎉", "chooseVariantButtonText": "Choose", "giftTiers": [], "stackTiers": true, "excludeGiftCards": false, "giftTierBackgroundColor": { "hex": "#F0F0FF" }, "giftTierButtonColor": { "hex": "#22C55E" } }, "recommendations": { "name": "Recommendations", "isActive": true, "isSlider": true, "isOutOfStock": false, "actionsColor": { "hex": "#1c1c1e" }, "headerColor": { "hex": "#1C1C1E" }, "textColor": { "hex": "#1C1C1E" }, "products": [], "productPriority": [], "recommendationChoice": "rules", "recommendationRulesNoMatchFallback": "automatic", "designOption": 2, "upsellHeaderText": "You may also want", "recommendationRules": [ { "name": "Rule 1", "priority": 1, "conditions": [ { "type": "cart-item-collection-set", "logic": "all", "value": [ "alphamenslab" ] } ], "logic": "all", "recommendations": { "type": "collections", "value": [ "total-wellness" ] }, "options": { "matchByTag": false } }, { "name": "Rule 2", "priority": 2, "conditions": [ { "type": "cart-item-collection-set", "logic": "any", "value": [ "total-wellness" ] } ], "logic": "all", "recommendations": { "type": "collections", "value": [ "alphamenslab" ] }, "options": { "matchByTag": false } } ], "recommendedProductImageRatio": "portrait", "recommendedProductImageSize": "medium", "recommendationIntent": "related", "recommendationLimit": 3, "buttonBackgroundColor": { "hex": "#ffffff" }, "actionsTextColor": { "hex": "#3D3DDB" }, "itemsBackgroundColor": { "hex": "#ffffff" } }, "bulkDiscounts": { "name": "Bulk Discounts", "isActive": false, "upsellDiscountMessage": "Get {{percentage}}% off on {{count}} or more products", "upsellColor": { "hex": "#1C1C1E" }, "textColor": { "hex": "#1C1C1E" }, "secondaryTextColor": { "hex": "#7C7C80" }, "upsellParts": [ { "count": "2", "percentage": "10" }, { "count": "3", "percentage": "20" } ], "upsellSpecificParts": [], "upsellCollections": [], "discountsIds": [], "choiceUpsell": "all", "designOption": 1, "itemBackgroundColor": { "hex": "#ffffff" } }, "orderDiscount": { "name": "Order Discount", "isActive": false, "threshold": "100", "percentageAmount": "10", "discountsIds": [], "orderDiscountMessage": "{{percentage}} off on orders above {{threshold}}", "isBlinking": false }, "discountCode": { "name": "Discount Code", "isActive": true, "backgroundColor": { "hex": "#1C1C1E" }, "headerTextColor": { "hex": "#1C1C1E" }, "textColor": { "hex": "#FFFFFF" }, "promotionalCodeText": "Promotional code", "promotionalCodePlaceholderText": "Enter promo code", "confirmText": "Confirm" }, "checkout": { "name": "Checkout", "isProductActive": false, "isOutOfStock": false, "isStickyCheckoutActive": true, "isContinueButtonActive": true, "isShippingPriceRowActive": true, "orderSummaryBackgroundColor": { "hex": "#ffffff" }, "orderSummaryTextColor": { "hex": "#1C1C1E" }, "buttonColor": { "hex": "#1C1C1E" }, "buttonTextColor": { "hex": "#ffffff" }, "infiniteAnimation": "none", "lockSvgEnabled": false, "infoText": "", "checkoutText": "Checkout", "totalText": "Total", "deliveryText": "Delivery", "shippingAndTaxText": "Shipping rates and tax calculated at checkout.", "addExpressShippingText": "Add express shipping", "subtotalText": "Subtotal", "shippingRatePrice": "2.50", "oneClickUpsellText": "Add {{product}} for {{price}}", "oneClickUpsellHeaderText": "", "oneClickUpsellDesignOption": 1, "shouldShowSavingsSummary": true, "savingsText": "Discounts", "summarySavingsCodesBgColor": { "hex": "#c6f1d5" }, "summarySavingsColor": { "hex": "#868686" }, "belowThresholdOption": 2, "belowThresholdCustomText": "Shipping calculated at checkout.", "customShippingMessage": "Shipping calculated at checkout." }, "paymentBadges": { "name": "Payment Badges", "isActive": false, "headerText": "Trusted", "badges": [ "", "", "" ], "size": "small", "alignment": "left", "itemBackgroundColor": { "hex": "#ffffff" }, "customIcons": [] }, "benefits": { "name": "Benefits Badges", "isActive": true, "backgroundColor": { "hex": "#ffffff" }, "textColor": { "hex": "#1C1C1E" }, "benefitsHeaderText": "We AlphaMens Lab offer", "designOption": 1, "iconColor": { "hex": "#1C1C1E" }, "badges": [ { "id": "badge-1", "svgKey": "delivery", "textKey": "deliveryText", "textValue": "Free Shipping Over $99", "createdAt": "2025-06-25T20:02:12.225Z", "updatedAt": "2025-06-25T20:02:12.225Z" }, { "id": "badge-2", "svgKey": "paid", "textKey": "returnText", "textValue": "Money Back Guarantee", "createdAt": "2025-06-25T20:02:12.225Z", "updatedAt": "2025-06-25T20:02:12.225Z" }, { "id": "badge-3", "svgKey": "military", "textKey": "warrantyText", "textValue": "NZ#1 Mens Health Store", "createdAt": "2025-06-25T20:02:12.225Z", "updatedAt": "2025-06-25T20:02:12.225Z" } ], "disableAllIcons": false }, "note": { "name": "Note", "isActive": false, "noteColor": { "hex": "#1C1C1E" }, "noteTextColor": { "hex": "#1C1C1E" }, "orderNoteText": "Have something to say?", "shareFeedbackText": "Share you feedback ..." }, "sticky": { "name": "Sticky Button", "backgroundColor": { "hex": "#1C1C1E" }, "textColor": { "hex": "#ffffff" }, "showLogic": "never", "position": "bottom/right", "size": "medium" }, "themes": { "name": "Themes", "customColor": { "hex": "#ffffff" } } }, "shopUrl": "alphamenslabnz.myshopify.com", "isInBuilder": false, "version": "0.13.0" };console.log({initialConfig:initialConfig}),async function(){var e,t;const{appIframeDocumentHandle:o}=Jv(),{setConfig:r}=no.getState();if(r(initialConfig),no.getState().isInBuilder||(()=>{const e=document.createElement("script");e.src=`https://js-de.sentry-cdn.com/${uo.sentryKey}.min.js`,e.crossOrigin="anonymous",e.onload=()=>{window.parent.Sentry.onLoad((function(){var e,t;window.parent.Sentry.init({release:null==(t=null==(e=no.getState())?void 0:e.config)?void 0:t.version,tracesSampleRate:0,replaysSessionSampleRate:0,replaysOnErrorSampleRate:1,integrations:[new window.parent.Sentry.Integrations.GlobalHandlers({onunhandledrejection:!1,onerror:!1})]})}))},document.getElementsByTagName("head")[0].appendChild(e)})(),no.getState().isInBuilder&&!(null==(t=null==(e=window.parent.CROCart)?void 0:e.storeSessionState)?void 0:t.isStorePasswordProtected)){z(Ko("div",{style:"width: 100vw; height: 100vh; display: flex; justify-content: center; align-items: center;",children:"Loading..."}),o.getElementById("app")),await Ss(initialConfig)}z(Ko(ao,{children:Ko(Xv,{})}),o.getElementById("app")),z(Ko(ao,{children:[Ko(ps,{}),Ko(us,{})]}),document.querySelector("body"))}().catch(io); })(); !function(){"use strict";((e,t)=>{try{if("undefined"!=typeof document){const e=document.createElement("style");for(const o in t.attributes)e.setAttribute(o,t.attributes[o]);e.appendChild(document.createTextNode("/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}*{font-family:sans-serif}* ::-webkit-scrollbar{width:5px;height:5px}")),setTimeout((()=>{var t;const o=null==(t=document.getElementById("cro-cart-app-iframe"))?void 0:t.contentDocument;null==o||o.head.appendChild(e)}),1)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})(0,{})}();