@shopify/hydrogen-react 0.0.0-next-b48cb83 → 0.0.0-next-781568d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-dev/AddToCartButton.mjs.map +1 -1
- package/dist/browser-dev/BaseButton.mjs.map +1 -1
- package/dist/browser-dev/BuyNowButton.mjs.map +1 -1
- package/dist/browser-dev/CartCheckoutButton.mjs.map +1 -1
- package/dist/browser-dev/CartCost.mjs.map +1 -1
- package/dist/browser-dev/CartLinePrice.mjs.map +1 -1
- package/dist/browser-dev/CartLineProvider.mjs +4 -1
- package/dist/browser-dev/CartLineProvider.mjs.map +1 -1
- package/dist/browser-dev/CartProvider.mjs +3 -3
- package/dist/browser-dev/CartProvider.mjs.map +1 -1
- package/dist/browser-dev/ExternalVideo.mjs.map +1 -1
- package/dist/browser-dev/Image.mjs +1 -1
- package/dist/browser-dev/Image.mjs.map +1 -1
- package/dist/browser-dev/MediaFile.mjs.map +1 -1
- package/dist/browser-dev/ModelViewer.mjs.map +1 -1
- package/dist/browser-dev/Money.mjs.map +1 -1
- package/dist/browser-dev/ProductPrice.mjs.map +1 -1
- package/dist/browser-dev/ProductProvider.mjs.map +1 -1
- package/dist/browser-dev/ShopPayButton.mjs.map +1 -1
- package/dist/browser-dev/ShopifyProvider.mjs.map +1 -1
- package/dist/browser-dev/Video.mjs.map +1 -1
- package/dist/browser-dev/analytics.mjs.map +1 -1
- package/dist/browser-dev/cart-hooks.mjs +5 -2
- package/dist/browser-dev/cart-hooks.mjs.map +1 -1
- package/dist/browser-dev/cart-queries.mjs.map +1 -1
- package/dist/browser-dev/flatten-connection.mjs +1 -1
- package/dist/browser-dev/flatten-connection.mjs.map +1 -1
- package/dist/browser-dev/image-size.mjs.map +1 -1
- package/dist/browser-dev/load-script.mjs +3 -1
- package/dist/browser-dev/load-script.mjs.map +1 -1
- package/dist/browser-dev/parse-metafield.mjs.map +1 -1
- package/dist/browser-dev/storefront-client.mjs +8 -7
- package/dist/browser-dev/storefront-client.mjs.map +1 -1
- package/dist/browser-dev/useCartAPIStateMachine.mjs +9 -0
- package/dist/browser-dev/useCartAPIStateMachine.mjs.map +1 -1
- package/dist/browser-dev/useCartActions.mjs.map +1 -1
- package/dist/browser-dev/useMoney.mjs +1 -0
- package/dist/browser-dev/useMoney.mjs.map +1 -1
- package/dist/browser-prod/AddToCartButton.mjs.map +1 -1
- package/dist/browser-prod/BaseButton.mjs.map +1 -1
- package/dist/browser-prod/BuyNowButton.mjs.map +1 -1
- package/dist/browser-prod/CartCheckoutButton.mjs.map +1 -1
- package/dist/browser-prod/CartCost.mjs.map +1 -1
- package/dist/browser-prod/CartLinePrice.mjs.map +1 -1
- package/dist/browser-prod/CartLineProvider.mjs +4 -1
- package/dist/browser-prod/CartLineProvider.mjs.map +1 -1
- package/dist/browser-prod/CartProvider.mjs +3 -3
- package/dist/browser-prod/CartProvider.mjs.map +1 -1
- package/dist/browser-prod/ExternalVideo.mjs.map +1 -1
- package/dist/browser-prod/Image.mjs +1 -1
- package/dist/browser-prod/Image.mjs.map +1 -1
- package/dist/browser-prod/MediaFile.mjs.map +1 -1
- package/dist/browser-prod/ModelViewer.mjs.map +1 -1
- package/dist/browser-prod/Money.mjs.map +1 -1
- package/dist/browser-prod/ProductPrice.mjs.map +1 -1
- package/dist/browser-prod/ProductProvider.mjs.map +1 -1
- package/dist/browser-prod/ShopPayButton.mjs.map +1 -1
- package/dist/browser-prod/ShopifyProvider.mjs.map +1 -1
- package/dist/browser-prod/Video.mjs.map +1 -1
- package/dist/browser-prod/analytics.mjs.map +1 -1
- package/dist/browser-prod/cart-hooks.mjs +5 -2
- package/dist/browser-prod/cart-hooks.mjs.map +1 -1
- package/dist/browser-prod/cart-queries.mjs.map +1 -1
- package/dist/browser-prod/flatten-connection.mjs +1 -1
- package/dist/browser-prod/flatten-connection.mjs.map +1 -1
- package/dist/browser-prod/image-size.mjs.map +1 -1
- package/dist/browser-prod/load-script.mjs +3 -1
- package/dist/browser-prod/load-script.mjs.map +1 -1
- package/dist/browser-prod/parse-metafield.mjs.map +1 -1
- package/dist/browser-prod/storefront-client.mjs +8 -7
- package/dist/browser-prod/storefront-client.mjs.map +1 -1
- package/dist/browser-prod/useCartAPIStateMachine.mjs +9 -0
- package/dist/browser-prod/useCartAPIStateMachine.mjs.map +1 -1
- package/dist/browser-prod/useCartActions.mjs.map +1 -1
- package/dist/browser-prod/useMoney.mjs +1 -0
- package/dist/browser-prod/useMoney.mjs.map +1 -1
- package/dist/node-dev/AddToCartButton.js.map +1 -1
- package/dist/node-dev/AddToCartButton.mjs.map +1 -1
- package/dist/node-dev/BaseButton.js.map +1 -1
- package/dist/node-dev/BaseButton.mjs.map +1 -1
- package/dist/node-dev/BuyNowButton.js.map +1 -1
- package/dist/node-dev/BuyNowButton.mjs.map +1 -1
- package/dist/node-dev/CartCheckoutButton.js.map +1 -1
- package/dist/node-dev/CartCheckoutButton.mjs.map +1 -1
- package/dist/node-dev/CartCost.js.map +1 -1
- package/dist/node-dev/CartCost.mjs.map +1 -1
- package/dist/node-dev/CartLinePrice.js.map +1 -1
- package/dist/node-dev/CartLinePrice.mjs.map +1 -1
- package/dist/node-dev/CartLineProvider.js +4 -1
- package/dist/node-dev/CartLineProvider.js.map +1 -1
- package/dist/node-dev/CartLineProvider.mjs +4 -1
- package/dist/node-dev/CartLineProvider.mjs.map +1 -1
- package/dist/node-dev/CartProvider.js +3 -3
- package/dist/node-dev/CartProvider.js.map +1 -1
- package/dist/node-dev/CartProvider.mjs +3 -3
- package/dist/node-dev/CartProvider.mjs.map +1 -1
- package/dist/node-dev/ExternalVideo.js.map +1 -1
- package/dist/node-dev/ExternalVideo.mjs.map +1 -1
- package/dist/node-dev/Image.js +1 -1
- package/dist/node-dev/Image.js.map +1 -1
- package/dist/node-dev/Image.mjs +1 -1
- package/dist/node-dev/Image.mjs.map +1 -1
- package/dist/node-dev/MediaFile.js.map +1 -1
- package/dist/node-dev/MediaFile.mjs.map +1 -1
- package/dist/node-dev/ModelViewer.js.map +1 -1
- package/dist/node-dev/ModelViewer.mjs.map +1 -1
- package/dist/node-dev/Money.js.map +1 -1
- package/dist/node-dev/Money.mjs.map +1 -1
- package/dist/node-dev/ProductPrice.js.map +1 -1
- package/dist/node-dev/ProductPrice.mjs.map +1 -1
- package/dist/node-dev/ProductProvider.js.map +1 -1
- package/dist/node-dev/ProductProvider.mjs.map +1 -1
- package/dist/node-dev/ShopPayButton.js.map +1 -1
- package/dist/node-dev/ShopPayButton.mjs.map +1 -1
- package/dist/node-dev/ShopifyProvider.js.map +1 -1
- package/dist/node-dev/ShopifyProvider.mjs.map +1 -1
- package/dist/node-dev/Video.js.map +1 -1
- package/dist/node-dev/Video.mjs.map +1 -1
- package/dist/node-dev/analytics.js.map +1 -1
- package/dist/node-dev/analytics.mjs.map +1 -1
- package/dist/node-dev/cart-hooks.js +5 -2
- package/dist/node-dev/cart-hooks.js.map +1 -1
- package/dist/node-dev/cart-hooks.mjs +5 -2
- package/dist/node-dev/cart-hooks.mjs.map +1 -1
- package/dist/node-dev/cart-queries.js.map +1 -1
- package/dist/node-dev/cart-queries.mjs.map +1 -1
- package/dist/node-dev/flatten-connection.js +1 -1
- package/dist/node-dev/flatten-connection.js.map +1 -1
- package/dist/node-dev/flatten-connection.mjs +1 -1
- package/dist/node-dev/flatten-connection.mjs.map +1 -1
- package/dist/node-dev/image-size.js.map +1 -1
- package/dist/node-dev/image-size.mjs.map +1 -1
- package/dist/node-dev/load-script.js +3 -1
- package/dist/node-dev/load-script.js.map +1 -1
- package/dist/node-dev/load-script.mjs +3 -1
- package/dist/node-dev/load-script.mjs.map +1 -1
- package/dist/node-dev/parse-metafield.js.map +1 -1
- package/dist/node-dev/parse-metafield.mjs.map +1 -1
- package/dist/node-dev/storefront-client.js +8 -7
- package/dist/node-dev/storefront-client.js.map +1 -1
- package/dist/node-dev/storefront-client.mjs +8 -7
- package/dist/node-dev/storefront-client.mjs.map +1 -1
- package/dist/node-dev/useCartAPIStateMachine.js +9 -0
- package/dist/node-dev/useCartAPIStateMachine.js.map +1 -1
- package/dist/node-dev/useCartAPIStateMachine.mjs +9 -0
- package/dist/node-dev/useCartAPIStateMachine.mjs.map +1 -1
- package/dist/node-dev/useCartActions.js.map +1 -1
- package/dist/node-dev/useCartActions.mjs.map +1 -1
- package/dist/node-dev/useMoney.js +1 -0
- package/dist/node-dev/useMoney.js.map +1 -1
- package/dist/node-dev/useMoney.mjs +1 -0
- package/dist/node-dev/useMoney.mjs.map +1 -1
- package/dist/node-prod/AddToCartButton.js.map +1 -1
- package/dist/node-prod/AddToCartButton.mjs.map +1 -1
- package/dist/node-prod/BaseButton.js.map +1 -1
- package/dist/node-prod/BaseButton.mjs.map +1 -1
- package/dist/node-prod/BuyNowButton.js.map +1 -1
- package/dist/node-prod/BuyNowButton.mjs.map +1 -1
- package/dist/node-prod/CartCheckoutButton.js.map +1 -1
- package/dist/node-prod/CartCheckoutButton.mjs.map +1 -1
- package/dist/node-prod/CartCost.js.map +1 -1
- package/dist/node-prod/CartCost.mjs.map +1 -1
- package/dist/node-prod/CartLinePrice.js.map +1 -1
- package/dist/node-prod/CartLinePrice.mjs.map +1 -1
- package/dist/node-prod/CartLineProvider.js +4 -1
- package/dist/node-prod/CartLineProvider.js.map +1 -1
- package/dist/node-prod/CartLineProvider.mjs +4 -1
- package/dist/node-prod/CartLineProvider.mjs.map +1 -1
- package/dist/node-prod/CartProvider.js +3 -3
- package/dist/node-prod/CartProvider.js.map +1 -1
- package/dist/node-prod/CartProvider.mjs +3 -3
- package/dist/node-prod/CartProvider.mjs.map +1 -1
- package/dist/node-prod/ExternalVideo.js.map +1 -1
- package/dist/node-prod/ExternalVideo.mjs.map +1 -1
- package/dist/node-prod/Image.js +1 -1
- package/dist/node-prod/Image.js.map +1 -1
- package/dist/node-prod/Image.mjs +1 -1
- package/dist/node-prod/Image.mjs.map +1 -1
- package/dist/node-prod/MediaFile.js.map +1 -1
- package/dist/node-prod/MediaFile.mjs.map +1 -1
- package/dist/node-prod/ModelViewer.js.map +1 -1
- package/dist/node-prod/ModelViewer.mjs.map +1 -1
- package/dist/node-prod/Money.js.map +1 -1
- package/dist/node-prod/Money.mjs.map +1 -1
- package/dist/node-prod/ProductPrice.js.map +1 -1
- package/dist/node-prod/ProductPrice.mjs.map +1 -1
- package/dist/node-prod/ProductProvider.js.map +1 -1
- package/dist/node-prod/ProductProvider.mjs.map +1 -1
- package/dist/node-prod/ShopPayButton.js.map +1 -1
- package/dist/node-prod/ShopPayButton.mjs.map +1 -1
- package/dist/node-prod/ShopifyProvider.js.map +1 -1
- package/dist/node-prod/ShopifyProvider.mjs.map +1 -1
- package/dist/node-prod/Video.js.map +1 -1
- package/dist/node-prod/Video.mjs.map +1 -1
- package/dist/node-prod/analytics.js.map +1 -1
- package/dist/node-prod/analytics.mjs.map +1 -1
- package/dist/node-prod/cart-hooks.js +5 -2
- package/dist/node-prod/cart-hooks.js.map +1 -1
- package/dist/node-prod/cart-hooks.mjs +5 -2
- package/dist/node-prod/cart-hooks.mjs.map +1 -1
- package/dist/node-prod/cart-queries.js.map +1 -1
- package/dist/node-prod/cart-queries.mjs.map +1 -1
- package/dist/node-prod/flatten-connection.js +1 -1
- package/dist/node-prod/flatten-connection.js.map +1 -1
- package/dist/node-prod/flatten-connection.mjs +1 -1
- package/dist/node-prod/flatten-connection.mjs.map +1 -1
- package/dist/node-prod/image-size.js.map +1 -1
- package/dist/node-prod/image-size.mjs.map +1 -1
- package/dist/node-prod/load-script.js +3 -1
- package/dist/node-prod/load-script.js.map +1 -1
- package/dist/node-prod/load-script.mjs +3 -1
- package/dist/node-prod/load-script.mjs.map +1 -1
- package/dist/node-prod/parse-metafield.js.map +1 -1
- package/dist/node-prod/parse-metafield.mjs.map +1 -1
- package/dist/node-prod/storefront-client.js +8 -7
- package/dist/node-prod/storefront-client.js.map +1 -1
- package/dist/node-prod/storefront-client.mjs +8 -7
- package/dist/node-prod/storefront-client.mjs.map +1 -1
- package/dist/node-prod/useCartAPIStateMachine.js +9 -0
- package/dist/node-prod/useCartAPIStateMachine.js.map +1 -1
- package/dist/node-prod/useCartAPIStateMachine.mjs +9 -0
- package/dist/node-prod/useCartAPIStateMachine.mjs.map +1 -1
- package/dist/node-prod/useCartActions.js.map +1 -1
- package/dist/node-prod/useCartActions.mjs.map +1 -1
- package/dist/node-prod/useMoney.js +1 -0
- package/dist/node-prod/useMoney.js.map +1 -1
- package/dist/node-prod/useMoney.mjs +1 -0
- package/dist/node-prod/useMoney.mjs.map +1 -1
- package/dist/types/CartLineProvider.d.ts +1 -1
- package/dist/types/CartProvider.d.ts +1 -1
- package/dist/types/image-size.d.ts +1 -1
- package/dist/types/parse-metafield.d.ts +1 -1
- package/dist/types/storefront-client.d.ts +1 -1
- package/dist/umd/hydrogen-react.dev.js +35 -16
- package/dist/umd/hydrogen-react.dev.js.map +1 -1
- package/dist/umd/hydrogen-react.prod.js +7 -7
- package/dist/umd/hydrogen-react.prod.js.map +1 -1
- package/package.json +11 -1
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
12
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
13
|
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
-
***************************************************************************** */function Le(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n,
|
|
14
|
+
***************************************************************************** */function Le(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n,a,u=r.call(e),i=[];try{for(;(t===void 0||t-- >0)&&!(n=u.next()).done;)i.push(n.value)}catch(o){a={error:o}}finally{try{n&&!n.done&&(r=u.return)&&r.call(u)}finally{if(a)throw a.error}}return i}var Y;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Y||(Y={}));var Pe={type:"xstate.init"};function pe(e){return e===void 0?[]:[].concat(e)}function J(e){return{type:"xstate.assign",assignment:e}}function Ue(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function le(e){return function(t){return e===t}}function ke(e){return typeof e=="string"?{type:e}:e}function Ne(e,t){return{value:e,context:t,actions:[],changed:!1,matches:le(e)}}function Ve(e,t,r){var n=t,a=!1;return[e.filter(function(u){if(u.type==="xstate.assign"){a=!0;var i=Object.assign({},n);return typeof u.assignment=="function"?i=u.assignment(n,r):Object.keys(u.assignment).forEach(function(o){i[o]=typeof u.assignment[o]=="function"?u.assignment[o](n,r):u.assignment[o]}),n=i,!1}return!0}),n,a]}function Re(e,t){t===void 0&&(t={});var r=Le(Ve(pe(e.states[e.initial].entry).map(function(i){return Ue(i,t.actions)}),e.context,Pe),2),n=r[0],a=r[1],u={config:e,_options:t,initialState:{value:e.initial,actions:n,context:a,matches:le(e.initial)},transition:function(i,o){var h,y,l=typeof i=="string"?{value:i,context:e.context}:i,d=l.value,p=l.context,E=ke(o),g=e.states[d];if(g.on){var b=pe(g.on[E.type]);try{for(var _=function(O){var K=typeof Symbol=="function"&&Symbol.iterator,P=K&&O[K],Ee=0;if(P)return P.call(O);if(O&&typeof O.length=="number")return{next:function(){return O&&Ee>=O.length&&(O=void 0),{value:O&&O[Ee++],done:!O}}};throw new TypeError(K?"Object is not iterable.":"Symbol.iterator is not defined.")}(b),L=_.next();!L.done;L=_.next()){var w=L.value;if(w===void 0)return Ne(d,p);var T=typeof w=="string"?{target:w}:w,c=T.target,f=T.actions,m=f===void 0?[]:f,C=T.cond,I=C===void 0?function(){return!0}:C,S=c===void 0,D=c??d,U=e.states[D];if(I(p,E)){var V=Le(Ve((S?pe(m):[].concat(g.exit,m,U.entry).filter(function(O){return O})).map(function(O){return Ue(O,u._options.actions)}),p,E),3),$=V[0],j=V[1],te=V[2],F=c??d;return{value:F,context:j,actions:$,changed:c!==d||$.length>0||te,matches:le(F)}}}}catch(O){h={error:O}}finally{try{L&&!L.done&&(y=_.return)&&y.call(_)}finally{if(h)throw h.error}}}return Ne(d,p)}};return u}var Me=function(e,t){return e.actions.forEach(function(r){var n=r.exec;return n&&n(e.context,t)})};function bt(e){var t=e.initialState,r=Y.NotStarted,n=new Set,a={_machine:e,send:function(u){r===Y.Running&&(t=e.transition(t,u),Me(t,ke(u)),n.forEach(function(i){return i(t)}))},subscribe:function(u){return n.add(u),u(t),{unsubscribe:function(){return n.delete(u)}}},start:function(u){if(u){var i=typeof u=="object"?u:{context:e.config.context,value:u};t={value:i.value,actions:[],context:i.context,matches:le(i.value)}}else t=e.initialState;return r=Y.Running,Me(t,Pe),a},stop:function(){return r=Y.Stopped,n.clear(),a},get state(){return t},get status(){return r}};return a}var wt=s.useLayoutEffect,_e={},It={get exports(){return _e},set exports(e){_e=e}},Se={},de={},Dt={get exports(){return de},set exports(e){de=e}},ve={};/**
|
|
15
15
|
* @license React
|
|
16
16
|
* use-sync-external-store-shim.production.min.js
|
|
17
17
|
*
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*
|
|
20
20
|
* This source code is licensed under the MIT license found in the
|
|
21
21
|
* LICENSE file in the root directory of this source tree.
|
|
22
|
-
*/var $e;function Ot(){if($e)return ve;$e=1;var e=s;function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,
|
|
22
|
+
*/var $e;function Ot(){if($e)return ve;$e=1;var e=s;function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,a=e.useEffect,u=e.useLayoutEffect,i=e.useDebugValue;function o(d,p){var E=p(),g=n({inst:{value:E,getSnapshot:p}}),b=g[0].inst,_=g[1];return u(function(){b.value=E,b.getSnapshot=p,h(b)&&_({inst:b})},[d,E,p]),a(function(){return h(b)&&_({inst:b}),d(function(){h(b)&&_({inst:b})})},[d]),i(E),E}function h(d){var p=d.getSnapshot;d=d.value;try{var E=p();return!r(d,E)}catch{return!0}}function y(d,p){return p()}var l=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?y:o;return ve.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:l,ve}var Te={};/**
|
|
23
23
|
* @license React
|
|
24
24
|
* use-sync-external-store-shim.development.js
|
|
25
25
|
*
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
*
|
|
28
28
|
* This source code is licensed under the MIT license found in the
|
|
29
29
|
* LICENSE file in the root directory of this source tree.
|
|
30
|
-
*/var xe;function Lt(){return xe||(xe=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=s,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(
|
|
30
|
+
*/var xe;function Lt(){return xe||(xe=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=s,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(T){{for(var c=arguments.length,f=new Array(c>1?c-1:0),m=1;m<c;m++)f[m-1]=arguments[m];n("error",T,f)}}function n(T,c,f){{var m=t.ReactDebugCurrentFrame,C=m.getStackAddendum();C!==""&&(c+="%s",f=f.concat([C]));var I=f.map(function(S){return String(S)});I.unshift("Warning: "+c),Function.prototype.apply.call(console[T],console,I)}}function a(T,c){return T===c&&(T!==0||1/T===1/c)||T!==T&&c!==c}var u=typeof Object.is=="function"?Object.is:a,i=e.useState,o=e.useEffect,h=e.useLayoutEffect,y=e.useDebugValue,l=!1,d=!1;function p(T,c,f){l||e.startTransition!==void 0&&(l=!0,r("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var m=c();if(!d){var C=c();u(m,C)||(r("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var I=i({inst:{value:m,getSnapshot:c}}),S=I[0].inst,D=I[1];return h(function(){S.value=m,S.getSnapshot=c,E(S)&&D({inst:S})},[T,m,c]),o(function(){E(S)&&D({inst:S});var U=function(){E(S)&&D({inst:S})};return T(U)},[T]),y(m),m}function E(T){var c=T.getSnapshot,f=T.value;try{var m=c();return!u(f,m)}catch{return!0}}function g(T,c,f){return c()}var b=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",_=!b,L=_?g:p,w=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:L;Te.useSyncExternalStore=w,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Te}var qe;function Fe(){return qe||(qe=1,function(e){process.env.NODE_ENV==="production"?e.exports=Ot():e.exports=Lt()}(Dt)),de}/**
|
|
31
31
|
* @license React
|
|
32
32
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
33
33
|
*
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
*
|
|
36
36
|
* This source code is licensed under the MIT license found in the
|
|
37
37
|
* LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/var Be;function Pt(){if(Be)return Se;Be=1;var e=s,t=Fe();function r(y,l){return y===l&&(y!==0||1/y===1/l)||y!==y&&l!==l}var n=typeof Object.is=="function"?Object.is:r,
|
|
38
|
+
*/var Be;function Pt(){if(Be)return Se;Be=1;var e=s,t=Fe();function r(y,l){return y===l&&(y!==0||1/y===1/l)||y!==y&&l!==l}var n=typeof Object.is=="function"?Object.is:r,a=t.useSyncExternalStore,u=e.useRef,i=e.useEffect,o=e.useMemo,h=e.useDebugValue;return Se.useSyncExternalStoreWithSelector=function(y,l,d,p,E){var g=u(null);if(g.current===null){var b={hasValue:!1,value:null};g.current=b}else b=g.current;g=o(function(){function L(m){if(!w){if(w=!0,T=m,m=p(m),E!==void 0&&b.hasValue){var C=b.value;if(E(C,m))return c=C}return c=m}if(C=c,n(T,m))return C;var I=p(m);return E!==void 0&&E(C,I)?C:(T=m,c=I)}var w=!1,T,c,f=d===void 0?null:d;return[function(){return L(l())},f===null?void 0:function(){return L(f())}]},[l,d,p,E]);var _=a(y,g[0],g[1]);return i(function(){b.hasValue=!0,b.value=_},[_]),h(_),_},Se}var Ce={};/**
|
|
39
39
|
* @license React
|
|
40
40
|
* use-sync-external-store-shim/with-selector.development.js
|
|
41
41
|
*
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/var He;function Ut(){return He||(He=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=s,t=Fe();function r(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}var n=typeof Object.is=="function"?Object.is:r,
|
|
46
|
+
*/var He;function Ut(){return He||(He=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=s,t=Fe();function r(l,d){return l===d&&(l!==0||1/l===1/d)||l!==l&&d!==d}var n=typeof Object.is=="function"?Object.is:r,a=t.useSyncExternalStore,u=e.useRef,i=e.useEffect,o=e.useMemo,h=e.useDebugValue;function y(l,d,p,E,g){var b=u(null),_;b.current===null?(_={hasValue:!1,value:null},b.current=_):_=b.current;var L=o(function(){var f=!1,m,C,I=function(V){if(!f){f=!0,m=V;var $=E(V);if(g!==void 0&&_.hasValue){var j=_.value;if(g(j,$))return C=j,j}return C=$,$}var te=m,F=C;if(n(te,V))return F;var O=E(V);return g!==void 0&&g(F,O)?F:(m=V,C=O,O)},S=p===void 0?null:p,D=function(){return I(d())},U=S===null?void 0:function(){return I(S())};return[D,U]},[d,p,E,g]),w=L[0],T=L[1],c=a(l,w,T);return i(function(){_.hasValue=!0,_.value=c},[c]),h(c),c}Ce.useSyncExternalStoreWithSelector=y,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Ce}(function(e){process.env.NODE_ENV==="production"?e.exports=Pt():e.exports=Ut()})(It);function kt(e){var t=Q.useRef();return t.current||(t.current={v:e()}),t.current.v}var Ge=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),a,u=[],i;try{for(;(t===void 0||t-- >0)&&!(a=n.next()).done;)u.push(a.value)}catch(o){i={error:o}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(i)throw i.error}}return u};function Nt(e){return e}var Vt=function(e){var t;return e.subscribe(function(r){t=r}).unsubscribe(),t};function Rt(e,t){var r=s.useRef();if(process.env.NODE_ENV!=="production"){var n=Ge(s.useState(e),1),a=n[0];e!==a&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var u=Ge(kt(function(){var y=[],l=bt(Re(e.config,t||e._options)),d=l.send;return l.send=function(p){if(l.status===Y.NotStarted){y.push(p);return}d(p),r.current=l.state},[l,y]}),2),i=u[0],o=u[1];wt(function(){t&&(i._machine._options=t)});var h=$t(i);return s.useEffect(function(){return i.start(r.current),o.forEach(i.send),r.current=i.state,function(){i.stop()}},[]),h}var Mt=function(e,t){return t.changed===!1};function $t(e){var t=s.useCallback(function(){return Vt(e)},[e]),r=s.useCallback(function(a){var u=e.subscribe(a).unsubscribe;return u},[e]),n=_e.useSyncExternalStoreWithSelector(r,t,t,Nt,Mt);return[n,e.send,e]}function H(e){if(!e){const t=`flattenConnection(): needs a 'connection' to flatten, but received '${e??""}' instead.`;return console.error(t+" Returning an empty array"),[]}return"nodes"in e?e.nodes:"edges"in e&&Array.isArray(e.edges)?e.edges.map(t=>{if(!(t!=null&&t.node))throw new Error("flattenConnection(): Connection edges must contain nodes");return t.node}):[]}const xt=e=>`
|
|
47
47
|
mutation CartLineAdd(
|
|
48
48
|
$cartId: ID!
|
|
49
49
|
$lines: [CartLineInput!]!
|
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
width
|
|
275
275
|
height
|
|
276
276
|
}
|
|
277
|
-
`,re="2023-01";function zt({storeDomain:e,privateStorefrontToken:t,publicStorefrontToken:r,storefrontApiVersion:n,contentType:i}){return n!==re&&Kt(`StorefrontClient: The Storefront API version that you're using is different than the version this build of Hydrogen React is targeting. You may run into unexpected errors if these versions don't match. Received verion: "${n}"; expected version "${re}"`),{getShopifyDomain(o){return(o==null?void 0:o.storeDomain)??e},getStorefrontApiUrl(o){const u=(o==null?void 0:o.storeDomain)??e;return`${u}${u.endsWith("/")?"":"/"}api/${(o==null?void 0:o.storefrontApiVersion)??n}/graphql.json`},getPrivateTokenHeaders(o){if(!t&&!(o!=null&&o.privateStorefrontToken))throw new Error("StorefrontClient: You did not pass in a 'privateStorefrontToken' while using 'getPrivateTokenHeaders()'");return{"content-type":((o==null?void 0:o.contentType)??i)==="graphql"?"application/graphql":"application/json","X-SDK-Variant":"hydrogen-react","X-SDK-Variant-Source":"react","X-SDK-Version":n,"Shopify-Storefront-Private-Token":(o==null?void 0:o.privateStorefrontToken)??t??"",...o!=null&&o.buyerIp?{"Shopify-Storefront-Buyer-IP":o.buyerIp}:{}}},getPublicTokenHeaders(o){if(!r&&!(o!=null&&o.publicStorefrontToken))throw new Error("StorefrontClient: You did not pass in a 'publicStorefrontToken' while using 'getPublicTokenHeaders()'");const u=(o==null?void 0:o.contentType)??i??"json";return je(u,n,(o==null?void 0:o.publicStorefrontToken)??r??"")}}}function je(e,t,r){return{"content-type":e==="graphql"?"application/graphql":"application/json","X-SDK-Variant":"hydrogen-react","X-SDK-Variant-Source":"react","X-SDK-Version":t,"X-Shopify-Storefront-Access-Token":r}}const Ye=new Set,Kt=e=>{Ye.has(e)||(console.warn(e),Ye.add(e))},We=s.createContext({storeDomain:"test",storefrontToken:"abc123",storefrontApiVersion:re,countryIsoCode:"US",languageIsoCode:"EN",getStorefrontApiUrl(){return""},getPublicTokenHeaders(){return{}},getShopifyDomain(){return""}});function Qt({children:e,...t}){if(!t.countryIsoCode||!t.languageIsoCode||!t.storeDomain||!t.storefrontToken||!t.storefrontApiVersion)throw new Error("Please provide the necessary props to '<ShopifyProvider/>'");t.storefrontApiVersion!==re&&console.warn(`<ShopifyProvider/>: This version of Hydrogen React is built for Shopify's Storefront API version ${re}, but it looks like you're using version ${t.storefrontApiVersion}. There may be issues or bugs if you use a mismatched version of Hydrogen React and the Storefront API.`);const r=s.useMemo(()=>{function n(i){return(i==null?void 0:i.storeDomain)??t.storeDomain}return{...t,getPublicTokenHeaders(i){return je(i.contentType,t.storefrontApiVersion,i.storefrontToken??t.storefrontToken)},getShopifyDomain:n,getStorefrontApiUrl(i){const o=n({storeDomain:(i==null?void 0:i.storeDomain)??t.storeDomain});return`${o}${o.endsWith("/")?"":"/"}api/${(i==null?void 0:i.storefrontApiVersion)??t.storefrontApiVersion}/graphql.json`}}},[t]);return s.createElement(We.Provider,{value:r},e)}function fe(){const e=s.useContext(We);if(!e)throw new Error("'useShop()' must be a descendent of <ShopifyProvider/>");return e}const Ae="shopifyCartId",Jt="Shopify-Storefront-Id",Xt="Shopify-Storefront-Y",er="Shopify-Storefront-S",W="_shopify_y",Z="_shopify_s";var tr=new Set(["domain","path","max-age","expires","samesite","secure","httponly"]);function rr(e){let t={},r,n,i=0,o=e.split(/;\s*/g),u,a;for(;i<o.length;i++)if(n=o[i],r=n.indexOf("="),~r){if(u=n.substring(0,r++).trim(),a=n.substring(r).trim(),a[0]==='"'&&(a=a.substring(1,a.length-1)),~a.indexOf("%"))try{a=decodeURIComponent(a)}catch{}tr.has(n=u.toLowerCase())?n==="expires"?t.expires=new Date(a):n==="max-age"?t.maxage=+a:t[n]=a:t[u]=a}else(u=n.trim().toLowerCase())&&(u==="httponly"||u==="secure")&&(t[u]=!0);return t}function nr(e,t,r={}){let n=e+"="+encodeURIComponent(t);return r.expires&&(n+="; Expires="+new Date(r.expires).toUTCString()),r.maxage!=null&&r.maxage>=0&&(n+="; Max-Age="+(r.maxage|0)),r.domain&&(n+="; Domain="+r.domain),r.path&&(n+="; Path="+r.path),r.samesite&&(n+="; SameSite="+r.samesite),(r.secure||r.samesite==="None")&&(n+="; Secure"),r.httponly&&(n+="; HttpOnly"),n}const Ze="xxxx-4xxx-xxxx-xxxxxxxxxxxx";function ye(){let e="";try{const t=window.crypto,r=new Uint16Array(31);t.getRandomValues(r);let n=0;e=Ze.replace(/[x]/g,i=>{const o=r[n]%16,u=i==="x"?o:o&3|8;return n++,u.toString(16)}).toUpperCase()}catch{e=Ze.replace(/[x]/g,r=>{const n=Math.random()*16|0;return(r==="x"?n:n&3|8).toString(16)}).toUpperCase()}return`${ar()}-${e}`}function ar(){let e=0,t=0;e=new Date().getTime()>>>0;try{t=performance.now()>>>0}catch{t=0}const r=Math.abs(e+t).toString(16).toLowerCase();return r.padStart(8-r.length,"0")}function he(e){const t=rr(e);return{[W]:t[W]||"",[Z]:t[Z]||""}}function or(){const{storefrontId:e,getPublicTokenHeaders:t,getStorefrontApiUrl:r}=fe();return s.useCallback(({query:n,variables:i})=>{const o=t({contentType:"json"});e&&(o[Jt]=e);const u=he(document.cookie);return o[Xt]=u[W],o[er]=u[Z],fetch(r(),{method:"POST",headers:o,body:JSON.stringify({query:n.toString(),variables:i})}).then(a=>a.json()).catch(a=>({data:void 0,errors:a.toString()}))},[t,e,r])}function ir({numCartLines:e,cartFragment:t,countryCode:r="US"}){const n=or(),i=s.useCallback(E=>n({query:Wt(t),variables:{id:E,numCartLines:e,country:r}}),[n,t,e,r]),o=s.useCallback(E=>n({query:qt(t),variables:{input:E,numCartLines:e,country:r}}),[t,r,n,e]),u=s.useCallback((E,g)=>n({query:xt(t),variables:{cartId:E,lines:g,numCartLines:e,country:r}}),[t,r,n,e]),a=s.useCallback((E,g)=>n({query:Bt(t),variables:{cartId:E,lines:g,numCartLines:e,country:r}}),[t,r,n,e]),h=s.useCallback((E,g)=>n({query:Ft(t),variables:{cartId:E,lines:g,numCartLines:e,country:r}}),[t,r,n,e]),y=s.useCallback((E,g)=>n({query:Ht(t),variables:{cartId:E,note:g,numCartLines:e,country:r}}),[n,t,e,r]),l=s.useCallback((E,g)=>n({query:Gt(t),variables:{cartId:E,buyerIdentity:g,numCartLines:e,country:r}}),[t,r,n,e]),d=s.useCallback((E,g)=>n({query:jt(t),variables:{cartId:E,attributes:g,numCartLines:e,country:r}}),[t,r,n,e]),p=s.useCallback((E,g)=>n({query:Yt(t),variables:{cartId:E,discountCodes:g,numCartLines:e,country:r}}),[t,r,n,e]);return s.useMemo(()=>({cartFetch:i,cartCreate:o,cartLineAdd:u,cartLineUpdate:a,cartLineRemove:h,noteUpdate:y,buyerIdentityUpdate:l,cartAttributesUpdate:d,discountCodesUpdate:p,cartFragment:t}),[i,o,u,a,h,y,l,d,p,t])}function x(e,t){return{entry:[...(t==null?void 0:t.entryActions)||[],J({lastValidCart:r=>r==null?void 0:r.cart}),"onCartActionEntry","onCartActionOptimisticUI",e],on:{RESOLVE:{target:(t==null?void 0:t.resolveTarget)||"idle",actions:[J({prevCart:r=>r==null?void 0:r.lastValidCart,cart:(r,n)=>{var i;return(i=n==null?void 0:n.payload)==null?void 0:i.cart},rawCartResult:(r,n)=>{var i;return(i=n==null?void 0:n.payload)==null?void 0:i.rawCartResult},errors:r=>{}})]},ERROR:{target:(t==null?void 0:t.errorTarget)||"error",actions:[J({prevCart:r=>r==null?void 0:r.lastValidCart,cart:r=>r==null?void 0:r.lastValidCart,errors:(r,n)=>{var i;return(i=n==null?void 0:n.payload)==null?void 0:i.errors}})]},CART_COMPLETED:{target:"cartCompleted",actions:J({prevCart:r=>{},cart:r=>{},lastValidCart:r=>{},rawCartResult:r=>{},errors:r=>{}})}},exit:["onCartActionComplete",...(t==null?void 0:t.exitActions)||[]]}}const ne={CART_FETCH:{target:"cartFetching"},CART_CREATE:{target:"cartCreating"},CART_SET:{target:"idle",actions:[J({rawCartResult:(e,t)=>t.payload.cart,cart:(e,t)=>be(t.payload.cart)})]}},ze={CARTLINE_ADD:{target:"cartLineAdding"},CARTLINE_UPDATE:{target:"cartLineUpdating"},CARTLINE_REMOVE:{target:"cartLineRemoving"},NOTE_UPDATE:{target:"noteUpdating"},BUYER_IDENTITY_UPDATE:{target:"buyerIdentityUpdating"},CART_ATTRIBUTES_UPDATE:{target:"cartAttributesUpdating"},DISCOUNT_CODES_UPDATE:{target:"discountCodesUpdating"}};function ur(e){return Re({id:"Cart",initial:e?"idle":"uninitialized",context:{cart:e&&be(e)},states:{uninitialized:{on:ne},cartCompleted:{on:ne},initializationError:{on:ne},idle:{on:{...ne,...ze}},error:{on:{...ne,...ze}},cartFetching:x("cartFetchAction",{errorTarget:"initializationError"}),cartCreating:x("cartCreateAction",{errorTarget:"initializationError"}),cartLineRemoving:x("cartLineRemoveAction"),cartLineUpdating:x("cartLineUpdateAction"),cartLineAdding:x("cartLineAddAction"),noteUpdating:x("noteUpdateAction"),buyerIdentityUpdating:x("buyerIdentityUpdateAction"),cartAttributesUpdating:x("cartAttributesUpdateAction"),discountCodesUpdating:x("discountCodesUpdateAction")}})}function sr({numCartLines:e,onCartActionEntry:t,onCartActionOptimisticUI:r,onCartActionComplete:n,data:i,cartFragment:o,countryCode:u}){const{cartFetch:a,cartCreate:h,cartLineAdd:y,cartLineUpdate:l,cartLineRemove:d,noteUpdate:p,buyerIdentityUpdate:E,cartAttributesUpdate:g,discountCodesUpdate:b}=ir({numCartLines:e,cartFragment:o,countryCode:u}),_=s.useMemo(()=>ur(i),[i]),[L,w,C]=Rt(_,{actions:{cartFetchAction:async(c,f)=>{var S;if(f.type!=="CART_FETCH")return;const{data:m,errors:T}=await a((S=f==null?void 0:f.payload)==null?void 0:S.cartId),I=q(f,m==null?void 0:m.cart,T);w(I)},cartCreateAction:async(c,f)=>{var S;if(f.type!=="CART_CREATE")return;const{data:m,errors:T}=await h(f==null?void 0:f.payload),I=q(f,(S=m==null?void 0:m.cartCreate)==null?void 0:S.cart,T);w(I)},cartLineAddAction:async(c,f)=>{var S,D;if(f.type!=="CARTLINE_ADD"||!((S=c==null?void 0:c.cart)!=null&&S.id))return;const{data:m,errors:T}=await y(c.cart.id,f.payload.lines),I=q(f,(D=m==null?void 0:m.cartLinesAdd)==null?void 0:D.cart,T);w(I)},cartLineUpdateAction:async(c,f)=>{var S,D;if(f.type!=="CARTLINE_UPDATE"||!((S=c==null?void 0:c.cart)!=null&&S.id))return;const{data:m,errors:T}=await l(c.cart.id,f.payload.lines),I=q(f,(D=m==null?void 0:m.cartLinesUpdate)==null?void 0:D.cart,T);w(I)},cartLineRemoveAction:async(c,f)=>{var S,D;if(f.type!=="CARTLINE_REMOVE"||!((S=c==null?void 0:c.cart)!=null&&S.id))return;const{data:m,errors:T}=await d(c.cart.id,f.payload.lines),I=q(f,(D=m==null?void 0:m.cartLinesRemove)==null?void 0:D.cart,T);w(I)},noteUpdateAction:async(c,f)=>{var S,D;if(f.type!=="NOTE_UPDATE"||!((S=c==null?void 0:c.cart)!=null&&S.id))return;const{data:m,errors:T}=await p(c.cart.id,f.payload.note),I=q(f,(D=m==null?void 0:m.cartNoteUpdate)==null?void 0:D.cart,T);w(I)},buyerIdentityUpdateAction:async(c,f)=>{var S,D;if(f.type!=="BUYER_IDENTITY_UPDATE"||!((S=c==null?void 0:c.cart)!=null&&S.id))return;const{data:m,errors:T}=await E(c.cart.id,f.payload.buyerIdentity),I=q(f,(D=m==null?void 0:m.cartBuyerIdentityUpdate)==null?void 0:D.cart,T);w(I)},cartAttributesUpdateAction:async(c,f)=>{var S,D;if(f.type!=="CART_ATTRIBUTES_UPDATE"||!((S=c==null?void 0:c.cart)!=null&&S.id))return;const{data:m,errors:T}=await g(c.cart.id,f.payload.attributes),I=q(f,(D=m==null?void 0:m.cartAttributesUpdate)==null?void 0:D.cart,T);w(I)},discountCodesUpdateAction:async(c,f)=>{var S,D;if(f.type!=="DISCOUNT_CODES_UPDATE"||!((S=c==null?void 0:c.cart)!=null&&S.id))return;const{data:m,errors:T}=await b(c.cart.id,f.payload.discountCodes),I=q(f,(D=m==null?void 0:m.cartDiscountCodesUpdate)==null?void 0:D.cart,T);w(I)},...t&&{onCartActionEntry:(c,f)=>{cr(f)&&t(c,f)}},...r&&{onCartActionOptimisticUI:J((c,f)=>r(c,f))},...n&&{onCartActionComplete:(c,f)=>{lr(f)&&n(c,f)}}}});return s.useMemo(()=>[L,w,C],[L,w,C])}function be(e){return{...e,lines:H(e==null?void 0:e.lines),note:e.note??void 0}}function q(e,t,r){return r?{type:"ERROR",payload:{errors:r,cartActionEvent:e}}:t?{type:"RESOLVE",payload:{cart:be(t),rawCartResult:t,cartActionEvent:e}}:{type:"CART_COMPLETED",payload:{cartActionEvent:e}}}function cr(e){return e.type==="CART_CREATE"||e.type==="CARTLINE_ADD"||e.type==="CARTLINE_UPDATE"||e.type==="CARTLINE_REMOVE"||e.type==="NOTE_UPDATE"||e.type==="BUYER_IDENTITY_UPDATE"||e.type==="CART_ATTRIBUTES_UPDATE"||e.type==="DISCOUNT_CODES_UPDATE"}function lr(e){return e.type==="RESOLVE"||e.type==="ERROR"||e.type==="CART_COMPLETED"}const Ke=s.createContext(null);function ae(){const e=s.useContext(Ke);if(!e)throw new Error("Expected a Cart Context, but no Cart Context was found");return e}function dr({children:e,numCartLines:t,onCreate:r,onLineAdd:n,onLineRemove:i,onLineUpdate:o,onNoteUpdate:u,onBuyerIdentityUpdate:a,onAttributesUpdate:h,onDiscountCodesUpdate:y,onCreateComplete:l,onLineAddComplete:d,onLineRemoveComplete:p,onLineUpdateComplete:E,onNoteUpdateComplete:g,onBuyerIdentityUpdateComplete:b,onAttributesUpdateComplete:_,onDiscountCodesUpdateComplete:L,data:w,cartFragment:C=Zt,customerAccessToken:c,countryCode:f="US"}){var Et,pt,_t,St,vt,Ct,Tt;f&&(f=f.toUpperCase());const[m,T]=s.useState(f),[I,S]=s.useState(c),D=s.useRef(!1);(m!==f||I!==c)&&(T(f),S(c),D.current=!1);const[U,V]=sr({numCartLines:t,data:w,cartFragment:C,countryCode:f,onCartActionEntry(v,k){try{switch(k.type){case"CART_CREATE":return r==null?void 0:r();case"CARTLINE_ADD":return n==null?void 0:n();case"CARTLINE_REMOVE":return i==null?void 0:i();case"CARTLINE_UPDATE":return o==null?void 0:o();case"NOTE_UPDATE":return u==null?void 0:u();case"BUYER_IDENTITY_UPDATE":return a==null?void 0:a();case"CART_ATTRIBUTES_UPDATE":return h==null?void 0:h();case"DISCOUNT_CODES_UPDATE":return y==null?void 0:y()}}catch(R){console.error("Cart entry action failed",R)}},onCartActionOptimisticUI(v,k){var R,B,N,ce;if(!v.cart)return{...v};switch(k.type){case"CARTLINE_REMOVE":return{...v,cart:{...v.cart,lines:(B=(R=v==null?void 0:v.cart)==null?void 0:R.lines)==null?void 0:B.filter(M=>(M==null?void 0:M.id)&&!k.payload.lines.includes(M==null?void 0:M.id))}};case"CARTLINE_UPDATE":return{...v,cart:{...v.cart,lines:(ce=(N=v==null?void 0:v.cart)==null?void 0:N.lines)==null?void 0:ce.map(M=>{const Oe=k.payload.lines.find(({id:ln})=>ln===(M==null?void 0:M.id));return Oe&&Oe.quantity?{...M,quantity:Oe.quantity}:M})}}}return{...v}},onCartActionComplete(v,k){const R=k.payload.cartActionEvent;try{switch(k.type){case"RESOLVE":switch(R.type){case"CART_CREATE":return l==null?void 0:l();case"CARTLINE_ADD":return d==null?void 0:d();case"CARTLINE_REMOVE":return p==null?void 0:p();case"CARTLINE_UPDATE":return E==null?void 0:E();case"NOTE_UPDATE":return g==null?void 0:g();case"BUYER_IDENTITY_UPDATE":return hr(v,R)&&(D.current=!0),b==null?void 0:b();case"CART_ATTRIBUTES_UPDATE":return _==null?void 0:_();case"DISCOUNT_CODES_UPDATE":return L==null?void 0:L()}}}catch(B){console.error("onCartActionComplete failed",B)}}}),$=s.useRef(!1),j=U.matches("cartCompleted"),te=(U.value==="idle"||U.value==="error"||U.value==="cartCompleted")&&f!==((_t=(pt=(Et=U==null?void 0:U.context)==null?void 0:Et.cart)==null?void 0:pt.buyerIdentity)==null?void 0:_t.countryCode)&&!U.context.errors,F=s.useRef(!1);s.useEffect(()=>{if(!$.current&&!F.current){if(!w&&we("localStorage")){F.current=!0;try{const v=window.localStorage.getItem(Ae);v&&V({type:"CART_FETCH",payload:{cartId:v}})}catch(v){console.warn("error fetching cartId"),console.warn(v)}}$.current=!0}},[w,$,V]),s.useEffect(()=>{!te||D.current||V({type:"BUYER_IDENTITY_UPDATE",payload:{buyerIdentity:{countryCode:f,customerAccessToken:c}}})},[f,c,te,D,V]);const O=s.useCallback(v=>{if(!$.current)return console.warn("Cart isn't ready yet");V(v)},[V]);s.useEffect(()=>{var v,k,R;if((k=(v=U==null?void 0:U.context)==null?void 0:v.cart)!=null&&k.id&&we("localStorage"))try{window.localStorage.setItem(Ae,(R=U.context.cart)==null?void 0:R.id)}catch(B){console.warn("Failed to save cartId to localStorage",B)}},[(vt=(St=U==null?void 0:U.context)==null?void 0:St.cart)==null?void 0:vt.id]),s.useEffect(()=>{if(j&&we("localStorage"))try{window.localStorage.removeItem(Ae)}catch(v){console.warn("Failed to delete cartId from localStorage",v)}},[j]);const K=s.useCallback(v=>{var k,R;f&&!((k=v.buyerIdentity)!=null&&k.countryCode)&&(v.buyerIdentity==null&&(v.buyerIdentity={}),v.buyerIdentity.countryCode=f),c&&!((R=v.buyerIdentity)!=null&&R.customerAccessToken)&&(v.buyerIdentity==null&&(v.buyerIdentity={}),v.buyerIdentity.customerAccessToken=c),O({type:"CART_CREATE",payload:v})},[f,c,O]),P=yr(U),Ee=s.useMemo(()=>{var v,k,R,B;return{...((v=P==null?void 0:P.context)==null?void 0:v.cart)??{lines:[],attributes:[]},status:fr(P.value),error:(k=P==null?void 0:P.context)==null?void 0:k.errors,totalQuantity:((B=(R=P==null?void 0:P.context)==null?void 0:R.cart)==null?void 0:B.totalQuantity)??0,cartCreate:K,linesAdd(N){var ce,M;(M=(ce=P==null?void 0:P.context)==null?void 0:ce.cart)!=null&&M.id?O({type:"CARTLINE_ADD",payload:{lines:N}}):K({lines:N})},linesRemove(N){O({type:"CARTLINE_REMOVE",payload:{lines:N}})},linesUpdate(N){O({type:"CARTLINE_UPDATE",payload:{lines:N}})},noteUpdate(N){O({type:"NOTE_UPDATE",payload:{note:N}})},buyerIdentityUpdate(N){O({type:"BUYER_IDENTITY_UPDATE",payload:{buyerIdentity:N}})},cartAttributesUpdate(N){O({type:"CART_ATTRIBUTES_UPDATE",payload:{attributes:N}})},discountCodesUpdate(N){O({type:"DISCOUNT_CODES_UPDATE",payload:{discountCodes:N}})},cartFragment:C}},[K,(Ct=P==null?void 0:P.context)==null?void 0:Ct.cart,(Tt=P==null?void 0:P.context)==null?void 0:Tt.errors,P.value,C,O]);return s.createElement(Ke.Provider,{value:Ee},e)}function fr(e){switch(e){case"uninitialized":case"initializationError":return"uninitialized";case"idle":case"cartCompleted":case"error":return"idle";case"cartFetching":return"fetching";case"cartCreating":return"creating";case"cartLineAdding":case"cartLineRemoving":case"cartLineUpdating":case"noteUpdating":case"buyerIdentityUpdating":case"cartAttributesUpdating":case"discountCodesUpdating":return"updating"}}function yr(e){const[t,r]=s.useTransition(),[n,i]=s.useState(e),o=s.useRef(!1);t&&(o.current=!0);const u=s.useRef(!1);return!t&&o.current&&(u.current=!0),s.useEffect(()=>{r(()=>{u.current||i(e)})},[e]),u.current?e:n}function we(e){let t;try{t=window[e];const r="__storage_test__";return t.setItem(r,r),t.removeItem(r),!0}catch(r){return r instanceof DOMException&&(r.code===22||r.code===1014||r.name==="QuotaExceededError"||r.name==="NS_ERROR_DOM_QUOTA_REACHED")&&t&&t.length!==0}}function hr(e,t){var r,n;return t.payload.buyerIdentity.countryCode&&((n=(r=e.cart)==null?void 0:r.buyerIdentity)==null?void 0:n.countryCode)!==t.payload.buyerIdentity.countryCode}const Qe=s.createContext(null);function gr({children:e,data:t,initialVariantId:r}){const n=s.useMemo(()=>H(t.variants??{}),[t.variants]);if(!Er(n))throw new Error("<ProductProvider/> requires 'product.variants.nodes' or 'product.variants.edges'");const i=s.useMemo(()=>mr(n),[n]),[o,u]=s.useState(()=>et(r,n)),[a,h]=s.useState(()=>tt(o));s.useEffect(()=>{const _=et(r,n);u(_),h(tt(_))},[r,n]);const y=s.useCallback((_,L)=>{h(w=>{const C={...w,[_]:L};return u(Xe(n,C)),C})},[h,n]),l=s.useCallback((_,L)=>{const w=Xe(n,{...a,[_]:L});return(w==null?void 0:w.availableForSale)??!0},[a,n]),d=s.useMemo(()=>H(t.sellingPlanGroups??{}).map(_=>({..._,sellingPlans:H((_==null?void 0:_.sellingPlans)??{})})),[t.sellingPlanGroups]),[p,E]=s.useState(void 0),g=s.useMemo(()=>{var _,L;if(!(!o||!p)){if(!((_=o.sellingPlanAllocations)!=null&&_.nodes)&&!((L=o.sellingPlanAllocations)!=null&&L.edges))throw new Error("<ProductProvider/>: You must include 'sellingPlanAllocations.nodes' or 'sellingPlanAllocations.edges' in your variants in order to calculate selectedSellingPlanAllocation");return H(o.sellingPlanAllocations).find(w=>{var C;return((C=w==null?void 0:w.sellingPlan)==null?void 0:C.id)===p.id})}},[o,p]),b=s.useMemo(()=>({variants:n,variantsConnection:t.variants,options:i,selectedVariant:o,setSelectedVariant:u,selectedOptions:a,setSelectedOption:y,setSelectedOptions:h,isOptionInStock:l,selectedSellingPlan:p,setSelectedSellingPlan:E,selectedSellingPlanAllocation:g,sellingPlanGroups:d,sellingPlanGroupsConnection:t.sellingPlanGroups}),[l,i,t.sellingPlanGroups,t.variants,a,p,g,o,d,y,n]);return s.createElement(Qe.Provider,{value:b},e)}function Je(){const e=s.useContext(Qe);if(!e)throw new Error("'useProduct' must be a child of <ProductProvider />");return e}function Xe(e,t){var r,n;if(!(!e.length||((n=(r=e==null?void 0:e[0])==null?void 0:r.selectedOptions)==null?void 0:n.length)!==Object.keys(t).length))return e==null?void 0:e.find(i=>Object.entries(t).every(([o,u])=>{var a;return(a=i==null?void 0:i.selectedOptions)==null?void 0:a.some(h=>(h==null?void 0:h.name)===o&&(h==null?void 0:h.value)===u)}))}function mr(e){const t=e.reduce((r,n)=>{var i;if(!n.selectedOptions)throw new Error("'getOptions' requires 'variant.selectedOptions'");return(i=n==null?void 0:n.selectedOptions)==null||i.forEach(o=>{r[(o==null?void 0:o.name)??""]=r[(o==null?void 0:o.name)??""]||new Set,r[(o==null?void 0:o.name)??""].add((o==null?void 0:o.value)??"")}),r},{});return Object.keys(t).map(r=>({name:r,values:Array.from(t[r])}))}function et(e,t){if(e){const r=t.find(n=>(n==null?void 0:n.id)===e);return r||console.warn("<ProductProvider/> received a 'initialVariantId' prop, but could not actually find a variant with that ID"),r}if(e===null)return null;if(e===void 0)return t.find(r=>r==null?void 0:r.availableForSale)||t[0]}function tt(e){return e!=null&&e.selectedOptions?e.selectedOptions.reduce((t,r)=>(t[(r==null?void 0:r.name)??""]=(r==null?void 0:r.value)??"",t),{}):{}}function Er(e){return!(!e||!Array.isArray(e))}function Ie(e){const{as:t,onClick:r,defaultOnClick:n,children:i,buttonRef:o,...u}=e,a=s.useCallback(y=>{if(r){const l=r(y);if(typeof l=="boolean"&&l===!1||y!=null&&y.defaultPrevented)return}n==null||n(y)},[n,r]),h=t||"button";return s.createElement(h,{ref:o,onClick:a,...u},i)}function pr(e){const[t,r]=s.useState(!1),{variantId:n,quantity:i=1,attributes:o,sellingPlanId:u,onClick:a,children:h,accessibleAddingToCartLabel:y,...l}=e,{status:d,linesAdd:p}=ae(),{selectedVariant:E}=Je(),g=n??(E==null?void 0:E.id)??"",b=n===null||g===""||E===null||t||l.disabled;s.useEffect(()=>{t&&d==="idle"&&r(!1)},[d,t]);const _=s.useCallback(()=>{r(!0),p([{quantity:i,merchandiseId:g||"",attributes:o,sellingPlanId:u}])},[p,i,g,o,u]);return Q.createElement(Q.Fragment,null,Q.createElement(Ie,{...l,disabled:b,onClick:a,defaultOnClick:_},h),y?Q.createElement("p",{style:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},role:"alert","aria-live":"assertive"},t?y:null):null)}const De={PAGE_VIEW:"PAGE_VIEW",ADD_TO_CART:"ADD_TO_CART"},ge={article:"article",blog:"blog",captcha:"captcha",cart:"cart",collection:"collection",customersAccount:"customers/account",customersActivateAccount:"customers/activate_account",customersAddresses:"customers/addresses",customersLogin:"customers/login",customersOrder:"customers/order",customersRegister:"customers/register",customersResetPassword:"customers/reset_password",giftCard:"gift_card",home:"index",listCollections:"list-collections",forbidden:"403",notFound:"404",page:"page",password:"password",product:"product",policy:"policy",search:"search"},rt={hydrogen:"hydrogen",headless:"headless"},nt={hydrogen:"6167201",headless:"12875497473"};function X(e,t){return{schema_id:e,payload:t,metadata:{event_created_at_ms:Date.now()}}}function G(e){const t={id:"",resource:null};if(typeof e!="string")return t;const r=e.match(/^gid:\/\/shopify\/(\w+)\/([a-z0-9]+)/);if(!r||r.length===1)return t;const n=r[2]??null,i=r[1]??null;return{id:n,resource:i}}function z(e,t){return typeof e!="object"?{}:(Object.entries(e).forEach(([r,n])=>{n&&(t[r]=n)}),t)}function _r(e){return typeof document>"u"?(console.error(`${e} should only be used within the useEffect callback or event handlers`),!0):!1}const Sr="trekkie_storefront_page_view/1.4",vr="myshopify.dev";function Cr(e){const t=e,{id:r,resource:n}=G(t.resourceId),i=n?n.toLowerCase():void 0;return[X(Sr,z({pageType:t.pageType,customerId:t.customerId,resourceType:i,resourceId:parseInt(r)},Tr(t)))]}function Tr(e){return{appClientId:e.shopifySalesChannel?nt[e.shopifySalesChannel]:nt.headless,isMerchantRequest:Ar(e.url),hydrogenSubchannelId:e.storefrontId||"0",isPersistentCookie:e.hasUserConsent,uniqToken:e.uniqueToken,visitToken:e.visitToken,microSessionId:ye(),microSessionCount:1,url:e.url,path:e.path,search:e.search,referrer:e.referrer,title:e.title,shopId:parseInt(G(e.shopId).id),currency:e.currency,contentLanguage:e.acceptedLanguage||"en"}}function Ar(e){if(typeof e!="string")return!1;const t=new URL(e).hostname;return t.indexOf(vr)!==-1||t==="localhost"}const oe="custom_storefront_customer_tracking/1.0",br="page_rendered",wr="collection_page_rendered",Ir="product_page_rendered",Dr="product_added_to_cart",Or="search_submitted";function Lr(e){const t=e,r={canonical_url:t.canonicalUrl||t.url,customer_id:t.customerId},n=t.pageType,i=[];switch(i.push(X(oe,z({event_name:br,...r},ie(t)))),n){case ge.collection:i.push(X(oe,z({event_name:wr,...r,collection_name:t.collectionHandle},ie(t))));break;case ge.product:i.push(X(oe,z({event_name:Ir,...r,products:at(t.products),total_value:t.totalValue},ie(t))));break;case ge.search:i.push(X(oe,z({event_name:Or,...r,search_string:t.searchString},ie(t))));break}return i}function Pr(e){const t=e,r=G(t.cartId),n=r!=null&&r.id?`${r.id}`:null;return[X(oe,z({event_name:Dr,customerId:t.customerId,cart_token:n,total_value:t.totalValue,products:at(t.products)},ie(t)))]}function ie(e){return{source:e.shopifySalesChannel||rt.headless,hydrogenSubchannelId:e.storefrontId||"0",is_persistent_cookie:e.hasUserConsent,ccpa_enforced:!1,gdpr_enforced:!1,unique_token:e.uniqueToken,event_time:Date.now(),event_id:ye(),event_source_url:e.url,referrer:e.referrer,user_agent:e.userAgent,navigation_type:e.navigationType,navigation_api:e.navigationApi,shop_id:parseInt(G(e.shopId).id),currency:e.currency}}function at(e){return e?e.map(t=>{const r=z({variant_gid:t.variantGid,category:t.category,sku:t.sku,product_id:parseInt(G(t.productGid).id),variant_id:parseInt(G(t.variantGid).id)},{product_gid:t.productGid,name:t.name,variant:t.variantName||"",brand:t.brand,price:t.price,quantity:Number(t.quantity||0)});return JSON.stringify(r)}):[]}function Ur(e,t){const{eventName:r,payload:n}=e;if(!n.hasUserConsent)return Promise.resolve();let i=[];if(r===De.PAGE_VIEW){const o=n;i=i.concat(Cr(o),Lr(o))}else r===De.ADD_TO_CART&&(i=i.concat(Pr(n)));return i.length?kr(i,t):Promise.resolve()}const ot="sendShopifyAnalytics request is unsuccessful";function kr(e,t){const r={events:e,metadata:{event_sent_at_ms:Date.now()}};try{return fetch(t?`https://${t}/.well-known/shopify/monorail/unstable/produce_batch`:"https://monorail-edge.shopifysvc.com/unstable/produce_batch",{method:"post",headers:{"content-type":"text/plain"},body:JSON.stringify(r)}).then(n=>{if(!n.ok)throw new Error("Response failed");return n.text()}).then(n=>{n&&JSON.parse(n).result.forEach(o=>{o.status!==200&&console.error(ot,`
|
|
277
|
+
`,re="2023-01";function zt(e){const{storeDomain:t,privateStorefrontToken:r,publicStorefrontToken:n,storefrontApiVersion:a,contentType:u}=e;return a!==re&&Kt(`StorefrontClient: The Storefront API version that you're using is different than the version this build of Hydrogen React is targeting. You may run into unexpected errors if these versions don't match. Received verion: "${a}"; expected version "${re}"`),{getShopifyDomain(i){return(i==null?void 0:i.storeDomain)??t},getStorefrontApiUrl(i){const o=(i==null?void 0:i.storeDomain)??t;return`${o}${o.endsWith("/")?"":"/"}api/${(i==null?void 0:i.storefrontApiVersion)??a}/graphql.json`},getPrivateTokenHeaders(i){if(!r&&!(i!=null&&i.privateStorefrontToken))throw new Error("StorefrontClient: You did not pass in a 'privateStorefrontToken' while using 'getPrivateTokenHeaders()'");return{"content-type":((i==null?void 0:i.contentType)??u)==="graphql"?"application/graphql":"application/json","X-SDK-Variant":"hydrogen-react","X-SDK-Variant-Source":"react","X-SDK-Version":a,"Shopify-Storefront-Private-Token":(i==null?void 0:i.privateStorefrontToken)??r??"",...i!=null&&i.buyerIp?{"Shopify-Storefront-Buyer-IP":i.buyerIp}:{}}},getPublicTokenHeaders(i){if(!n&&!(i!=null&&i.publicStorefrontToken))throw new Error("StorefrontClient: You did not pass in a 'publicStorefrontToken' while using 'getPublicTokenHeaders()'");const o=(i==null?void 0:i.contentType)??u??"json";return je(o,a,(i==null?void 0:i.publicStorefrontToken)??n??"")}}}function je(e,t,r){return{"content-type":e==="graphql"?"application/graphql":"application/json","X-SDK-Variant":"hydrogen-react","X-SDK-Variant-Source":"react","X-SDK-Version":t,"X-Shopify-Storefront-Access-Token":r}}const Ye=new Set,Kt=e=>{Ye.has(e)||(console.warn(e),Ye.add(e))},We=s.createContext({storeDomain:"test",storefrontToken:"abc123",storefrontApiVersion:re,countryIsoCode:"US",languageIsoCode:"EN",getStorefrontApiUrl(){return""},getPublicTokenHeaders(){return{}},getShopifyDomain(){return""}});function Qt({children:e,...t}){if(!t.countryIsoCode||!t.languageIsoCode||!t.storeDomain||!t.storefrontToken||!t.storefrontApiVersion)throw new Error("Please provide the necessary props to '<ShopifyProvider/>'");t.storefrontApiVersion!==re&&console.warn(`<ShopifyProvider/>: This version of Hydrogen React is built for Shopify's Storefront API version ${re}, but it looks like you're using version ${t.storefrontApiVersion}. There may be issues or bugs if you use a mismatched version of Hydrogen React and the Storefront API.`);const r=s.useMemo(()=>{function n(a){return(a==null?void 0:a.storeDomain)??t.storeDomain}return{...t,getPublicTokenHeaders(a){return je(a.contentType,t.storefrontApiVersion,a.storefrontToken??t.storefrontToken)},getShopifyDomain:n,getStorefrontApiUrl(a){const u=n({storeDomain:(a==null?void 0:a.storeDomain)??t.storeDomain});return`${u}${u.endsWith("/")?"":"/"}api/${(a==null?void 0:a.storefrontApiVersion)??t.storefrontApiVersion}/graphql.json`}}},[t]);return s.createElement(We.Provider,{value:r},e)}function fe(){const e=s.useContext(We);if(!e)throw new Error("'useShop()' must be a descendent of <ShopifyProvider/>");return e}const Ae="shopifyCartId",Jt="Shopify-Storefront-Id",Xt="Shopify-Storefront-Y",er="Shopify-Storefront-S",W="_shopify_y",Z="_shopify_s";var tr=new Set(["domain","path","max-age","expires","samesite","secure","httponly"]);function rr(e){let t={},r,n,a=0,u=e.split(/;\s*/g),i,o;for(;a<u.length;a++)if(n=u[a],r=n.indexOf("="),~r){if(i=n.substring(0,r++).trim(),o=n.substring(r).trim(),o[0]==='"'&&(o=o.substring(1,o.length-1)),~o.indexOf("%"))try{o=decodeURIComponent(o)}catch{}tr.has(n=i.toLowerCase())?n==="expires"?t.expires=new Date(o):n==="max-age"?t.maxage=+o:t[n]=o:t[i]=o}else(i=n.trim().toLowerCase())&&(i==="httponly"||i==="secure")&&(t[i]=!0);return t}function nr(e,t,r={}){let n=e+"="+encodeURIComponent(t);return r.expires&&(n+="; Expires="+new Date(r.expires).toUTCString()),r.maxage!=null&&r.maxage>=0&&(n+="; Max-Age="+(r.maxage|0)),r.domain&&(n+="; Domain="+r.domain),r.path&&(n+="; Path="+r.path),r.samesite&&(n+="; SameSite="+r.samesite),(r.secure||r.samesite==="None")&&(n+="; Secure"),r.httponly&&(n+="; HttpOnly"),n}const Ze="xxxx-4xxx-xxxx-xxxxxxxxxxxx";function ye(){let e="";try{const t=window.crypto,r=new Uint16Array(31);t.getRandomValues(r);let n=0;e=Ze.replace(/[x]/g,a=>{const u=r[n]%16,i=a==="x"?u:u&3|8;return n++,i.toString(16)}).toUpperCase()}catch{e=Ze.replace(/[x]/g,r=>{const n=Math.random()*16|0;return(r==="x"?n:n&3|8).toString(16)}).toUpperCase()}return`${or()}-${e}`}function or(){let e=0,t=0;e=new Date().getTime()>>>0;try{t=performance.now()>>>0}catch{t=0}const r=Math.abs(e+t).toString(16).toLowerCase();return r.padStart(8-r.length,"0")}function he(e){const t=rr(e);return{[W]:t[W]||"",[Z]:t[Z]||""}}function ar(){const{storefrontId:e,getPublicTokenHeaders:t,getStorefrontApiUrl:r}=fe();return s.useCallback(({query:n,variables:a})=>{const u=t({contentType:"json"});e&&(u[Jt]=e);const i=he(document.cookie);return u[Xt]=i[W],u[er]=i[Z],fetch(r(),{method:"POST",headers:u,body:JSON.stringify({query:n.toString(),variables:a})}).then(o=>o.json()).catch(o=>({data:void 0,errors:o==null?void 0:o.toString()}))},[t,e,r])}function ir({numCartLines:e,cartFragment:t,countryCode:r="US"}){const n=ar(),a=s.useCallback(E=>n({query:Wt(t),variables:{id:E,numCartLines:e,country:r}}),[n,t,e,r]),u=s.useCallback(E=>n({query:qt(t),variables:{input:E,numCartLines:e,country:r}}),[t,r,n,e]),i=s.useCallback((E,g)=>n({query:xt(t),variables:{cartId:E,lines:g,numCartLines:e,country:r}}),[t,r,n,e]),o=s.useCallback((E,g)=>n({query:Bt(t),variables:{cartId:E,lines:g,numCartLines:e,country:r}}),[t,r,n,e]),h=s.useCallback((E,g)=>n({query:Ft(t),variables:{cartId:E,lines:g,numCartLines:e,country:r}}),[t,r,n,e]),y=s.useCallback((E,g)=>n({query:Ht(t),variables:{cartId:E,note:g,numCartLines:e,country:r}}),[n,t,e,r]),l=s.useCallback((E,g)=>n({query:Gt(t),variables:{cartId:E,buyerIdentity:g,numCartLines:e,country:r}}),[t,r,n,e]),d=s.useCallback((E,g)=>n({query:jt(t),variables:{cartId:E,attributes:g,numCartLines:e,country:r}}),[t,r,n,e]),p=s.useCallback((E,g)=>n({query:Yt(t),variables:{cartId:E,discountCodes:g,numCartLines:e,country:r}}),[t,r,n,e]);return s.useMemo(()=>({cartFetch:a,cartCreate:u,cartLineAdd:i,cartLineUpdate:o,cartLineRemove:h,noteUpdate:y,buyerIdentityUpdate:l,cartAttributesUpdate:d,discountCodesUpdate:p,cartFragment:t}),[a,u,i,o,h,y,l,d,p,t])}function x(e,t){return{entry:[...(t==null?void 0:t.entryActions)||[],J({lastValidCart:r=>r==null?void 0:r.cart}),"onCartActionEntry","onCartActionOptimisticUI",e],on:{RESOLVE:{target:(t==null?void 0:t.resolveTarget)||"idle",actions:[J({prevCart:r=>r==null?void 0:r.lastValidCart,cart:(r,n)=>{var a;return(a=n==null?void 0:n.payload)==null?void 0:a.cart},rawCartResult:(r,n)=>{var a;return(a=n==null?void 0:n.payload)==null?void 0:a.rawCartResult},errors:r=>{}})]},ERROR:{target:(t==null?void 0:t.errorTarget)||"error",actions:[J({prevCart:r=>r==null?void 0:r.lastValidCart,cart:r=>r==null?void 0:r.lastValidCart,errors:(r,n)=>{var a;return(a=n==null?void 0:n.payload)==null?void 0:a.errors}})]},CART_COMPLETED:{target:"cartCompleted",actions:J({prevCart:r=>{},cart:r=>{},lastValidCart:r=>{},rawCartResult:r=>{},errors:r=>{}})}},exit:["onCartActionComplete",...(t==null?void 0:t.exitActions)||[]]}}const ne={CART_FETCH:{target:"cartFetching"},CART_CREATE:{target:"cartCreating"},CART_SET:{target:"idle",actions:[J({rawCartResult:(e,t)=>t.payload.cart,cart:(e,t)=>be(t.payload.cart)})]}},ze={CARTLINE_ADD:{target:"cartLineAdding"},CARTLINE_UPDATE:{target:"cartLineUpdating"},CARTLINE_REMOVE:{target:"cartLineRemoving"},NOTE_UPDATE:{target:"noteUpdating"},BUYER_IDENTITY_UPDATE:{target:"buyerIdentityUpdating"},CART_ATTRIBUTES_UPDATE:{target:"cartAttributesUpdating"},DISCOUNT_CODES_UPDATE:{target:"discountCodesUpdating"}};function ur(e){return Re({id:"Cart",initial:e?"idle":"uninitialized",context:{cart:e&&be(e)},states:{uninitialized:{on:ne},cartCompleted:{on:ne},initializationError:{on:ne},idle:{on:{...ne,...ze}},error:{on:{...ne,...ze}},cartFetching:x("cartFetchAction",{errorTarget:"initializationError"}),cartCreating:x("cartCreateAction",{errorTarget:"initializationError"}),cartLineRemoving:x("cartLineRemoveAction"),cartLineUpdating:x("cartLineUpdateAction"),cartLineAdding:x("cartLineAddAction"),noteUpdating:x("noteUpdateAction"),buyerIdentityUpdating:x("buyerIdentityUpdateAction"),cartAttributesUpdating:x("cartAttributesUpdateAction"),discountCodesUpdating:x("discountCodesUpdateAction")}})}function sr({numCartLines:e,onCartActionEntry:t,onCartActionOptimisticUI:r,onCartActionComplete:n,data:a,cartFragment:u,countryCode:i}){const{cartFetch:o,cartCreate:h,cartLineAdd:y,cartLineUpdate:l,cartLineRemove:d,noteUpdate:p,buyerIdentityUpdate:E,cartAttributesUpdate:g,discountCodesUpdate:b}=ir({numCartLines:e,cartFragment:u,countryCode:i}),_=s.useMemo(()=>ur(a),[a]),[L,w,T]=Rt(_,{actions:{cartFetchAction:async(c,f)=>{var S;if(f.type!=="CART_FETCH")return;const{data:m,errors:C}=await o((S=f==null?void 0:f.payload)==null?void 0:S.cartId),I=q(f,m==null?void 0:m.cart,C);w(I)},cartCreateAction:async(c,f)=>{var S;if(f.type!=="CART_CREATE")return;const{data:m,errors:C}=await h(f==null?void 0:f.payload),I=q(f,(S=m==null?void 0:m.cartCreate)==null?void 0:S.cart,C);w(I)},cartLineAddAction:async(c,f)=>{var S,D;if(f.type!=="CARTLINE_ADD"||!((S=c==null?void 0:c.cart)!=null&&S.id))return;const{data:m,errors:C}=await y(c.cart.id,f.payload.lines),I=q(f,(D=m==null?void 0:m.cartLinesAdd)==null?void 0:D.cart,C);w(I)},cartLineUpdateAction:async(c,f)=>{var S,D;if(f.type!=="CARTLINE_UPDATE"||!((S=c==null?void 0:c.cart)!=null&&S.id))return;const{data:m,errors:C}=await l(c.cart.id,f.payload.lines),I=q(f,(D=m==null?void 0:m.cartLinesUpdate)==null?void 0:D.cart,C);w(I)},cartLineRemoveAction:async(c,f)=>{var S,D;if(f.type!=="CARTLINE_REMOVE"||!((S=c==null?void 0:c.cart)!=null&&S.id))return;const{data:m,errors:C}=await d(c.cart.id,f.payload.lines),I=q(f,(D=m==null?void 0:m.cartLinesRemove)==null?void 0:D.cart,C);w(I)},noteUpdateAction:async(c,f)=>{var S,D;if(f.type!=="NOTE_UPDATE"||!((S=c==null?void 0:c.cart)!=null&&S.id))return;const{data:m,errors:C}=await p(c.cart.id,f.payload.note),I=q(f,(D=m==null?void 0:m.cartNoteUpdate)==null?void 0:D.cart,C);w(I)},buyerIdentityUpdateAction:async(c,f)=>{var S,D;if(f.type!=="BUYER_IDENTITY_UPDATE"||!((S=c==null?void 0:c.cart)!=null&&S.id))return;const{data:m,errors:C}=await E(c.cart.id,f.payload.buyerIdentity),I=q(f,(D=m==null?void 0:m.cartBuyerIdentityUpdate)==null?void 0:D.cart,C);w(I)},cartAttributesUpdateAction:async(c,f)=>{var S,D;if(f.type!=="CART_ATTRIBUTES_UPDATE"||!((S=c==null?void 0:c.cart)!=null&&S.id))return;const{data:m,errors:C}=await g(c.cart.id,f.payload.attributes),I=q(f,(D=m==null?void 0:m.cartAttributesUpdate)==null?void 0:D.cart,C);w(I)},discountCodesUpdateAction:async(c,f)=>{var S,D;if(f.type!=="DISCOUNT_CODES_UPDATE"||!((S=c==null?void 0:c.cart)!=null&&S.id))return;const{data:m,errors:C}=await b(c.cart.id,f.payload.discountCodes),I=q(f,(D=m==null?void 0:m.cartDiscountCodesUpdate)==null?void 0:D.cart,C);w(I)},...t&&{onCartActionEntry:(c,f)=>{cr(f)&&t(c,f)}},...r&&{onCartActionOptimisticUI:J((c,f)=>r(c,f))},...n&&{onCartActionComplete:(c,f)=>{lr(f)&&n(c,f)}}}});return s.useMemo(()=>[L,w,T],[L,w,T])}function be(e){return{...e,lines:H(e==null?void 0:e.lines),note:e.note??void 0}}function q(e,t,r){return r?{type:"ERROR",payload:{errors:r,cartActionEvent:e}}:t?{type:"RESOLVE",payload:{cart:be(t),rawCartResult:t,cartActionEvent:e}}:{type:"CART_COMPLETED",payload:{cartActionEvent:e}}}function cr(e){return e.type==="CART_CREATE"||e.type==="CARTLINE_ADD"||e.type==="CARTLINE_UPDATE"||e.type==="CARTLINE_REMOVE"||e.type==="NOTE_UPDATE"||e.type==="BUYER_IDENTITY_UPDATE"||e.type==="CART_ATTRIBUTES_UPDATE"||e.type==="DISCOUNT_CODES_UPDATE"}function lr(e){return e.type==="RESOLVE"||e.type==="ERROR"||e.type==="CART_COMPLETED"}const Ke=s.createContext(null);function oe(){const e=s.useContext(Ke);if(!e)throw new Error("Expected a Cart Context, but no Cart Context was found");return e}function dr({children:e,numCartLines:t,onCreate:r,onLineAdd:n,onLineRemove:a,onLineUpdate:u,onNoteUpdate:i,onBuyerIdentityUpdate:o,onAttributesUpdate:h,onDiscountCodesUpdate:y,onCreateComplete:l,onLineAddComplete:d,onLineRemoveComplete:p,onLineUpdateComplete:E,onNoteUpdateComplete:g,onBuyerIdentityUpdateComplete:b,onAttributesUpdateComplete:_,onDiscountCodesUpdateComplete:L,data:w,cartFragment:T=Zt,customerAccessToken:c,countryCode:f="US"}){var Et,pt,_t,St,vt,Tt,Ct;f&&(f=f.toUpperCase());const[m,C]=s.useState(f),[I,S]=s.useState(c),D=s.useRef(!1);(m!==f||I!==c)&&(C(f),S(c),D.current=!1);const[U,V]=sr({numCartLines:t,data:w,cartFragment:T,countryCode:f,onCartActionEntry(v,k){try{switch(k.type){case"CART_CREATE":return r==null?void 0:r();case"CARTLINE_ADD":return n==null?void 0:n();case"CARTLINE_REMOVE":return a==null?void 0:a();case"CARTLINE_UPDATE":return u==null?void 0:u();case"NOTE_UPDATE":return i==null?void 0:i();case"BUYER_IDENTITY_UPDATE":return o==null?void 0:o();case"CART_ATTRIBUTES_UPDATE":return h==null?void 0:h();case"DISCOUNT_CODES_UPDATE":return y==null?void 0:y()}}catch(R){console.error("Cart entry action failed",R)}},onCartActionOptimisticUI(v,k){var R,B,N,ce;if(!v.cart)return{...v};switch(k.type){case"CARTLINE_REMOVE":return{...v,cart:{...v.cart,lines:(B=(R=v==null?void 0:v.cart)==null?void 0:R.lines)==null?void 0:B.filter(M=>(M==null?void 0:M.id)&&!k.payload.lines.includes(M==null?void 0:M.id))}};case"CARTLINE_UPDATE":return{...v,cart:{...v.cart,lines:(ce=(N=v==null?void 0:v.cart)==null?void 0:N.lines)==null?void 0:ce.map(M=>{const Oe=k.payload.lines.find(({id:ln})=>ln===(M==null?void 0:M.id));return Oe&&Oe.quantity?{...M,quantity:Oe.quantity}:M})}}}return{...v}},onCartActionComplete(v,k){const R=k.payload.cartActionEvent;try{switch(k.type){case"RESOLVE":switch(R.type){case"CART_CREATE":return l==null?void 0:l();case"CARTLINE_ADD":return d==null?void 0:d();case"CARTLINE_REMOVE":return p==null?void 0:p();case"CARTLINE_UPDATE":return E==null?void 0:E();case"NOTE_UPDATE":return g==null?void 0:g();case"BUYER_IDENTITY_UPDATE":return hr(v,R)&&(D.current=!0),b==null?void 0:b();case"CART_ATTRIBUTES_UPDATE":return _==null?void 0:_();case"DISCOUNT_CODES_UPDATE":return L==null?void 0:L()}}}catch(B){console.error("onCartActionComplete failed",B)}}}),$=s.useRef(!1),j=U.matches("cartCompleted"),te=(U.value==="idle"||U.value==="error"||U.value==="cartCompleted")&&f!==((_t=(pt=(Et=U==null?void 0:U.context)==null?void 0:Et.cart)==null?void 0:pt.buyerIdentity)==null?void 0:_t.countryCode)&&!U.context.errors,F=s.useRef(!1);s.useEffect(()=>{if(!$.current&&!F.current){if(!w&&we("localStorage")){F.current=!0;try{const v=window.localStorage.getItem(Ae);v&&V({type:"CART_FETCH",payload:{cartId:v}})}catch(v){console.warn("error fetching cartId"),console.warn(v)}}$.current=!0}},[w,$,V]),s.useEffect(()=>{!te||D.current||V({type:"BUYER_IDENTITY_UPDATE",payload:{buyerIdentity:{countryCode:f,customerAccessToken:c}}})},[f,c,te,D,V]);const O=s.useCallback(v=>{if(!$.current)return console.warn("Cart isn't ready yet");V(v)},[V]);s.useEffect(()=>{var v,k,R;if((k=(v=U==null?void 0:U.context)==null?void 0:v.cart)!=null&&k.id&&we("localStorage"))try{window.localStorage.setItem(Ae,(R=U.context.cart)==null?void 0:R.id)}catch(B){console.warn("Failed to save cartId to localStorage",B)}},[(vt=(St=U==null?void 0:U.context)==null?void 0:St.cart)==null?void 0:vt.id]),s.useEffect(()=>{if(j&&we("localStorage"))try{window.localStorage.removeItem(Ae)}catch(v){console.warn("Failed to delete cartId from localStorage",v)}},[j]);const K=s.useCallback(v=>{var k,R;f&&!((k=v.buyerIdentity)!=null&&k.countryCode)&&(v.buyerIdentity==null&&(v.buyerIdentity={}),v.buyerIdentity.countryCode=f),c&&!((R=v.buyerIdentity)!=null&&R.customerAccessToken)&&(v.buyerIdentity==null&&(v.buyerIdentity={}),v.buyerIdentity.customerAccessToken=c),O({type:"CART_CREATE",payload:v})},[f,c,O]),P=yr(U),Ee=s.useMemo(()=>{var v,k,R,B;return{...((v=P==null?void 0:P.context)==null?void 0:v.cart)??{lines:[],attributes:[]},status:fr(P.value),error:(k=P==null?void 0:P.context)==null?void 0:k.errors,totalQuantity:((B=(R=P==null?void 0:P.context)==null?void 0:R.cart)==null?void 0:B.totalQuantity)??0,cartCreate:K,linesAdd(N){var ce,M;(M=(ce=P==null?void 0:P.context)==null?void 0:ce.cart)!=null&&M.id?O({type:"CARTLINE_ADD",payload:{lines:N}}):K({lines:N})},linesRemove(N){O({type:"CARTLINE_REMOVE",payload:{lines:N}})},linesUpdate(N){O({type:"CARTLINE_UPDATE",payload:{lines:N}})},noteUpdate(N){O({type:"NOTE_UPDATE",payload:{note:N}})},buyerIdentityUpdate(N){O({type:"BUYER_IDENTITY_UPDATE",payload:{buyerIdentity:N}})},cartAttributesUpdate(N){O({type:"CART_ATTRIBUTES_UPDATE",payload:{attributes:N}})},discountCodesUpdate(N){O({type:"DISCOUNT_CODES_UPDATE",payload:{discountCodes:N}})},cartFragment:T}},[K,(Tt=P==null?void 0:P.context)==null?void 0:Tt.cart,(Ct=P==null?void 0:P.context)==null?void 0:Ct.errors,P.value,T,O]);return s.createElement(Ke.Provider,{value:Ee},e)}function fr(e){switch(e){case"uninitialized":case"initializationError":return"uninitialized";case"idle":case"cartCompleted":case"error":return"idle";case"cartFetching":return"fetching";case"cartCreating":return"creating";case"cartLineAdding":case"cartLineRemoving":case"cartLineUpdating":case"noteUpdating":case"buyerIdentityUpdating":case"cartAttributesUpdating":case"discountCodesUpdating":return"updating"}}function yr(e){const[t,r]=s.useTransition(),[n,a]=s.useState(e),u=s.useRef(!1);t&&(u.current=!0);const i=s.useRef(!1);return!t&&u.current&&(i.current=!0),s.useEffect(()=>{r(()=>{i.current||a(e)})},[e]),i.current?e:n}function we(e){let t;try{t=window[e];const r="__storage_test__";return t.setItem(r,r),t.removeItem(r),!0}catch(r){return!!(r instanceof DOMException&&(r.code===22||r.code===1014||r.name==="QuotaExceededError"||r.name==="NS_ERROR_DOM_QUOTA_REACHED")&&t&&t.length!==0)}}function hr(e,t){var r,n;return!!(t.payload.buyerIdentity.countryCode&&((n=(r=e.cart)==null?void 0:r.buyerIdentity)==null?void 0:n.countryCode)!==t.payload.buyerIdentity.countryCode)}const Qe=s.createContext(null);function gr({children:e,data:t,initialVariantId:r}){const n=s.useMemo(()=>H(t.variants??{}),[t.variants]);if(!Er(n))throw new Error("<ProductProvider/> requires 'product.variants.nodes' or 'product.variants.edges'");const a=s.useMemo(()=>mr(n),[n]),[u,i]=s.useState(()=>et(r,n)),[o,h]=s.useState(()=>tt(u));s.useEffect(()=>{const _=et(r,n);i(_),h(tt(_))},[r,n]);const y=s.useCallback((_,L)=>{h(w=>{const T={...w,[_]:L};return i(Xe(n,T)),T})},[h,n]),l=s.useCallback((_,L)=>{const w=Xe(n,{...o,[_]:L});return(w==null?void 0:w.availableForSale)??!0},[o,n]),d=s.useMemo(()=>H(t.sellingPlanGroups??{}).map(_=>({..._,sellingPlans:H((_==null?void 0:_.sellingPlans)??{})})),[t.sellingPlanGroups]),[p,E]=s.useState(void 0),g=s.useMemo(()=>{var _,L;if(!(!u||!p)){if(!((_=u.sellingPlanAllocations)!=null&&_.nodes)&&!((L=u.sellingPlanAllocations)!=null&&L.edges))throw new Error("<ProductProvider/>: You must include 'sellingPlanAllocations.nodes' or 'sellingPlanAllocations.edges' in your variants in order to calculate selectedSellingPlanAllocation");return H(u.sellingPlanAllocations).find(w=>{var T;return((T=w==null?void 0:w.sellingPlan)==null?void 0:T.id)===p.id})}},[u,p]),b=s.useMemo(()=>({variants:n,variantsConnection:t.variants,options:a,selectedVariant:u,setSelectedVariant:i,selectedOptions:o,setSelectedOption:y,setSelectedOptions:h,isOptionInStock:l,selectedSellingPlan:p,setSelectedSellingPlan:E,selectedSellingPlanAllocation:g,sellingPlanGroups:d,sellingPlanGroupsConnection:t.sellingPlanGroups}),[l,a,t.sellingPlanGroups,t.variants,o,p,g,u,d,y,n]);return s.createElement(Qe.Provider,{value:b},e)}function Je(){const e=s.useContext(Qe);if(!e)throw new Error("'useProduct' must be a child of <ProductProvider />");return e}function Xe(e,t){var r,n;if(!(!e.length||((n=(r=e==null?void 0:e[0])==null?void 0:r.selectedOptions)==null?void 0:n.length)!==Object.keys(t).length))return e==null?void 0:e.find(a=>Object.entries(t).every(([u,i])=>{var o;return(o=a==null?void 0:a.selectedOptions)==null?void 0:o.some(h=>(h==null?void 0:h.name)===u&&(h==null?void 0:h.value)===i)}))}function mr(e){const t=e.reduce((r,n)=>{var a;if(!n.selectedOptions)throw new Error("'getOptions' requires 'variant.selectedOptions'");return(a=n==null?void 0:n.selectedOptions)==null||a.forEach(u=>{r[(u==null?void 0:u.name)??""]=r[(u==null?void 0:u.name)??""]||new Set,r[(u==null?void 0:u.name)??""].add((u==null?void 0:u.value)??"")}),r},{});return Object.keys(t).map(r=>({name:r,values:Array.from(t[r])}))}function et(e,t){if(e){const r=t.find(n=>(n==null?void 0:n.id)===e);return r||console.warn("<ProductProvider/> received a 'initialVariantId' prop, but could not actually find a variant with that ID"),r}if(e===null)return null;if(e===void 0)return t.find(r=>r==null?void 0:r.availableForSale)||t[0]}function tt(e){return e!=null&&e.selectedOptions?e.selectedOptions.reduce((t,r)=>(t[(r==null?void 0:r.name)??""]=(r==null?void 0:r.value)??"",t),{}):{}}function Er(e){return!(!e||!Array.isArray(e))}function Ie(e){const{as:t,onClick:r,defaultOnClick:n,children:a,buttonRef:u,...i}=e,o=s.useCallback(y=>{if(r){const l=r(y);if(typeof l=="boolean"&&l===!1||y!=null&&y.defaultPrevented)return}n==null||n(y)},[n,r]),h=t||"button";return s.createElement(h,{ref:u,onClick:o,...i},a)}function pr(e){const[t,r]=s.useState(!1),{variantId:n,quantity:a=1,attributes:u,sellingPlanId:i,onClick:o,children:h,accessibleAddingToCartLabel:y,...l}=e,{status:d,linesAdd:p}=oe(),{selectedVariant:E}=Je(),g=n??(E==null?void 0:E.id)??"",b=n===null||g===""||E===null||t||l.disabled;s.useEffect(()=>{t&&d==="idle"&&r(!1)},[d,t]);const _=s.useCallback(()=>{r(!0),p([{quantity:a,merchandiseId:g||"",attributes:u,sellingPlanId:i}])},[p,a,g,u,i]);return Q.createElement(Q.Fragment,null,Q.createElement(Ie,{...l,disabled:b,onClick:o,defaultOnClick:_},h),y?Q.createElement("p",{style:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},role:"alert","aria-live":"assertive"},t?y:null):null)}const De={PAGE_VIEW:"PAGE_VIEW",ADD_TO_CART:"ADD_TO_CART"},ge={article:"article",blog:"blog",captcha:"captcha",cart:"cart",collection:"collection",customersAccount:"customers/account",customersActivateAccount:"customers/activate_account",customersAddresses:"customers/addresses",customersLogin:"customers/login",customersOrder:"customers/order",customersRegister:"customers/register",customersResetPassword:"customers/reset_password",giftCard:"gift_card",home:"index",listCollections:"list-collections",forbidden:"403",notFound:"404",page:"page",password:"password",product:"product",policy:"policy",search:"search"},rt={hydrogen:"hydrogen",headless:"headless"},nt={hydrogen:"6167201",headless:"12875497473"};function X(e,t){return{schema_id:e,payload:t,metadata:{event_created_at_ms:Date.now()}}}function G(e){const t={id:"",resource:null};if(typeof e!="string")return t;const r=e.match(/^gid:\/\/shopify\/(\w+)\/([a-z0-9]+)/);if(!r||r.length===1)return t;const n=r[2]??null,a=r[1]??null;return{id:n,resource:a}}function z(e,t){return typeof e!="object"?{}:(Object.entries(e).forEach(([r,n])=>{n&&(t[r]=n)}),t)}function _r(e){return typeof document>"u"?(console.error(`${e} should only be used within the useEffect callback or event handlers`),!0):!1}const Sr="trekkie_storefront_page_view/1.4",vr="myshopify.dev";function Tr(e){const t=e,{id:r,resource:n}=G(t.resourceId),a=n?n.toLowerCase():void 0;return[X(Sr,z({pageType:t.pageType,customerId:t.customerId,resourceType:a,resourceId:parseInt(r)},Cr(t)))]}function Cr(e){return{appClientId:e.shopifySalesChannel?nt[e.shopifySalesChannel]:nt.headless,isMerchantRequest:Ar(e.url),hydrogenSubchannelId:e.storefrontId||"0",isPersistentCookie:e.hasUserConsent,uniqToken:e.uniqueToken,visitToken:e.visitToken,microSessionId:ye(),microSessionCount:1,url:e.url,path:e.path,search:e.search,referrer:e.referrer,title:e.title,shopId:parseInt(G(e.shopId).id),currency:e.currency,contentLanguage:e.acceptedLanguage||"en"}}function Ar(e){if(typeof e!="string")return!1;const t=new URL(e).hostname;return t.indexOf(vr)!==-1||t==="localhost"}const ae="custom_storefront_customer_tracking/1.0",br="page_rendered",wr="collection_page_rendered",Ir="product_page_rendered",Dr="product_added_to_cart",Or="search_submitted";function Lr(e){const t=e,r={canonical_url:t.canonicalUrl||t.url,customer_id:t.customerId},n=t.pageType,a=[];switch(a.push(X(ae,z({event_name:br,...r},ie(t)))),n){case ge.collection:a.push(X(ae,z({event_name:wr,...r,collection_name:t.collectionHandle},ie(t))));break;case ge.product:a.push(X(ae,z({event_name:Ir,...r,products:ot(t.products),total_value:t.totalValue},ie(t))));break;case ge.search:a.push(X(ae,z({event_name:Or,...r,search_string:t.searchString},ie(t))));break}return a}function Pr(e){const t=e,r=G(t.cartId),n=r!=null&&r.id?`${r.id}`:null;return[X(ae,z({event_name:Dr,customerId:t.customerId,cart_token:n,total_value:t.totalValue,products:ot(t.products)},ie(t)))]}function ie(e){return{source:e.shopifySalesChannel||rt.headless,hydrogenSubchannelId:e.storefrontId||"0",is_persistent_cookie:e.hasUserConsent,ccpa_enforced:!1,gdpr_enforced:!1,unique_token:e.uniqueToken,event_time:Date.now(),event_id:ye(),event_source_url:e.url,referrer:e.referrer,user_agent:e.userAgent,navigation_type:e.navigationType,navigation_api:e.navigationApi,shop_id:parseInt(G(e.shopId).id),currency:e.currency}}function ot(e){return e?e.map(t=>{const r=z({variant_gid:t.variantGid,category:t.category,sku:t.sku,product_id:parseInt(G(t.productGid).id),variant_id:parseInt(G(t.variantGid).id)},{product_gid:t.productGid,name:t.name,variant:t.variantName||"",brand:t.brand,price:t.price,quantity:Number(t.quantity||0)});return JSON.stringify(r)}):[]}function Ur(e,t){const{eventName:r,payload:n}=e;if(!n.hasUserConsent)return Promise.resolve();let a=[];if(r===De.PAGE_VIEW){const u=n;a=a.concat(Tr(u),Lr(u))}else r===De.ADD_TO_CART&&(a=a.concat(Pr(n)));return a.length?kr(a,t):Promise.resolve()}const at="sendShopifyAnalytics request is unsuccessful";function kr(e,t){const r={events:e,metadata:{event_sent_at_ms:Date.now()}};try{return fetch(t?`https://${t}/.well-known/shopify/monorail/unstable/produce_batch`:"https://monorail-edge.shopifysvc.com/unstable/produce_batch",{method:"post",headers:{"content-type":"text/plain"},body:JSON.stringify(r)}).then(n=>{if(!n.ok)throw new Error("Response failed");return n.text()}).then(n=>{n&&JSON.parse(n).result.forEach(u=>{u.status!==200&&console.error(at,`
|
|
278
278
|
|
|
279
|
-
`,o.message)})}).catch(n=>{console.error(ot,n)})}catch{return Promise.resolve()}}function Nr(){if(_r("getClientBrowserParameters"))return{uniqueToken:"",visitToken:"",url:"",path:"",search:"",referrer:"",title:"",userAgent:"",navigationType:"",navigationApi:""};const[e,t]=Mr(),r=he(document.cookie);return{uniqueToken:r[W],visitToken:r[Z],url:location.href,path:location.pathname,search:location.search,referrer:document.referrer,title:document.title,userAgent:navigator.userAgent,navigationType:e,navigationApi:t}}function Vr(){try{const e=(performance==null?void 0:performance.getEntriesByType)&&(performance==null?void 0:performance.getEntriesByType("navigation"));if(e&&e[0]){const t=window.performance.getEntriesByType("navigation")[0].type;return t&&t.toString()}}catch{}}function Rr(){var e,t;try{if(PerformanceNavigation&&((e=performance==null?void 0:performance.navigation)==null?void 0:e.type)!==null&&((t=performance==null?void 0:performance.navigation)==null?void 0:t.type)!==void 0){const r=performance.navigation.type;switch(r){case PerformanceNavigation.TYPE_NAVIGATE:return"navigate";case PerformanceNavigation.TYPE_RELOAD:return"reload";case PerformanceNavigation.TYPE_BACK_FORWARD:return"back_forward";default:return`unknown: ${r}`}}}catch{}}function Mr(){try{let e="PerformanceNavigationTiming",t=Vr();return t||(t=Rr(),e="performance.navigation"),t?[t,e]:["unknown","unknown"]}catch{}return["error","error"]}function $r(e){const{cartCreate:t,checkoutUrl:r}=ae(),[n,i]=s.useState(!1),{quantity:o,variantId:u,onClick:a,attributes:h,children:y,...l}=e;s.useEffect(()=>{r&&(window.location.href=r)},[r]);const d=s.useCallback(()=>{i(!0),t({lines:[{quantity:o??1,merchandiseId:u,attributes:h}]})},[t,o,u,h]);return s.createElement(Ie,{disabled:n??l.disabled,...l,onClick:a,defaultOnClick:d},y)}function xr(e){const[t,r]=s.useState(!1),{status:n,checkoutUrl:i}=ae(),{children:o,...u}=e;return s.useEffect(()=>{t&&i&&n==="idle"&&(window.location.href=i)},[t,n,i]),s.createElement(Ie,{...u,disabled:t||u.disabled,onClick:()=>r(!0)},o)}function it(e){const{countryIsoCode:t,languageIsoCode:r}=fe(),n=`${r}-${t}`;if(!n)throw new Error("useMoney(): Unable to get 'locale' from 'useShop()', which means that 'locale' was not passed to '<ShopifyProvider/>'. 'locale' is required for 'useMoney()' to work");const i=parseFloat(e.amount),o=s.useMemo(()=>({style:"currency",currency:e.currencyCode}),[e.currencyCode]),u=ee(n,o),a=ee(n,{...o,currencyDisplay:"name"}),h=ee(n,{...o,currencyDisplay:"narrowSymbol"}),y=ee(n,{...o,minimumFractionDigits:0,maximumFractionDigits:0}),l=ee(n),d=ee(n,{minimumFractionDigits:0,maximumFractionDigits:0}),p=g=>g.type==="currency",E=s.useMemo(()=>({original:()=>e,currencyCode:()=>e.currencyCode,localizedString:()=>u().format(i),parts:()=>u().formatToParts(i),withoutTrailingZeros:()=>i%1===0?y().format(i):u().format(i),withoutTrailingZerosAndCurrency:()=>i%1===0?d().format(i):l().format(i),currencyName:()=>{var g;return((g=a().formatToParts(i).find(p))==null?void 0:g.value)??e.currencyCode},currencySymbol:()=>{var g;return((g=u().formatToParts(i).find(p))==null?void 0:g.value)??e.currencyCode},currencyNarrowSymbol:()=>{var g;return((g=h().formatToParts(i).find(p))==null?void 0:g.value)??""},amount:()=>u().formatToParts(i).filter(g=>["decimal","fraction","group","integer","literal"].includes(g.type)).map(g=>g.value).join("")}),[e,i,a,u,h,l,y,d]);return s.useMemo(()=>new Proxy(E,{get:(g,b)=>{var _;return(_=Reflect.get(g,b))==null?void 0:_.call(null)}}),[E])}function ee(e,t){return s.useMemo(()=>{let r;return()=>r??(r=new Intl.NumberFormat(e,t))},[e,t])}function ue({data:e,as:t,withoutCurrency:r,withoutTrailingZeros:n,measurement:i,measurementSeparator:o="/",...u}){if(!qr(e))throw new Error("<Money/> needs a valid 'data' prop that has 'amount' and 'currencyCode'");const a=it(e),h=t??"div";let y=a.localizedString;return(r||n)&&(r&&!n?y=a.amount:!r&&n?y=a.withoutTrailingZeros:y=a.withoutTrailingZerosAndCurrency),s.createElement(h,{...u},y,i&&i.referenceUnit&&s.createElement(s.Fragment,null,o,i.referenceUnit))}function qr(e){return typeof e.amount=="string"&&!!e.amount&&typeof e.currencyCode=="string"&&!!e.currencyCode}function Fr(e){const{cost:t}=ae(),{amountType:r="total",children:n,...i}=e;let o;return r=="total"?o=t==null?void 0:t.totalAmount:r=="subtotal"?o=t==null?void 0:t.subtotalAmount:r=="tax"?o=t==null?void 0:t.totalTaxAmount:r=="duty"&&(o=t==null?void 0:t.totalDutyAmount),o==null?null:s.createElement(ue,{...i,data:o},n)}function Br(e){var o,u;const{data:t,priceType:r="regular",...n}=e;if(t==null)throw new Error("<CartLinePrice/> requires a cart line as the 'data' prop");const i=r==="regular"?(o=t.cost)==null?void 0:o.totalAmount:(u=t.cost)==null?void 0:u.compareAtAmountPerQuantity;return i==null?null:s.createElement(ue,{...n,data:i})}const ut=s.createContext(null);function Hr(){const e=s.useContext(ut);if(e==null)throw new Error("Expected a cart line context but none was found");return e}function Gr({children:e,line:t}){return s.createElement(ut.Provider,{value:t},e)}const jr={DateTime:"string",Decimal:"string",HTML:"string",URL:"string",Color:"string",UnsignedInt64:"string"};function st(e){const{data:t,options:r,id:n=t.id,frameBorder:i="0",allow:o="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:u=!0,loading:a="lazy",...h}=e;if(!t.embedUrl)throw new Error("<ExternalVideo/> requires the 'embedUrl' property");let y=t.embedUrl;if(r){const l=new URL(t.embedUrl);for(const d of Object.keys(r))l.searchParams.set(d,r[d]);y=l.toString()}return s.createElement("iframe",{...h,id:n??t.embedUrl,title:t.alt??t.id??"external video",frameBorder:i,allow:o,allowFullScreen:u,src:y,loading:a})}const Yr=["cdn.shopify.com","cdn.shopifycdn.net","shopify-assets.shopifycdn.com","shopify-assets.shopifycdn.net"],Wr=["spin.dev"],Zr=[...Yr,...Wr],se=[352,832,1200,1920,2560];function ct({src:e,width:t,height:r,crop:n,scale:i}){const o=new URL(e),u=i??1;if(t){let a;typeof t=="string"?a=(se[0]*u).toString():a=(Number(t)*u).toString(),o.searchParams.append("width",a)}return r&&typeof r=="number"&&o.searchParams.append("height",(r*u).toString()),n&&o.searchParams.append("crop",n),o.toString()}function lt(e){const t=new URL(e.src);return!Zr.some(n=>t.hostname.endsWith(n))||!e.width&&!e.height&&!e.crop&&!e.scale?e.src:ct(e)}function zr({data:e,loaderOptions:t,elementProps:r}){let n=null;return e!=null&&e.width&&(e!=null&&e.height)&&(n=(e==null?void 0:e.width)/(e==null?void 0:e.height)),t!=null&&t.width||t!=null&&t.height?{width:(t==null?void 0:t.width)??(n&&typeof t.height=="number"?Math.round(n*t.height):null),height:(t==null?void 0:t.height)??(n&&typeof t.width=="number"?Math.round(n*t.width):null)}:r!=null&&r.width||r!=null&&r.height?{width:(r==null?void 0:r.width)??(n&&typeof r.height=="number"?Math.round(n*r.height):null),height:(r==null?void 0:r.height)??(n&&typeof r.width=="number"?Math.round(n*r.width):null)}:e!=null&&e.width||e!=null&&e.height?{width:(e==null?void 0:e.width)??null,height:(e==null?void 0:e.height)??null}:{width:null,height:null}}function dt({data:e,width:t,height:r,loading:n,loader:i=lt,loaderOptions:o,widths:u,decoding:a="async",...h}){if(!e.url){const g=`<Image/>: the 'data' prop requires the 'url' property. Image: ${e.id??"no ID provided"}`;return console.error(g),null}const{width:y,height:l}=zr({data:e,loaderOptions:o,elementProps:{width:t,height:r}});let d=e.url;if(i&&(d=i({...o,src:e.url,width:y,height:l}),typeof d!="string"||!d))throw new Error(`<Image/>: 'loader' did not return a valid string. Image: ${e.id??e.url}`);const p=t&&y&&t<y?t:y,E=h.srcSet??Kr({...o,widths:u,src:e.url,width:p,height:l,loader:i});return Q.createElement("img",{id:e.id??"",alt:e.altText??h.alt??"",loading:n??"lazy",...h,src:d,width:y??void 0,height:l??void 0,srcSet:E,decoding:a})}function Kr({src:e,width:t,crop:r,scale:n,widths:i,loader:o,height:u}){const a=i&&Array.isArray(i);if(a&&i.some(d=>isNaN(d)))throw new Error(`<Image/>: the 'widths' must be an array of numbers. Image: ${e}`);let h=1;t&&u&&(h=Number(u)/Number(t));let y=a?i:se;!a&&t&&t<se[se.length-1]&&(y=se.filter(d=>d<=t));const l=o||ct;return y.map(d=>`${l({src:e,width:d,height:r?Number(d)*h:void 0,crop:r,scale:n})} ${d}w`).join(", ")}function ft(e){var y;const{data:t,previewImageOptions:r,id:n=t.id,playsInline:i=!0,controls:o=!0,sourceProps:u={},...a}=e,h=lt({src:((y=t.previewImage)==null?void 0:y.url)??"",...r});if(!t.sources)throw new Error("<Video/> requires a 'data.sources' array");return s.createElement("video",{...a,id:n,playsInline:i,controls:o,poster:h},t.sources.map(l=>{if(!(l!=null&&l.url&&(l!=null&&l.mimeType)))throw new Error("<Video/> needs 'source.url' and 'source.mimeType'");return s.createElement("source",{...u,key:l.url,src:l.url,type:l.mimeType})}))}const yt={};function Qr(e,t){const r=yt[e];if(r)return r;const n=new Promise((i,o)=>{const u=document.createElement("script");t!=null&&t.module?u.type="module":u.type="text/javascript",u.src=e,u.onload=()=>{i(!0)},u.onerror=()=>{o(!1)},(t==null?void 0:t.in)==="head"?document.head.appendChild(u):document.body.appendChild(u)});return yt[e]=n,n}function ht(e,t){const[r,n]=s.useState("loading"),i=JSON.stringify(t);return s.useEffect(()=>{async function o(){try{n("loading"),await Qr(e,t),n("done")}catch{n("error")}}o()},[e,i,t]),r}function gt(e){var y,l,d;const[t,r]=s.useState(void 0),n=s.useCallback(p=>{r(p)},[]),{data:i,children:o,className:u,...a}=e,h=ht("https://unpkg.com/@google/model-viewer@v1.12.1/dist/model-viewer.min.js",{module:!0});return s.useEffect(()=>{if(t)return a.onError&&t.addEventListener("error",a.onError),a.onLoad&&t.addEventListener("load",a.onLoad),a.onPreload&&t.addEventListener("preload",a.onPreload),a.onModelVisibility&&t.addEventListener("model-visibility",a.onModelVisibility),a.onProgress&&t.addEventListener("progress",a.onProgress),a.onArStatus&&t.addEventListener("ar-status",a.onArStatus),a.onArTracking&&t.addEventListener("ar-tracking",a.onArTracking),a.onQuickLookButtonTapped&&t.addEventListener("quick-look-button-tapped",a.onQuickLookButtonTapped),a.onCameraChange&&t.addEventListener("camera-change",a.onCameraChange),a.onEnvironmentChange&&t.addEventListener("environment-change",a.onEnvironmentChange),a.onPlay&&t.addEventListener("play",a.onPlay),a.onPause&&t.addEventListener("ar-status",a.onPause),a.onSceneGraphReady&&t.addEventListener("scene-graph-ready",a.onSceneGraphReady),()=>{t!=null&&(a.onError&&t.removeEventListener("error",a.onError),a.onLoad&&t.removeEventListener("load",a.onLoad),a.onPreload&&t.removeEventListener("preload",a.onPreload),a.onModelVisibility&&t.removeEventListener("model-visibility",a.onModelVisibility),a.onProgress&&t.removeEventListener("progress",a.onProgress),a.onArStatus&&t.removeEventListener("ar-status",a.onArStatus),a.onArTracking&&t.removeEventListener("ar-tracking",a.onArTracking),a.onQuickLookButtonTapped&&t.removeEventListener("quick-look-button-tapped",a.onQuickLookButtonTapped),a.onCameraChange&&t.removeEventListener("camera-change",a.onCameraChange),a.onEnvironmentChange&&t.removeEventListener("environment-change",a.onEnvironmentChange),a.onPlay&&t.removeEventListener("play",a.onPlay),a.onPause&&t.removeEventListener("ar-status",a.onPause),a.onSceneGraphReady&&t.removeEventListener("scene-graph-ready",a.onSceneGraphReady))}},[t,a.onArStatus,a.onArTracking,a.onCameraChange,a.onEnvironmentChange,a.onError,a.onLoad,a.onModelVisibility,a.onPause,a.onPlay,a.onPreload,a.onProgress,a.onQuickLookButtonTapped,a.onSceneGraphReady]),h!=="done"?null:(l=(y=i.sources)==null?void 0:y[0])!=null&&l.url?s.createElement("model-viewer",{ref:n,...a,className:u,id:a.id??i.id,src:i.sources[0].url,alt:i.alt??null,"camera-controls":a.cameraControls??!0,poster:(a.poster||((d=i.previewImage)==null?void 0:d.url))??null,autoplay:a.autoplay??!0,loading:a.loading,reveal:a.reveal,ar:a.ar,"ar-modes":a.arModes,"ar-scale":a.arScale,"ar-placement":a.arPlacement,"ios-src":a.iosSrc,"touch-action":a.touchAction,"disable-zoom":a.disableZoom,"orbit-sensitivity":a.orbitSensitivity,"auto-rotate":a.autoRotate,"auto-rotate-delay":a.autoRotateDelay,"rotation-per-second":a.rotationPerSecond,"interaction-policy":a.interactionPolicy,"interaction-prompt":a.interactionPrompt,"interaction-prompt-style":a.interactionPromptStyle,"interaction-prompt-threshold":a.interactionPromptThreshold,"camera-orbit":a.cameraOrbit,"camera-target":a.cameraTarget,"field-of-view":a.fieldOfView,"max-camera-orbit":a.maxCameraOrbit,"min-camera-orbit":a.minCameraOrbit,"max-field-of-view":a.maxFieldOfView,"min-field-of-view":a.minFieldOfView,bounds:a.bounds,"interpolation-decay":a.interpolationDecay??100,"skybox-image":a.skyboxImage,"environment-image":a.environmentImage,exposure:a.exposure,"shadow-intensity":a.shadowIntensity??0,"shadow-softness":a.shadowSoftness??0,"animation-name":a.animationName,"animation-crossfade-duration":a.animationCrossfadeDuration,"variant-name":a.variantName,orientation:a.orientation,scale:a.scale},o):(console.error("<ModelViewer/> requires 'data.sources' prop to be an array, with an object that has a property 'url' on it. Rendering 'null'"),null)}function Jr({data:e,mediaOptions:t,...r}){switch(e.__typename){case"MediaImage":return e.image?s.createElement(dt,{...r,...t==null?void 0:t.image,data:e.image}):(console.warn("<MediaFile/>: 'data.image' does not exist for __typename of 'MediaImage'; rendering 'null' by default."),null);case"Video":return s.createElement(ft,{...r,...t==null?void 0:t.video,data:e});case"ExternalVideo":return s.createElement(st,{...r,...t==null?void 0:t.externalVideo,data:e});case"Model3d":return s.createElement(gt,{...r,...t==null?void 0:t.modelViewer,data:e});default:return console.error("<MediaFile /> requires the '__typename' property to exist on the 'data' prop in order to render the matching sub-component for this type of media. Rendering 'null' by default"),null}}function Xr(e){if(!e.type)return console.error("parseMetafield(): The 'type' field is required in order to parse the Metafield. Returning 'parsedValue' of 'null'"),{...e,parsedValue:null};switch(e.type){case"boolean":return{...e,parsedValue:e.value==="true"};case"collection_reference":case"file_reference":case"page_reference":case"product_reference":case"variant_reference":return{...e,parsedValue:e.reference};case"color":case"multi_line_text_field":case"single_line_text_field":case"url":return{...e,parsedValue:e.value};case"dimension":case"money":case"json":case"rating":case"volume":case"weight":case"list.color":case"list.dimension":case"list.number_integer":case"list.number_decimal":case"list.rating":case"list.single_line_text_field":case"list.url":case"list.volume":case"list.weight":{let t=null;try{t=mt(e.value??"")}catch{console.error("parseMetafield(): attempted to JSON.parse the 'metafield.value' property, but failed. Returning 'null' for 'parsedValue'"),t=null}return{...e,parsedValue:t}}case"date":case"date_time":return{...e,parsedValue:new Date(e.value??"")};case"list.date":case"list.date_time":{const t=mt((e==null?void 0:e.value)??"");return{...e,parsedValue:t.map(r=>new Date(r))}}case"number_decimal":case"number_integer":return{...e,parsedValue:Number(e.value)};case"list.collection_reference":case"list.file_reference":case"list.page_reference":case"list.product_reference":case"list.variant_reference":return{...e,parsedValue:H(e.references??void 0)};default:{const t=`parseMetafield(): the 'metafield.type' you passed in is not supported. Your type: "${e.type}". If you believe this is an error, please open an issue on GitHub.`;return console.error(`${t} Returning 'parsedValue' of 'null'`),{...e,parsedValue:null}}}}function mt(e){return String(e).includes("__proto__")?JSON.parse(e,(t,r)=>{if(t!=="__proto__")return r}):JSON.parse(e)}function en(e){var y,l,d,p,E,g;const{priceType:t="regular",variantId:r,valueType:n="min",data:i,...o}=e;if(i==null)throw new Error("<ProductPrice/> requires a product as the 'data' prop");let u,a;const h=r?H((i==null?void 0:i.variants)??{}).find(b=>(b==null?void 0:b.id)===r)??null:null;if(t==="compareAt")if(r&&h){if(((y=h.compareAtPriceV2)==null?void 0:y.amount)===((l=h.priceV2)==null?void 0:l.amount))return null;u=h.compareAtPriceV2}else n==="max"?u=(d=i==null?void 0:i.compareAtPriceRange)==null?void 0:d.maxVariantPrice:u=(p=i==null?void 0:i.compareAtPriceRange)==null?void 0:p.minVariantPrice;else r&&h?(u=h.priceV2,n==="unit"&&(u=h.unitPrice,a=h.unitPriceMeasurement)):n==="max"?u=(E=i.priceRange)==null?void 0:E.maxVariantPrice:u=(g=i.priceRange)==null?void 0:g.minVariantPrice;return u?a?s.createElement(ue,{...o,data:u,measurement:a}):s.createElement(ue,{...o,data:u}):null}const tn="https://cdn.shopify.com/shopifycloud/shop-js/v1.0/client.js";function rn({variantIds:e,className:t,variantIdsAndQuantities:r,width:n}){const{storeDomain:i}=fe(),o=ht(tn);let u=[];if(e&&r)throw new Error(on);if(e)u=e.reduce((h,y)=>{const l=G(y).id;return l&&h.push(l),h},[]);else if(r)u=r.reduce((h,y)=>{const l=G(y==null?void 0:y.id).id;return l&&h.push(`${l}:${(y==null?void 0:y.quantity)??1}`),h},[]);else throw new Error(an);if(u.length===0)throw new Error(nn);const a=n?{"--shop-pay-button-width":n}:void 0;return s.createElement("div",{className:t,style:a},o==="done"&&s.createElement("shop-pay-button",{"store-url":i,variants:u.join(",")}))}const nn='You must pass in "variantIds" in the form of ["gid://shopify/ProductVariant/1"]',an='You must pass in either "variantIds" or "variantIdsAndQuantities" to ShopPayButton',on="You must provide either a variantIds or variantIdsAndQuantities prop, but not both in the ShopPayButton component",un=60*60*24*360*1,sn=60*30;function cn(e){const{hasUserConsent:t=!1,domain:r=""}=e||{};s.useEffect(()=>{const n=he(document.cookie);t?(me(W,n[W]||ye(),un,r),me(Z,n[Z]||ye(),sn,r)):(me(W,"",0,r),me(Z,"",0,r))})}function me(e,t,r,n){document.cookie=nr(e,t,{maxage:r,domain:n,samesite:"Lax",path:"/"})}A.AddToCartButton=pr,A.AnalyticsEventName=De,A.AnalyticsPageType=ge,A.BuyNowButton=$r,A.CartCheckoutButton=xr,A.CartCost=Fr,A.CartLinePrice=Br,A.CartLineProvider=Gr,A.CartProvider=dr,A.ExternalVideo=st,A.Image=dt,A.MediaFile=Jr,A.ModelViewer=gt,A.Money=ue,A.ProductPrice=en,A.ProductProvider=gr,A.ShopPayButton=rn,A.ShopifyProvider=Qt,A.ShopifySalesChannel=rt,A.Video=ft,A.createStorefrontClient=zt,A.flattenConnection=H,A.getClientBrowserParameters=Nr,A.getShopifyCookies=he,A.parseMetafield=Xr,A.sendShopifyAnalytics=Ur,A.storefrontApiCustomScalars=jr,A.useCart=ae,A.useCartLine=Hr,A.useMoney=it,A.useProduct=Je,A.useShop=fe,A.useShopifyCookies=cn,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|
|
279
|
+
`,u.message)})}).catch(n=>{console.error(at,n)})}catch{return Promise.resolve()}}function Nr(){if(_r("getClientBrowserParameters"))return{uniqueToken:"",visitToken:"",url:"",path:"",search:"",referrer:"",title:"",userAgent:"",navigationType:"",navigationApi:""};const[e,t]=Mr(),r=he(document.cookie);return{uniqueToken:r[W],visitToken:r[Z],url:location.href,path:location.pathname,search:location.search,referrer:document.referrer,title:document.title,userAgent:navigator.userAgent,navigationType:e,navigationApi:t}}function Vr(){try{const e=(performance==null?void 0:performance.getEntriesByType)&&(performance==null?void 0:performance.getEntriesByType("navigation"));if(e&&e[0]){const t=window.performance.getEntriesByType("navigation")[0].type;return t&&t.toString()}}catch{}}function Rr(){var e,t;try{if(PerformanceNavigation&&((e=performance==null?void 0:performance.navigation)==null?void 0:e.type)!==null&&((t=performance==null?void 0:performance.navigation)==null?void 0:t.type)!==void 0){const r=performance.navigation.type;switch(r){case PerformanceNavigation.TYPE_NAVIGATE:return"navigate";case PerformanceNavigation.TYPE_RELOAD:return"reload";case PerformanceNavigation.TYPE_BACK_FORWARD:return"back_forward";default:return`unknown: ${r}`}}}catch{}}function Mr(){try{let e="PerformanceNavigationTiming",t=Vr();return t||(t=Rr(),e="performance.navigation"),t?[t,e]:["unknown","unknown"]}catch{}return["error","error"]}function $r(e){const{cartCreate:t,checkoutUrl:r}=oe(),[n,a]=s.useState(!1),{quantity:u,variantId:i,onClick:o,attributes:h,children:y,...l}=e;s.useEffect(()=>{r&&(window.location.href=r)},[r]);const d=s.useCallback(()=>{a(!0),t({lines:[{quantity:u??1,merchandiseId:i,attributes:h}]})},[t,u,i,h]);return s.createElement(Ie,{disabled:n??l.disabled,...l,onClick:o,defaultOnClick:d},y)}function xr(e){const[t,r]=s.useState(!1),{status:n,checkoutUrl:a}=oe(),{children:u,...i}=e;return s.useEffect(()=>{t&&a&&n==="idle"&&(window.location.href=a)},[t,n,a]),s.createElement(Ie,{...i,disabled:t||i.disabled,onClick:()=>r(!0)},u)}function it(e){const{countryIsoCode:t,languageIsoCode:r}=fe(),n=`${r}-${t}`;if(!n)throw new Error("useMoney(): Unable to get 'locale' from 'useShop()', which means that 'locale' was not passed to '<ShopifyProvider/>'. 'locale' is required for 'useMoney()' to work");const a=parseFloat(e.amount),u=s.useMemo(()=>({style:"currency",currency:e.currencyCode}),[e.currencyCode]),i=ee(n,u),o=ee(n,{...u,currencyDisplay:"name"}),h=ee(n,{...u,currencyDisplay:"narrowSymbol"}),y=ee(n,{...u,minimumFractionDigits:0,maximumFractionDigits:0}),l=ee(n),d=ee(n,{minimumFractionDigits:0,maximumFractionDigits:0}),p=g=>g.type==="currency",E=s.useMemo(()=>({original:()=>e,currencyCode:()=>e.currencyCode,localizedString:()=>i().format(a),parts:()=>i().formatToParts(a),withoutTrailingZeros:()=>a%1===0?y().format(a):i().format(a),withoutTrailingZerosAndCurrency:()=>a%1===0?d().format(a):l().format(a),currencyName:()=>{var g;return((g=o().formatToParts(a).find(p))==null?void 0:g.value)??e.currencyCode},currencySymbol:()=>{var g;return((g=i().formatToParts(a).find(p))==null?void 0:g.value)??e.currencyCode},currencyNarrowSymbol:()=>{var g;return((g=h().formatToParts(a).find(p))==null?void 0:g.value)??""},amount:()=>i().formatToParts(a).filter(g=>["decimal","fraction","group","integer","literal"].includes(g.type)).map(g=>g.value).join("")}),[e,a,o,i,h,l,y,d]);return s.useMemo(()=>new Proxy(E,{get:(g,b)=>{var _;return(_=Reflect.get(g,b))==null?void 0:_.call(null)}}),[E])}function ee(e,t){return s.useMemo(()=>{let r;return()=>r??(r=new Intl.NumberFormat(e,t))},[e,t])}function ue({data:e,as:t,withoutCurrency:r,withoutTrailingZeros:n,measurement:a,measurementSeparator:u="/",...i}){if(!qr(e))throw new Error("<Money/> needs a valid 'data' prop that has 'amount' and 'currencyCode'");const o=it(e),h=t??"div";let y=o.localizedString;return(r||n)&&(r&&!n?y=o.amount:!r&&n?y=o.withoutTrailingZeros:y=o.withoutTrailingZerosAndCurrency),s.createElement(h,{...i},y,a&&a.referenceUnit&&s.createElement(s.Fragment,null,u,a.referenceUnit))}function qr(e){return typeof e.amount=="string"&&!!e.amount&&typeof e.currencyCode=="string"&&!!e.currencyCode}function Fr(e){const{cost:t}=oe(),{amountType:r="total",children:n,...a}=e;let u;return r=="total"?u=t==null?void 0:t.totalAmount:r=="subtotal"?u=t==null?void 0:t.subtotalAmount:r=="tax"?u=t==null?void 0:t.totalTaxAmount:r=="duty"&&(u=t==null?void 0:t.totalDutyAmount),u==null?null:s.createElement(ue,{...a,data:u},n)}function Br(e){var u,i;const{data:t,priceType:r="regular",...n}=e;if(t==null)throw new Error("<CartLinePrice/> requires a cart line as the 'data' prop");const a=r==="regular"?(u=t.cost)==null?void 0:u.totalAmount:(i=t.cost)==null?void 0:i.compareAtAmountPerQuantity;return a==null?null:s.createElement(ue,{...n,data:a})}const ut=s.createContext(null);function Hr(){const e=s.useContext(ut);if(e==null)throw new Error("Expected a cart line context but none was found");return e}function Gr({children:e,line:t}){return s.createElement(ut.Provider,{value:t},e)}const jr={DateTime:"string",Decimal:"string",HTML:"string",URL:"string",Color:"string",UnsignedInt64:"string"};function st(e){const{data:t,options:r,id:n=t.id,frameBorder:a="0",allow:u="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:i=!0,loading:o="lazy",...h}=e;if(!t.embedUrl)throw new Error("<ExternalVideo/> requires the 'embedUrl' property");let y=t.embedUrl;if(r){const l=new URL(t.embedUrl);for(const d of Object.keys(r))l.searchParams.set(d,r[d]);y=l.toString()}return s.createElement("iframe",{...h,id:n??t.embedUrl,title:t.alt??t.id??"external video",frameBorder:a,allow:u,allowFullScreen:i,src:y,loading:o})}const Yr=["cdn.shopify.com","cdn.shopifycdn.net","shopify-assets.shopifycdn.com","shopify-assets.shopifycdn.net"],Wr=["spin.dev"],Zr=[...Yr,...Wr],se=[352,832,1200,1920,2560];function ct({src:e,width:t,height:r,crop:n,scale:a}){const u=new URL(e),i=a??1;if(t){let o;typeof t=="string"?o=(se[0]*i).toString():o=(Number(t)*i).toString(),u.searchParams.append("width",o)}return r&&typeof r=="number"&&u.searchParams.append("height",(r*i).toString()),n&&u.searchParams.append("crop",n),u.toString()}function lt(e){const t=new URL(e.src);return!Zr.some(n=>t.hostname.endsWith(n))||!e.width&&!e.height&&!e.crop&&!e.scale?e.src:ct(e)}function zr({data:e,loaderOptions:t,elementProps:r}){let n=null;return e!=null&&e.width&&(e!=null&&e.height)&&(n=(e==null?void 0:e.width)/(e==null?void 0:e.height)),t!=null&&t.width||t!=null&&t.height?{width:(t==null?void 0:t.width)??(n&&typeof t.height=="number"?Math.round(n*t.height):null),height:(t==null?void 0:t.height)??(n&&typeof t.width=="number"?Math.round(n*t.width):null)}:r!=null&&r.width||r!=null&&r.height?{width:(r==null?void 0:r.width)??(n&&typeof r.height=="number"?Math.round(n*r.height):null),height:(r==null?void 0:r.height)??(n&&typeof r.width=="number"?Math.round(n*r.width):null)}:e!=null&&e.width||e!=null&&e.height?{width:(e==null?void 0:e.width)??null,height:(e==null?void 0:e.height)??null}:{width:null,height:null}}function dt({data:e,width:t,height:r,loading:n,loader:a=lt,loaderOptions:u,widths:i,decoding:o="async",...h}){if(!e.url){const g=`<Image/>: the 'data' prop requires the 'url' property. Image: ${e.id??"no ID provided"}`;return console.error(g),null}const{width:y,height:l}=zr({data:e,loaderOptions:u,elementProps:{width:t,height:r}});let d=e.url;if(a&&(d=a({...u,src:e.url,width:y,height:l}),typeof d!="string"||!d))throw new Error(`<Image/>: 'loader' did not return a valid string. Image: ${e.id??e.url}`);const p=t&&y&&t<y?t:y,E=h.srcSet??Kr({...u,widths:i,src:e.url,width:p,height:l,loader:a});return Q.createElement("img",{id:e.id??"",alt:e.altText??h.alt??"",loading:n??"lazy",...h,src:d,width:y??void 0,height:l??void 0,srcSet:E,decoding:o})}function Kr({src:e,width:t,crop:r,scale:n,widths:a,loader:u,height:i}){const o=a&&Array.isArray(a);if(o&&a.some(d=>isNaN(d)))throw new Error(`<Image/>: the 'widths' must be an array of numbers. Image: ${e}`);let h=1;t&&i&&(h=Number(i)/Number(t));let y=o?a:se;!o&&t&&t<se[se.length-1]&&(y=se.filter(d=>d<=t));const l=u||ct;return y.map(d=>`${l({src:e,width:d,height:r?Number(d)*h:void 0,crop:r,scale:n})} ${d??""}w`).join(", ")}function ft(e){var y;const{data:t,previewImageOptions:r,id:n=t.id,playsInline:a=!0,controls:u=!0,sourceProps:i={},...o}=e,h=lt({src:((y=t.previewImage)==null?void 0:y.url)??"",...r});if(!t.sources)throw new Error("<Video/> requires a 'data.sources' array");return s.createElement("video",{...o,id:n,playsInline:a,controls:u,poster:h},t.sources.map(l=>{if(!(l!=null&&l.url&&(l!=null&&l.mimeType)))throw new Error("<Video/> needs 'source.url' and 'source.mimeType'");return s.createElement("source",{...i,key:l.url,src:l.url,type:l.mimeType})}))}const yt={};function Qr(e,t){const r=yt[e];if(r)return r;const n=new Promise((a,u)=>{const i=document.createElement("script");t!=null&&t.module?i.type="module":i.type="text/javascript",i.src=e,i.onload=()=>{a(!0)},i.onerror=()=>{u(!1)},(t==null?void 0:t.in)==="head"?document.head.appendChild(i):document.body.appendChild(i)});return yt[e]=n,n}function ht(e,t){const[r,n]=s.useState("loading"),a=JSON.stringify(t);return s.useEffect(()=>{async function u(){try{n("loading"),await Qr(e,t),n("done")}catch{n("error")}}u().catch(()=>{n("error")})},[e,a,t]),r}function gt(e){var y,l,d;const[t,r]=s.useState(void 0),n=s.useCallback(p=>{r(p)},[]),{data:a,children:u,className:i,...o}=e,h=ht("https://unpkg.com/@google/model-viewer@v1.12.1/dist/model-viewer.min.js",{module:!0});return s.useEffect(()=>{if(t)return o.onError&&t.addEventListener("error",o.onError),o.onLoad&&t.addEventListener("load",o.onLoad),o.onPreload&&t.addEventListener("preload",o.onPreload),o.onModelVisibility&&t.addEventListener("model-visibility",o.onModelVisibility),o.onProgress&&t.addEventListener("progress",o.onProgress),o.onArStatus&&t.addEventListener("ar-status",o.onArStatus),o.onArTracking&&t.addEventListener("ar-tracking",o.onArTracking),o.onQuickLookButtonTapped&&t.addEventListener("quick-look-button-tapped",o.onQuickLookButtonTapped),o.onCameraChange&&t.addEventListener("camera-change",o.onCameraChange),o.onEnvironmentChange&&t.addEventListener("environment-change",o.onEnvironmentChange),o.onPlay&&t.addEventListener("play",o.onPlay),o.onPause&&t.addEventListener("ar-status",o.onPause),o.onSceneGraphReady&&t.addEventListener("scene-graph-ready",o.onSceneGraphReady),()=>{t!=null&&(o.onError&&t.removeEventListener("error",o.onError),o.onLoad&&t.removeEventListener("load",o.onLoad),o.onPreload&&t.removeEventListener("preload",o.onPreload),o.onModelVisibility&&t.removeEventListener("model-visibility",o.onModelVisibility),o.onProgress&&t.removeEventListener("progress",o.onProgress),o.onArStatus&&t.removeEventListener("ar-status",o.onArStatus),o.onArTracking&&t.removeEventListener("ar-tracking",o.onArTracking),o.onQuickLookButtonTapped&&t.removeEventListener("quick-look-button-tapped",o.onQuickLookButtonTapped),o.onCameraChange&&t.removeEventListener("camera-change",o.onCameraChange),o.onEnvironmentChange&&t.removeEventListener("environment-change",o.onEnvironmentChange),o.onPlay&&t.removeEventListener("play",o.onPlay),o.onPause&&t.removeEventListener("ar-status",o.onPause),o.onSceneGraphReady&&t.removeEventListener("scene-graph-ready",o.onSceneGraphReady))}},[t,o.onArStatus,o.onArTracking,o.onCameraChange,o.onEnvironmentChange,o.onError,o.onLoad,o.onModelVisibility,o.onPause,o.onPlay,o.onPreload,o.onProgress,o.onQuickLookButtonTapped,o.onSceneGraphReady]),h!=="done"?null:(l=(y=a.sources)==null?void 0:y[0])!=null&&l.url?s.createElement("model-viewer",{ref:n,...o,className:i,id:o.id??a.id,src:a.sources[0].url,alt:a.alt??null,"camera-controls":o.cameraControls??!0,poster:(o.poster||((d=a.previewImage)==null?void 0:d.url))??null,autoplay:o.autoplay??!0,loading:o.loading,reveal:o.reveal,ar:o.ar,"ar-modes":o.arModes,"ar-scale":o.arScale,"ar-placement":o.arPlacement,"ios-src":o.iosSrc,"touch-action":o.touchAction,"disable-zoom":o.disableZoom,"orbit-sensitivity":o.orbitSensitivity,"auto-rotate":o.autoRotate,"auto-rotate-delay":o.autoRotateDelay,"rotation-per-second":o.rotationPerSecond,"interaction-policy":o.interactionPolicy,"interaction-prompt":o.interactionPrompt,"interaction-prompt-style":o.interactionPromptStyle,"interaction-prompt-threshold":o.interactionPromptThreshold,"camera-orbit":o.cameraOrbit,"camera-target":o.cameraTarget,"field-of-view":o.fieldOfView,"max-camera-orbit":o.maxCameraOrbit,"min-camera-orbit":o.minCameraOrbit,"max-field-of-view":o.maxFieldOfView,"min-field-of-view":o.minFieldOfView,bounds:o.bounds,"interpolation-decay":o.interpolationDecay??100,"skybox-image":o.skyboxImage,"environment-image":o.environmentImage,exposure:o.exposure,"shadow-intensity":o.shadowIntensity??0,"shadow-softness":o.shadowSoftness??0,"animation-name":o.animationName,"animation-crossfade-duration":o.animationCrossfadeDuration,"variant-name":o.variantName,orientation:o.orientation,scale:o.scale},u):(console.error("<ModelViewer/> requires 'data.sources' prop to be an array, with an object that has a property 'url' on it. Rendering 'null'"),null)}function Jr({data:e,mediaOptions:t,...r}){switch(e.__typename){case"MediaImage":return e.image?s.createElement(dt,{...r,...t==null?void 0:t.image,data:e.image}):(console.warn("<MediaFile/>: 'data.image' does not exist for __typename of 'MediaImage'; rendering 'null' by default."),null);case"Video":return s.createElement(ft,{...r,...t==null?void 0:t.video,data:e});case"ExternalVideo":return s.createElement(st,{...r,...t==null?void 0:t.externalVideo,data:e});case"Model3d":return s.createElement(gt,{...r,...t==null?void 0:t.modelViewer,data:e});default:return console.error("<MediaFile /> requires the '__typename' property to exist on the 'data' prop in order to render the matching sub-component for this type of media. Rendering 'null' by default"),null}}function Xr(e){if(!e.type)return console.error("parseMetafield(): The 'type' field is required in order to parse the Metafield. Returning 'parsedValue' of 'null'"),{...e,parsedValue:null};switch(e.type){case"boolean":return{...e,parsedValue:e.value==="true"};case"collection_reference":case"file_reference":case"page_reference":case"product_reference":case"variant_reference":return{...e,parsedValue:e.reference};case"color":case"multi_line_text_field":case"single_line_text_field":case"url":return{...e,parsedValue:e.value};case"dimension":case"money":case"json":case"rating":case"volume":case"weight":case"list.color":case"list.dimension":case"list.number_integer":case"list.number_decimal":case"list.rating":case"list.single_line_text_field":case"list.url":case"list.volume":case"list.weight":{let t=null;try{t=mt(e.value??"")}catch{console.error("parseMetafield(): attempted to JSON.parse the 'metafield.value' property, but failed. Returning 'null' for 'parsedValue'"),t=null}return{...e,parsedValue:t}}case"date":case"date_time":return{...e,parsedValue:new Date(e.value??"")};case"list.date":case"list.date_time":{const t=mt((e==null?void 0:e.value)??"");return{...e,parsedValue:t.map(r=>new Date(r))}}case"number_decimal":case"number_integer":return{...e,parsedValue:Number(e.value)};case"list.collection_reference":case"list.file_reference":case"list.page_reference":case"list.product_reference":case"list.variant_reference":return{...e,parsedValue:H(e.references??void 0)};default:{const t=`parseMetafield(): the 'metafield.type' you passed in is not supported. Your type: "${e.type}". If you believe this is an error, please open an issue on GitHub.`;return console.error(`${t} Returning 'parsedValue' of 'null'`),{...e,parsedValue:null}}}}function mt(e){return String(e).includes("__proto__")?JSON.parse(e,(t,r)=>{if(t!=="__proto__")return r}):JSON.parse(e)}function en(e){var y,l,d,p,E,g;const{priceType:t="regular",variantId:r,valueType:n="min",data:a,...u}=e;if(a==null)throw new Error("<ProductPrice/> requires a product as the 'data' prop");let i,o;const h=r?H((a==null?void 0:a.variants)??{}).find(b=>(b==null?void 0:b.id)===r)??null:null;if(t==="compareAt")if(r&&h){if(((y=h.compareAtPriceV2)==null?void 0:y.amount)===((l=h.priceV2)==null?void 0:l.amount))return null;i=h.compareAtPriceV2}else n==="max"?i=(d=a==null?void 0:a.compareAtPriceRange)==null?void 0:d.maxVariantPrice:i=(p=a==null?void 0:a.compareAtPriceRange)==null?void 0:p.minVariantPrice;else r&&h?(i=h.priceV2,n==="unit"&&(i=h.unitPrice,o=h.unitPriceMeasurement)):n==="max"?i=(E=a.priceRange)==null?void 0:E.maxVariantPrice:i=(g=a.priceRange)==null?void 0:g.minVariantPrice;return i?o?s.createElement(ue,{...u,data:i,measurement:o}):s.createElement(ue,{...u,data:i}):null}const tn="https://cdn.shopify.com/shopifycloud/shop-js/v1.0/client.js";function rn({variantIds:e,className:t,variantIdsAndQuantities:r,width:n}){const{storeDomain:a}=fe(),u=ht(tn);let i=[];if(e&&r)throw new Error(an);if(e)i=e.reduce((h,y)=>{const l=G(y).id;return l&&h.push(l),h},[]);else if(r)i=r.reduce((h,y)=>{const l=G(y==null?void 0:y.id).id;return l&&h.push(`${l}:${(y==null?void 0:y.quantity)??1}`),h},[]);else throw new Error(on);if(i.length===0)throw new Error(nn);const o=n?{"--shop-pay-button-width":n}:void 0;return s.createElement("div",{className:t,style:o},u==="done"&&s.createElement("shop-pay-button",{"store-url":a,variants:i.join(",")}))}const nn='You must pass in "variantIds" in the form of ["gid://shopify/ProductVariant/1"]',on='You must pass in either "variantIds" or "variantIdsAndQuantities" to ShopPayButton',an="You must provide either a variantIds or variantIdsAndQuantities prop, but not both in the ShopPayButton component",un=60*60*24*360*1,sn=60*30;function cn(e){const{hasUserConsent:t=!1,domain:r=""}=e||{};s.useEffect(()=>{const n=he(document.cookie);t?(me(W,n[W]||ye(),un,r),me(Z,n[Z]||ye(),sn,r)):(me(W,"",0,r),me(Z,"",0,r))})}function me(e,t,r,n){document.cookie=nr(e,t,{maxage:r,domain:n,samesite:"Lax",path:"/"})}A.AddToCartButton=pr,A.AnalyticsEventName=De,A.AnalyticsPageType=ge,A.BuyNowButton=$r,A.CartCheckoutButton=xr,A.CartCost=Fr,A.CartLinePrice=Br,A.CartLineProvider=Gr,A.CartProvider=dr,A.ExternalVideo=st,A.Image=dt,A.MediaFile=Jr,A.ModelViewer=gt,A.Money=ue,A.ProductPrice=en,A.ProductProvider=gr,A.ShopPayButton=rn,A.ShopifyProvider=Qt,A.ShopifySalesChannel=rt,A.Video=ft,A.createStorefrontClient=zt,A.flattenConnection=H,A.getClientBrowserParameters=Nr,A.getShopifyCookies=he,A.parseMetafield=Xr,A.sendShopifyAnalytics=Ur,A.storefrontApiCustomScalars=jr,A.useCart=oe,A.useCartLine=Hr,A.useMoney=it,A.useProduct=Je,A.useShop=fe,A.useShopifyCookies=cn,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
|
|
280
280
|
//# sourceMappingURL=hydrogen-react.prod.js.map
|