PageSourceSearch

https://obermeyer.com/cdn/shopifycloud/checkout-web/assets/c1/2c1ab0fe.GMbxnz74.js

js obermeyer.com collected 2026-10-02 11:32:53 UTC 138,809 bytes, 1 lines download raw bytes

vendor: 5,247 bytes, line 1
1var e,t,n,r,o,i,a,s,c,u,l,f,d,h,p,m,v={},_=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function w(e,t){for(var n in t)e[n]=t[n];return e}function b(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function E(t,n,r){var o,i,a,s={};for(a in n)"key"==a?o=n[a]:"ref"==a?i=n[a]:s[a]=n[a];if(arguments.length>2&&(s.children=arguments.length>3?e.call(arguments,2):r),"function"==typeof t&&null!=t.defaultProps)for(a in t.defaultProps)void 0===s[a]&&(s[a]=t.defaultProps[a]);return S(t,s,o,i,null)}function S(e,r,o,i,a){var s={type:e,props:r,key:o,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==a?++n:a,__i:-1,__u:0};return null==a&&null!=t.vnode&&t.vnode(s),s}function k(){return{current:null}}function x(e){return e.children}function C(e,t){this.props=e,this.context=t}function A(e,t){if(null==t)return e.__?A(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?A(e):null}function P(e){if(e.__P&&e.__d){var n=e.__v,r=n.__e,o=[],i=[],a=w({},n);a.__v=n.__v+1,t.vnode&&t.vnode(a),j(e.__P,a,n,e.__n,e.__P.namespaceURI,32&n.__u?[r]:null,o,null==r?A(n):r,!!(32&n.__u),i),a.__v=n.__v,a.__.__k[a.__i]=a,B(o,a,i),n.__e=n.__=null,a.__e!=r&&N(a)}}function N(e){if(null!=(e=e.__)&&null!=e.__c)return e.__e=e.__c.base=null,e.__k.some(function(t){if(null!=t&&null!=t.__e)return e.__e=e.__c.base=t.__e}),N(e)}function $(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!T.__r++||i!=t.debounceRendering)&&((i=t.debounceRendering)||a)(T)}function T(){try{for(var e,t=1;o.length;)o.length>t&&o.sort(s),e=o.shift(),t=o.length,P(e)}finally{o.length=T.__r=0}}function M(e,t,n,r,o,i,a,s,c,u,l){var f,d,h,p,m,y,w,b=r&&r.__k||_,E=t.length;for(c=function(e,t,n,r,o){var i,a,s,c,u,l=n.length,f=l,d=0;for(e.__k=new Array(o),i=0;i<o;i++)null!=(a=t[i])&&"boolean"!=typeof a&&"function"!=typeof a?("string"==typeof a||"number"==typeof a||"bigint"==typeof a||a.constructor==String?a=e.__k[i]=S(null,a,null,null,null):g(a)?a=e.__k[i]=S(x,{children:a},null,null,null):void 0===a.constructor&&a.__b>0?a=e.__k[i]=S(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):e.__k[i]=a,c=i+d,a.__=e,a.__b=e.__b+1,s=null,-1!=(u=a.__i=I(a,n,c,f))&&(f--,(s=n[u])&&(s.__u|=2)),null==s||null==s.__v?(-1==u&&(o>l?d--:o<l&&d++),"function"!=typeof a.type&&(a.__u|=4)):u!=c&&(u==c-1?d--:u==c+1?d++:(u>c?d--:d++,a.__u|=4))):e.__k[i]=null;if(f)for(i=0;i<l;i++)null!=(s=n[i])&&!(2&s.__u)&&(s.__e==r&&(r=A(s)),W(s,s));return r}(n,t,b,c,E),f=0;f<E;f++)null!=(h=n.__k[f])&&(d=-1!=h.__i&&b[h.__i]||v,h.__i=f,y=j(e,h,d,o,i,a,s,c,u,l),p=h.__e,h.ref&&d.ref!=h.ref&&(d.ref&&H(d.ref,null,h),l.push(h.ref,h.__c||p,h)),null==m&&null!=p&&(m=p),(w=!!(4&h.__u))||d.__k===h.__k?(c=O(h,c,e,w),w&&d.__e&&(d.__e=null)):"function"==typeof h.type&&void 0!==y?c=y:p&&(c=p.nextSibling),h.__u&=-7);return n.__e=m,c}function O(e,t,n,r){var o,i;if("function"==typeof e.type){for(o=e.__k,i=0;o&&i<o.length;i++)o[i]&&(o[i].__=e,t=O(o[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=A(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do{t=t&&t.nextSibling}while(null!=t&&8==t.nodeType);return t}function R(e,t){return t=t||[],null==e||"boolean"==typeof e||(g(e)?e.some(function(e){R(e,t)}):t.push(e)),t}function I(e,t,n,r){var o,i,a,s=e.key,c=e.type,u=t[n],l=null!=u&&!(2&u.__u);if(null===u&&null==s||l&&s==u.key&&c==u.type)return n;if(r>(l?1:0))for(o=n-1,i=n+1;o>=0||i<t.length;)if(null!=(u=t[a=o>=0?o--:i++])&&!(2&u.__u)&&s==u.key&&c==u.type)return a;return-1}function U(e,t,n){"-"==t[0]?e.setProperty(t,null==n?"":n):e[t]=null==n?"":"number"!=typeof n||y.test(t)?n:n+"px"}function L(e,t,n,r,o){var i,a;e:if("style"==t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||U(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||U(e.style,t,n[t])}else if("o"==t[0]&&"n"==t[1])i=t!=(t=t.replace(f,"$1")),a=t.toLowerCase(),t=a in e||"onFocusOut"==t||"onFocusIn"==t?a.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n[l]=r[l]:(n[l]=d,e.addEventListener(t,i?p:h,i)):e.removeEventListener(t,i?p:h,i);else{if("http://www.w3.org/2000/svg"==o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=t&&"height"!=t&&"href"!=t&&"list"!=t&&"form"!=t&&"tabIndex"!=t&&"download"!=t&&"rowSpan"!=t&&"colSpan"!=t&&"role"!=t&&"popover"!=t&&t in e)try{e[t]=null==n?"":n;break e}catch(s){}"function"==typeof n||(null==n||!1===n&&"-"!=t[4]?e.removeAttribute(t):e.setAttribute(t,"popover"==t&&1==n?"":n))}}function D(e){return function(n){if(this.l){var r=this.l[n.type+e];if(null==n[u])n[u]=d++;else if(n[u]<r[l])return;return r(t.event?t.event(n):n)}}}function j(n,r,o,i,a,s,c,u,l,f){var d,h,p,m,y,E,S,k,P,N,$,T,O,R,I,U,D=r.type;if(void 0!==r.constructor)return null;128&o.__u&&(l=!!(32&o.__u),s=[u=r.__e=o.__e]),(d=t.__b)&&d(r);e:if("function"==typeof D){h=c.length;try{if(P=r.props,N=D.prototype&&D.prototype.render,$=(d=D.contextType)&&i[d.__c],T=d?$?$.props.value:d.__:i,o.__c?k=(p=r.__c=o.__c).__=p.__E:(N?r.__c=p=new D(P,T):(r.__c=p=new C(P,T),p.constructor=D,p.render=K),$&&$.sub(p),p.state||(p.state={}),p.__n=i,m=p.__d=!0,p.__h=[],p._sb=[]),N&&null==p.__s&&(p.__s=p.state),N&&null!=D.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=w({}
vendor: 4,381 bytes, line 1
1,p.__s)),w(p.__s,D.getDerivedStateFromProps(P,p.__s))),y=p.props,E=p.state,p.__v=r,m)N&&null==D.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),N&&null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else{if(N&&null==D.getDerivedStateFromProps&&P!==y&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(P,T),r.__v==o.__v||!p.__e&&null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(P,p.__s,T)){r.__v!=o.__v&&(p.props=P,p.state=p.__s,p.__d=!1),r.__e=o.__e,r.__k=o.__k,r.__k.some(function(e){e&&(e.__=r)}),_.push.apply(p.__h,p._sb),p._sb=[],p.__h.length&&c.push(p);break e}null!=p.componentWillUpdate&&p.componentWillUpdate(P,p.__s,T),N&&null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(y,E,S)})}if(p.context=T,p.props=P,p.__P=n,p.__e=!1,O=t.__r,R=0,N)p.state=p.__s,p.__d=!1,O&&O(r),d=p.render(p.props,p.state,p.context),_.push.apply(p.__h,p._sb),p._sb=[];else do{p.__d=!1,O&&O(r),d=p.render(p.props,p.state,p.context),p.state=p.__s}while(p.__d&&++R<25);p.state=p.__s,null!=p.getChildContext&&(i=w(w({},i),p.getChildContext())),N&&!m&&null!=p.getSnapshotBeforeUpdate&&(S=p.getSnapshotBeforeUpdate(y,E)),I=null!=d&&d.type===x&&null==d.key?q(d.props.children):d,u=M(n,g(I)?I:[I],r,o,i,a,s,c,u,l,f),p.base=r.__e,r.__u&=-161,p.__h.length&&c.push(p),k&&(p.__E=p.__=null)}catch(j){if(c.length=h,r.__v=null,l||null!=s){if(j.then){for(r.__u|=l?160:128;u&&8==u.nodeType&&u.nextSibling;)u=u.nextSibling;null!=s&&(s[s.indexOf(u)]=null),r.__e=u}else if(null!=s)for(U=s.length;U--;)b(s[U])}else r.__e=o.__e;null==r.__k&&(r.__k=o.__k||[]),j.then||F(r),t.__e(j,r,o)}}else null==s&&r.__v==o.__v?(r.__k=o.__k,r.__e=o.__e):u=r.__e=function(n,r,o,i,a,s,c,u,l){var f,d,h,p,m,_,y,w=o.props||v,E=r.props,S=r.type;if("svg"==S?a="http://www.w3.org/2000/svg":"math"==S?a="http://www.w3.org/1998/Math/MathML":a||(a="http://www.w3.org/1999/xhtml"),null!=s)for(f=0;f<s.length;f++)if((m=s[f])&&"setAttribute"in m==!!S&&(S?m.localName==S:3==m.nodeType)){n=m,s[f]=null;break}if(null==n){if(null==S)return document.createTextNode(E);n=document.createElementNS(a,S,E.is&&E),u&&(t.__m&&t.__m(r,s),u=!1),s=null}if(null==S)w===E||u&&n.data==E||(n.data=E);else{if(s="textarea"==S&&null!=E.defaultValue?null:s&&e.call(n.childNodes),!u&&null!=s)for(w={},f=0;f<n.attributes.length;f++)w[(m=n.attributes[f]).name]=m.value;for(f in w)m=w[f],"dangerouslySetInnerHTML"==f?h=m:"children"==f||f in E||"value"==f&&"defaultValue"in E||"checked"==f&&"defaultChecked"in E||L(n,f,null,m,a);for(f in E)m=E[f],"children"==f?p=m:"dangerouslySetInnerHTML"==f?d=m:"value"==f?_=m:"checked"==f?y=m:u&&"function"!=typeof m||w[f]===m||L(n,f,m,w[f],a);if(d)u||h&&(d.__html==h.__html||d.__html==n.innerHTML)||(n.innerHTML=d.__html),r.__k=[];else if(h&&(n.innerHTML=""),M("template"==r.type?n.content:n,g(p)?p:[p],r,o,i,"foreignObject"==S?"http://www.w3.org/1999/xhtml":a,s,c,s?s[0]:o.__k&&A(o,0),u,l),null!=s)for(f=s.length;f--;)b(s[f]);u&&"textarea"!=S||(f="value","progress"==S&&null==_?n.removeAttribute("value"):null!=_&&(_!==n[f]||"progress"==S&&!_||"option"==S&&_!=w[f])&&L(n,f,_,w[f],a),f="checked",null!=y&&y!=n[f]&&L(n,f,y,w[f],a))}return n}(o.__e,r,o,i,a,s,c,l,f);return(d=t.diffed)&&d(r),128&r.__u?void 0:u}function F(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(F))}function B(e,n,r){for(var o=0;o<r.length;o++)H(r[o],r[++o],r[++o]);t.__c&&t.__c(n,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(e){e.call(n)})}catch(r){t.__e(r,n.__v)}})}function q(e){return"object"!=typeof e||null==e||e.__b>0?e:g(e)?e.map(q):void 0!==e.constructor?null:w({},e)}function H(e,n,r){try{if("function"==typeof e){var o="function"==typeof e.__u;o&&e.__u(),o&&null==n||(e.__u=e(n))}else e.current=n}catch(i){t.__e(i,r)}}function W(e,n,r){var o,i;if(t.unmount&&t.unmount(e),(o=e.ref)&&(o.current&&o.current!=e.__e||H(o,null,n)),null!=(o=e.__c)){if(o.componentWillUnmount)try{o.componentWillUnmount()}catch(a){t.__e(a,n)}o.base=o.__P=o.__n=null}if(o=e.__k)for(i=0;i<o.length;i++)o[i]&&W(o[i],n,r||"function"!=typeof e.type);r||b(e.__e),e.__c=e.__=e.__e=void 0}function K(e,t,n){return this.constructor(e,n)}function z(n,r,o){var i,a,s,c;r==document&&(r=document.documentElement),t.__&&t.__(n,r),a=(i="function"==typeof o)?null:o&&o.__k||r.__k,s=[],c=[],j(r,n=(!i&&o||r).__k=E(x,null,[n]),a||v,v,r.namespaceURI,!i&&o?[o]:a?null:r.firstChild?e.call(r.childNodes):null,
vendor: 1,675 bytes, line 1
1s,!i&&o?o:a?a.__e:r.firstChild,i,c),B(s,n,c),n.props.children=null}function G(e,t){z(e,t,G)}function J(t,n,r){var o,i,a,s,c=w({},t.props);for(a in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),n)"key"==a?o=n[a]:"ref"==a?i=n[a]:c[a]=void 0===n[a]&&null!=s?s[a]:n[a];return arguments.length>2&&(c.children=arguments.length>3?e.call(arguments,2):r),S(t.type,c,o||t.key,i||t.ref,null)}function V(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__e=!0,$(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c="__cC"+m++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}e=_.slice,t={__e:function(e,t,n,r){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&null!=i.getDerivedStateFromError&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),a=o.__d),a)return o.__E=o}catch(s){e=s}throw e}},n=0,r=function(e){return null!=e&&void 0===e.constructor},C.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=w({},this.state),"function"==typeof e&&(e=e(w({},n),this.props)),e&&w(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),$(this))},C.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),$(this))},C.prototype.render=x,o=[],a="function"==typeof Promise?Promise.prototype.then.bind(Prom
1ise.resolve()):setTimeout,s=function(e,t){return e.__v.__b-t.__v.__b},T.__r=0,c=Math.random().toString(8),u="__d"+c,l="__a"+c,f=/(PointerCapture)$|Capture$/i,d=0,h=D(!1),p=D(!0),m=0;var Z,X,Q,Y,ee=0,te=[],ne=t,re=ne.__b,oe=ne.__r,ie=ne.diffed,ae=ne.__c,se=ne.unmount,ce=ne.__;function ue(e,t){ne.__h&&ne.__h(X,e,ee||t),ee=0;var n=X.__H||(X.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function le(e){return ee=1,fe(Pe,e)}function fe(e,t,n){var r=ue(Z++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Pe(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=X,!X.__f)){var o=function(e,t,n){if(!r.__c.__H)return!0;var o=!1,a=r.__c.props!==e;if(r.__c.__H.__.some(function(e){if(e.__N){o=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(a=!0)}}),i){var s=i.call(this,e,t,n);return o?s||a:s}return!o||a};X.__f=!0;var i=X.shouldComponentUpdate,a=X.componentWillUpdate;X.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,o(e,t,n),i=r}a&&a.call(this,e,t,n)},X.shouldComponentUpdate=o}return r.__N||r.__}function de(e,t){var n=ue(Z++,3);!ne.__s&&Ae(n.__H,t)&&(n.__=e,n.u=t,X.__H.__h.push(n))}function he(e,t){var n=ue(Z++,4);!ne.__s&&Ae(n.__H,t)&&(n.__=e,n.u=t,X.__h.push(n))}function pe(e){return ee=5,ve(function(){return{current:e}},[])}function me(e,t,n){ee=6,he(function(){if("function"==typeof e){var n=e(t());return function(){e(null),n&&"function"==typeof n&&n()}}if(e)return e.current=t(),function(){return e.current=null}},null==n?n:n.concat(e))}function ve(e,t){var n=ue(Z++,7);return Ae(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function _e(e,t){return ee=8,ve(function(){return e},t)}function ye(e){var t=X.context[e.__c],n=ue(Z++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(X)),t.props.value):e.__}function ge(e,t){ne.useDebugValue&&ne.useDebugValue(t?t(e):e)}function we(e){var t=ue(Z++,10),n=le();return t.__=e,X.componentDidCatch||(X.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function be(){var e=ue(Z++,11);if(!e.__){for(var t=X.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Ee(){for(var e;e=te.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(xe),t.__h.some(Ce),t.__h=[]}catch(n){t.__h=[],ne.__e(n,e.__v)}}}ne.__b=function(e){X=null,re&&re(e)},ne.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),ce&&ce(e,t)},ne.__r=function(e){oe&&oe(e),Z=0;var t=(X=e.__c).__H;t&&(Q===X?(t.__h=[],X.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(xe),t.__h.some(Ce),t.__h=[],Z=0)),Q=X},ne.diffed=function(e){ie&&ie(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==te.push(t)&&Y===ne.requestAnimationFrame||((Y=ne.requestAnimationFrame)||ke)(Ee)),t.__H.__.some(function(e){e.u&&(e.__H=e.u,e.u=void 0)})),Q=X=null},ne.__c=function(e,t){t.some(function(e){try{e.__h.some(xe),e.__h=e.__h.filter(function(e){return!e.__||Ce(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],ne.__e(n,e.__v)}}),ae&&ae(e,t)},ne.unmount=function(e){se&&se(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{xe(e)}catch(n){t=n}}),n.__H=void 0,t&&ne.__e(t,n.__v))};var Se="function"==typeof requestAnimationFrame;function ke(e){var t,n=function(){clearTimeout(r),Se&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Se&&(t=requestAnimationFrame(n))}function xe(e){var t=X,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),X=t}function Ce(e){var t=X;e.__c=e.__(),X=t}function Ae(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Pe(e,t){return"function"==typeof t?t(e):t}var Ne=Symbol.for("preact-signals");function $e(){if(Ue>1)Ue--;else{var e,t=!1;for(function(){var e=Fe;for(Fe=void 0;void 0!==e;){var t=e.S;if(t.v===e.v)for(var n=t.t;void 0!==n;n=n.x)n.i===e.i&&(n.i=t.i);e=e.o}}();void 0!==Ie;){var n=Ie;for(Ie=void 0,Le++;void 0!==n;){var r=n.u;if(n.u=void 0,n.f&=-3,!(8&n.f)&&Ke(n))try{n.c()}catch(o){t||(e=o,t=!0)}n=r}}if(Le=0,Ue--,t)throw e}}function Te(e){if(Ue>0)return e();je=++De,Ue++;try{return e()}finally{$e()}}var Me,Oe=void 0;function Re(e){var t=Oe,n=Me;Oe=void 0,Me=void 0;try{return e()}finally{Oe=t,Me=n}}var Ie=void 0,Ue=0,Le=0,De=0,je=0,Fe=void 0,Be=0;function qe(e){if(void 0!==Oe){var t=e.n;if(void 0===t||t.t!==Oe)return t={i:0,S:e,p:Oe.s,n:void 0,t:Oe,e:void 0,x:void 0,r:t}
1,void 0!==Oe.s&&(Oe.s.n=t),Oe.s=t,e.n=t,32&Oe.f&&e.S(t),t;if(-1===t.i)return t.i=0,void 0!==t.n&&(t.n.p=t.p,void 0!==t.p&&(t.p.n=t.n),t.p=Oe.s,t.n=void 0,Oe.s.n=t,Oe.s=t),t}}function He(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.l=0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function We(e,t){return new He(e,t)}function Ke(e){for(var t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function ze(e){for(var t=e.s;void 0!==t;t=t.n){var n=t.S.n;if(void 0!==n&&(t.r=n),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function Ge(e){for(var t=e.s,n=void 0;void 0!==t;){var r=t.p;-1===t.i?(t.S.U(t),void 0!==r&&(r.n=t.n),void 0!==t.n&&(t.n.p=r)):n=t,t.S.n=t.r,void 0!==t.r&&(t.r=void 0),t=r}e.s=n}function Je(e,t){He.call(this,void 0,t),this.x=e,this.s=void 0,this.g=Be-1,this.f=4}function Ve(e,t){return new Je(e,t)}function Ze(e){var t=e.m;if(e.m=void 0,"function"==typeof t){Ue++;var n=Oe;Oe=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,Xe(e),r}finally{Oe=n,$e()}}}function Xe(e){for(var t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ze(e)}function Qe(e){if(Oe!==this)throw new Error("Out-of-order effect");Ge(this),Oe=e,this.f&=-2,8&this.f&&Xe(this),$e()}function Ye(e,t){this.x=e,this.m=void 0,this.s=void 0,this.u=void 0,this.f=32,this.name=null==t?void 0:t.name,Me&&Me.push(this)}function et(e,t){var n=new Ye(e,t);try{n.c()}catch(o){throw n.d(),o}var r=n.d.bind(n);return r[Symbol.dispose]=r,r}function tt(e){return function(){var t=arguments,n=this;return Te(function(){return Re(function(){return e.apply(n,[].slice.call(t))})})}}He.prototype.brand=Ne,He.prototype.h=function(){return!0},He.prototype.S=function(e){var t=this,n=this.t;n!==e&&void 0===e.e&&(e.x=n,this.t=e,void 0!==n?n.e=e:Re(function(){var e;null==(e=t.W)||e.call(t)}))},He.prototype.U=function(e){var t=this;if(void 0!==this.t){var n=e.e,r=e.x;void 0!==n&&(n.x=r,e.e=void 0),void 0!==r&&(r.e=n,e.x=void 0),e===this.t&&(this.t=r,void 0===r&&Re(function(){var e;null==(e=t.Z)||e.call(t)}))}},He.prototype.subscribe=function(e){var t=this;return et(function(){var n=t.value;Re(function(){return e(n)})},{name:"sub"})},He.prototype.valueOf=function(){return this.value},He.prototype.toString=function(){return this.value+""},He.prototype.toJSON=function(){return this.value},He.prototype.peek=function(){var e=this;return Re(function(){return e.value})},Object.defineProperty(He.prototype,"value",{get:function(){var e=qe(this);return void 0!==e&&(e.i=this.i),this.v},set:function(e){if(e!==this.v){if(Le>100)throw new Error("Cycle detected");n=this,0!==Ue&&0===Le&&n.l!==je&&(n.l=je,Fe={S:n,v:n.v,i:n.i,o:Fe}),this.v=e,this.i++,Be++,Ue++;try{for(var t=this.t;void 0!==t;t=t.x)t.t.N()}finally{$e()}}var n}}),Je.prototype=new He,Je.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f))return!0;if(this.f&=-5,this.g===Be)return!0;if(this.g=Be,this.f|=1,this.i>0&&!Ke(this))return this.f&=-2,!0;var e=Oe;try{ze(this),Oe=this;var t=this.x();(16&this.f||this.v!==t||0===this.i)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return Oe=e,Ge(this),this.f&=-2,!0},Je.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(var t=this.s;void 0!==t;t=t.n)t.S.S(t)}He.prototype.S.call(this,e)},Je.prototype.U=function(e){if(void 0!==this.t&&(He.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(var t=this.s;void 0!==t;t=t.n)t.S.U(t)}},Je.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(Je.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var e=qe(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),Ye.prototype.c=function(){var e=this.S();try{if(8&this.f)return;if(void 0===this.x)return;var t=this.x();"function"==typeof t&&(this.m=t)}finally{e()}},Ye.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ze(this),ze(this),Ue++;var e=Oe;return Oe=this,Qe.bind(this,e)},Ye.prototype.N=function(){2&this.f||(this.f|=2,this.u=Ie,Ie=this)},Ye.prototype.d=function(){this.f|=8,1&this.f||Xe(this)},Ye.prototype.dispose=function(){this.d()};var nt=function(e){for(var t in e){var n=e[t];"function"==typeof n?e[t]=tt(n):"object"!=typeof n||null===n||"brand"in n||nt(n)}};function rt(e){return function(){var t,n,r=function(){var e=Me;return Me=[],function(){var t=Me;return Me&&e&&(e=e.concat(Me)),Me=e,t}}();try{n=e.apply(void 0,[].slice.call(arguments))}catch(o){throw Me=void 0,o}finally{t=r()}return nt(n),n[Symbol.dispose]=tt(function(){if(t)for(var e=0;e<t.length;e++)t[e].dispose();t=void 0}),n}}var ot,it,at,st="undefined"!=typeof window&&!!window.__PREACT_SIGNALS_DEVTOOLS__,ct=[],ut=[];function lt(e,n){t[e]=n.bind(null,t[e]||function(){})}function ft(e){if(at){var t=at;at=void 0,t()}at=e&&e.S()}function dt(e){var t=this,n=e.data,o=pt(n);o.name="ReactiveDom",o.value=n;var i=ve(function(){for(var e=t,n=t.__v;n=n.__;
1)if(n.__c){n.__c.__$f|=4;break}var i=Ve(function(){var e=o.value.value;return 0===e?0:!0===e?"":e||""}),a=Ve(function(){return!Array.isArray(i.value)&&!r(i.value)}),s=et(function(){if(this.N=bt,a.value){var t=i.value;e.__v&&e.__v.__e&&3===e.__v.__e.nodeType&&(e.__v.__e.data=t)}}),c=t.__$u.d;return t.__$u.d=function(){s(),c.call(this)},[a,i]},[]),a=i[0],s=i[1];return a.value?s.peek():s.value}function ht(e,t,n,r){var o=t in e&&void 0===e.ownerSVGElement,i=We(n);return{o:function(e,t){i.value=e,r=t},d:et(function(){this.N=bt;var n=i.value.value;r[t]!==n&&(r[t]=n,o?e[t]=n:null==n||!1===n&&"-"!==t[4]?e.removeAttribute(t):e.setAttribute(t,n))})}}function pt(e,t){return ve(function(){return We(e,t)},[])}function mt(e,t){var n=pe(e);return n.current=e,it.__$f|=4,ve(function(){return Ve(function(){return n.current()},t)},[])}et(function(){ot=this.N})(),dt.displayName="ReactiveTextNode",Object.defineProperties(He.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:dt},props:{configurable:!0,get:function(){var e=this;return{data:{get value(){return e.value}}}}},__b:{configurable:!0,value:1}}),lt("__b",function(e,t){if("string"==typeof t.type){var n,r=t.props;for(var o in r)if("children"!==o){var i=r[o];i instanceof He&&(n||(t.__np=n={}),n[o]=i,r[o]=i.peek())}}e(t)}),lt("__r",function(e,t){if(e(t),t.type!==x){ft();var n,r=t.__c;r&&(r.__$f&=-2,void 0===(n=r.__$u)&&(r.__$u=(et(function(){o=this},{name:"function"==typeof t.type?t.type.displayName||t.type.name:""}),o.c=function(){var e;st&&(null==(e=n.y)||e.call(n)),r.__$f|=1,r.setState({})},n=o))),it=r,ft(n)}var o}),lt("__e",function(e,t,n,r){ft(),it=void 0,e(t,n,r)}),lt("diffed",function(e,t){var n;if(ft(),it=void 0,"string"==typeof t.type&&(n=t.__e)){var r=t.__np,o=t.props,i=n.U;if(i)for(var a in i){var s=i[a];void 0===s||r&&a in r||(s.d(),i[a]=void 0)}if(r)for(var c in i||(i={},n.U=i),r){var u=i[c],l=r[c];void 0===u?(u=ht(n,c,l,o),i[c]=u):u.o(l,o)}}e(t)}),lt("unmount",function(e,t){if("string"==typeof t.type){var n=t.__e;if(n){var r=n.U;if(r)for(var o in n.U=void 0,r){var i=r[o];i&&i.d()}}var a=t.__np;if(a){var s=t.props;for(var c in a)s[c]=a[c]}t.__np=void 0}else{var u=t.__c;if(u){var l=u.__$u;l&&(u.__$u=void 0,l.d())}}e(t)}),lt("__h",function(e,t,n,r){r<3&&(t.__$f|=2),e(t,n,r)}),C.prototype.shouldComponentUpdate=function(e,t){if(this.__R)return!0;var n=this.__$u,r=n&&void 0!==n.s;for(var o in t)return!0;if(this.__f||"boolean"==typeof this.u&&!0===this.u){var i=2&this.__$f;if(!(r||i||4&this.__$f))return!0;if(1&this.__$f)return!0}else{if(!(r||4&this.__$f))return!0;if(3&this.__$f)return!0}for(var a in e)if("__source"!==a&&e[a]!==this.props[a])return!0;for(var s in this.props)if(!(s in e))return!0;return!1};var vt="undefined"==typeof requestAnimationFrame?setTimeout:function(e){var t=function(){clearTimeout(n),cancelAnimationFrame(r),e()},n=setTimeout(t,35),r=requestAnimationFrame(t)},_t=function(e){queueMicrotask(function(){queueMicrotask(e)})};function yt(){Te(function(){for(var e;e=ct.shift();)ot.call(e)})}function gt(){1===ct.push(this)&&(t.requestAnimationFrame||vt)(yt)}function wt(){Te(function(){for(var e;e=ut.shift();)ot.call(e)})}function bt(){1===ut.push(this)&&(t.requestAnimationFrame||_t)(wt)}function Et(e,t){var n=pe(e);n.current=e,de(function(){return et(function(){return this.N=gt,n.current()},t)},[])}function St(e){var t=ve(function(){return e()},[]);return de(function(){return t[Symbol.dispose]},[t]),t}class kt extends TypeError{constructor(e){super(e),this.name="ConsentValidationError",Object.setPrototypeOf(this,kt.prototype)}}const xt={TRACKING_ACCEPTED:"trackingConsentAccepted",TRACKING_DECLINED:"trackingConsentDeclined",MARKETING_ACCEPTED:"firstPartyMarketingConsentAccepted",SALE_OF_DATA_ACCEPTED:"thirdPartyMarketingConsentAccepted",ANALYTICS_ACCEPTED:"analyticsConsentAccepted",PREFERENCES_ACCEPTED:"preferencesConsentAccepted",MARKETING_DECLINED:"firstPartyMarketingConsentDeclined",SALE_OF_DATA_DECLINED:"thirdPartyMarketingConsentDeclined",ANALYTICS_DECLINED:"analyticsConsentDeclined",PREFERENCES_DECLINED:"preferencesConsentDeclined",CONSENT_COLLECTED:"visitorConsentCollected"},Ct="p",At="a",Pt="m",Nt="t",$t="m",Tt="a",Mt="p",Ot="s",Rt="marketing",It="analytics",Ut="preferences",Lt="sale_of_data",Dt=()=>"undefined"==typeof window,jt=()=>"undefined"!=typeof __CtaTestEnv__&&"true"===__CtaTestEnv__;class Ft{}Ft.warn=e=>{jt()||console.warn(e)},Ft.error=e=>{jt()||console.error(e)},Ft.info=e=>{jt()||console.info(e)},Ft.debug=e=>{jt()||console.debug(e)},Ft.trace=e=>{jt()||console.trace(e)};const Bt=Ft;function qt(e,t){if(null===e)return"null";if(Array.isArray(e))return`[${e.map(e=>qt(e,!0)).join(",")}]`;if("object"==typeof e){let n=[];for(const t in e)e.hasOwnProperty(t)&&void 0!==e[t]&&""!==e[t]&&n.push(`${t}:${qt(e[t],!0)}`);const r=n.join(",");return t?`{${r}}`:r}return"string"==typeof e?JSON.stringify(e):`${e}`}function Ht(e,...t){if(0===t.length)return e;const n=t[0];return e[n]||(e[n]={}
1),Ht(e[n],...t.slice(1))}function Wt(e){try{return decodeURIComponent(e)}catch(t){return""}}function Kt(){if(!Dt())return window}function zt(){try{return"undefined"!=typeof PerformanceServerTiming}catch{return!1}}const Gt="_tracking_consent";function Jt(e,t=!1){const n=function(){try{return document.cookie}catch{return!1}}()?document.cookie.split("; "):[];for(let r=0;r<n.length;r++){const[t,o]=n[r].split("=");if(e===Wt(t))return Wt(o)}if(t&&"_tracking_consent"===e&&!window.localStorage.getItem("tracking_consent_fetched")){if(jt())return;return console.debug("_tracking_consent missing"),function(e="/"){const t=new XMLHttpRequest;t.open("HEAD",e,!1),t.withCredentials=!0,t.send()}(),window.localStorage.setItem("tracking_consent_fetched","true"),Jt(e,!1)}}function Vt(e){return e===encodeURIComponent(Wt(e))}function Zt(e,t,n,r){if(!Vt(r))throw new TypeError("Cookie value is not correctly URI encoded.");if(!Vt(e))throw new TypeError("Cookie name is not correctly URI encoded.");let o=`${e}=${r}`;o+="; path=/",t&&(o+=`; domain=${t}`),o+=`; expires=${new Date((new Date).getTime()+n).toUTCString()}`,document.cookie=o}let Xt=class e{constructor(){if(e.instance)return e.instance;e.instance=this}produce(e,t){if(!Dt())try{const n={schema_id:"customer_privacy_api_events/2.0",payload:{shop_domain:window.location.host,method_name:e,call_details:t||null}},r={accept:"*/*","accept-language":"en-GB,en-US;q=0.9,en;q=0.8","content-type":"application/json; charset=utf-8","x-monorail-edge-event-created-at-ms":String(Date.now()),"x-monorail-edge-event-sent-at-ms":String(Date.now())};if(!window.location.host.endsWith("spin.dev"))return fetch("https://monorail-edge.shopifysvc.com/v1/produce",{headers:r,body:JSON.stringify(n),method:"POST",mode:"cors",credentials:"omit"}).catch(()=>{});console.log("Monorail event from consent API:",r,n)}catch(n){}}};function Qt(){var e,t;return Dt()?{}:(null===(e=window.Shopify)||void 0===e||null===(t=e.customerPrivacy)||void 0===t?void 0:t.config)||{}}Xt.instance=void 0;const Yt="_cmp";function en(e=Yt){let t;if(t=on()&&tn(()=>function(e=Yt){var t,n;const r=null===(t=performance)||void 0===t||null===(n=t.getEntriesByType)||void 0===n?void 0:n.call(t,"resource");let o=nn[e];for(let i=r.length-1;i>=0;i--){let t=rn(r[i],e);if(t){o=t;break}}return nn[e]=o,o}(e))||tn(()=>function(e=Yt){var t,n;if(!an()&&!function(){try{const e=performance.getEntriesByType("navigation")[0].serverTiming;return!!e&&0!=e.length}catch{return!1}}()){const e=new Xt;let t="failed_to_fetch";try{t=navigator.userAgent}catch{}e.produce("navigationServerTiming",JSON.stringify({failed:!0,userAgent:t,apiSupported:zt()})),an()||(Ht(Kt(),"Shopify","customerPrivacy").serverTimingSupportVerified=!0)}const r=null===(t=performance)||void 0===t||null===(n=t.getEntriesByType)||void 0===n?void 0:n.call(t,"navigation");if(!r)return;const o=r.map(t=>rn(t,e)).find(e=>e);if(o&&e===Yt)try{sessionStorage.setItem("consentHeader",o)}catch{}return o}(e)),!t){if(e!==Yt)return;let t;try{t=sessionStorage.getItem("consentHeader")}catch{}return t||void 0}try{t=decodeURIComponent(t)}catch{}return t}function tn(e){try{return e()}catch{return}}const nn={};function rn(e,t=Yt){var n,r;if(e)return null===(n=e.serverTiming)||void 0===n||null===(r=n.find(e=>e.name==t))||void 0===r?void 0:r.description}function on(){var e,t;const n=Kt();return!0===(null==n||null===(e=n.Shopify)||void 0===e||null===(t=e.customerPrivacy)||void 0===t?void 0:t.backendConsentEnabled)||!0===Qt().asyncVisitorState}function an(){var e,t;const n=Kt();return null==n||null===(e=n.Shopify)||void 0===e||null===(t=e.customerPrivacy)||void 0===t?void 0:t.serverTimingSupportVerified}let sn;function cn(){if(Dt())return sn;{var e,t;const n=(null===(e=window.Shopify)||void 0===e||null===(t=e.customerPrivacy)||void 0===t?void 0:t.injectedConsent)||Qt().injectedConsent;return n?Wt(n):void 0}}function un(e,t){if(!Dt())try{document.dispatchEvent(new CustomEvent(e,{detail:t||{}}))}catch(n){console.error(`[Shopify Customer Privacy] Error in event listener for "${e}":`,n)}}function ln(e){!function(e){const t=function(){var e;if(!Dt())return null===(e=window.Shopify)||void 0===e?void 0:e.customerPrivacy}();t&&(t.consentStatus=e)}("loaded");const t=e[Pt],n=e[Nt],r=e[At],o=e[Ct];!0===t?un(xt.MARKETING_ACCEPTED):!1===t&&un(xt.MARKETING_DECLINED),!0===n?un(xt.SALE_OF_DATA_ACCEPTED):!1===n&&un(xt.SALE_OF_DATA_DECLINED),!0===r?un(xt.ANALYTICS_ACCEPTED):!1===r&&un(xt.ANALYTICS_DECLINED),!0===o?un(xt.PREFERENCES_ACCEPTED):!1===o&&un(xt.PREFERENCES_DECLINED);const i=function(e){return{marketingAllowed:e[Pt],saleOfDataAllowed:e[Nt],analyticsAllowed:e[At],preferencesAllowed:e[Ct],firstPartyMarketingAllowed:e[Pt],thirdPartyMarketingAllowed:e[Nt]}}(e);un(xt.CONSENT_COLLECTED,i);const a=[r,o,t,n];a.every(e=>!0===e)&&un(xt.TRACKING_ACCEPTED),a.every(e=>!1===e)&&un(xt.TRACKING_DECLINED)}function fn(e){var t,n;!function(e){Dt()?sn=e:Ht(window,"Shopify","customerPrivacy").injectedConsent=e}(e),Dt()||(null!==(t=window.Shopify)&&void 0!==t&&null!==(n=t.customerPrivacy)&&void 0!==n&&n.cachedConsent&&(window.Shopify.customerPrivacy.cachedConsent=void 0),ln({[Ct]:gn(),[At]:wn(),[Pt]:bn(),[Nt]:En()}))}function dn(){let e;if(e=Dt()?cn():function(){var e,t;const n=null===(e=window.Shopify)||void 0===e||null===(t=e.customerPrivacy)||void 0===t?void 0:t.cachedConsent;return n?Wt(n):void 0}()||cn()||new URLSearchParams(window.location.search).get("_cs")||Jt(Gt)||en(),void 0!==e)return function(e){if("%"==e.slice(0,1))try{e=decodeURIComponent(e)}catch{}const t=e.slice(0,1);return"{"==t?function(e){var t;let n;try{n=JSON.parse(e)}catch{return}if("2.1"===n.v&&null!==(t=n.con)&&void 0!==t&&t.CMP)return n}(e):"3"==t?function(e){const t=e.slice(1).split("_"),[n,r,o,i,a]=t;let s,c;try{s=t[5]?JSON.parse(t.slice(5).join("_")):void 0}catch{}if(a){const e=a.replace(/\*/g,"/").replace(/-/g,"+"),t=atob(e);let n="";for(let r=0;r<t.length;r++){const e=t.charCodeAt(r).toString(16);n+=1===e.length?"0"+e:e}c=[8,13,18,23].reduce((e,t)=>
1e.slice(0,t)+"-"+e.slice(t),n)}function u(e){const t=n.split(".")[0];return t.includes(e.toLowerCase())?"0":t.includes(e.toUpperCase())?"1":""}function l(e){return n.includes(e.replace("t","s").toUpperCase())}return{v:"3",con:{CMP:{[Tt]:u(Tt),[Mt]:u(Mt),[$t]:u($t),[Ot]:u(Ot)}},region:r||"",cus:s,purposes:{[At]:l(At),[Ct]:l(Ct),[Pt]:l(Pt),[Nt]:l(Nt)},sale_of_data_region:"t"==i,display_banner:"t"==o,consent_id:c}}(e):void 0}(e)}function hn(){try{let e=dn();if(!e)return;return e}catch{return}}function pn(e=null){return null===e&&(e=hn()),void 0===e}function mn(e){switch(e){case"1":return"yes";case"0":return"no";default:return""}}function vn(e){switch(e){case Tt:return It;case $t:return Rt;case Mt:return Ut;case Ot:return Lt}}function _n(e){const t=hn();if(!t)return"";const n=t.con.CMP;return n?n[e]:""}function yn(e){const t=hn();if(!t||!t.purposes)return!0;const n=t.purposes[e];return"boolean"!=typeof n||n}function gn(){return yn(Ct)}function wn(){return yn(At)}function bn(){return yn(Pt)}function En(){return yn(Nt)}function Sn(){const e=hn();return!!e&&"boolean"==typeof e.display_banner&&e.display_banner}function kn(){const e=hn();return e&&e.sale_of_data_region||!1}const xn=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Cn(e,t){if("string"!=typeof e)return;if(!function(e){return!!e&&xn.test(e.trim().toLowerCase())}(e))return;const n=e.trim();if("00000000-0000-0000-0000-000000000000"===n)return;if("00000000-0000-0000-5000-000000000000"===n)return;const r=null==t||"string"==typeof t&&""===t.trim()?NaN:Number(t);return Number.isFinite(r)&&Date.now()>r?void 0:n}function An(e,t){const n=Kt();if(!n)return;const r=Ht(n,"Shopify","customerPrivacy","cachedToken");if(t){const n="_shopify_s"===e?18e5:31536e6;r[e]=t,r[e+"_expires_at"]=Date.now()+n}else delete r[e],delete r[e+"_expires_at"]}function Pn(e){return`${e.origin}${t=e.pathname,t.replace(/\/$/,"")}`;var t}function Nn(e){return e.startsWith("http://")||e.startsWith("https://")}const $n="Shopify-Storefront-Consent-Management";function Tn(e){const t=e.granular_consent;return{query:`query { consentManagement { cookies(${qt({visitorConsent:{marketing:t.marketing,analytics:t.analytics,preferences:t.preferences,saleOfData:t.sale_of_data,...t.metafields&&{metafields:t.metafields}},...t.email&&{visitorEmail:t.email},origReferrer:e.referrer,landingPage:e.landing_page})}) { trackingConsentCookie cookieDomain landingPageCookie origReferrerCookie shopifyUnique shopifyVisit } customerAccountUrl } }`,variables:{}}}let Mn;function On(e,t,n,r={}){const o=Qt().consentDomain||t.granular_consent.checkoutRootDomain||window.location.host,i=()=>function(e,t,n,r){const o=t.granular_consent;let i="",a={};if(o.customerAccountRequestInfo)i=o.customerAccountRequestInfo.url,a=o.customerAccountRequestInfo.headers;else{const t=Qt(),r=o.storefrontAccessToken||t.storefrontAccessToken||function(){try{const e=document.documentElement.querySelector("#shopify-features"),t="Could not find liquid access token";if(!e)return void Bt.warn(t);const n=e.textContent;if(!n)return void Bt.warn(t);let r;try{r=JSON.parse(n).accessToken}catch{return void Bt.warn(t)}return r||void Bt.warn(t)}catch{return void Bt.warn("Could not find liquid access token")}}();i=`${/^(localhost|127\.0\.0\.1)(:|$)/.test(e)?"http:":"https:"}//${e}/api/unstable/graphql.json`;const s=o.isExtensionToken?"Shopify-Storefront-Extension-Token":"x-shopify-storefront-access-token";a=r?{[s]:r}:{},n&&(a={...a,...n()})}const s={headers:{"content-type":"application/json",...!0===Qt().asyncConsent&&new URL(i).origin===window.location.origin&&{[$n]:"1"},...a,...jt()?{"x-test-payload":JSON.stringify(t)}:{}},body:JSON.stringify(Tn(t)),method:"POST"};let c;try{c=fetch(i,s)}catch(u){c=Promise.reject(u)}return c.then(e=>{try{null==r||r(e)}catch{}if(e.ok)return e.json();{const t=new Error("Server error");throw t.cause={status:e.status},t}})}(o,t,r.getVisitorTokenHeaders,r.onResponse).then(e=>{var o,i;const a=null==e||null===(o=e.data)||void 0===o?void 0:o.consentManagement;if(!a){var s;const t=(null!==(s=null==e?void 0:e.errors)&&void 0!==s?s:[]).map(e=>
1null==e?void 0:e.message).filter(Boolean).join("; ");throw new Error(t?`GraphQL error: ${t}`:"GraphQL response missing consentManagement")}const c=a.cookies.cookieDomain,u=a.cookies.trackingConsentCookie,l=a.cookies.shopifyUnique,f=a.cookies.shopifyVisit,d=null!==(i=a.customerAccountUrl)&&void 0!==i?i:"";var h,p,m;if(u&&(h=u,Ht(window,"Shopify","customerPrivacy").cachedConsent=h),An("_shopify_y",l),An("_shopify_s",f),t.granular_consent.headlessStorefront&&!on()){const e=31536e6,n=t.granular_consent,r=c||n.checkoutRootDomain||window.location.hostname,o=n.storefrontRootDomain||c||window.location.hostname;Zt(Gt,r,e,u),o!==r&&Zt(Gt,o,e,u)}return!1!==r.emitEvents&&(p=t,m={[Ct]:gn(),[At]:wn(),[Pt]:bn(),[Nt]:En()},void 0!==p.granular_consent&&ln(m)),function(e,t){if(!e)return;const n=function(e){const t=new URL(e,window.location.origin),n=Nn(e)?Pn(t):Pn(t).replace(window.location.origin,""),r=document.querySelectorAll(`a[href^="${n}"]`),o=document.querySelectorAll(`a[href*="${window.location.hostname}/customer_authentication"]`),i=new Set,a=[];for(let s=0;s<r.length;s++)i.has(r[s])||(i.add(r[s]),a.push(r[s]));for(let s=0;s<o.length;s++)i.has(o[s])||(i.add(o[s]),a.push(o[s]));return a}(e);if(n.length)for(let r=0;r<n.length;r++){const o=n[r],i=o.getAttribute("href");if(!i)continue;const a=new URL(i,window.location.origin);a.searchParams.set("_cs",t);const s=Nn(e)?a.toString():a.toString().replace(window.location.origin,"");o.setAttribute("href",s)}}(d,u),void 0!==n&&n(null,e),e}).catch(e=>{var t;const r="Error while setting storefront API consent: "+e.message,o=null===(t=e.cause)||void 0===t?void 0:t.status,i={error:r};if(void 0!==o&&(i.statusCode=o),void 0===n)throw i;n(i)});if(!0!==Qt().asyncConsent)return i();const a=Mn=Mn?Mn.then(i,i):i(),s=()=>{Mn===a&&(Mn=void 0)};return a.then(s,s),a}const Rn=[Rt,It,Ut,Lt],In=[...Rn,"email","rootDomain","checkoutRootDomain","storefrontRootDomain","storefrontAccessToken","headlessStorefront","isExtensionToken","metafields","customerAccountRequestInfo"],Un=Rn.map(e=>`"${e}"`).join(", "),Ln="https://shopify.dev/docs/api/customer-privacy";function Dn(e,t){if(Dt())throw new Error("setTrackingConsent is not supported in Node.js environments. This function requires browser APIs (XHR, cookies, window) and can only be called client-side.");const n=new Xt;if(wn()&&n.produce("setTrackingConsent","v0.2"),function(e){if("boolean"!=typeof e&&"object"!=typeof e)throw new kt(`setTrackingConsent received an invalid argument of type "${typeof e}". Expected an object with consent keys. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${Ln} for documentation.`);if("object"==typeof e){const t=Object.keys(e);if(0===t.length)throw new kt(`The submitted consent object is empty. Expected at least one consent key: ${Un}. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${Ln} for documentation.`);for(const e of t)if(!In.includes(e))throw new kt(`The submitted consent object contains an invalid key: "${e}". Valid keys are: ${Un}. Example: setTrackingConsent({ analytics: true, marketing: false }). See ${Ln} for documentation.`)}}(e),void 0!==t&&"function"!=typeof t)throw new kt(`setTrackingConsent received an invalid callback of type "${typeof t}". The second argument must be a function if provided. Example: setTrackingConsent({ analytics: true }, (error, result) => { ... }). See ${Ln} for documentation.`);const r=function(e){if(!e)return null;try{return Fn()?document.referrer:""}catch{return""}}(e.analytics),o=function(e){if(!e)return null;if(!Fn())return"/";try{return window.location.pathname+window.location.search}catch{return"/"}}(e.analytics);return On(0,{granular_consent:e,...null!==r&&{referrer:r},...null!==o&&{landing_page:o}},t)}function jn(){return function(){const e=hn();return pn(e)?"":e.region||""}()}function Fn(){try{if(""===document.referrer)return!0;const e=document.createElement("a");return e.href=document.referrer,window.location.hostname!=e.hostname}catch{return!0}}function Bn(){return function(){const e=hn();if(!pn(e)&&e.cus)return Object.entries(e.cus).map(([e,t])=>({key:decodeURIComponent(e),value:decodeURIComponent(t)}))}()}function qn(){const e={},t={m:_n($t),a:_n(Tt),p:_n(Mt),s:_n(Ot)};for(const n of Object.keys(t))e[vn(n)]=mn(t[n]);return e}function Hn(){return bn()}function Wn(){return wn()}function Kn(){return gn()}function zn(){return En()}async function Gn(e){try{var t;if(!(Math.random()<.01))return;let n=null;if(e)try{const t=await e.json();n=Array.isArray(null==t?void 0:t.errors)&&t.errors.length>0}catch{}!function(e,t,n){(new Xt).produce("persistOutcome",JSON.stringify({ok:e,status:t,graphqlErrors:n,sampleRate:.01}))}(!(null==e||!e.ok),null!==(t=null==e?void 0:e.status)&&void 0!==t?t:null,n)}catch{}}function Jn(e,t){if(!Dt())try{const r=Cn(e),o=Cn(t);if(!r&&!o)return;const i=new URLSearchParams,a={"content-type":"application/json"};r&&(i.set("_y",r),a["X-Shopify-UniqueToken"]=r),o&&(i.set("_s",o),a["X-Shopify-VisitToken"]=o);const{protocol:s,host:c}=function(){const e=Qt().consentDomain||window.location.host;return{protocol:/^(localhost|127\.0\.0\.1)(:|$)/.test(e)?"http:":"https:",host:e}}(),u=`${s}//${c}/api/unstable/graphql.json?${i.toString()}`;let l;try{l=fetch(u,{headers:a,body:JSON.stringify({query:"query { consentManagement { cookies(visitorConsent:{}) { cookieDomain } } }",variables:{}}),method:"POST",mode:"cors",credentials:"include"})}catch(n){l=Promise.reject(n)}l.then(e=>Gn(e),()=>Gn(void 0))}catch{}}const Vn="uc",Zn=["ac","ah","ba","bin","c","cn","co","do","e","md","o","pc","sh","sim",Vn],Xn="(?<language>[a-z]{2,3}|zh-hans|zh-hant)(?:-(?<region>[a-zA-Z0-9]+))?",Qn=new RegExp(`^${Xn}$`),Yn=`/(?<sourceId>[a-zA-Z0-9=\\-_]+)(?:/(?<locale>${Xn}))?(?:/(?<route>[^/]+))?`;function er(e){return`(?<sourceType>${e.join("|")})${Yn}`}const tr=er(Zn.filter(e=>e!==Vn)),nr=er([Vn]),rr=new RegExp(`^/checkouts/${tr}/?$`),or=new RegExp(`^/checkout/(?<shopId>[0-9]+)/${tr}/?$`),ir=new RegExp(`^/checkouts/${nr}/?$`),ar=new RegExp("^/checkout/(?<shopId>[0-9]+)/(?<sourceType>spe)(?:/(?<sourceId>[a-zA-Z0-9=\\-_]+)?)?(?:/(?<route>[^/]+)?)?/?$");function sr(e,t){const n=function(e,{isShopPayActive:t,isShopPayExternal:n}){return t?n?e.match(ar):e.match(or)??e.match(ir):e.match(rr)}(e.pathname,t);if(!n)return;
1const{shopId:r,sourceType:o,sourceId:i,route:a,locale:s}=n.groups??{};let c;var u;"o"!==o||(u=i)&&/^[a-f0-9]{32}$/i.test(u)||(c=`gid://shopify/Order/${i}`);const l={type:o,id:c??i},f=r?{id:r}:void 0,d=e.searchParams.get("locale")??void 0;let h;return cr(d)?h=d:cr(s)&&(h=s),{shop:f,source:l,route:`/${a??""}`,locale:h,shopPaySimulated:"sim"===l.type&&e.searchParams.has("shop_pay_sim")}}function cr(e){return!!e&&Qn.test(e)}function ur(e,t){for(var n in t)e[n]=t[n];return e}function lr(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function fr(e,t){var n=t(),r=le({t:{__:n,u:t}}),o=r[0].t,i=r[1];return he(function(){o.__=n,o.u=t,dr(o)&&i({t:o})},[e,n,t]),de(function(){return dr(o)&&i({t:o}),e(function(){dr(o)&&i({t:o})})},[e]),n}function dr(e){try{return!((t=e.__)===(n=e.u())&&(0!==t||1/t==1/n)||t!=t&&n!=n)}catch(r){return!0}var t,n}function hr(e,t){this.props=e,this.context=t}function pr(e,t){function n(e){var n=this.props.ref;return n!=e.ref&&n&&("function"==typeof n?n(null):n.current=null),t?!t(this.props,e)||n!=e.ref:lr(this.props,e)}function r(t){return this.shouldComponentUpdate=n,E(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.__f=r.prototype.isReactComponent=!0,r.type=e,r}(hr.prototype=new C).isPureReactComponent=!0,hr.prototype.shouldComponentUpdate=function(e,t){return lr(this.props,e)||lr(this.state,t)};var mr=t.__b;t.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),mr&&mr(e)};var vr="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function _r(e){function t(t){var n=ur({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=vr,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var yr=function(e,t){return null==e?null:R(R(e).map(t))},gr={map:yr,forEach:yr,count:function(e){return e?R(e).length:0},only:function(e){var t=R(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:R},wr=t.__e;t.__e=function(e,t,n,r){if(e.then)for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k||[]),o.__c(e,t);wr(e,t,n,r)};var br=t.unmount;function Er(e,t,n){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=ur({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return Er(e,t,n)})),e}function Sr(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return Sr(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function kr(){this.__u=0,this.o=null,this.__b=null}function xr(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function Cr(){this.i=null,this.l=null}t.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),br&&br(e)},(kr.prototype=new C).__c=function(e,t){var n=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(n);var o=xr(r.__v),i=!1,a=function(){i||r.__z||(i=!0,n.__R=null,o?o(c):c())};n.__R=a;var s=n.__P;n.__P=null;var c=function(){if(! --r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Sr(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=s,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},kr.prototype.componentWillUnmount=function(){this.o=[]},kr.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;
1this.__v.__k[0]=Er(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&E(x,null,e.fallback);return o&&(o.__u&=-33),[E(x,null,t.__a?null:e.children),o]};var Ar=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function Pr(e){return this.getChildContext=function(){return e.context},e.children}function Nr(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){z(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;null!==r&&!r.__m&&null!==r.__;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(e,n){this.childNodes.push(e),t.h.insertBefore(e,n)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.h.removeChild(e)}}}z(E(Pr,{context:t.context},e.__v),t.v)}function $r(e,t){var n=E(Nr,{__v:e,h:t});return n.containerInfo=t,n}(Cr.prototype=new C).__a=function(e){var t=this,n=xr(t.__v),r=t.l.get(e);return r[0]++,function(o){var i=function(){t.props.revealOrder?(r.push(o),Ar(t,e,r)):o()};n?n(i):i()}},Cr.prototype.render=function(e){this.i=null,this.l=new Map;var t=R(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Cr.prototype.componentDidUpdate=Cr.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Ar(e,n,t)})};var Tr="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Mr=/^(?: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]/,Or=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Rr=/[A-Z0-9]/g,Ir="undefined"!=typeof document,Ur=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};C.prototype.isReactComponent=!0,["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 Lr=t.event;t.event=function(e){return Lr&&(e=Lr(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var Dr={configurable:!0,get:function(){return this.class}},jr=t.vnode;t.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,n=e.type,r={},o=-1==n.indexOf("-");for(var i in t){var a=t[i];if(!("value"===i&&"defaultValue"in t&&null==a||Ir&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var s=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===a?a="":"translate"===s&&"no"===a?a=!1:"o"===s[0]&&"n"===s[1]?"ondoubleclick"===s?i="ondblclick":"onchange"!==s||"input"!==n&&"textarea"!==n||Ur(t.type)?"onfocus"===s?i="onfocusin":"onblur"===s?i="onfocusout":Or.test(i)&&(i=s):s=i="oninput":o&&Mr.test(i)?i=i.replace(Rr,"-$&").toLowerCase():null===a&&(a=void 0),"oninput"===s&&r[i=s]&&(i="oninputCapture"),r[i]=a}}"select"==n&&(r.multiple&&Array.isArray(r.value)&&(r.value=R(t.children).forEach(function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)})),null!=r.defaultValue&&(r.value=R(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",Dr)):t.className&&(r.class=r.className=t.className),e.props=r}(e),e.$$typeof=Tr,jr&&jr(e)};var Fr=t.__r;t.__r=function(e){Fr&&Fr(e),e.__c};var Br=t.diffed;function qr(e){return!!e&&e.$$typeof===Tr}function Hr(e){return qr(e)?J.apply(null,arguments):e}function Wr(e){return!!e.__k&&(z(null,e),!0)}t.diffed=function(e){Br&&Br(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value)};var Kr=0;function zr(e,n,r,o,i,a){n||(n={});var s,c,u=n;if("ref"in u)for(c in u={},n)"ref"==c?s=n[c]:u[c]=n[c];var l={type:e,props:u,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Kr,__i:-1,__u:0,__source:i,__self:a};if("function"==typeof e&&(s=e.defaultProps))for(c in s)void 0===u[c]&&(u[c]=s[c]);return t.vnode&&t.vnode(l),l}
1class Gr extends Error{constructor(){super(...arguments),this.name="TypescriptAssertionError"}}function Jr(e){throw new Gr(`Received unexpected value ${JSON.stringify(e)} in an exhaustive switch/conditional block`)}function Vr(e){throw new Gr(`Received unexpected value ${JSON.stringify(e)} in an exhaustive switch/conditional block`)}const Zr=()=>e=>e;function Xr({id:e},t){return`${e}${JSON.stringify(t?Qr(t):{})}`}function Qr(e){const t={};for(const n of Object.keys(e).sort((e,t)=>e.localeCompare(t)))t[n]=e[n];return t}function Yr(e){var t=e.match(/^var\((.*)\)$/);return t?t[1]:e}function eo(e,t){var n={},r=e;for(var o in r){var i=r[o];null!=i&&(n[Yr(o)]=i)}return Object.defineProperty(n,"toString",{value:function(){return Object.keys(this).map(e=>"".concat(e,":").concat(this[e])).join(";")},writable:!1}),n}function to(e,t=2){return 1e3*Math.min(t**e,60)+Math.floor(100*Math.random())}function*no(e=2,t=10){for(let n=1;n<=t;n++)yield to(n,e)}function ro({initialDelay:e=2,maxAttempts:t=10}={}){return ve(()=>{let n=no(e,t);return{next:()=>n.next(),reset:()=>{n=no(e,t)}}},[e,t])}class oo extends Error{constructor(){super(...arguments),this.name="RetryError"}}async function io(e,{shouldRetry:t=ao,maxAttempts:n=3,initialRetryDelay:r}={}){let o;for(let a=1;a<=n;a++){a>1&&await so(to(a-1,r));try{return await e()}catch(i){if(o=i,!t(i))break;console.warn(`Failed to execute action on attempt ${a} of ${n}.`)}}if(o instanceof Error)throw o;throw new oo("Failed to execute action after retrying.",{cause:o})}function ao(e){return null!=e}function so(e){return new Promise(t=>setTimeout(t,Math.max(e,0)))}var co=function(e){return"function"==typeof e.children?e.children(e.v,e.i?e.i.value:void 0):e.children};function uo(e){var t="function"==typeof e.when?e.when():e.when.value;if(!t){var n=e.fallback;return"function"==typeof n?n():n||null}return E(co,{v:t,children:e.children})}function lo(e){var t=ve(function(){return new Map},[]),n="function"==typeof e.each?e.each():e.each,r=n instanceof He?n.value:n;if(!r.length)return e.fallback||null;var o=new Set(t.keys()),i=r.map(function(n,r){o.delete(n);var i=t.get(n);if(i)i.i.peek()!==r&&(i.i.value=r);else{var a=We(r),s=e.getKey?e.getKey(n,r):r;i={vnode:E(co,{key:s,v:n,i:a,children:e.children}),i:a},t.set(n,i)}return i.vnode});return o.forEach(function(e){t.delete(e)}),E(x,null,i)}function fo(e){var t=pt(e);return t.name="useLiveSignal",t.peek()!==e&&(t.value=e),t}function ho(e){var t=pt(e);return"current"in t||Object.defineProperty(t,"current",po),t}co.displayName="Item",uo.displayName="Show",lo.displayName="For";var po={configurable:!0,get:function(){return this.value},set:function(e){this.value=e}};function mo({url:e,method:t="POST",credentials:n,headers:r,source:o,explicitSearchParams:i={},onResult:a,onError:s,fetch:c=globalThis.fetch}){return async u=>{const l=performance.now(),f=new Headers("function"==typeof r?r(u):r);if(u.additionalHeaders)for(const[e,t]of Object.entries(u.additionalHeaders))f.set(e,t);const d="function"==typeof t?t(u):t,h=("function"==typeof o?o(u):o)??"GET"!==d;f.has("Content-Type")||f.set("Content-Type","application/json"),f.has("Accept")||f.set("Accept","application/json"),f.set("Shopify-Checkout-Client","checkout-web/1.0");const p={method:d,headers:f,credentials:n,redirect:"manual",signal:u.signal},m=new URL("function"==typeof e?e(u):e);if(u.query.name&&m.searchParams.set("operationName",u.query.name),i&&Object.entries(i).forEach(([e,t])=>{m.searchParams.set(e,t)}),"GET"===d)u.variables&&"{}"!==JSON.stringify(u.variables)&&m.searchParams.set("variables",JSON.stringify(u.variables)),h?m.searchParams.set("query",u.query.source):m.searchParams.set("id",u.query.id),m.search.includes(";")&&(m.search=m.search.replace(/;/g,"%3B"));else{const e={variables:u.variables,operationName:u.query.name};h?e.query=u.query.source:e.id=u.query.id,p.body=JSON.stringify(e)}const v=new Request(m,p),_=await c(v).catch(e=>e);try{if(_ instanceof Error)throw new yo(_);if(!_.ok){if(400===_.status)throw new bo(_,u.query.name);throw new wo(_,u.query.name)}const e=_.headers.get("Content-Type")??"missing";if(!e.includes("application/json"))throw new Eo(_,e,(await _.text()).substring(0,200),u.query.name);let t;try{t=await _.json()}catch(y){throw new So(_,m.toString(),u.query.name,y)}const{data:n,errors:r}=t;let o;o=null!=r&&r.length>0?{data:void 0,error:new vo(r)}
1:null==n?{data:void 0,error:new vo([{name:"NoDataError",message:"No data returned by GraphQL"}],"GraphQLExecutionError::NoDataReturned")}:{data:n,error:void 0};const i=performance.now();return a?.({...u,request:v,response:_,result:o,start:l,end:i,duration:i-l}),o}catch(y){const e=performance.now(),t=y instanceof wo||y instanceof Eo?y.response:void 0;throw s?.({...u,request:v,response:t,error:y,start:l,end:e,duration:e-l}),y}}}class vo extends Error{constructor(e,t){const n=JSON.stringify(e.map(({message:e})=>e),null,2);super(`GraphQL execution failed with errors: ${n}`),this.errors=e,this.name="GraphQLExecutionError",this.groupingHash=t??function(e){const t=[{pattern:/syntax error/i,hash:"graphql_parsing_error"},{pattern:/No operation named/i,hash:"graphql_missing_operation_error"},{pattern:/Variable.*geolocation\.countryCode/i,hash:"invalid_country_code_error"},{pattern:/Variable.*coordinates\.(latitude|longitude)/i,hash:"invalid_coordinates_error"},{pattern:/Variable.*was provided invalid value/i,hash:"invalid_variable_error"},{pattern:/Cannot target merchandise with stableId/i,hash:"merchandise_stable_id_error"},{pattern:/Cannot return null for non-nullable field CreditCard/i,hash:"credit_card_field_error"},{pattern:/doesn't exist on type/i,hash:"graphql_undefined_field_error"},{pattern:/isn't a defined input type/i,hash:"graphql_undefined_input_type_error"},{pattern:/could not be composed from extendedFields/i,hash:"address_composition_error"},{pattern:/Invalid query string parameter/i,hash:"invalid_query_string_parameter_error"},{pattern:/Cannot return null for non-nullable field/i,hash:"graphql_non_nullable_field_error"}].find(({pattern:t})=>t.test(e));return t?.hash??"generic_graphql_execution_error"}(n)}}const _o="GraphQL fetch failed with network failure:";class yo extends Error{constructor(e){super(`${_o} ${e.message}`),this.error=e,this.name="GraphQLFetchNetworkError"}}class go extends Error{constructor(e){super(e),this.message=e,this.name="GraphQLFetchHttpBaseError"}getGroupingHash(e){const t=e??"UNKNOWN NAME";return[this.name,t].join(":")}}class wo extends go{constructor(e,t){super(`GraphQL query [${t??"UNKNOWN NAME"}] fetch failed with status: ${e.status}`),this.response=e,this.queryName=t,this.name="GraphQLFetchHttpStatusError",this.groupingHash=this.getGroupingHash(t)}}class bo extends wo{constructor(e,t){super(e,t),this.response=e,this.queryName=t,this.name="GraphQLFetchHttpBadRequestError",this.groupingHash=this.getGroupingHash(t)}}class Eo extends go{constructor(e,t,n,r){super(`GraphQL UnsupportedContentType ${t}: ${n}`),this.response=e,this.contentType=t,this.contentPreview=n,this.queryName=r,this.name="GraphQLFetchHttpContentTypeError",this.groupingHash=this.getGroupingHash(r)}}class So extends go{constructor(e,t,n,r){const o=r?` (${r.constructor.name}: ${r.message})`:"";super(`GraphQL JSON parse error for query [${n??"UNKNOWN NAME"}]: status ${e.status}, url ${t}${o}`),this.response=e,this.requestUrl=t,this.queryName=n,this.name="GraphQLFetchJsonParseError",this.groupingHash=this.getGroupingHash(n)}}class ko extends Error{constructor(){super(...arguments),this.name="CheckoutGraphQLError"}}function xo(e){return"function"==typeof e?e():e}function Co(e){return e?Object.keys(e).sort().map(t=>`${t}=${e[t]}`).join("&"):""}class Ao{constructor(e,t=new Map,{timing:n}={}){this.cache=t,this.timings=[],this.inflight=new Map,this.cacheWriteSequence=new Map,this.fetch=n?function(e,t,n){return async r=>{const o=performance.now();try{return await e(r)}finally{n({clientName:t,operationName:r.query.name??r.query.id,startedAt:o,duration:Math.max(0,performance.now()-o)})}}}(e,n.clientName,e=>this.timings.push(e)):e}read(e,t){return this.cache.get("string"==typeof e?e:Xr(e))}extract(){return Object.fromEntries(this.cache.entries())}mutate(e,{variables:t}={}){return this.run(e,{variables:t})}staticQuery(e,t={}){return this.internalQuery(e,t)}get reactiveEffectsEnabled(){return!0}query(e,t={}){const n=We(void 0),r=We(!1),o=We(void 0),i=We(!1);let a,s,c=0,u=Promise.resolve({});const l=t.cache??!0,f=()=>{const e=(c??0)+1;return c=e,e},d=(e,t)=>{t===c&&(e.error?(o.value=e.error,n.value=void 0):(o.value=void 0,n.value=e.data),r.value=!1)},h=n=>{if(null===c)return Promise.resolve({});const o=f();s=Co(n.additionalHeaders);const a=(t.getCacheKey??Xr)(e,n.variables),u=!n.forceNetwork&&(n.cache??l)&&!this.inflight.has(a)&&this.cache.has(a),h=this.internalQuery(e,{variables:n.variables,cache:n.cache??l,getCacheKey:t.getCacheKey,additionalHeaders:n.additionalHeaders,forceNetwork:n.forceNetwork});return i.value=u,h instanceof Promise?(r.value=!0,h.then(e=>(d(e,o),e))):(d(h,o),Promise.resolve(h))};if(this.reactiveEffectsEnabled)a=et(()=>{if(xo(t.skip))return f(),void(r.value=!1);const e=xo(t.variables),n=xo(t.additionalHeaders),o=Co(n);
1u=h({variables:e,cache:l,additionalHeaders:n,forceNetwork:void 0!==s&&o!==s})});else if(!xo(t.skip)){const o=(t.getCacheKey??Xr)(e,xo(t.variables)),a=l?this.read(o):void 0;null==a?r.value=!0:(n.value=a,i.value=!0,u=Promise.resolve({data:a}))}const p=()=>{null!==c&&(c=null,a?.())};et(()=>()=>p());const m={data:n,loading:r,error:o,isFromCache:i,refetch:e=>(u=h({variables:e?.variables??xo(t.variables),cache:!1,additionalHeaders:xo(t.additionalHeaders),forceNetwork:!e?.deduplicate}),m),[Symbol.dispose]:p,then:(e,t)=>u.then(e,t)};return m}internalQuery(e,{cache:t=!0,variables:n,getCacheKey:r,skip:o=!1,additionalHeaders:i,forceNetwork:a=!1}={}){const s=(r??Xr)(e,n);if(o)return{data:this.cache.get(s)};if(!a){if(this.inflight.has(s))return this.inflight.get(s);if(t&&this.cache.has(s))return{data:this.cache.get(s)}}const c=(this.cacheWriteSequence.get(s)??0)+1;this.cacheWriteSequence.set(s,c);const u=(async()=>{try{const t=await this.run(e,{variables:n},i);return t.error||this.cacheWriteSequence.get(s)!==c||this.cache.set(s,t.data),t}finally{this.cacheWriteSequence.get(s)===c&&this.inflight.delete(s)}})();return this.inflight.set(s,u),u}async run(e,{variables:t}={},n){try{const r=await this.fetch({query:e,variables:t??{},...n&&{additionalHeaders:n}}),{data:o,error:i}=r;return o?{data:o}:{error:i}}catch(r){return{error:r instanceof Error?r:new ko}}}}const Po={"America/Indiana":"America/Indiana/Indianapolis","America/Argentina":"America/Argentina/Buenos_Aires","Asia/Chongqing":"Asia/Shanghai","Asia/Istanbul":"Europe/Istanbul","Australia/ACT":"Australia/Sydney","Australia/LHI":"Australia/Lord_Howe","Australia/North":"Australia/Darwin","Australia/NSW":"Australia/Sydney","Australia/Queensland":"Australia/Brisbane","Australia/South":"Australia/Adelaide","Australia/Tasmania":"Australia/Hobart","Australia/Victoria":"Australia/Melbourne","Australia/West":"Australia/Perth","Brazil/Acre":"America/Rio_Branco","Brazil/DeNoronha":"America/Noronha","Brazil/East":"America/Sao_Paulo","Brazil/West":"America/Manaus","Canada/Atlantic":"America/Halifax","Canada/Central":"America/Winnipeg","Canada/Eastern":"America/Toronto","Canada/Mountain":"America/Edmonton","Canada/Newfoundland":"America/St_Johns","Canada/Pacific":"America/Vancouver","Canada/Saskatchewan":"America/Regina","Canada/Yukon":"America/Whitehorse","Chile/Continental":"America/Santiago","Chile/EasterIsland":"Pacific/Easter",Cuba:"America/Havana",Egypt:"Africa/Cairo",Eire:"Europe/Dublin","Europe/Kyiv"
1:"Europe/Kiev","Etc/Greenwich":"Etc/GMT","Etc/UCT":"UTC","Etc/Universal":"UTC","Etc/Zulu":"UTC",GB:"Europe/London","GB-Eire":"Europe/London","GMT+0":"Etc/GMT",GMT0:"Etc/GMT","GMT−0":"Etc/GMT",Greenwich:"Etc/GMT",Hongkong:"Asia/Hong_Kong",Iceland:"Atlantic/Reykjavik",Iran:"Asia/Tehran",Israel:"Asia/Jerusalem",Jamaica:"America/Jamaica",Japan:"Asia/Tokyo",Kwajalein:"Pacific/Kwajalein",Libya:"Africa/Tripoli","Mexico/BajaNorte":"America/Tijuana","Mexico/BajaSur":"America/Mazatlan","Mexico/General":"America/Mexico_City",Navajo:"America/Denver",NZ:"Pacific/Auckland","NZ-CHAT":"Pacific/Chatham",Poland:"Europe/Warsaw",Portugal:"Europe/Lisbon",PRC:"Asia/Shanghai",ROC:"Asia/Taipei",ROK:"Asia/Seoul",Singapore:"Asia/Singapore",Turkey:"Europe/Istanbul",UCT:"UTC",Universal:"UTC","US/Alaska":"America/Anchorage","US/Aleutian":"America/Adak","US/Arizona":"America/Phoenix","US/Central":"America/Chicago","US/Eastern":"America/New_York","US/East-Indiana":"America/Indiana/Indianapolis","US/Hawaii":"Pacific/Honolulu","US/Indiana-Starke":"America/Indiana/Knox","US/Michigan":"America/Detroit","US/Mountain":"America/Denver","US/Pacific":"America/Los_Angeles","US/Pacific-New":"America/Los_Angeles","US/Samoa":"Pacific/Pago_Pago","W-SU":"Europe/Moscow",Zulu:"UTC"},No=new Map;function $o(e,t){const n=null!=t&&t.timeZone?(r=t.timeZone,Object.keys(Po).some(e=>e===r)?Po[r]:r):void 0;var r;const o=function(e,t={}){return`${Array.isArray(e)?e.sort().join("-"):e}-${JSON.stringify(t)}`}(e,{...t,timeZone:n});if(No.has(o))return No.get(o);const i=new Intl.DateTimeFormat(e,{...t,timeZone:n});return No.set(o,i),i}const To=Intl.DateTimeFormat("en",{hour:"numeric"}),Mo=void 0===To.resolvedOptions?void 0:To.resolvedOptions(),Oo=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]),Ro=/[\p{Script=Adlam}\p{Script=Arabic}\p{Script=Hebrew}\p{Script=Mandaic}\p{Script=Nko}\p{Script=Samaritan}\p{Script=Syriac}\p{Script=Thaana}]/u;function Io(e){return Ro.test(e)}function Uo(e){return Lo.get(e)??2}const Lo=new Map([["BHD",3],["BIF",0],["BYR",0],["CLF",4],["CLP",0],["DJF",0],["GNF",0],["HUF",2],["IQD",3],["ISK",0],["JOD",3],["JPY",0],["KMF",0],["KRW",0],["KWD",3],["LYD",3],["MGA",2],["MRO",5],["OMR",3],["PYG",0],["RWF",0],["TND",3],["UGX",0],["VND",0],["VUV",0],["XAF",0],["XAG",0],["XAU",0],["XBA",0],["XBB",0],["XBC",0],["XBD",0],["XDR",0],["XOF",0],["XPD",0],["XPF",0],["XPT",0],["XTS",0]]);function Do(e){return e.replace(/\s*[A-Z]{3}\s*/g,"")}function jo(e,t={},n){const r="he"===n.locale.split("-")[0],o=e<0||Object.is(e,-0),i=Ho(t.currency||n.currency||"",n),a=Wo(n,t),s=Do(n.numberFormatter({style:"currency",maximumFractionDigits:a,minimumFractionDigits:a,currencyDisplay:"code",...t}).format(t.spacedMinusSign&&!r?Math.abs(e):e)),c=i.prefixed&&/^[A-Za-z]+$/.test(i.symbol)?" ":"",u=i.prefixed?`${i.symbol}${c}${s}`:`${s} ${i.symbol}
1`,l=t.spacedMinusSign?"− ":"-";return o&&r?u.replace("−","-").replace("-",l):o?`${l}${u.replace("-","").replace("−","")}`:u}function Fo(e,t={},n){const r=jo(e,t,n),o=t.currency||n.currency||"";return qo(o,r)?r:`${r} ${o}`}const Bo={SRD:{symbol:"SRD",prefixed:!0,explicit:!0},TRY:{symbol:"TL",prefixed:!1,explicit:!0},CHF:{symbol:"CHF",explicit:!0},KGS:{symbol:"лв",prefixed:!0}};function qo(e,t){return!0===Bo[e]?.explicit||null!=t&&t.includes(e)}function Ho(e,t){const n=e||t.currency,r=Bo[n];if(void 0!==r?.prefixed)return{symbol:r.symbol,prefixed:r.prefixed};const o=n.substring(0,2),i=Ko(t),a=t.numberFormatter({currency:n,style:"currency",currencyDisplay:"narrowSymbol",maximumFractionDigits:i,minimumFractionDigits:i}).format(0).replace(/[\u200E\u200F]/g,""),s=t.numberFormatter({currency:n,style:"currency",currencyDisplay:"code",maximumFractionDigits:i,minimumFractionDigits:i}).format(0).replace(/[\u200E\u200F]/g,"");if(r&&a!==s)return{symbol:r.symbol,prefixed:s.startsWith(n)};if(a===s){const e=s.replace(n,"").trim();return{symbol:s.replace(e,"").trimStart(),prefixed:s.startsWith(n)}}const c=s.replace(n,"").trim(),u=a.replace(c,"").trimStart(),l=a.startsWith(u);return{symbol:u.replace(o,""),prefixed:l}}function Wo(e,t={}){return"IQD"===(t.currency||e.currency||"").toUpperCase()&&void 0===t.precision&&void 0===t.minimumFractionDigits&&void 0===t.maximumFractionDigits?0:Ko(e,t)}function Ko(e,t={}){let n=t.precision;return void 0===n&&(n=Uo((t.currency||e.currency||"").toUpperCase())),n}const zo=(e,t)=>e&&t?`${t}${e}`:"",Go=(e,t,n)=>e?zo(n,t):n||"",Jo=new Map([["ko",Go],["ja",(e,t,n)=>e?zo(n,t):t?`${t}様`:""],["zh-CN",Go],["zh-TW",Go]]),Vo=new RegExp("^(?<language>[a-z]{2,3})(?:-(?<region>[a-zA-Z0-9]+))?$");class Zo{constructor(e,t){this.language=e,this.region=t}toString(){return this.region?`${this.language}-${this.region}`:this.language}}const Xo="latn",Qo=`-u-nu-${Xo}`;function Yo(e){try{const t=new Intl.Locale(e);return new Intl.Locale(t.baseName,{numberingSystem:Xo}).toString()}catch{return function(e){return e.includes("-u-nu-")?e.replace(/-u-nu-[a-z0-9]+/i,Qo):`${e}${Qo}`}(e)}}const ei="count",ti="scope",ni=".";function ri(e){const t=new Map;return oi(e,(e,n)=>t.set(e,n)),t}function oi(e,t,n){Object.keys(e).forEach(r=>{const o=e[r],i=n?`${n}.${r}`:r;null!=o&&("string"==typeof o?t(i,o):oi(o,t,i))})}function ii(e,t,n){Object.keys(e).forEach(r=>{const o=e[r],i=n?`${n}.${r}`:r;null!=o&&(t(i,o),"string"!=typeof o&&ii(o,t,i))})}function ai(e){const t=new Map;return ii(e,(e,n)=>t.set(e,n)),t}function si(){return`${ci()}-${ci()}-${ci()}-${ci()}`}function ci(){return Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)}class ui extends Error{constructor(e,t){super(`The value for "${e}" was not a string. Found ${JSON.stringify(t)} instead.`),this.name="TranslationNotStringError"}}class li extends Error{constructor(e,t,n){super(`The key "${t}" is not a valid replacement for "${e}".`),this.rawTranslation=n,this.name="MissingReplacementError"}}const fi=/(%{([^}]*)})|({{([^}]*)}})/g,di=/((?:%{([^}]*)}|{{([^}]*)}})[….,!?;:)'"’”]?)/g,hi=/(href="%{([^}]*)}")|(href="{{([^}]*)}}")/g,pi={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},mi="data-replacement-index";function vi(e){return String(e).replace(/[&<>"']/g,e=>pi[e])}const _i=["…",".",",","!","?",";",":",")","'",'"',"’","”"];function yi({i18n:e,rawTranslation:t,replacements:n,translationKey:r,noWrapElementReplacements:o}){const i=[];let a=t;try{a=t.replace(hi,e=>{const o=e.startsWith('href="%')?e.substring(8,e.length-2).trim():e.substring(8,e.length-3).trim();if(o in n)return`href="${vi(n[o])}"`;throw new li(r,o,t)}).replace(fi,e=>{const a="%"===e.slice(0,1)?e.substring(2,e.length-1):e.substring(2,e.length-2).trim();if(a in n){if(!qr(n[a]))return vi(n[a]);i.push(n[a]);const e=o?' style="white-space: nowrap;"':"";return`<span ${mi}="${i.length-1}"${e}></span>`}throw new li(r,a,t)})}catch(s){s instanceof Error&&e.onError?.(s)}return zr(gi,{translation:a,portals:i})}function gi({translation:e,portals:t=[]}){const n=pe(null),[r,o]=le([]);return he(()=>{const e=n.current;o(e?Array.from(e.querySelectorAll(`[${mi}]`)):[])},[e]),zr(x,{children:[zr("span",{ref:n,dangerouslySetInnerHTML:{__html:e}}),t.map((e,t)=>{const n=r[t];return n?$r(e,n):null})]})}class wi{constructor(e,t){this.pluralRules=function(e,t){const n=new WeakMap,r=new Map,o=[];return function(...i){if("undefined"==typeof window)return e.apply(this,i);
1const a=1===i.length&&"object"==typeof i[0]&&!t;let s;s=a?i[0]:t&&t instanceof Function?t(...i):i[0];const c=a?n:r;if(c.has(s))return c.get(s);const u=e.apply(this,i);if(a)n.set(s,u);else if(r.set(s,u),o.push(s),r.size>50){const e=o[0];r.delete(e),o.shift()}return u}}(Ei,(e,t={})=>`${e}${JSON.stringify(t)}`),this.numberFormats=new Map,this.translations=ai(t),this.locale=function(e="en"){const t=function(e){if(!e)return null;const t=e.match(Vo);return t?new Zo(t.groups?.language,t.groups?.region):null}(e);return t?.toString()??bi(e)??"en"}(e.locale),this.localeDirection=e.direction??function(e){const t=e.split("-")[0].toLowerCase();return t&&Oo.has(t)?"rtl":"ltr"}(this.locale),this.currency=e.currency&&function(e){try{return new Intl.NumberFormat(void 0,{style:"currency",currency:e}).format(123),!0}catch{return!1}}(e.currency)?e.currency:"USD";const n=e.fallbackTimeZone&&Si(e.fallbackTimeZone)?e.fallbackTimeZone:void 0;this.timeZone=Si(e.timeZone)?e.timeZone:n,this.onError=e.onError,this.uuid=e.uuid??si,this.formattingLocale=Yo(this.locale)}numberFormatter(e={}){const t=function(e,t={}){return`${e}${JSON.stringify(t)}`}(this.formattingLocale,e);if(this.numberFormats.has(t))return this.numberFormats.get(t);let n;try{const n=new Intl.NumberFormat(this.formattingLocale,e);return this.numberFormats.set(t,n),n}catch(c){n=c}const{currencyDisplay:r,...o}=e,i=bi(this.locale),a=i?Yo(i):void 0,s=[];r&&s.push({locale:this.formattingLocale,options:o}),a&&a!==this.formattingLocale&&(s.push({locale:a,options:e}),r&&s.push({locale:a,options:o}));for(const{locale:u,options:l}of s)try{const e=new Intl.NumberFormat(u,l);return this.numberFormats.set(t,e),e}catch(c){n=c;continue}throw n}formatCurrency(e,t){return function(e,t,{form:n,...r}={}){switch(n){case"auto":return function(e,t={},n){return null==t.currency||null==n.currency||t.currency===n.currency?jo(e,t,n):Fo(e,t,n)}(t,r,e);case"explicit":return Fo(t,r,e);case"name":return function(e,t={},n){const r=t.currency||n.currency,o=Wo(n,t);return n.numberFormatter({maximumFractionDigits:o,minimumFractionDigits:o,...t,style:"currency",currency:r,currencyDisplay:"name"}).format(e)}(t,r,e);case"plain":return function(e,t={},n){const r=Ko(n,t);return Do(n.numberFormatter({style:"currency",useGrouping:!1,maximumFractionDigits:r,minimumFractionDigits:r,currencyDisplay:"code",...t}).format(e))}(t,r,e);default:return jo(t,r,e)}}(this,e,t)}formatDate(e,t){return function(e,t,n={}){if(null!=Mo&&!1===n.hour12&&null!=Mo.hourCycle&&(n.hour12=void 0,n.hourCycle="h23"),null!=n.timeZone&&"Etc/GMT+12"===n.timeZone){const r=new Date(e.valueOf()-432e5);return $o(t,{...n,timeZone:"UTC"}).format(r)}return $o(t,n).format(e)}(e,this.formattingLocale,{timeZone:this.timeZone,...t})}formatName(e,t,n){return function(e,t,n,r){const o=e.includes("-")&&"zh-CN"!==e&&"zh-TW"!==e?e.split("-")[0].toLowerCase():e,i=Boolean(r&&t&&n),a=Jo.get(o);return a?a(i,n,t):i?`${t} ${n}`:t||""}(this.locale,e,t,n)}translate(e,t,n){return function(e,t,n,r){let o=!!t.endsWith("_html")||void 0,i=!1;"object"==typeof r&&(o=r.dangerouslySetInnerHTML??o,i=r.noWrapElementReplacements??!1);try{if("object"==typeof n&&Boolean(Object.keys(n).length)){const r=function(e,t,n){let r;return r=function(e){return ti in e&&"string"==typeof e[ti]}(n)?function(e,t,n){const r=n[ti],o=t+ni+r,i=e.translations.get(o),a="string"==typeof i?i:i?.[r];if("string"!=typeof a)throw new ui(o,a);return{translation:a,key:o,replacements:n}}(e,t,n):function(e){return ei in e&&"number"==typeof e[ei]}(n)?function(e,t,n){const r=n[ei],o=e.pluralRules(e.locale).select(r),i=e.pluralRules(e.locale).resolvedOptions().pluralCategories,a=e.numberFormatter().format(r),s=t+ni+o;let c=e.translations.get(s);if(c||i.includes("other")&&e.translations.has(`${t}${ni}other`)&&(c=e.translations.get(`${t}${ni}other`)),"string"!=typeof c)throw new ui(s,c);return{translation:c,key:s,replacements:{...n,[ei]:a}}}(e,t,n):function(e,t,n){const r=e.translations.get(t);if("string"!=typeof r)throw new ui(t,r);return{translation:r,key:t,replacements:n}}(e,t,n),{translation:r.translation,replacements:r.replacements,key:r.key}}
1(e,t,n);return function(e,t,n,r,o,i){return o?zr(yi,{i18n:e,rawTranslation:t,replacements:n,translationKey:r,noWrapElementReplacements:i}):function(e){return Object.values(e).every(e=>!qr(e))}(n)?function(e,t,n){return e.replace(fi,r=>{let o;if(o="%"===r.slice(0,1)?r.substring(2,r.length-1).trim():r.substring(2,r.length-2).trim(),o in t)return t[o];throw new li(n,o,e)})}(t,n,r):function(e,t,n,r){return e.split(r?di:fi).filter(e=>Boolean(e)).reduce((o,i)=>{if(o.nextExtryIsReplacementKey){const a=i.trim();if(!(a in t))throw new li(n,a,e);const s=o.matchIndex+1,c=function(e,t,n,r){const o=t.slice(-1),i=r&&_i.includes(o);if(!qr(e))return i?`${e}${o}`:e;const a=Hr(e,{key:n});return i?zr("span",{style:{whiteSpace:"nowrap"},children:[a,o]}):a}(t[a],o.previousEntry,s,r);return{nextExtryIsReplacementKey:!1,matchIndex:s,splitTranslationWithReplacements:[...o.splitTranslationWithReplacements,c],previousEntry:i}}return i.match(fi)?{...o,nextExtryIsReplacementKey:!0,previousEntry:i}:{...o,nextExtryIsReplacementKey:!1,splitTranslationWithReplacements:[...o.splitTranslationWithReplacements,i],previousEntry:i}},{nextExtryIsReplacementKey:!1,matchIndex:0,splitTranslationWithReplacements:[],previousEntry:""}).splitTranslationWithReplacements}(t,n,r,i)}(e,r.translation,r.replacements,r.key,o,i)}return o?function(e,t){const n=e.translations.get(t);if("string"!=typeof n)throw new ui(t,n);return zr(gi,{translation:n})}(e,t):function(e,t){const n=e.translations.get(t);if(n&&"string"==typeof n)return n;throw new ui(t,n)}(e,t)}catch(a){if(a instanceof li)return a.rawTranslation;if(a instanceof Error)return e.onError?.(a),`I18n Error: ${a.message}`}}(this,e,t,n)}}function bi(e){if(e)return e.match(/^([a-z]{2,3})(?:[-_].*)?$/i)?.[1]}function Ei(e,t={}){try{return new Intl.PluralRules(e,t)}catch(n){const r=bi(e);if(!r)throw n;return new Intl.PluralRules(r,t)}}function Si(e){try{if(new Intl.DateTimeFormat(void 0,{timeZone:e}))return!0}catch{return!1}return!1}function ki(...e){const t={};return e.forEach(e=>{Object.keys(e).forEach(n=>{t[n]?"string"==typeof e[n]?t[n]=e[n]:t[n]=ki(t[n],e[n]):t[n]=e[n]})}),t}function xi(e,t){if(!{}.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}var Ci=0;function Ai(e){return"__private_"+Ci+++"_"+e}function Pi(e){return Object.entries(e).map(([e,t])=>({key:e,value:{stringValue:String(t)}}))}function Ni(e){if(Array.isArray(e))return{arrayValue:{values:e.map(e=>Ni(e))}};switch(typeof e){case"boolean":return{boolValue:Boolean(e)};case"number":return{doubleValue:Number(e)};default:return{stringValue:String(e)}}}const $i=function(){const e=[0];for(let t=0;t<12;t++){const n=Math.floor(5*2**t);e.push(n)}return e}();function Ti(e){return"number"==typeof e&&Number.isFinite(e)}function Mi(e,t,n){throw new Error(`[OpenTelemetry] Invalid ${e} "${t}": value must be a finite number, got ${null===n?"null":typeof n}`)}var Oi=Ai("exporter"),Ri=Ai("attributes"),Ii=Ai("metrics"),Ui=Ai("logs");class Li{constructor({exporter:e,attributes:t}){Object.defineProperty(this,Oi,{writable:!0,value:void 0}),Object.defineProperty(this,Ri,{writable:!0,value:void 0}),Object.defineProperty(this,Ii,{writable:!0,value:[]}),Object.defineProperty(this,Ui,{writable:!0,value:[]}),xi(this,Oi)[Oi]=e,xi(this,Ri)[Ri]=null!=t?t:{}}addAttributes(e){xi(this,Ri)[Ri]={...xi(this,Ri)[Ri],...e}}histogram({name:e,value:t,unit:n,description:r,bounds:o,attributes:i,scale:a,requiresKeepalive:s}){Ti(t)||Mi("histogram",e,t);const c=1e6*Date.now();o?xi(this,Ii)[Ii].push({name:e,type:"histogram",value:t,unit:n,description:r,timeUnixNano:c,attributes:i,bounds:o,requiresKeepalive:s}):xi(this,Ii)[Ii].push({name:e,type:"exponential_histogram",value:t,unit:n,description:r,timeUnixNano:c,attributes:i,scale:a,requiresKeepalive:s})}counter({name:e,value:t,unit:n,description:r,attributes:o,requiresKeepalive:i}){Ti(t)||Mi("counter",e,t);const a=1e6*Date.now();xi(this,Ii)[Ii].push({name:e,type:"counter",value:t,unit:n,description:r,timeUnixNano:a,attributes:o,requiresKeepalive:i})}gauge({name:e,value:t,unit:n,description:r,attributes:o,requiresKeepalive:i}){Ti(t)||Mi("gauge",e,t);const a=1e6*Date.now();xi(this,Ii)[Ii].push({name:e,type:"gauge",value:t,unit:n,description:r,timeUnixNano:a,attributes:o,requiresKeepalive:i})}log({body:e,attributes:t,requiresKeepalive:n}){const r=1e6*Date.now();xi(this,Ui)[Ui].push({timeUnixNano:r,body:e,attributes:t,requiresKeepalive:n})}
1async exportMetrics(){xi(this,Ii)[Ii].forEach(e=>{e.attributes={...xi(this,Ri)[Ri],...e.attributes}});const e=xi(this,Ii)[Ii];xi(this,Ii)[Ii]=[],await this.exportByKeepalive(e,(e,t)=>xi(this,Oi)[Oi].exportMetrics(this.aggregateMetrics(e),t))}async exportLogs(){const e=xi(this,Ui)[Ui];xi(this,Ui)[Ui]=[],await this.exportByKeepalive(e,(e,t)=>xi(this,Oi)[Oi].exportLogs(this.formatLogs(e),t))}aggregateMetrics(e){const t={};return e.forEach(e=>{switch(e.type){case"histogram":!function(e,t){var n;const{name:r,value:o,unit:i,description:a,timeUnixNano:s,attributes:c}=t,u=null!==(n=t.bounds)&&void 0!==n?n:$i,l=new Array(u.length+1).fill(0);e[r]||={name:r,unit:i||"1",description:a,histogram:{aggregationTemporality:1,dataPoints:[]}};for(let f=0;f<l.length;f++){const e=u[f];if(void 0===e)l[f]=1;else if(o<=e){l[f]=1;break}}e[r].histogram.dataPoints.push({startTimeUnixNano:s,timeUnixNano:s,count:1,sum:o,min:o,max:o,bucketCounts:l,explicitBounds:u,attributes:Pi(null!=c?c:{})})}(t,e);break;case"exponential_histogram":!function(e,t){const{name:n,value:r,unit:o,description:i,timeUnixNano:a,attributes:s,scale:c}=t;e[n]||={name:n,unit:o||"1",description:i,exponentialHistogram:{aggregationTemporality:1,dataPoints:[]}};const u=r<=0?0:r,l=c||3,f=2**l/Math.log(2),d=Math.ceil(Math.log(r)*f)-1,h=r<=0?1:0,p={offset:r>0?d:0,bucketCounts:r>0?[1]:[]};e[n].exponentialHistogram.dataPoints.push({attributes:Pi(null!=s?s:{}),startTimeUnixNano:a,timeUnixNano:a,count:1,sum:u,scale:l,zeroCount:h,positive:p,negative:{offset:0,bucketCounts:[]},min:u,max:u,zeroThreshold:0})}(t,e);break;case"counter":!function(e,t){const{name:n,value:r,unit:o,description:i,timeUnixNano:a,attributes:s}=t;e[n]||={name:n,unit:o||"1",description:i,sum:{aggregationTemporality:1,isMonotonic:!0,dataPoints:[]}},e[n].sum.dataPoints.push({startTimeUnixNano:a,timeUnixNano:a,asDouble:r,attributes:Pi(null!=s?s:{})})}(t,e);break;case"gauge":!function(e,t){const{name:n,value:r,unit:o,description:i,timeUnixNano:a,attributes:s}=t;e[n]||={name:n,unit:o||"1",description:i,gauge:{dataPoints:[]}},e[n].gauge.dataPoints.push({startTimeUnixNano:a,timeUnixNano:a,asDouble:r,attributes:Pi(null!=s?s:{})})}(t,e)}}),Object.values(t)}async exportByKeepalive(e,t){if(0===e.length)return;const n=[],r=[];e.forEach(e=>{var t;null===(t=e.requiresKeepalive)||void 0===t||t?n.push(e):r.push(e)});const o=[n.length>0?t(n,{keepalive:!0}):void 0,r.length>0?t(r,{keepalive:!1}):void 0].filter(e=>void 0!==e);await Promise.all(o)}formatLogs(e){return e.map(e=>{const t={timeUnixNano:e.timeUnixNano,observedTimeUnixNano:e.timeUnixNano,attributes:(n={...xi(this,Ri)[Ri],...e.attributes},Object.entries(n).map(([e,t])=>({key:e,value:Ni(t)})))};var n;return e.body&&(t.body={stringValue:e.body}),t})}}var Di=Ai("url"),ji=Ai("serviceName"),Fi=Ai("logger"),Bi=Ai("fetchFn"),qi=Ai("maxPayloadSizeBytes"),Hi=Ai("retry");class Wi{constructor(e,t,n){var r;Object.defineProperty(this,Di,{writable:!0,value:void 0}),Object.defineProperty(this,ji,{writable:!0,value:void 0}),Object.defineProperty(this,Fi,{writable:!0,value:void 0}),Object.defineProperty(this,Bi,{writable:!0,value:void 0}),Object.defineProperty(this,qi,{writable:!0,value:void 0}),Object.defineProperty(this,Hi,{writable:!0,value:void 0}),xi(this,Di)[Di]=e.replace(/\/v1\/(logs|metrics|traces)\/?$/,""),xi(this,ji)[ji]=t,xi(this,Fi)[Fi]=null==n?void 0:n.logger,xi(this,Bi)[Bi]=null==n?void 0:n.fetchFn,xi(this,qi)[qi]=null!==(r=null==n?void 0:n.maxPayloadSizeBytes)&&void 0!==r?r:51200,xi(this,Hi)[Hi]=null==n?void 0:n.retry}async exportMetrics(e,t){var n;const r=null===(n=null==t?void 0:t.keepalive)||void 0===n||n;await this.exportBatches("/v1/metrics",[...e],e=>({resourceMetrics:[{resource:{attributes:[{key:"service.name",value:{stringValue:xi(this,ji)[ji]}}]},scopeMetrics:[{scope:{name:"open-telemetry-mini-client",version:"1.1.0",attributes:[]},metrics:e}]}]}),r,{splitEntry:Ki,describeEntry:e=>({metricName:e.name,dataPointCount:Gi(e)})})}async exportLogs(e,t){var n;const r=null===(n=null==t?void 0:t.keepalive)||void 0===n||n;await this.exportBatches("/v1/logs",[...e],e=>({resourceLogs:[{resource:{attributes:[{key:"service.name",value:{stringValue:xi(this,ji)[ji]}}]},scopeLogs:[{scope:{name:"open-telemetry-mini-client",version:"1.1.0",attributes:[]},logRecords:e}]}]}),r)}async exportTo(e,t,n){await this.exportSerializedWithRetry(this.serializeBody(e),t,n)}serializeBody(e){const t=JSON.stringify(e),n=(new TextEncoder).encode(t).length;if(n>xi(this,qi)[qi])throw new Zi(n,xi(this,qi)[qi]);return{body:e,jsonBody:t}}async exportSerializedTo({body:e,jsonBody:t},n,r){var o;const i=await this.exporterFetch()(`${xi(this,Di)[Di]}${n}`,{method:"POST",keepalive:r,headers:{"Content-Type":"application/json"},body:t});if(null===(o=xi(this,Fi)[Fi])||void 0===o||o.log({status:i.status}),!i.ok){if(400===i.status){const e=await i.text();throw new Vi(`Invalid OpenTelemetry Data: ${e}`)}if(429===i.status||503===i.status){const t=await i.text(),n=i.headers.get("Retry-After"),r=n?{seconds:Number(n)}:void 0;throw new Vi("Server did not accept data",{errorData:t,retryAfter:r,body:e})}if(401===i.status||403===i.status){const t=await i.text();throw new Xi(`Authentication failed: ${i.status} ${401===i.status?"Unauthorized":"Forbidden"}`,{errorData:t,body:e})}throw new Vi(`Server responded with ${i.status}`)}}async exportSerializedWithRetry(e,t,n){const r=()=>this.exportSerializedTo(e,t,n);await(xi(this,Hi)[Hi]?xi(this,Hi)[Hi](r):r())}exporterFetch(){return xi(this,Bi)[Bi]||fetch}async exportBatches(e,t,n,r,o){const i=this.serializedBatches(t,n,o);for(const a of i)await this.exportSerializedWithRetry(a,e,r)}serializedBatches(e,t,n){if(0===e.length)return[];try{return[this.serializeBody(t(e))]}catch(i){var r;if(!(i instanceof Zi))throw i;if(e.length>1){const r=Math.ceil(e.length/2);return[...this.serializedBatches(e.slice(0,r),t,n),...this.serializedBatches(e.slice(r),t,n)]}const a=e[0];if(void 0===a)throw i;const s=null==n||null===(r=n.splitEntry)||void 0===r?void 0:r.call(n,a);var o;if(!s)throw i.metricDetails=null==n||null===(o=n.describeEntry)||void 0===o?void 0:o.call(n,a),i;return[...this.serializedBatches([s[0]],t,n),...this.serializedBatches([s[1]],t,n)]}}}function Ki(e){const t=Gi(e);if(t<=1)return;const n=Math.ceil(t/2);return[zi(e,0,n),zi(e,n,t)]}function zi(e,t,n){switch(!0){case"exponentialHistogram"in e:return{...e,exponentialHistogram:{...e.exponentialHistogram,dataPoints:e.exponentialHistogram.dataPoints.slice(t,n)}};case"histogram"in e:return{...e,histogram:{...e.histogram,dataPoints:e.histogram.dataPoints.slice(t,n)}};case"gauge"in e:return{...e,gauge:{...e.gauge,dataPoints:e.gauge.dataPoints.slice(t,n)}};case"sum"in e:return{...e,sum:{...e.sum,dataPoints:e.sum.dataPoints.slice(t,n)}};default:return Ji(e)}}function Gi(e){switch(!0){case"exponentialHistogram"in e:return e.exponentialHistogram.dataPoints.length;case"histogram"in e:return e.histogram.dataPoints.length;case"gauge"in e:return e.gauge.dataPoints.length;case"sum"in e:return e.sum.dataPoints.length;default:return Ji(e)}}function Ji(e){throw new Error(`Unhandled metric type: ${JSON.stringify(e)}`)}
1class Vi extends Error{constructor(e,t){super(e),this.metadata=void 0,this.name="OpenTelemetryClientError",this.metadata=t}}class Zi extends Error{constructor(e,t){const n="number"==typeof e&&void 0!==t;super(n?`Payload size ${e} exceeds ${t} bytes`:String(e)),this.name="PayloadTooLargeError",this.payloadSizeBytes=void 0,this.payloadSizeLimitBytes=void 0,this.metricDetails=void 0,n&&(this.payloadSizeBytes=e,this.payloadSizeLimitBytes=t)}}class Xi extends Error{constructor(e,t){super(e),this.name="AuthenticationFailedError",this.metadata=void 0,this.name="AuthenticationFailedError",this.metadata=t}}function Qi(e){return Yi(e).map(e=>e instanceof Error?e:new ea(`[${typeof e}] ${function(e){if("function"==typeof e)return`${e.name||"anonymous"}`;if("string"!=typeof e)try{return JSON.stringify(e)??typeof e}catch{}return`${e}`}(e).slice(0,10240)}`))}function Yi(e,t=0){return t>=20?[e,"Truncated cause stack"]:e instanceof Error&&e.cause?[e,...Yi(e.cause,t+1)]:[e]}var ea=class extends Error{name="BugsnagInvalidError"},ta=/^\s*at .*(\S+:\d+|\(native\))/m,na=/^(eval@)?(\[native code])?$/;function ra(e){if(-1===e.indexOf(":"))return[e];let t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[t[1],t[2]?Number(t[2]):void 0,t[3]?Number(t[3]):void 0]}var oa=class{breadcrumbs=[];apiKey;plugins;appId;appType;appVersion;releaseStage;locale;userAgent;metadata;persistedMetadata;onError;onPostErrorListeners=[];endpoints;session;constructor(e){this.apiKey=e.apiKey,this.appType=e.appType,this.appId=e.appId,this.appVersion=e.appVersion,this.releaseStage=e.releaseStage,this.locale=e.locale,this.userAgent=e.userAgent,this.metadata=e.metadata,this.onError=e.onError,this.persistedMetadata={},this.endpoints=e.endpoints??{notify:"https://error-analytics-production.shopifysvc.com",sessions:"https://error-analytics-sessions-production.shopifysvc.com/observeonly"},this.plugins=e.plugins??[],this.plugins.forEach(e=>e.load(this)),this.leaveBreadcrumb("Bugsnag started",void 0,"state"),(e.withSessionTracking??!0)&&(this.session={id:this.getRandomUUID(),startedAt:(new Date).toISOString(),events:{handled:0,unhandled:0}},this.startSession())}addMetadata(e){for(let t of Object.keys(e))this.persistedMetadata[t]=e[t]}getSessionId(){return this.session?.id}leaveBreadcrumb(e,t,n="manual"){this.breadcrumbs.push({name:e,metaData:t,type:n,timestamp:(new Date).toISOString()})}notify(e,{errorClass:t,severity:n,severityType:r,handled:o=!0,metadata:i,context:a,groupingHash:s}={}){let c=Qi(e),u={...this.metadata,...this.persistedMetadata,...i},l=this.buildBugsnagEvent(c,{errorClass:t,severityType:r,handled:o,severity:n,metadata:u,context:a,groupingHash:s});if((this.onError?.(l,e)??!0)&&"development"!==this.releaseStage){this.updateAndAppendSessionInformation(l);let t=this.sendToBugsnag(l);return this.onPostErrorListeners.forEach(t=>t(l,e)),t}return Promise.resolve()}addOnPostError(e){this.onPostErrorListeners.push(e)}updateAndAppendSessionInformation(e){this.session&&(e.unhandled?this.session.events.unhandled++:this.session.events.handled++,e.session=this.session)}buildBugsnagEvent(e,{errorClass:t,severity:n="error",severityType:r="handledException",handled:o,metadata:i={},context:a,groupingHash:s}){let c=(new Date).toISOString(),{breadcrumbs:u,appId:l,appType:f,appVersion:d,releaseStage:h,locale:p,userAgent:m}=this;return{payloadVersion:"5",exceptions:e.map((e,n)=>({errorClass:0===n?t??e.name:e.name,stacktrace:ia(l,e),message:e.message,type:"browserjs"})),severity:n,severityReason:{type:r},unhandled:!o,app:{id:l,type:f,version:d,releaseStage:h},device:{time:c,locale:p,userAgent:m},breadcrumbs:u,context:a,metaData:i,groupingHash:s}}async startSession(){if("development"===this.releaseStage)return void console.log("Skipping error logging session tracking in development mode");let{apiKey:e}=this,t={notifier:{name:"Bugsnag JavaScript",version:"7.22.2",url:"https://github.com/bugsnag/bugsnag-js"},app:{version:this.appVersion,releaseStage:this.releaseStage,type:this.appType},device:{id:this.appId,locale:this.locale,userAgent:this.userAgent},sessions:[this.session]};try{await fetch(this.endpoints.sessions,{method:"POST",headers:{"Content-Type":"application/json","Bugsnag-Api-Key":e,"Bugsnag-Payload-Version":"5","Bugsnag-Sent-At":this.session?.startedAt??(new Date).toISOString()},body:JSON.stringify(sa(t))})}catch(n){console.warn("[bugsnag-light] failed to start session"),console.warn(n)}}async sendToBugsnag(e){let{apiKey:t}=this,n={apiKey:t,notifier:{name:"Bugsnag JavaScript",version:"7.22.2",url:"https://github.com/bugsnag/bugsnag-js"},events:[e]};try{await fetch(this.endpoints.notify,{method:"POST",headers:{"Content-Type":"application/json","Bugsnag-Api-Key":t,"Bugsnag-Payload-Version":"5","Bugsnag-Sent-At":e.device.time},body:JSON.stringify(sa(n))})}catch(r){console.warn("[bugsnag-light] failed to send an event"),console.warn(r)}}getRandomUUID(){try{return crypto.randomUUID()}catch{return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}}};
1function ia(e,t){let n=function(e){return e.stack?e.stack.match(ta)?function(e){return e.stack.split("\n").filter(e=>!!e.match(ta)).map(e=>{let t=e.replace(/^\s+/,"").replace(/^.*?\s+/,""),n=t.match(/ (\(.+\)$)/);t=n?t.replace(n[0],""):t;let r=ra(n?n[1]:t);return{method:n&&t||void 0,file:["eval","<anonymous>"].indexOf(r[0])>-1?void 0:r[0],lineNumber:r[1],columnNumber:r[2]}})}(e):function(e){return e.stack.split("\n").filter(e=>!e.match(na)).map(e=>{if(-1===e.indexOf("@")&&-1===e.indexOf(":"))return{method:e};let t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,o=ra(e.replace(t,""));return{method:r,file:o[0],lineNumber:o[1],columnNumber:o[2]}})}(e):[]}(t).map(t=>{let n=t.file?.includes(e);return{method:t.method??"",file:t.file??"",lineNumber:t.lineNumber??0,columnNumber:t.columnNumber,inProject:n}});if(t instanceof ea){let e=n.findIndex(e=>e.method.endsWith("notify"));e>-1&&(n=n.slice(e+1))}return n}var aa=50;function sa(e,t=new Set,n=0){if(null===e||"object"!=typeof e)return e;if(n>=aa)return"[MaxDepth]";if(t.has(e))return"[Circular]";let r=new Set(t);if(r.add(e),Array.isArray(e))return e.map(e=>sa(e,r,n+1));let o={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(o[i]=sa(e[i],r,n+1));return o}var ca=class e extends Error{reason;constructor(t,n){super(t,n),this.name="BreadcrumbsPluginFetchError",Object.setPrototypeOf(this,e.prototype)}};function ua(e,{metadata:t}={}){let n=window.onerror;window.onerror=(r,o,i,a,s)=>{s&&e.notify(s,{severityType:"unhandledException",handled:!1,metadata:t}),"function"==typeof n&&n.apply(window.onerror,[r,o,i,a,s])}}function la(e,{metadata:t}={}){window.addEventListener("unhandledrejection",n=>{n.reason&&n.reason instanceof Error&&n.reason.stack&&!(n.reason instanceof ca)&&e.notify(n.reason,{severityType:"unhandledPromiseRejection",handled:!1,metadata:t})})}var fa={load(e){e.addOnPostError(t=>{e.leaveBreadcrumb(t.exceptions[0].errorClass,{errorClass:t.exceptions[0].errorClass,errorMessage:t.exceptions[0].message,severity:t.severity},"error")})}};function da(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}var ha={load(e){"addEventListener"in self&&self.addEventListener("click",t=>{let n="[hidden]";try{let e=function(e){return da(e)&&e.nodeType===Node.ELEMENT_NODE}(t.target)?t.target:null;n=e?pa(e):"(Non-Element Target)"}catch{}let r=function(){try{return window.self===window.top?"in-top-window":"in-same-origin-iframe"}catch{return"in-cross-origin-iframe"}}();e.leaveBreadcrumb("UI click",{targetSelector:n,targetFrame:r},"user")},!0)}};function pa(e){let t=e.tagName;if(e.id&&(t+=`#${e.id}`),e.className?.length&&(t+=`.${e.className.replace(/ /g,".")}`),!self.document.querySelectorAll)return t;try{if(1===self.document.querySelectorAll(t).length)return t}catch{return t}return e.parentNode&&e.parentNode.childNodes.length>1&&(t+=`:nth-child(${Array.from(e.parentNode.children).indexOf(e)+1})`),1===self.document.querySelectorAll(t).length?t:e.parentElement?`${pa(e.parentElement)} > ${t}`:t}var ma={load(e){let t=["log","debug","info","warn","error"].filter(e=>typeof console<"u"&&"function"==typeof console[e]);for(let n of t){let t=console[n];console[n]=(...r)=>{e.leaveBreadcrumb("Console output",r.reduce((e,t,n)=>{let r="[Unknown value]";try{r=String(t)}catch{}if("[object Object]"===r)try{r=JSON.stringify(t)}catch{}return e[`[${n}]`]=r,e},{severity:n}),"log"),t.apply(console,r)}}}},va={load(e){if(!("addEventListener"in self))return;let t=t=>()=>e.leaveBreadcrumb(t,void 0,"navigation");self.addEventListener("pagehide",t("Page hidden"),!0),self.addEventListener("pageshow",t("Page shown"),!0),self.addEventListener("load",()=>{self.addEventListener("popstate",t("Navigated back"),!0)},!0),self.document?.addEventListener("DOMContentLoaded",t("DOMContentLoaded"),!0),self.location&&self.addEventListener("hashchange",t=>e.leaveBreadcrumb("Hash changed",{from:t.oldURL&&_a(t.oldURL),to:_a(t.oldURL?t.newURL:self.location.href),state:t.oldURL&&ya(self)},"navigation"),!0);let n=e.leaveBreadcrumb.bind(e);self.history&&self instanceof Window&&("function"==typeof self.history.replaceState&&ga({fn:"replaceState",target:self.history,leaveBreadcrumb:n,win:self}),"function"==typeof self.history.pushState&&ga({fn:"pushState",target:self.history,leaveBreadcrumb:n,win:self}))}};function _a(e){try{let t=new URL(e);return`${t.pathname}${t.search}${t.hash}`}catch{return e}}function ya(e){try{return e.history.state}catch{return{}}}function ga({fn:e,leaveBreadcrumb:t,target:n,win:r}){let o=n[e];n[e]=(i,a,s)=>{t(`History ${e}`,function({win:e,state:t,title:n,url:r}){let o=_a(e.location.href);return{title:n,state:t,prevState:ya(e),to:r||o,from:o}}({win:r,state:i,title:a,url:s}),"navigation"),o.apply(n,[i,a,s])}}var wa={load(e){if(!("fetch"in self))return;let t=self.fetch;self.fetch=function(n,r){let o,i="GET";!function(e){return e instanceof Request||da(e)&&"url"in e}(n)?o=n.toString():(o=n.url,i=n.method),r&&"string"==typeof r.method&&r.method.length&&(i=r.method);let a=e.leaveBreadcrumb.bind(e);return new Promise((e,s)=>{t(n,r).then(t=>{let n=t.headers?.get("x-request-id");ba({message:"fetch() "+(t.status>=400?"failed":"succeeded"),url:o,leaveBreadcrumb:a,breadcrumbMetadata:{request:`${i} ${o}`,status:t.status,...n&&{requestId:n}}}),e(t)}
1).catch(e=>{ba({message:"fetch() error",url:o,leaveBreadcrumb:a,breadcrumbMetadata:{error:e?.message,request:`${i} ${o}`}}),s(new ca(e?.message,{cause:e}))})})}}};function ba({message:e,url:t,leaveBreadcrumb:n,breadcrumbMetadata:r}){t.startsWith("https://notify.bugsnag")||n(e,r,"request")}var Ea,Sa=-1,ka=function(e){addEventListener("pageshow",function(t){t.persisted&&(Sa=t.timeStamp,e(t))},!0)},xa=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},Ca=function(){var e=xa();return e&&e.activationStart||0},Aa=function(e,t){var n=xa(),r="navigate";return Sa>=0?r="back-forward-cache":n&&(document.prerendering||Ca()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},Pa=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver(function(e){Promise.resolve().then(function(){t(e.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(o){}},Na=function(e,t,n,r){var o,i;return function(a){var s,c;t.value>=0&&(a||r)&&((i=t.value-(o||0))||void 0===o)&&(o=t.value,t.delta=i,t.rating=(s=t.value)>(c=n)[1]?"poor":s>c[0]?"needs-improvement":"good",e(t))}},$a=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},Ta=function(e){document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&e()})},Ma=function(e){var t=!1;return function(){t||(e(),t=!0)}},Oa=-1,Ra=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},Ia=function(e){"hidden"===document.visibilityState&&Oa>-1&&(Oa="visibilitychange"===e.type?e.timeStamp:0,La())},Ua=function(){addEventListener("visibilitychange",Ia,!0),addEventListener("prerenderingchange",Ia,!0)},La=function(){removeEventListener("visibilitychange",Ia,!0),removeEventListener("prerenderingchange",Ia,!0)},Da=function(){return Oa<0&&(Oa=Ra(),Ua(),ka(function(){setTimeout(function(){Oa=Ra(),Ua()},0)})),{get firstHiddenTime(){return Oa}}},ja=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},Fa=[1800,3e3],Ba=[.1,.25],qa=function(e,t){t=t||{},function(e,t){t=t||{},ja(function(){var n,r=Da(),o=Aa("FCP"),i=Pa("paint",function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-Ca(),0),o.entries.push(e),n(!0)))})});i&&(n=Na(e,o,Fa,t.reportAllChanges),ka(function(r){o=Aa("FCP"),n=Na(e,o,Fa,t.reportAllChanges),$a(function(){o.value=performance.now()-r.timeStamp,n(!0)})}))})}(Ma(function(){var n,r=Aa("CLS",0),o=0,i=[],a=function(e){e.forEach(function(e){if(!e.hadRecentInput){var t=i[0],n=i[i.length-1];o&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,i.push(e)):(o=e.value,i=[e])}}),o>r.value&&(r.value=o,r.entries=i,n())},s=Pa("layout-shift",a);s&&(n=Na(e,r,Ba,t.reportAllChanges),Ta(function(){a(s.takeRecords()),n(!0)}),ka(function(){o=0,r=Aa("CLS",0),n=Na(e,r,Ba,t.reportAllChanges),$a(function(){return n()})}),setTimeout(n,0))}))},Ha=0,Wa=1/0,Ka=0,za=function(e){e.forEach(function(e){e.interactionId&&(Wa=Math.min(Wa,e.interactionId),Ka=Math.max(Ka,e.interactionId),Ha=Ka?(Ka-Wa)/7+1:0)})},Ga=function(){return Ea?Ha:performance.interactionCount||0},Ja=[],Va=new Map,Za=0,Xa=[],Qa=function(e){if(Xa.forEach(function(t){return t(e)}),e.interactionId||"first-input"===e.entryType){var t=Ja[Ja.length-1],n=Va.get(e.interactionId);if(n||Ja.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};Va.set(r.id,r),Ja.push(r)}Ja.sort(function(e,t){return t.latency-e.latency}),Ja.length>
110&&Ja.splice(10).forEach(function(e){return Va.delete(e.id)})}}},Ya=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=Ma(e),"hidden"===document.visibilityState?e():(n=t(e),Ta(e)),n},es=[200,500],ts=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},ja(function(){var n;"interactionCount"in performance||Ea||(Ea=Pa("event",za,{type:"event",buffered:!0,durationThreshold:0}));var r,o=Aa("INP"),i=function(e){Ya(function(){e.forEach(Qa);var t=function(){var e=Math.min(Ja.length-1,Math.floor((Ga()-Za)/50));return Ja[e]}();t&&t.latency!==o.value&&(o.value=t.latency,o.entries=t.entries,r())})},a=Pa("event",i,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=Na(e,o,es,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),Ta(function(){i(a.takeRecords()),r(!0)}),ka(function(){Za=Ga(),Ja.length=0,Va.clear(),o=Aa("INP"),r=Na(e,o,es,t.reportAllChanges)}))}))},ns=[2500,4e3],rs={},os=function(e,t){t=t||{},ja(function(){var n,r=Da(),o=Aa("LCP"),i=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach(function(e){e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-Ca(),0),o.entries=[e],n())})},a=Pa("largest-contentful-paint",i);if(a){n=Na(e,o,ns,t.reportAllChanges);var s=Ma(function(){rs[o.id]||(i(a.takeRecords()),a.disconnect(),rs[o.id]=!0,n(!0))});["keydown","click"].forEach(function(e){addEventListener(e,function(){return Ya(s)},{once:!0,capture:!0})}),Ta(s),ka(function(r){o=Aa("LCP"),n=Na(e,o,ns,t.reportAllChanges),$a(function(){o.value=performance.now()-r.timeStamp,rs[o.id]=!0,n(!0)})})}})};class is{constructor(e){this.to=e}}class as extends Error{constructor(){super(...arguments),this.name="NavigationError"}}function ss(e,t,n,r){Object.defineProperty(e,"state",{value:t,writable:!1});const o=_s(e,r);Object.defineProperty(e,"prefix",{value:o,writable:!1});const i=ps(e.pathname.replace(o??"",""));return Object.defineProperty(e,"normalizedPath",{value:i,writable:!1}),Object.defineProperty(e,"key",{value:n,writable:!1}),e}function cs(e,t){if(e instanceof URL){if(e.origin!==t.origin)throw new as(`You can’t perform a client side navigation to ${e.href} from ${t.href}`);return new URL(e.href)}if("object"==typeof e){const{pathname:n,search:r,hash:o}=e,i=n??t.pathname,a=function(e){return null==e?"":"string"==typeof e?ls("?",e):e instanceof URLSearchParams?ls("?",e.toString()):ls("?",Object.keys(e).reduce((t,n)=>`${t}${n}=${encodeURIComponent(e[n])}`,""))}(r),s=ls("#",o);return new URL(us(`${i}${a}${s}`,t.prefix),t.href)}return"function"==typeof e?cs(e(t),t):new URL(us(e,t.prefix),ds(t.href))}function us(e,t){return t&&0===e.indexOf("/")?`${ds(t)}${e.slice(1)}`:e}function ls(e,t=""){return 0===t.length||t[0]===e?t:`${e}${t}`}function fs(){return`${String(Date.now())}${Math.random()}`}function ds(e){return 0===e.length?"/":"/"===e[e.length-1]?e:`${e}/`}function hs(e){return 1===e.length?e:"/"===e[e.length-1]?e.slice(0,-1):e}function ps(e){return"/"===e[0]?hs(e):`/${hs(e)}`}function ms(e,t,n,r){const o=function(e,t,n=""){const r=_s(e,t)??"",o=n?`${r}${n}`:r,i="/"===(a=hs(e.pathname.replace(o,"")))[0]?a.slice(1):a;var a;return{previousMatchedPathPrefix:n,remainderRelative:i,remainderAbsolute:`${ds(n)}${i}`}}(e,t,r);if(null==n)return{matched:hs(o.remainderAbsolute)};if("function"==typeof n){if(!n(e))return;return{matched:hs(o.remainderAbsolute)}}if("string"==typeof n){const e=hs(n);if("/"===e)return"/"===o.remainderAbsolute?{matched:e,nextMatchedPathPrefix:e}:void 0;if("/"===e[0]){if(!o.remainderAbsolute.startsWith(e))return;return{matched:e,nextMatchedPathPrefix:e}}if(!o.remainderRelative.startsWith(e))return;return{matched:e,nextMatchedPathPrefix:`${o.previousMatchedPathPrefix}${ps(e)}`}}if(n instanceof RegExp){const e=o.remainderRelative.match(n);if(null!=e&&0===e.index)return{matched:hs(e[0]),nextMatchedPathPrefix:`${o.previousMatchedPathPrefix}${ps(e[0])}`};const t=o.remainderAbsolute.match(n);if(null==t||0!==t.index)return;const r=hs(t[0]);return{matched:r,nextMatchedPathPrefix:r}}}function vs(e,t){return null!=_s(e,t)}function _s(e,t){if(!t)return;if("string"==typeof t)return 0===e.pathname.indexOf(t)?hs(t):void 0;const n=new RegExp(t.source).exec(e.pathname);return null!=n&&0===n.index?hs(n[0]):void 0}const ys="_key";class gs{#e;#t;#n=new Set;#r=new Set;#o=!1;#i;#a;constructor(e,{prefix:t,state:n}={}){this.prefix=t,this.#e=We(e?ss(e,n??{},fs(),t):ws(t)),this.currentUrl=this.#e,this.#t=[this.#e.value.key],"undefined"!=typeof window&&window.addEventListener("popstate",this.#s)}currentUrlMatches(e){return null!=ms(this.#e.value,this.prefix,e)}navigate(e,{state:t={},replace:n=!1}={}){const r=this.#e.value,o=cs(e,r);for(const d of this.#r)d(r,o);const i=fs(),a=ss(o,t,i,this.prefix),s={...t,[ys]:i};if(!this.#o&&this.#c(a,()=>{this.#o=!0,this.navigate(a,{replace:n})}))return;this.#o=!1;const c=`${(u=a).pathname}${u.search}${u.hash}`;var u;try{history[n?"replaceState":"pushState"](s,"",c)}catch{return void window.location[n?"replace":"assign"](c)}const l=this.#t.lastIndexOf(r.key);n?this.#t.splice(l,1,i):this.#t.splice(l+1,this.#t.length-l-1,i);const f=ws(this.prefix,i);this.#e.value=f,this.#u(r,f)}redirect(e){if(null==e)return;const t=this.#e.value,n=cs(e,t);if("undefined"==typeof window)throw new is(n);const r=t.key;if(null!=this.#i)return this.#i.to=n,void(this.#i.fromNavigationKey=r);this.#i={to:n,fromNavigationKey:r},window.requestAnimationFrame(()=>{const e=this.#i;this.#i=void 0,null!=e&&this.#e.value.key===e.fromNavigationKey&&this.navigate(e.to,{replace:!0})})}beforeNavigate(e){return this.#r.add(e),()=>{this.#r.delete(e)}}block(e=()=>!0){return this.#n.add(e),()=>{this.#n.delete(e)}}go(e){window.history.go(e)}back(e=-1){this.go(e)}forward(e=1){this.go(e)}resolve(e){return cs(e,this.#e.value)}#s=()=>{const e=this.#e.value;if(e.pathname===window.location.pathname){const e=window.location.hash,t=e?.slice(1);if(t)return}const t=this.#t[0],n=ws(this.prefix,t),r=this.#t.lastIndexOf(window.history.state?.[ys]??t),o=this.#t.lastIndexOf(e.key)-r;if(!this.#o&&this.#c(n,()=>{o&&(this.#o=!0,this.go(o))},!0))return this.#o=!0,void this.go(-o);this.#o=!1,this.#e.value=n,this.#u(e,n)};#u(e,t){e.pathname!==t.pathname&&"undefined"!=typeof window&&(null!=this.#a&&window.cancelAnimationFrame(this.#a),this.#a=window.requestAnimationFrame(()=>{this.#a=void 0,document.body.focus()}))}#c(e,t,n=!1){return[...this.#n].some(r=>r(e,t,n))}}function ws(e,t){const{[ys]:n,...r}=window.history.state??{};return ss(new URL(window.location.href),r,n??t??fs(),e)}const bs="http://localhost:8082",Es="https://monorail-edge.shopifysvc.com",Ss="/v1/produce";function ks(e){return void 0!==e.schemaId}class xs{constructor(e){this.producer=e}do(e,t){return ks(e)?this.producer.produce(e):this.producer.produceBatch(e)}}function Cs(){if("undefined"!=typeof crypto&&crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();const e=new Array(36);for(let t=0;t<36;t++)e[t]=Math.floor(16*Math.random());return e[14]=4,e[19]=e[19]&=-5,e[19]=e[19]|=8,e[8]=e[13]=e[18]=e[23]="-",e.map(e=>e.toString(16)).join("")}function As(e,t=!0){return e&&Object.keys(e).length&&t?Object.keys(e).map(t=>({[Ps(t)]:e[t]})).reduce((e,t)=>
1({...e,...t})):e}function Ps(e){return e.split(/(?=[A-Z])/).join("_").toLowerCase()}function Ns(e){return e.events.map(e=>{let t=!0,n=!0;return e&&e.options&&Object.prototype.hasOwnProperty.call(e.options,"convertEventCase")&&(t=Boolean(e.options.convertEventCase)),e&&e.options&&Object.prototype.hasOwnProperty.call(e.options,"convertMetaDataCase")&&(n=Boolean(e.options.convertMetaDataCase)),{schema_id:e.schemaId,payload:As(e.payload,t),...e.metadata&&{metadata:As(e.metadata,n)}}})}class $s extends Error{name="MonorailUnableToProduceError";constructor(e){super(`Error producing to the Monorail Edge. Response received: ${JSON.stringify(e)}`),this.response=e,Object.setPrototypeOf(this,$s.prototype)}}class Ts extends Error{name="MonorailInterceptedProduceError";constructor(e){super(`Response not from Monorail Edge. Response received: ${JSON.stringify(e)}`),this.response=e,Object.setPrototypeOf(this,Ts.prototype)}}class Ms extends Error{name="MonorailBatchProduceError";constructor(e){super(`Error producing to the Monorail Edge. Response received: ${JSON.stringify(e)}`),Object.setPrototypeOf(this,Ms.prototype),this.response=e}}class Os extends Error{name="MonorailRequestError";constructor(e,t){super(`Error completing request. A network failure may have prevented the request from completing. Error: ${e}. Schemas: ${Array.from(new Set(t)).join(", ")}`),Object.setPrototypeOf(this,Os.prototype)}}class Rs extends Error{name="MonorailResponseReadError";constructor(e,t){super(`Error reading response from Monorail Edge. Status: ${t||"unknown"}. Error: ${e?.message||"Unknown error"}`),this.error=e,this.status=t,Object.setPrototypeOf(this,Rs.prototype)}}class Is{static withEndpoint(e){return new Is(`https://${new URL(e).hostname}`)}constructor(e=bs,t={}){if(this.edgeDomain=e,this.optionsOrKeepalive=t,"boolean"==typeof t)return this.keepalive=t,void(this.detectInterceptedErrorEnabled=!1);this.keepalive=t.keepalive??!1,this.detectInterceptedErrorEnabled=t.detectInterceptedErrorEnabled??!1}async produceBatch(e){const t={events:Ns(e),metadata:As(e.metadata)};let n,r;try{n=await fetch(this.produceBatchEndpoint(),{method:"post",headers:Us(e.metadata),body:JSON.stringify(t),keepalive:e.options?.keepalive??this.resolveKeepaliveFromEvents(e.events)})}catch(o){throw new Os(o,e.events.map(e=>e.schemaId))}if(207===n.status){const e=await n.json();throw new Ms(e)}try{r=await n.text()}catch(o){throw new Rs(o,n.status)}if(!n.ok){if(!Boolean(n.headers.get("x-request-id"))&&this.detectInterceptedErrorEnabled)throw new Ts({status:n.status,message:r});throw new $s({status:n.status,message:r})}return{status:n.status}}async produce(e){let t,n,r=!0;e&&e.options&&Object.prototype.hasOwnProperty.call(e.options,"convertEventCase")&&(r=Boolean(e.options.convertEventCase));try{t=await async function({endpoint:e,event:t,keepalive:n}){const r=t.metadata?{clientMessageId:t.metadata?.clientMessageId,eventCreatedAtMs:t.metadata?.eventCreatedAtMs,consent:t.metadata?.consent,consent_provider:t.metadata?.consent_provider,consent_version:t.metadata?.consent_version}:void 0;return fetch(e??Es+Ss,{method:"post",headers:Us(t.metadata),body:JSON.stringify({schema_id:t.schemaId,payload:t.payload,metadata:r&&As(r,!0)}),keepalive:n})}({endpoint:this.produceEndpoint(),keepalive:e.options?.keepalive??this.keepalive,event:{...e,payload:As(e.payload,r)}})}catch(o){throw new Os(o,[e.schemaId])}if(!t)throw new $s({message:"No response from edge"});try{n=await t.text()}catch(o){throw new Rs(o,t.status)}if(!t.ok){if(!Boolean(t.headers.get("x-request-id"))&&this.detectInterceptedErrorEnabled)throw new Ts({status:t.status,message:n});throw new $s({status:t.status,message:n})}return{status:t.status}}resolveKeepaliveFromEvents(e){for(const t of e)if(!0===t.options?.keepalive)return!0;return this.keepalive}produceBatchEndpoint(){return this.edgeDomain+"/unstable/produce_batch"}produceEndpoint(){return this.edgeDomain+Ss}}function Us(e){const t={"Content-Type":"application/json; charset=utf-8","X-Monorail-Edge-Event-Created-At-Ms":(e&&e.eventCreatedAtMs||Date.now()).toString(),"X-Monorail-Edge-Event-Sent-At-Ms":Date.now().toString(),"X-Monorail-Edge-Client-Message-Id":(e&&e.clientMessageId||Cs()).toString()};return e&&e.userAgent&&(t["User-Agent"]=e.userAgent),e&&e.remoteIp&&(t["X-Forwarded-For"]=e.remoteIp),e&&e.deviceInstallId&&(t["X-Monorail-Edge-Device-Install-Id"]=e.deviceInstallId),e&&e.client&&(t["X-Monorail-Edge-Client"]=e.client),e&&e.clientOs&&(t["X-Monorail-Edge-Client-OS"]=e.clientOs),t}class Ls{static printWelcomeMessage(e){console.log(`%c👋 from Monorail%c\n\nWe've noticed that you're${e?"":" not"} running in debug mode. As such, we will ${e?"produce":"not produce"}
1 Monorail events to the console. \n\nIf you want Monorail events to ${e?"stop":"start"} appearing here, %cset debugMode=${(!e).toString()}%c, for the Monorail Log Producer in your code.`,"font-size: large;","font-size: normal;","font-weight: bold;","font-weight: normal;")}constructor(e){this.sendToConsole=e,e&&Ls.printWelcomeMessage(e)}async produce(e){return this.sendToConsole&&console.log("Monorail event produced",e),new Promise(t=>{t(e)})}produceBatch(e){return this.sendToConsole&&console.log("Monorail Batch event produced",e),new Promise(t=>{t(e)})}}class Ds{static createLogProducer(e){return new Ds(new Ls(e.debugMode),e.middleware||[])}static createHttpProducerWithEndpoint(e,t=[]){return new Ds(Is.withEndpoint(e),t)}static createHttpProducer(e){return new Ds(e.production?new Is(Es,e.options):new Is(bs,e.options),e.middleware||[])}static buildMiddlewareChain(e,t=0){return t===e.length?this.identityFn:n=>e[t].do(n,this.buildMiddlewareChain(e,t+1))}constructor(e,t){this.producer=e,this.middleware=t,this.executeChain=Ds.buildMiddlewareChain(this.middleware.concat(new xs(e)))}produce(e){return e.metadata={eventCreatedAtMs:Date.now(),clientMessageId:Cs(),...e.metadata},this.executeChain(e)}produceBatch(e){return this.executeChain(e)}}class js{constructor(e){this.version=e.version}}class Fs{eventsAwaitingConsent=[];constructor(e,t=()=>!1){if(!e?.provider)throw new Bs("ConsentTrackingMiddleware requires an instance of ConsentTrackingProvider");this.isStrictlyNecessary=t,this.provider=e.provider}async do(e,t){if(ks(e)){const n=await this.provider.annotateEvent(e);return this.isConsentGivenForEmission(n)?(await this.processBufferedEvents(t),t(n)):this.isStrictlyNecessary(n)?t(n):(this.eventsAwaitingConsent.push(e),Promise.resolve({status:0,message:"Consent not granted and event not marked strictly necessary, event not sent"}))}{if(this.isConsentGivenForEmission(await this.provider.annotateEvent(e.events[0]))){await this.processBufferedEvents(t);const n=await Promise.all(e.events.map(e=>this.provider.annotateEvent(e)));return t({...e,events:n})}const n=e.events.filter(e=>!!this.isStrictlyNecessary(e)||(this.eventsAwaitingConsent.push(e),!1));if(n.length>0){const r=await Promise.all(n.map(e=>this.provider.annotateEvent(e)));return t({...e,events:r})}return Promise.resolve({status:0,message:"Consent not granted for any event, and no event marked strictly necessary, event batch not sent"})}}isConsentGivenForEmission(e){const t=e.metadata?.consent,n=this.provider.getRequiredConsentForEmission();return Boolean(Array.isArray(t)&&t.some(e=>n.includes(e)))}async processBufferedEvents(e){if(0===this.eventsAwaitingConsent.length)return;const t=this.eventsAwaitingConsent;this.eventsAwaitingConsent=[];const n=await Promise.all(t.map(e=>this.provider.annotateEvent(e)));await e({events:n})}}class Bs extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Bs.prototype)}}const qs="__quiltRouterScroll",Hs={},Ws="undefined"==typeof window?()=>{}:he;function Ks(){return!0}function zs(){}const Gs=V(null);class Js extends Error{constructor(){super(...arguments),this.name="PrefetcherError"}}function Vs(e){return null==e?"":"string"==typeof e?e:e instanceof RegExp?e.source:e.toString()}function Zs(e,t,n){if(0===n.length)return"";let r,o="";for(const i of n){const n=ms(e,t.prefix,i,r);if(null==n)return!1;r=n.nextMatchedPathPrefix??r,o=n.matched}return o}function Xs({event:e,handler:t,...n}){return function(e,t,{target:n,once:r,passive:o,capture:i}={}){de(()=>{const a=n||window,s=function(){if(null!==Ys)return Ys;try{const e=Object.defineProperty({},"once",{get(){Ys=!0}});document.addEventListener("test",ec,e)}catch{Ys=!1}return document.removeEventListener("test",ec),Ys}(),c=function(){if(null!==Qs)return Qs;try{const e=Object.defineProperty({},"passive",{get(){Qs=!0}});document.addEventListener("test",ec,e)}catch{Qs=!1}return document.removeEventListener("test",ec),Qs}(),u=r&&!s?function(e,t,n){return function(r){n(r),e.removeEventListener(t,n)}}(a,e,t):t;return s||c?(a.addEventListener(e,u,{once:r,passive:o,capture:i}),()=>{a.removeEventListener(e,u,{capture:i})}):(a.addEventListener(e,u,i),()=>{a.removeEventListener(e,u,i)})},[e,t,n,r,o,i])}
1(e,t,n),null}let Qs=null,Ys=null;function ec(){}const tc=pr(function({router:e,children:t}){const n=ve(()=>function(e){let t=0;const n=new Set,r=new Set;return{registerRoutes(e){const n=new Set,o=new Set;function a(e,i=[]){const{children:s,match:c,renderPrefetch:u}=e,l=c?[...i,c]:i;if(null!=u){const e=l.map(Vs).join(",");if(o.has(e))throw new Js(`Duplicate prefetch registration for match chain "${e}"`);o.add(e);const i={id:"Prefetch"+t++,matches:l,render:u};n.add(i),r.add(i)}if(null!=s)for(const t of s)a(t,l)}for(const t of e)a(t);return n.size>0&&i(),()=>{if(0!==n.size){for(const e of n)r.delete(e);n.clear(),i()}}},getMatches:o,listenForMatch(e,t){function r(){t(o(e))}return n.add(r),()=>{n.delete(r)}}};function o(t){const n=[];for(const o of r){const r=Zs(t,e,o.matches);"string"==typeof r&&n.push({id:o.id,matched:r,render:o.render})}return n}function i(){for(const e of n)e()}}(e),[e]),[r,o]=le(null),[i,a]=le([]),s=pe(null),c=pe(null),{current:u}=pe("undefined"==typeof navigator||!("connection"in navigator)||!navigator.connection?.saveData);de(()=>{if(null!=r)return n.listenForMatch(r,a)},[n,r]);const l=()=>{null!=s.current&&(window.clearTimeout(s.current),s.current=null,c.current=null)},f=_e(({target:e})=>{if(null==e)return;const t=rc(e);if(null!=t){if(s.current){if(nc(t,c.current))return;l()}c.current=t,s.current=window.setTimeout(()=>{l(),o(t),a(n.getMatches(t))},150)}},[n]),d=_e(({target:e,relatedTarget:t})=>{if(null==e)return void l();if(null==r&&null==s.current)return;const n=rc(e),i=t&&rc(t);null!=s.current&&nc(n,c.current)&&!nc(i,c.current)&&l(),nc(n,r)&&!nc(i,r)&&(o(null),a([]))},[r]),h=_e(({target:e})=>{if(l(),null==e)return;const t=rc(e);null!=t&&(o(t),a(n.getMatches(t)))},[n]),p=r?zr("div",{style:{visibility:"hidden"},children:i.map(({id:e,matched:t,render:n})=>zr("div",{children:n({url:r,matched:t})},e))}):null,m=u?zr(x,{children:[zr(Xs,{passive:!0,event:"mouseover",handler:f}),zr(Xs,{passive:!0,event:"focusin",handler:f}),zr(Xs,{passive:!0,event:"mouseout",handler:d}),zr(Xs,{passive:!0,event:"focusout",handler:d})]}):null;return zr(x,{children:[zr(Gs.Provider,{value:n,children:t}),zr(Xs,{passive:!0,event:"mousedown",handler:h}),m,p]})});function nc(e,t){return null==e&&e===t||null!=e&&null!=t&&e.href===t.href}function rc(e){if(!(e instanceof HTMLElement))return;const t=e.closest("[href], [data-href]");if(null==t||!(t instanceof HTMLElement))return;const n=t.getAttribute("href")||t.getAttribute("data-href");try{return n?new URL(n,window.location.href):void 0}catch{return}}const oc=pr(function({children:e,router:t}){return zr(tc,{router:t,children:[e,zr(ic,{router:t}),zr(ac,{router:t})]})});function ic({router:e}){return function(e,{id:t="__default",manual:n=!1,include:r=Ks,persist:o="sessionStorage"}={}){const i=e.currentUrl.value,a=pe(null),s=pe(),c=pe(),u=ve(()=>"memory"===o?Hs:(()=>{try{return JSON.parse(sessionStorage.getItem(qs)??"{}")}catch{return{}}})(),[o]),l=_e(()=>{const e=a.current??document.documentElement;if(!r(i))return zs;let n=u[i.key];if(n){const e=n[t];null==e?(n[t]=0,l(0)):l(e)}else n={[t]:0},u[i.key]=n,l(0);return f(),()=>{n[t]=e.scrollTop,f(),null!=c.current&&(window.cancelAnimationFrame(c.current),c.current=void 0)};function l(t){c.current=window.requestAnimationFrame(()=>{e.scrollTop=t,c.current=void 0})}function f(){var e,t;"sessionStorage"===o&&(null!=(t=s.current)&&("function"==typeof window.cancelIdleCallback?window.cancelIdleCallback(t):"number"==typeof t&&window.clearTimeout(t)),s.current=(e=()=>{try{sessionStorage.setItem(qs,JSON.stringify(u))}catch{}},"function"==typeof window.requestIdleCallback?window.requestIdleCallback(e):window.setTimeout(e,0)))}},[i.normalizedPath]);Ws(()=>{if(!n)return l()},[l])}(e),null}function ac({router:e}){return function(e){const t=e.currentUrl.value;de(()=>{if("undefined"==typeof window)return;const e=t.hash;if(!e||e.length<=1)return;const n=e.substring(1),r=document.getElementById(n);r&&window.requestAnimationFrame(()=>{r.scrollIntoView()})},[t.hash])}(e),null}const sc={}.hasOwnProperty;function cc(...e){let t="";for(const n of e)n&&(t=lc(t,uc(n)));return t}function uc(e){if("string"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return cc(...e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();let t="";for(const n in e)sc.call(e,n)&&e[n]&&(t=lc(t,n));return t}function lc(e,t){return t?e?`${e} ${t}`:t:e}function fc(e,t){return`${e}${"number"==typeof t?String(t):`${t[0].toUpperCase()}${t.substring(1)}`}`}const dc=V(null),hc=V(null);function pc(e,{scripts:t,styles:n,suspense:r,cacheErrors:o=!0}={}){const{id:i}
1=e,a=_e(()=>e.resolve({cacheErrors:o}),[e,o]),{snapshot:s,subscribe:c}=ve(()=>({snapshot:()=>e.resolved,subscribe:t=>e.subscribe(t)}),[e]),u=fr(c,s);if(function(e,{scripts:t,styles:n}={}){const r=ye(hc);!function(o,i){const a=ye(dc);a?.perform(()=>{r&&e&&r.markAsUsed(e,{scripts:t,styles:n})},i,void 0)}(0,r?.serverAction)}(i,{scripts:t,styles:n}),r&&null==u)throw"undefined"==typeof window?new Promise(e=>{setTimeout(()=>{e(a())},10)}):new Promise(e=>{setTimeout(async()=>{e(await a())},0)});return u instanceof Error?{id:i,resolved:null,error:u,loading:!1,load:a}:{id:i,resolved:u,error:null,loading:null==u,load:a}}function mc({name:e,fallback:t,children:n}){const r=ve(()=>e?function(e){return`S${t=e,0===t.length?"0":Array.from(t,e=>e.codePointAt(0).toString(36)).join("_")}`;var t}(e):void 0,[e]);return void 0===r?zr(kr,{fallback:t,children:n}):zr(vc,{namespace:r,fallback:t,children:n},r)}class vc extends C{render(){const e=this.__v;return e&&(this.mask??=[this.props.namespace,0],e.__m=this.mask),zr(kr,{fallback:this.props.fallback,children:this.props.children})}}function _c({id:e,load:t,displayName:n,suspense:r=!0,suspenseName:o,renderLoading:i=gc,renderError:a=Ec,useError:s,usePreload:c,usePrefetch:u}){const l=function({id:e,load:t}){let n,r,o=!0;const i=e?.(),a=new Set;return{get id(){return i},get resolved(){return n},resolve:async e=>{const i=e?.cacheErrors??!0;return r?o||=i:(o=i,r=async function(){let e=!1;try{return n=function(e){if(null==e)return null;const t="object"==typeof e&&"default"in e?e.default:e;return null==t?null:t}(await t()),e=!0,s(),n}catch(i){const e=i instanceof Error?i:void 0;return o&&(n=e,s()),e}finally{e||(r=void 0,o=!0)}}()),r},subscribe:e=>(a.add(e),()=>{a.delete(e)})};function s(){for(const e of a)e(n)}}({id:e,load:t}),f=n??function(e){if(!e)return wc;const t=bc.exec(e);return t?.[1]??wc}(l.id);function d(e){const{resolved:t,load:n,loading:o,error:c}=pc(l,{scripts:"immediate",styles:"immediate",suspense:r});if(s?.(c,e),c)return zr(x,{children:a(c)});let u=null;const f=t?zr(t,{...e}):null;return r?f:(u=o?i(e):f,zr(x,{children:[u,o&&zr(Sc,{load:n})]}))}function h(e){if(!r)return zr(d,{...e});const t=i(e)??null,n="function"==typeof o?o(e):o;return void 0===n?zr(kr,{fallback:t,children:zr(d,{...e})}):zr(mc,{name:n,fallback:t,children:zr(d,{...e})})}function p(e){const{load:t}=pc(l,{styles:"eventually",scripts:"eventually",cacheErrors:!1}),n=c?.(e);return _e(()=>(t(),n?.()??yc),[t,n])}function m(e){const{load:t}=pc(l,{styles:"soon",scripts:"soon",cacheErrors:!1}),n=u?.(e);return _e(()=>(t(),n?.()??yc),[t,n])}function v(e){const t=p(e);return de(()=>t(),[t]),null}function _(e){const t=m(e);return de(()=>t(),[t]),null}d.displayName=`Suspender(${f})`,h.displayName=`Async(${f})`,v.displayName=`Async.Preload(${n})`,_.displayName=`Async.Prefetch(${n})`;const y=h;return Reflect.defineProperty(y,"load",{value:()=>l.resolve(),writable:!1}),Reflect.defineProperty(y,"preload",{value:()=>l.resolve({cacheErrors:!1}),writable:!1}),Reflect.defineProperty(y,"Preload",{value:v,writable:!1}),Reflect.defineProperty(y,"Prefetch",{value:_,writable:!1}),Reflect.defineProperty(y,"usePreload",{value:p,writable:!1}),Reflect.defineProperty(y,"usePrefetch",{value:m,writable:!1}),Reflect.defineProperty(y,"useLoadState",{value:function(){const e=fr(l.subscribe,()=>l.resolved);return e instanceof Error?"failed":null==e?"loading":"loaded"},writable:!1}),y}function yc(){}function gc(){return null}const wc="Component",bc=/([^/]*)\.\w+$/;function Ec(e){return null}function Sc({load:e}){return de(()=>{e()},[e]),null}const kc=Symbol.for("RemoteUi::Retain"),xc=Symbol.for("RemoteUi::Release"),Cc=Symbol.for("RemoteUi::RetainedBy");class Ac{constructor(){this.memoryManaged=new Set}add(e){this.memoryManaged.add(e),e[Cc].add(this),e[kc]()}release(){for(const e of this.memoryManaged)e[Cc].delete(this),e[xc]();this.memoryManaged.clear()}}function Pc(e){return Boolean(e&&e[kc]&&e[xc])}function Nc(e,{deep:t=!0}={}){return $c(e,t,new Map)}function $c(e,t,n){const r=n.get(e);if(null!=r)return r;const o=Pc(e);if(o&&e[kc](),n.set(e,o),t){if(Array.isArray(e)){const r=e.reduce((e,r)=>$c(r,t,n)||e,o);return n.set(e,r),r}if(Oc(e)){const r=Object.keys(e).reduce((r,o)=>$c(e[o],t,n)||r,o);return n.set(e,r),r}}return n.set(e,o),o}function Tc(e,{deep:t=!0}={}){return Mc(e,t,new Map)}function Mc(e,t,n){const r=n.get(e);if(null!=r)return r;const o=Pc(e);if(o&&e[xc](),n.set(e,o),t){if(Array.isArray(e)){const r=e.reduce((e,r)=>Mc(r,t,n)||e,o);return n.set(e,r),r}if(Oc(e)){const r=Object.keys(e).reduce((r,o)=>Mc(e[o],t,n)||r,o);return n.set(e,r),r}}return o}function Oc(e){if(null==e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return null==t||t===Object.prototype}const Rc="_@f",Ic="_@fn";function Uc(e){const t="undefined"!=typeof self&&self.name||globalThis.location?.origin||"unknown",n=e.uuid();let r=null;const o=new Map,i=new Map,a=new Map,s=new Map;return{encode:function t(n,r=new Map){if(null==n)return[n];const a=r.get(n);if(a)return a;
1if("object"==typeof n){if(Array.isArray(n)){r.set(n,[void 0]);const e=[],o=[n.map(n=>{const[o,i=[]]=t(n,r);return e.push(...i),o}),e];return r.set(n,o),o}if(Oc(n)){r.set(n,[void 0]);const e=[],o=[Object.keys(n).reduce((o,i)=>{const[a,s=[]]=t(n[i],r);return e.push(...s),{...o,[i]:a}},{}),e];return r.set(n,o),o}}if("function"==typeof n){if(o.has(n)){const e=o.get(n),t=[{[Rc]:e}];return r.set(n,t),t}const t=e.uuid();o.set(n,t),i.set(t,n);const a=[{[Rc]:t,[Ic]:n.name||String(n).slice(0,100)}];return r.set(n,a),a}const s=[n];return r.set(n,s),s},decode:c,async call(e,o){const a=new Ac,u=i.get(e);if(null==u){const o=s.get(e)||"unknown",i=new Error(`[${t}] You attempted to call a function that was already released. (function: ${o}, endpoint: ${n}${null!=r?`, endpoint terminated ${Date.now()-r}ms ago`:""})`);throw i.name="RemoteFunctionReleasedError",i}try{const e=Pc(u)?[a,...u[Cc]]:[a];return await u(...c(o,e))}finally{a.release()}},release(e){const t=i.get(e);t&&(i.delete(e),o.delete(t),s.set(e,t.name||"unknown"))},terminate(){r=Date.now(),o.clear(),i.clear(),a.clear(),s.clear()}};function c(o,i){if("object"==typeof o){if(null==o)return o;if(Array.isArray(o))return o.map(e=>c(e,i));if(Rc in o){const s=o[Rc];if(a.has(s))return a.get(s);let c=0,u=!1,l=null;const f=()=>{c-=1,0===c&&(u=!0,l=Date.now(),a.delete(s),e.release(s))},d=()=>{c+=1},h=new Set(i),p=Ic in o&&o[Ic]||"unknown",m=(...o)=>{if(u){const e=new Error(`[${t}] You attempted to call a function that was already released. (function: ${p}, endpoint: ${n}${null!=l?`, released ${Date.now()-l}ms ago`:""}, retained by ${h.size})`);throw e.name="RemoteFunctionReleasedError",e}if(!a.has(s)){const e=new Error(`[${t}] You attempted to call a function that was already revoked. (function: ${p}, endpoint: ${n}${null!=r?`, endpoint terminated ${Date.now()-r}ms ago`:""}, retained by ${h.size})`);throw e.name="RemoteFunctionRevokedError",e}return e.call(s,o)};Object.defineProperties(m,{[xc]:{value:f,writable:!1},[kc]:{value:d,writable:!1},[Cc]:{value:h,writable:!1}});for(const e of h)e.add(m);return a.set(s,m),m}if(Oc(o))return Object.keys(o).reduce((e,t)=>({...e,[t]:c(o[t],i)}),{})}return o}}class Lc extends Error{constructor(e){const{callId:t,error:n,result:r}=e;super(`No resolver found for call ID: ${t}${n?` Error: ${String(n)}`:""}${null==r?"":` Result: ${JSON.stringify(r)}`}`),this.callId=void 0,this.error=void 0,this.result=void 0,this.groupingHash="RemoteUI::MissingResolverError",this.name="MissingResolverError",this.callId=t,this.error=n,this.result=r}}function Dc(e,{uuid:t=jc,createEncoder:n=Uc,callable:r}={}){let o=!1,i=e;const a=new Map,s=new Map,c=function(e,t){let n;if(null==t){if("function"!=typeof Proxy)throw new Error("You must pass an array of callable methods in environments without Proxies.");const t=new Map;n=new Proxy({},{get(n,r){if(t.has(r))return t.get(r);const o=e(r);return t.set(r,o),o}})}else{n={};for(const r of t)Object.defineProperty(n,r,{value:e(r),writable:!1,configurable:!0,enumerable:!0})}return n}(d,r),u=n({uuid:t,release(e){l(3,[e])},call(e,n,r){const o=t(),i=h(o,r),[a,s]=u.encode(n);return l(5,[o,e,a],s),i}});return i.addEventListener("message",f),{call:c,replace(e){const t=i;i=e,t.removeEventListener("message",f),e.addEventListener("message",f)},expose(e){for(const t of Object.keys(e)){const n=e[t];"function"==typeof n?a.set(t,n):a.delete(t)}},callable(...e){if(null!=r)for(const t of e)Object.defineProperty(c,t,{value:d(t),writable:!1,configurable:!0,enumerable:!0})},terminate(){l(2,void 0),p(),i.terminate&&i.terminate()}};function l(e,t,n){o||i.postMessage(t?[e,t]:[e],n)}async function f(e){if(o)return;const{data:t}=e;var n;if(n=t,Array.isArray(n)&&"number"==typeof n[0]&&(null==n[1]||Array.isArray(n[1])))switch(t[0]){case 2:p();break;case 0:{const e=new Ac,[n,o,i]=t[1],s=a.get(o);try{if(null==s)throw new Error(`No '${o}' method is exposed on this endpoint`);const[t,r]=u.encode(await s(...u.decode(i,[e])));l(1,[n,void 0,t],r)}catch(r){const{name:e,message:t,stack:o}=r;throw l(1,[n,{name:e,message:t,stack:o}]),r}finally{e.release()}break}case 1:{const[e,n,r]=t[1],o=s.get(e);if(null==o)throw new Lc({callId:e,error:n,result:r});o(...t[1]),s.delete(e);break}case 3:{const[e]=t[1];u.release(e);break}case 6:{const[e,n,r]=t[1],o=s.get(e);if(null==o)throw new Lc({callId:e,error:n,result:r});o(...t[1]),s.delete(e);break}case 5:{const[e,n,o]=t[1];try{const t=await u.call(n,o),[r,i]=u.encode(t);l(6,[e,void 0,r],i)}catch(r){const{name:t,message:n,stack:o}=r;throw l(6,[e,{name:t,message:n,stack:o}]),r}break}}}function d(e){return(...n)=>{if(o)return Promise.reject(new Error("You attempted to call a function on a terminated web worker."));if("string"!=typeof e&&"number"!=typeof e)return Promise.reject(new Error(`Can’t call a symbol method on a remote endpoint: ${e.toString()}`));const r=t(),i=h(r),[a,s]=u.encode(n);return l(0,[r,e,a],s),i}}function h(e,t){return new Promise((n,r)=>{s.set(e,(e,o,i)=>{if(null==o)n(i&&u.decode(i,t));else{const e=new Error;Object.assign(e,o),r(e)}})})}function p(){var e;o=!0,a.clear(),s.clear(),null===(e=u.terminate)||void 0===e||e.call(u),i.removeEventListener("message",f)}}function jc(){return`${Fc()}-${Fc()}-${Fc()}-${Fc()}`}function Fc(){return Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)}function Bc(e){return{postMessage:(...t)=>e.postMessage(...t),addEventListener:(...t)=>e.addEventListener(...t),removeEventListener:(...t)=>e.removeEventListener(...t),terminate(){e.close()}}}const qc="remote-ui::ready";function Hc(e,{terminate:t=!0,targetOrigin:n="*"}={}){var r;if("undefined"==typeof window)throw new Error("You can only run fromIframe() in a browser context, but no window was found.");const o=new WeakMap;let i;function a(t){t.source===e.contentWindow&&t.data===qc&&(window.removeEventListener("message",a),i())}null===(r=e.contentWindow)||void 0===r||r.postMessage(qc,n);const s=new Promise(e=>{i=e,window.addEventListener("message",a)});return{async postMessage(t,r){var o;await s,null===(o=e.contentWindow)||void 0===o||o.postMessage(t,n,r)},addEventListener(t,n){const r=t=>{t.source===e.contentWindow&&n(t)};o.set(n,r),self.addEventListener(t,r)},removeEventListener(e,t){const n=o.get(t);null!=n&&(o.delete(t),self.removeEventListener(e,n))},terminate(){window.removeEventListener("message",a),t&&e.remove()}}}function Wc({targetOrigin:e="*"}={}){if("undefined"==typeof self||null==self.parent)throw new Error("This does not appear to be a child iframe, because there is no parent window.");const{parent:t}=self,n=()=>t.postMessage(qc,e);window.addEventListener("message",e=>{e.source===t&&"complete"===document.readyState&&e.data===qc&&n()}),"complete"===document.readyState?n():document.addEventListener("readystatechange",()=>{"complete"===document.readyState&&n()});const r=new WeakMap;return{postMessage(n,r){t.postMessage(n,e,r)},addEventListener(e,n){const o=e=>{e.source===t&&n(e)};r.set(n,o),self.addEventListener(e,o)},removeEventListener(e,t){const n=r.get(t);null!=n&&(r.delete(t),self.removeEventListener(e,n))}}}function Kc({children:e,router:t,href:n,onClick:r,...o}
1){return zr("a",{href:t.resolve(n).href,onClick:e=>{r?.(e),e.defaultPrevented||e.shiftKey||e.ctrlKey||e.metaKey||(e.preventDefault(),t.navigate(n))},...o,children:e})}function zc(e,t){return function(e){const t=ye(Gs)??void 0;de(()=>{if(null!=t)return t.registerRoutes(e)},[t,e])}(t),zr(Gc,{routes:t,router:e})}const Gc=pr(function e({routes:t,router:n,parentMatchedPath:r}){let o;for(const h of t){const e=ms(n.currentUrl.value,n.prefix,h.match,r);if(null!=e){o={...e,route:h};break}}if(null==o)return null;const{route:i,nextMatchedPathPrefix:a,matched:s}=o,{render:c,redirect:u,children:l}=i,f=a??r;let d=null;return c?d=c({url:n.currentUrl.value,matched:s,children:l&&zr(e,{routes:l,router:n,parentMatchedPath:f})}):l?d=zr(e,{routes:l,router:n,parentMatchedPath:f}):u&&n.redirect(u),d});function Jc(e){const t=URL.createObjectURL(new Blob([`importScripts(${JSON.stringify(e.href)})`])),n=new Worker(t),r=n.terminate.bind(n);return n.terminate=()=>{URL.revokeObjectURL(t),r()},n}const Vc=new WeakMap;function Zc(e){const t=function(e){return"undefined"==typeof window||"string"!=typeof e?void 0:new URL(e,window.location.href)}(e);function n({createMessenger:n=Jc,...r}={}){if(t){const e=Dc(n(t),r),{call:o}=e;return Vc.set(o,e),o}if("function"==typeof e)return new Proxy({},{get:(t,n)=>async(...t)=>(await e())[n](...t)});if("undefined"==typeof window)return new Proxy({},{get:(e,t)=>()=>{throw new Error("You can’t call a method on a worker on the server.")}});throw new Error("Could not create a suitable fallback")}return Reflect.defineProperty(n,"url",{value:t}),n}function Xc(e,t){const n=Yc(e);return null==n||n.expose(t),null!=n}function Qc(e){const t=Yc(e);return null==t||t.terminate(),Vc.delete(e),null!=t}function Yc(e){return Vc.get(e)}const eu=0,tu=1,nu=2,ru=3,ou=4,iu=1,au=2,su=3,cu=Symbol("RootId");function uu(){const e=new Set,t=new Map,n=new Map;let r=null,o="unmounted";const i={id:cu,kind:0,children:[],version:0},a=new Map([[cu,i]]),s=function({mount:e,insertChild:t,removeChild:n,updateProps:r,updateText:o}){const i=new Map([[0,e],[2,n],[1,t],[4,r],[3,o]]);return(e,...t)=>i.get(e)(...t)}({mount:e=>{const n=a.get(cu),r=e.map(e=>fu(e,lu));n.version+=1,n.children=r,o="mounted";for(const t of r)Nc(t),u(t);c(n).then(()=>{!function(){const e=t.get("mount");if(e)for(const t of e)t()}()})},insertChild:(e,t,n,r)=>{const o=a.get(null!=e?e:cu),{children:i}=o;let s,l;if(e===r?s=o:!1!==r&&(s=a.get(null!=r?r:cu)),s){const t=n.id,o=s.children,i=o.findIndex(e=>e.id===t),[a]=o.splice(i,1);l=a,e!==r&&(s.version+=1,c(s))}else l=fu(n,lu),Nc(l),u(l);t===i.length?i.push(l):i.splice(t,0,l),o.version+=1,c(o)},removeChild:(e,t)=>{const n=a.get(null!=e?e:cu),{children:r}=n,[o]=r.splice(t,1);o&&(n.version+=1,l(o),c(n).then(()=>{Tc(o)}))},updateProps:(e,t)=>{const n=a.get(e),r={...n.props};Nc(t),Object.keys(t).forEach(e=>{const n=t[e],o=r[e];hu(o)&&l(o),du(n)&&u(fu(n,lu))}),Object.assign(n.props,t),n.version+=1,c(n).then(()=>{for(const e of Object.keys(t))Tc(r[e])})},updateText:(e,t)=>
1{const n=a.get(e);n.text=t,n.version+=1,c(n)}});return{get state(){return o},receive:s,attached:{root:i,get({id:e}){var t;return null!==(t=a.get(e))&&void 0!==t?t:null},subscribe({id:e},t){let r=n.get(e);return null==r&&(r=new Set,n.set(e,r)),r.add(t),()=>{const r=n.get(e);r&&(r.delete(t),0===r.size&&n.delete(e))}}},flush:function(){var e;return null!==(e=r)&&void 0!==e?e:Promise.resolve()},on(e,n){let r=t.get(e);return null==r&&(r=new Set,t.set(e,r)),r.add(n),()=>{const r=t.get(e);r&&(r.delete(n),0===r.size&&t.delete(e))}}};function c(t){var o;return r=null!==(o=r)&&void 0!==o?o:new Promise(t=>{setTimeout(()=>{const o=[...e];r=null,e.clear();for(const e of o){const t=n.get(e.id);if(t)for(const n of t)n(e)}t()},0)}),e.add(t),r}function u(e){if(a.set(e.id,e),1===e.kind&&"props"in e){const{props:t={}}=e;Object.keys(t).forEach(e=>{const n=t[e];hu(n)&&u(n)})}if("children"in e)for(const t of e.children)u(t)}function l(e){if(a.delete(e.id),1===e.kind&&"props"in e){const{props:t={}}=e;Object.keys(t).forEach(e=>{const n=t[e];hu(n)&&l(n)})}if("children"in e)for(const t of e.children)l(t)}}function lu(e){return e.version=0,e}function fu(e,t){if(3!==e.kind&&1!==e.kind||e.children.forEach(e=>fu(e,t)),1===e.kind&&"props"in e){const{props:n}=e;for(const e of Object.keys(n)){const r=n[e];du(r)&&(n[e]=fu(r,t))}}return t(e)}function du(e){return function(e){return null!=e&&3===e.kind}(e)&&"id"in e&&"children"in e}function hu(e){return du(e)&&"version"in e}function pu(e){"undefined"!=typeof window&&("function"==typeof window.requestIdleCallback?window.requestIdleCallback(e):window.setTimeout(e,0))}function mu(e){const t=pe(!1);t.current||(t.current=!0,pu(()=>{Promise.resolve(e()).catch(()=>{})}))}class vu extends js{async annotateEvent(e){return Promise.resolve(function(e,t){if("v1"===t){const n=function(){const e=[];return Wn()&&e.push("analytics"),Hn()&&e.push("marketing"),zn()&&e.push("sale_of_data"),Kn()&&e.push("preferences"),e}();return{...e,metadata:{...null==e?void 0:e.metadata,consent:n,consent_provider:"consent-tracking-api",consent_version:t}}}throw new _u(t||"unknown")}(e,this.version))}getRequiredConsentForEmission(){if("v1"===this.version)return["anal
1ytics","marketing"];throw new _u(this.version||"unknown")}}class _u extends Error{constructor(e){super(`Version ${e} is not supported by the consent-tracking-api provider`),this.name="MonorailConsentTrackingApiProviderVersionError",Object.setPrototypeOf(this,_u.prototype)}}export{Hr as $,ou as A,He as B,Et as C,_r as D,ye as E,lo as F,Ve as G,eo as H,Eo as I,So as J,su as K,vo as L,yo as M,pr as N,wo as O,ge as P,fe as Q,Ho as R,x as S,ve as T,Vr as U,so as V,fc as W,V as X,gr as Y,qr as Z,he as _,Jr as a,os as a$,ro as a0,fr as a1,C as a2,Zc as a3,Tc as a4,Xc as a5,Qc as a6,ho as a7,Dc as a8,Hc as a9,mu as aA,Io as aB,rt as aC,Cn as aD,xt as aE,zn as aF,Kn as aG,Hn as aH,Wn as aI,jn as aJ,kn as aK,Sn as aL,qn as aM,Bn as aN,Dn as aO,fn as aP,Ao as aQ,mo as aR,ki as aS,fa as aT,ha as aU,ma as aV,va as aW,wa as aX,ua as aY,la as aZ,ts as a_,Wi as aa,Li as ab,ri as ac,Wc as ad,be as ae,r as af,Xr as ag,Qr as ah,$r as ai,Vi as aj,oa as ak,we as al,vu as am,Fs as an,Rs as ao,Os as ap,$s as aq,Ds as ar,J as as,z as at,E as au,me as av,pu as aw,hu as ax,uu as ay,wi as az,Zr as b,qa as b0,gs as b1,js as b2,sr as b3,St as b4,k as b5,t as b6,Bc as b7,_o as b8,Jn as b9,kr as ba,Kc as bb,vs as bc,oc as bd,qo as be,zc as bf,G as bg,Wr as bh,Uo as c,ru as d,nu as e,Re as f,tu as g,eu as h,iu as i,et as j,au as k,pe as l,de as m,Te as n,_c as o,io as p,pt as q,Nc as r,_e as s,mt as t,zr as u,cc as v,uo as w,le as x,We as y,fo as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.