@shopify/hydrogen 2023.7.13 → 2023.10.1
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/development/index.cjs +639 -165
- package/dist/development/index.cjs.map +1 -1
- package/dist/development/index.js +639 -166
- package/dist/development/index.js.map +1 -1
- package/dist/production/index.cjs +169 -130
- package/dist/production/index.cjs.map +1 -1
- package/dist/production/index.d.cts +63 -26
- package/dist/production/index.d.ts +63 -26
- package/dist/production/index.js +130 -92
- package/dist/production/index.js.map +1 -1
- package/dist/storefront-api-types.d.ts +1046 -979
- package/dist/storefront.schema.json +1 -1
- package/package.json +6 -5
|
@@ -5,14 +5,14 @@ var serverRuntime = require('@remix-run/server-runtime');
|
|
|
5
5
|
var react = require('react');
|
|
6
6
|
var react$1 = require('@remix-run/react');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
-
var
|
|
8
|
+
var tn = require('content-security-policy-builder');
|
|
9
9
|
|
|
10
10
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var tn__default = /*#__PURE__*/_interopDefault(tn);
|
|
13
13
|
|
|
14
|
-
var
|
|
15
|
-
`))||`API response error: ${e.status}`;throw new
|
|
14
|
+
var wt=Object.defineProperty;var Ot=(e,t)=>()=>(e&&(t=e(e=0)),t);var Pt=(e,t)=>{for(var r in t)wt(e,r,{get:t[r],enumerable:!0});};var ot={};Pt(ot,{default:()=>nt,logSeoTags:()=>at});function nt({headTags:e}){return at(e),null}function at(e){console.log(" "),console.log("%cSEO Meta Tags",`${Xt}`),console.log(" "),e.forEach(t=>{if(t.tag==="script"){if(console.log("%c\u2022 JSON LD ",xe),t.children)try{console.table(JSON.parse(t.children),["name","content"]);}catch{console.log(t.children);}}else {if(console.log(`%c\u2022 ${t.tag} `,xe),t.children)if(typeof t.children=="string")console.log(`\u21B3 ${t.children}`);else try{Object.entries(JSON.parse(t.children)).map(([r,n])=>console.log(`\u21B3 ${n}`));}catch{console.log(t.children);}if(t.props.property==="og:image:url"){let r=t.props.content;Zt(r).then(n=>{let a=`font-size: 400px; padding: 10px; background: white url(${n}) no-repeat center; background-size: contain;`;console.log("%c\u2022 Share image preview",xe),console.log("%c ",a),console.log(`\u21B3 ${r}`);}).catch(n=>{console.error(n);});}Object.entries(t.props).map(([r,n])=>{console.log(`\u21B3 ${r} \u2192 ${n}`);});}console.log(" ");});}async function Zt(e){let n=await(await(await fetch(e)).blob()).arrayBuffer();return `data:image/png;base64,${er(n)}`}function er(e){let t="",r=new Uint8Array(e),n=r.byteLength;for(let a=0;a<n;a++)t+=String.fromCharCode(r[a]);return btoa(t)}var xe,Xt,st=Ot(()=>{xe="text-transform: uppercase;",Xt="text-transform: uppercase; font-weight: bold; text-transform: uppercase;font-weight: bold";});function Qe(e){let t=Array.isArray(e)?e:[e],r="";for(let n of t)n!=null&&(typeof n=="object"?r+=JSON.stringify(n):r+=n.toString());return encodeURIComponent(r)}var G="public",bt="private",oe="no-store",Ge={maxAge:"max-age",staleWhileRevalidate:"stale-while-revalidate",sMaxAge:"s-maxage",staleIfError:"stale-if-error"};function L(e){let t=[];return Object.keys(e).forEach(r=>{r==="mode"?t.push(e[r]):Ge[r]&&t.push(`${Ge[r]}=${e[r]}`);}),t.join(", ")}function se(){return {mode:oe}}function ie(e){if(e?.mode&&e?.mode!==G&&e?.mode!==bt)throw Error("'mode' must be either 'public' or 'private'")}function b(e){return ie(e),{mode:G,maxAge:1,staleWhileRevalidate:9,...e}}function ce(e){return ie(e),{mode:G,maxAge:3600,staleWhileRevalidate:82800,...e}}function D(e){return ie(e),{mode:G,maxAge:1,staleWhileRevalidate:86399,...e}}function pe(e){return e}function P(e){return String(e).includes("__proto__")?JSON.parse(e,Dt):JSON.parse(e)}function Dt(e,t){if(e!=="__proto__")return t}function V(e,t){return e&&t?{...e,...t}:e||D()}function ue(e){return L(V(e))}async function Et(e,t){if(!e)return;let r=await e.match(t);if(!r){return}return r}async function Ut(e,t,r,n){if(!e)return;let a=V(n),s=ue(V(a,{maxAge:(a.maxAge||0)+(a.staleWhileRevalidate||0)})),o=ue(V(a));r.headers.set("cache-control",s),r.headers.set("real-cache-control",o),r.headers.set("cache-put-date",new Date().toUTCString()),await e.put(t,r);}async function Mt(e,t){e&&await e.delete(t);}function vt(e,t){let r=e.headers.get("real-cache-control"),n=0;if(r){let s=r.match(/max-age=(\d*)/);s&&s.length>1&&(n=parseFloat(s[1]));}return [(new Date().valueOf()-new Date(t).valueOf())/1e3,n]}function Lt(e,t){let r=t.headers.get("cache-put-date");if(!r)return !1;let[n,a]=vt(t,r),s=n>a;return s}var B={get:Et,set:Ut,delete:Mt,generateDefaultCacheControlHeader:ue,isStale:Lt};function de(e){return `https://shopify.dev/?${e}`}function _t(e){return e||D()}async function Ve(e,t){if(!e)return;let r=de(t),n=new Request(r),a=await B.get(e,n);if(!a)return;let s=await a.text();try{return [P(s),a]}catch{return [s,a]}}async function le(e,t,r,n){if(!e)return;let a=de(t),s=new Request(a),o=new Response(JSON.stringify(r));await B.set(e,s,o,_t(n));}function Be(e,t){return B.isStale(new Request(de(e)),t)}function Nt(e,t){return [e,{status:t.status,statusText:t.statusText,headers:Array.from(t.headers.entries())}]}function je([e,t]){return [e,new Response(e,t)]}var We=e=>!e?.errors,fe=new Set;async function ge(e,t,{strategy:r=b(),cacheInstance:n,shouldCacheResult:a=()=>!0,waitUntil:s,debugInfo:o}){let p=Qe([...typeof e=="string"?[e]:e]),d=void 0;if(!n||!r||r.mode===oe){let f=await t();return f}let u=await Ve(n,p);if(u){let[f,l]=u,C=Be(p,l)?"STALE":"HIT";if(!fe.has(p)&&C==="STALE"){fe.add(p);let y=Promise.resolve().then(async()=>{let g=Date.now();try{let m=await t();a(m)&&(await le(n,p,m,r),d?.("PUT",g));}catch(m){m.message&&(m.message="SWR in sub-request failed: "+m.message),console.error(m);}finally{fe.delete(p);}});s?.(y);}return f}let c=await t();if(a(c)){let f=Promise.resolve().then(async()=>{await le(n,p,c,r);});s?.(f);}return c}async function ze(e,t,{cacheInstance:r,cache:n,cacheKey:a=[e,t],shouldCacheResponse:s=()=>!0,waitUntil:o,returnType:i="json",debugInfo:p}={}){return !n&&(!t.method||t.method==="GET")&&(n=b()),ge(a,async()=>{let d=await fetch(e,t),u;try{u=await d[i]();}catch{try{u=await d.text();}catch{throw new Error(`Storefront API response code: ${d.status} (Request Id: ${d.headers.get("x-request-id")})`)}}return Nt(u,d)},{cacheInstance:r,waitUntil:o,strategy:n??null,debugInfo:p,shouldCacheResult:d=>s(...je(d))}).then(je)}var ye="Custom-Storefront-Request-Group-ID",me="X-Shopify-Storefront-Access-Token",he="X-SDK-Variant",Ce="X-SDK-Variant-Source",Se="X-SDK-Version";function Ke(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`weak-${Math.random().toString(16).substring(2)}`}var _="2023.10.1";function E(e){return e.replace(/\s*#.*$/gm,"").replace(/\s+/gm," ").trim()}var kt=/(^|}\s)query[\s({]/im,qt=/(^|}\s)mutation[\s({]/im;function j(e,t){if(!kt.test(e))throw new Error(`[h2:error:${t}] Can only execute queries`)}function W(e,t){if(!qt.test(e))throw new Error(`[h2:error:${t}] Can only execute mutations`)}function U({response:e,errors:t,type:r,query:n,queryVariables:a,ErrorConstructor:s=Error,client:o="storefront"}){let i=e.headers.get("x-request-id"),p=(typeof t=="string"?t:t?.map?.(d=>d.message).join(`
|
|
15
|
+
`))||`API response error: ${e.status}`;throw new s(`[h2:error:${o}.${r}] `+p+(i?` - Request ID: ${i}`:""),{cause:JSON.stringify({errors:t,requestId:i})})}var Xe=class extends Error{},Vt=e=>e instanceof Xe,Bt={language:"EN",country:"US"};function Gn(e){let {storefrontHeaders:t,cache:r,waitUntil:n,i18n:a,storefrontId:s,...o}=e,{getPublicTokenHeaders:p,getPrivateTokenHeaders:d,getStorefrontApiUrl:u,getShopifyDomain:c}=hydrogenReact.createStorefrontClient(o),l=(o.privateStorefrontToken?d:p)({contentType:"json",buyerIp:t?.buyerIp||""});if(l[ye]=t?.requestGroupId||Ke(),s&&(l[hydrogenReact.SHOPIFY_STOREFRONT_ID_HEADER]=s),(l["user-agent"]=`Hydrogen ${_}`),t&&t.cookie){let g=hydrogenReact.getShopifyCookies(t.cookie??"");g[hydrogenReact.SHOPIFY_Y]&&(l[hydrogenReact.SHOPIFY_STOREFRONT_Y_HEADER]=g[hydrogenReact.SHOPIFY_Y]),g[hydrogenReact.SHOPIFY_S]&&(l[hydrogenReact.SHOPIFY_STOREFRONT_S_HEADER]=g[hydrogenReact.SHOPIFY_S]);}let C=JSON.stringify({"content-type":l["content-type"],"user-agent":l["user-agent"],[he]:l[he],[Ce]:l[Ce],[Se]:l[Se],[me]:l[me]});async function y({query:g,mutation:m,variables:h,cache:A,headers:R=[],storefrontApiVersion:M}){let re=R instanceof Headers?Object.fromEntries(R.entries()):Array.isArray(R)?Object.fromEntries(R):R;g=g??m;let O={...h};a&&(!h?.country&&/\$country/.test(g)&&(O.country=a.country),!h?.language&&/\$language/.test(g)&&(O.language=a.language));let v=u({storefrontApiVersion:M}),H=JSON.stringify({query:g,variables:O}),Q={method:"POST",headers:{...l,...re},body:H},xt=[v,Q.method,C,Q.body],[ne,Fe]=await ze(v,Q,{cacheInstance:m?void 0:r,cache:A||D(),cacheKey:xt,shouldCacheResponse:We,waitUntil:n,debugInfo:{graphql:H,requestId:Q.headers[ye],purpose:t?.purpose}}),$e={response:Fe,type:m?"mutation":"query",query:g,queryVariables:O,errors:void 0};if(!Fe.ok){let ae;try{ae=P(ne);}catch{ae=[{message:ne}];}U({...$e,errors:ae});}let{data:At,errors:He}=ne;return He?.length&&U({...$e,errors:He,ErrorConstructor:Xe}),At}return {storefront:{query:(g,m)=>{g=E(g),j(g,"storefront.query");let h=y({...m,query:g});return h.catch(()=>{}),h},mutate:(g,m)=>{g=E(g),W(g,"storefront.mutate");let h=y({...m,mutation:g});return h.catch(()=>{}),h},cache:r,CacheNone:se,CacheLong:ce,CacheShort:b,CacheCustom:pe,generateCacheControlHeader:L,getPublicTokenHeaders:p,getPrivateTokenHeaders:d,getShopifyDomain:c,getApiUrl:u,isApiError:Vt,i18n:a??Bt}}}function Ze(e,t){let r=e.headers?.get?.(t)??e.headers?.[t];return typeof r=="string"?r:null}function et(e){return e?{requestId:Ze(e,"request-id"),purpose:Ze(e,"purpose")}:{}}function Kn({cache:e,waitUntil:t,request:r}){return function(a,s,o){return ge(a,o,{strategy:s,cacheInstance:e,waitUntil:t,debugInfo:et(r)})}}var Ie=class{#e;constructor(){this.#e=new Map;}add(t){throw new Error("Method not implemented. Use `put` instead.")}addAll(t){throw new Error("Method not implemented. Use `put` instead.")}matchAll(t,r){throw new Error("Method not implemented. Use `match` instead.")}async put(t,r){if(t.method!=="GET")throw new TypeError("Cannot cache response to non-GET request.");if(r.status===206)throw new TypeError("Cannot cache response to a range request (206 Partial Content).");if(r.headers.get("vary")?.includes("*"))throw new TypeError("Cannot cache response with 'Vary: *' header.");this.#e.set(t.url,{body:new Uint8Array(await r.arrayBuffer()),status:r.status,headers:[...r.headers],timestamp:Date.now()});}async match(t){if(t.method!=="GET")return;let r=this.#e.get(t.url);if(!r)return;let{body:n,timestamp:a,...s}=r,o=new Headers(s.headers),i=o.get("cache-control")||o.get("real-cache-control")||"",p=parseInt(i.match(/max-age=(\d+)/)?.[1]||"0",10),d=parseInt(i.match(/stale-while-revalidate=(\d+)/)?.[1]||"0",10),u=(Date.now()-a)/1e3;if(u>p+d){this.#e.delete(t.url);return}let f=u>p;return o.set("cache",f?"STALE":"HIT"),o.set("date",new Date(a).toUTCString()),new Response(n,{status:s.status??200,headers:o})}async delete(t){return this.#e.has(t.url)?(this.#e.delete(t.url),!0):!1}keys(t){let r=[];for(let n of this.#e.keys())(!t||t.url===n)&&r.push(new Request(n));return Promise.resolve(r)}};async function jt(e){let{storefront:t,request:r,noAdminRedirect:n,response:a=new Response("Not Found",{status:404})}=e,{pathname:s,search:o}=new URL(r.url),i=s+o;if(s==="/admin"&&!n)return serverRuntime.redirect(`${t.getShopifyDomain()}/admin`);try{let{urlRedirects:p}=await t.query(zt,{variables:{query:"path:"+i}}),d=p?.edges?.[0]?.node?.target;if(d)return new Response(null,{status:301,headers:{location:d}});let u=new URLSearchParams(o),c=u.get("return_to")||u.get("redirect");if(c){if(Wt(c))return serverRuntime.redirect(c);console.warn(`Cross-domain redirects are not supported. Tried to redirect from ${i} to ${c}`);}}catch(p){console.error(`Failed to fetch redirects from Storefront API for route ${i}`,p);}return a}function Wt(e){return !/^(([a-z+-]+:)?\/\/|[a-z+-]+:)/i.test(e.trim())}var zt=`#graphql
|
|
16
16
|
query redirects($query: String) {
|
|
17
17
|
urlRedirects(first: 1, query: $query) {
|
|
18
18
|
edges {
|
|
@@ -22,86 +22,124 @@ var lt=Object.defineProperty;var ft=(e,t)=>()=>(e&&(t=e(e=0)),t);var yt=(e,t)=>{
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
`;var
|
|
26
|
-
<!DOCTYPE html>
|
|
27
|
-
<html lang="en">
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
`;var Kt=async function({context:t}){let r=t?.storefront;if(!r)throw new Error("GraphiQL: Hydrogen's storefront client must be injected in the loader context.");let n=r.getApiUrl(),a=r.getPublicTokenHeaders()["X-Shopify-Storefront-Access-Token"],s="https://avatars.githubusercontent.com/u/12972006?s=48&v=4",o=String.raw;return new Response(o`
|
|
26
|
+
<!DOCTYPE html>
|
|
27
|
+
<html lang="en">
|
|
28
|
+
<head>
|
|
29
|
+
<title>GraphiQL</title>
|
|
30
|
+
<link rel="icon" type="image/x-icon" href="${s}" />
|
|
31
|
+
<style>
|
|
32
|
+
body {
|
|
33
|
+
height: 100%;
|
|
34
|
+
margin: 0;
|
|
35
|
+
width: 100%;
|
|
36
|
+
overflow: hidden;
|
|
37
|
+
background-color: hsl(219, 29%, 18%);
|
|
38
|
+
}
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
</style>
|
|
40
|
+
#graphiql {
|
|
41
|
+
height: 100vh;
|
|
42
|
+
}
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
></script>
|
|
52
|
-
<link rel="stylesheet" href="https://unpkg.com/graphiql@3/graphiql.min.css" />
|
|
53
|
-
</head>
|
|
44
|
+
#graphiql > .placeholder {
|
|
45
|
+
color: slategray;
|
|
46
|
+
width: fit-content;
|
|
47
|
+
margin: 40px auto;
|
|
48
|
+
font-family: Arial;
|
|
49
|
+
}
|
|
50
|
+
</style>
|
|
54
51
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
<script
|
|
53
|
+
crossorigin
|
|
54
|
+
src="https://unpkg.com/react@18/umd/react.development.js"
|
|
55
|
+
></script>
|
|
56
|
+
<script
|
|
57
|
+
crossorigin
|
|
58
|
+
src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"
|
|
59
|
+
></script>
|
|
60
|
+
<link
|
|
61
|
+
rel="stylesheet"
|
|
62
|
+
href="https://unpkg.com/graphiql@3/graphiql.min.css"
|
|
63
|
+
/>
|
|
64
|
+
<link
|
|
65
|
+
rel="stylesheet"
|
|
66
|
+
href="https://unpkg.com/@graphiql/plugin-explorer/dist/style.css"
|
|
67
|
+
/>
|
|
68
|
+
</head>
|
|
63
69
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (query) query = GraphiQL.GraphQL.print(GraphiQL.GraphQL.parse(query));
|
|
69
|
-
}
|
|
70
|
+
<body>
|
|
71
|
+
<div id="graphiql">
|
|
72
|
+
<div class="placeholder">Loading GraphiQL...</div>
|
|
73
|
+
</div>
|
|
70
74
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
<script
|
|
76
|
+
src="https://unpkg.com/graphiql@3/graphiql.min.js"
|
|
77
|
+
type="application/javascript"
|
|
78
|
+
crossorigin="anonymous"
|
|
79
|
+
></script>
|
|
80
|
+
<script
|
|
81
|
+
src="https://unpkg.com/@graphiql/plugin-explorer/dist/index.umd.js"
|
|
82
|
+
type="application/javascript"
|
|
83
|
+
crossorigin="anonymous"
|
|
84
|
+
></script>
|
|
85
|
+
|
|
86
|
+
<script>
|
|
87
|
+
const windowUrl = new URL(document.URL);
|
|
88
|
+
|
|
89
|
+
let query = '{ shop { name } }';
|
|
90
|
+
if (windowUrl.searchParams.has('query')) {
|
|
91
|
+
query = decodeURIComponent(
|
|
92
|
+
windowUrl.searchParams.get('query') ?? query,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Prettify query
|
|
97
|
+
query = GraphiQL.GraphQL.print(GraphiQL.GraphQL.parse(query));
|
|
98
|
+
|
|
99
|
+
let variables;
|
|
100
|
+
if (windowUrl.searchParams.has('variables')) {
|
|
101
|
+
variables = decodeURIComponent(
|
|
102
|
+
windowUrl.searchParams.get('variables') ?? '',
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Prettify variables
|
|
107
|
+
if (variables) {
|
|
108
|
+
variables = JSON.stringify(JSON.parse(variables), null, 2);
|
|
109
|
+
}
|
|
77
110
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
`,{status:200,headers:{"content-type":"text/html"}})};var A="Error in SEO input: ",F={title:{validate:e=>{if(typeof e!="string")throw new Error(A.concat("`title` should be a string"));if(typeof e=="string"&&e.length>120)throw new Error(A.concat("`title` should not be longer than 120 characters"));return e}},description:{validate:e=>{if(typeof e!="string")throw new Error(A.concat("`description` should be a string"));if(typeof e=="string"&&e.length>155)throw new Error(A.concat("`description` should not be longer than 155 characters"));return e}},url:{validate:e=>{if(typeof e!="string")throw new Error(A.concat("`url` should be a string"));if(typeof e=="string"&&!e.startsWith("http"))throw new Error(A.concat("`url` should be a valid URL"));return e}},handle:{validate:e=>{if(typeof e!="string")throw new Error(A.concat("`handle` should be a string"));if(typeof e=="string"&&!e.startsWith("@"))throw new Error(A.concat("`handle` should start with `@`"));return e}}};function Be(e){let t=[];for(let r of Object.keys(e))switch(r){case"title":{let n=_(F.title,e.title),a=_t(e?.titleTemplate,n);if(!a)break;t.push(S("title",{title:a}),S("meta",{property:"og:title",content:a}),S("meta",{name:"twitter:title",content:a}));break}case"description":{let n=_(F.description,e.description);if(!n)break;t.push(S("meta",{name:"description",content:n}),S("meta",{property:"og:description",content:n}),S("meta",{name:"twitter:description",content:n}));break}case"url":{let n=_(F.url,e.url);if(!n)break;t.push(S("link",{rel:"canonical",href:n}),S("meta",{property:"og:url",content:n}));break}case"handle":{let n=_(F.handle,e.handle);if(!n)break;t.push(S("meta",{name:"twitter:site",content:n}),S("meta",{name:"twitter:creator",content:n}));break}case"media":{let n,a=ue(e.media);for(let o of a)if(typeof o=="string"&&t.push(S("meta",{name:"og:image",content:o})),o&&typeof o=="object"){let s=o.type||"image",i=o?{url:o?.url,secure_url:o?.url,type:$t(o.url),width:o?.width,height:o?.height,alt:o?.altText}:{};for(let u of Object.keys(i))i[u]&&(n=i[u],t.push(S("meta",{property:`og:${s}:${u}`,content:n},i.url)));}break}case"jsonLd":{let n=ue(e.jsonLd),a=0;for(let o of n){if(typeof o!="object")continue;let s=S("script",{type:"application/ld+json",children:JSON.stringify(o)},`json-ld-${o?.["@type"]||o?.name||a++}`);t.push(s);}break}case"alternates":{let n=ue(e.alternates);for(let a of n){if(!a)continue;let{language:o,url:s,default:i}=a,u=o?`${o}${i?"-default":""}`:void 0;t.push(S("link",{rel:"alternate",hrefLang:u,href:s}));}break}case"robots":{if(!e.robots)break;let{maxImagePreview:n,maxSnippet:a,maxVideoPreview:o,noArchive:s,noFollow:i,noImageIndex:u,noIndex:d,noSnippet:p,noTranslate:c,unavailableAfter:y}=e.robots,C=[s&&"noarchive",u&&"noimageindex",p&&"nosnippet",c&&"notranslate",n&&`max-image-preview:${n}`,a&&`max-snippet:${a}`,o&&`max-video-preview:${o}`,y&&`unavailable_after:${y}`],h=(d?"noindex":"index")+","+(i?"nofollow":"follow");for(let l of C)l&&(h+=`,${l}`);t.push(S("meta",{name:"robots",content:h}));break}}return t.flat().sort((r,n)=>r.key.localeCompare(n.key))}function S(e,t,r){let n={tag:e,props:{},key:""};return e==="title"?(n.children=t.title,n.key=ie(n),n):e==="script"?(n.children=typeof t.children=="string"?t.children:"",n.key=ie(n,r),delete t.children,n.props=t,n):(n.props=t,Object.keys(n.props).forEach(a=>!n.props[a]&&delete n.props[a]),n.key=ie(n,r),n)}function ie(e,t){let{tag:r,props:n}=e;if(r==="title")return "0-title";if(r==="meta"){let a=n.content===t&&typeof n.property=="string"&&!n.property.endsWith("secure_url")&&"0";return [r,...[t,a],n.property||n.name].filter(s=>s).join("-")}return r==="link"?[r,n.rel,n.hrefLang||n.media].filter(o=>o).join("-").replace(/\s+/g,"-"):r==="script"?`${r}-${t}`:`${r}-${n.type}`}function _t(e,t){if(t)return e?typeof e=="function"?e(t):e.replace("%s",t??""):t}function $t(e){switch(e&&e.split(".").pop()){case"svg":return "image/svg+xml";case"png":return "image/png";case"gif":return "image/gif";case"swf":return "application/x-shockwave-flash";case"mp3":return "audio/mpeg";case"jpg":case"jpeg":default:return "image/jpeg"}}function ue(e){return Array.isArray(e)?e:[e]}function _(e,t){try{return e.validate(t)}catch(r){return console.warn(r.message),t}}var Wt=react.lazy(()=>Promise.resolve().then(()=>(Je(),Ke)));function Kt({debug:e}){let t=react$1.useMatches(),r=react$1.useLocation(),n=react.useMemo(()=>t.flatMap(s=>{let{handle:i,...u}=s,d={...u,...r},p=i?.seo,c=u?.data?.seo;return !p&&!c?[]:p?$(i.seo,d):[c]}).reduce((s,i)=>{Object.keys(i).forEach(d=>!i[d]&&delete i[d]);let{jsonLd:u}=i;return u?s?.jsonLd?Array.isArray(u)?{...s,...i,jsonLd:[...s.jsonLd,...u]}:{...s,...i,jsonLd:[...s.jsonLd,u]}:{...s,...i,jsonLd:[u]}:{...s,...i}},{}),[t,r]),{html:a,loggerMarkup:o}=react.useMemo(()=>{let s=Be(n),i=s.map(d=>d.tag==="script"?react.createElement(d.tag,{...d.props,key:d.key,dangerouslySetInnerHTML:{__html:d.children}}):react.createElement(d.tag,{...d.props,key:d.key},d.children)),u=react.createElement(react.Suspense,{fallback:null},react.createElement(Wt,{headTags:s}));return {html:i,loggerMarkup:u}},[n]);return react.createElement(react.Fragment,null,a,e&&o)}function $(e,...t){if(e instanceof Function)return $(e(...t),...t);let r={};return Array.isArray(e)?(r=e.reduce((n,a)=>[...n,$(a)],[]),r):e instanceof Object?(Object.entries(e).forEach(([a,o])=>{r[a]=$(o,...t);}),r):e}function er({connection:e,children:t=()=>(console.warn("<Pagination> requires children to work properly"),null)}){let n=react$1.useNavigation().state==="loading",{endCursor:a,hasNextPage:o,hasPreviousPage:s,nextPageUrl:i,nodes:u,previousPageUrl:d,startCursor:p}=tr(e),c=react.useMemo(()=>({pageInfo:{endCursor:a,hasPreviousPage:s,startCursor:p},nodes:u}),[a,s,p,u]),y=react.useMemo(()=>react.forwardRef(function(l,I){return o?react.createElement(react$1.Link,{preventScrollReset:!0,...l,to:i,state:c,replace:!0,ref:I}):null}),[o,i,c]),C=react.useMemo(()=>react.forwardRef(function(l,I){return s?react.createElement(react$1.Link,{preventScrollReset:!0,...l,to:d,state:c,replace:!0,ref:I}):null}),[s,d,c]);return t({state:c,hasNextPage:o,hasPreviousPage:s,isLoading:n,nextPageUrl:i,nodes:u,previousPageUrl:d,NextLink:y,PreviousLink:C})}function k(e){let t=new URLSearchParams(e);return t.delete("cursor"),t.delete("direction"),t.toString()}function D(e){throw new Error(`The Pagination component requires ${"`"+e+"`"} to be a part of your query. See the guide on how to setup your query to include ${"`"+e+"`"}: https://shopify.dev/docs/custom-storefronts/hydrogen/data-fetching/pagination#setup-the-paginated-query`)}function tr(e){e.pageInfo||D("pageInfo"),typeof e.pageInfo.startCursor>"u"&&D("pageInfo.startCursor"),typeof e.pageInfo.endCursor>"u"&&D("pageInfo.endCursor"),typeof e.pageInfo.hasNextPage>"u"&&D("pageInfo.hasNextPage"),typeof e.pageInfo.hasPreviousPage>"u"&&D("pageInfo.hasPreviousPage");let t=react$1.useNavigate(),{state:r,search:n,pathname:a}=react$1.useLocation(),i=new URLSearchParams(n).get("direction")==="previous",[u,d]=react.useState(hydrogenReact.flattenConnection(e)),[p,c]=react.useState({startCursor:e.pageInfo.startCursor,endCursor:e.pageInfo.endCursor,hasPreviousPage:e.pageInfo.hasPreviousPage,hasNextPage:e.pageInfo.hasNextPage}),y=react.useRef({params:k(n),pathname:a});react.useEffect(()=>{if(k(n)!==y.current.params||a!==y.current.pathname)y.current={pathname:a,params:k(n)},t(`${a}?${k(n)}`,{replace:!0,preventScrollReset:!0,state:{nodes:void 0,pageInfo:void 0}});else if(r?.nodes){if(d(i?[...hydrogenReact.flattenConnection(e),...r.nodes]:[...r.nodes,...hydrogenReact.flattenConnection(e)]),r?.pageInfo){let l=r?.pageInfo?.startCursor===void 0?e.pageInfo.startCursor:r.pageInfo.startCursor,I=r?.pageInfo?.endCursor===void 0?e.pageInfo.endCursor:r.pageInfo.endCursor,f=r?.pageInfo?.hasPreviousPage===void 0?e.pageInfo.hasPreviousPage:r.pageInfo.hasPreviousPage,T=r?.pageInfo?.hasNextPage===void 0?e.pageInfo.hasNextPage:r.pageInfo.hasNextPage;i?(l=e.pageInfo.startCursor,f=e.pageInfo.hasPreviousPage):(I=e.pageInfo.endCursor,T=e.pageInfo.hasNextPage),c({startCursor:l,endCursor:I,hasPreviousPage:f,hasNextPage:T});}}else d(hydrogenReact.flattenConnection(e)),c({startCursor:e.pageInfo.startCursor,endCursor:e.pageInfo.endCursor,hasPreviousPage:e.pageInfo.hasPreviousPage,hasNextPage:e.pageInfo.hasNextPage});},[r,e,i,n,t,a]);let C=react.useMemo(()=>{let l=new URLSearchParams(n);return l.set("direction","previous"),p.startCursor&&l.set("cursor",p.startCursor),`?${l.toString()}`},[n,p.startCursor]),h=react.useMemo(()=>{let l=new URLSearchParams(n);return l.set("direction","next"),p.endCursor&&l.set("cursor",p.endCursor),`?${l.toString()}`},[n,p.endCursor]);return {...p,previousPageUrl:C,nextPageUrl:h,nodes:u}}function rr(e,t={pageBy:20}){if(typeof e?.url>"u")throw new Error("getPaginationVariables must be called with the Request object passed to your loader function");let{pageBy:r}=t,n=new URLSearchParams(new URL(e.url).search),a=n.get("cursor")??void 0;return (n.get("direction")==="previous"?"previous":"next")==="previous"?{last:r,startCursor:a??null}:{first:r,endCursor:a??null}}var tt="cartFormInput";function H({children:e,action:t,inputs:r,route:n}){let a=react$1.useFetcher();return jsxRuntime.jsxs(a.Form,{action:n||"",method:"post",children:[(t||r)&&jsxRuntime.jsx("input",{type:"hidden",name:tt,value:JSON.stringify({action:t,inputs:r})}),typeof e=="function"?e(a):e]})}H.INPUT_NAME=tt;H.ACTIONS={AttributesUpdateInput:"AttributesUpdateInput",BuyerIdentityUpdate:"BuyerIdentityUpdate",Create:"Create",DiscountCodesUpdate:"DiscountCodesUpdate",LinesAdd:"LinesAdd",LinesRemove:"LinesRemove",LinesUpdate:"LinesUpdate",NoteUpdate:"NoteUpdate",SelectedDeliveryOptionsUpdate:"SelectedDeliveryOptionsUpdate",MetafieldsSet:"MetafieldsSet",MetafieldDelete:"MetafieldDelete"};function ar(e){let t={};for(let s of e.entries()){let i=s[0],u=e.getAll(i);t[i]=u.length>1?u:s[1];}let{cartFormInput:r,...n}=t,{action:a,inputs:o}=r?JSON.parse(String(r)):{};return {action:a,inputs:{...o,...n}}}H.getFormInput=ar;var g=`#graphql
|
|
111
|
+
const root = ReactDOM.createRoot(
|
|
112
|
+
document.getElementById('graphiql'),
|
|
113
|
+
);
|
|
114
|
+
root.render(
|
|
115
|
+
React.createElement(GraphiQL, {
|
|
116
|
+
fetcher: GraphiQL.createFetcher({
|
|
117
|
+
url: '${n}',
|
|
118
|
+
headers: {
|
|
119
|
+
'X-Shopify-Storefront-Access-Token': '${a}',
|
|
120
|
+
},
|
|
121
|
+
}),
|
|
122
|
+
defaultEditorToolsVisibility: true,
|
|
123
|
+
query,
|
|
124
|
+
variables,
|
|
125
|
+
plugins: [GraphiQLPluginExplorer.explorerPlugin()],
|
|
126
|
+
}),
|
|
127
|
+
);
|
|
128
|
+
</script>
|
|
129
|
+
</body>
|
|
130
|
+
</html>
|
|
131
|
+
`,{status:200,headers:{"content-type":"text/html"}})};var w="Error in SEO input: ",z={title:{validate:e=>{if(typeof e!="string")throw new Error(w.concat("`title` should be a string"));if(typeof e=="string"&&e.length>120)throw new Error(w.concat("`title` should not be longer than 120 characters"));return e}},description:{validate:e=>{if(typeof e!="string")throw new Error(w.concat("`description` should be a string"));if(typeof e=="string"&&e.length>155)throw new Error(w.concat("`description` should not be longer than 155 characters"));return e}},url:{validate:e=>{if(typeof e!="string")throw new Error(w.concat("`url` should be a string"));if(typeof e=="string"&&!e.startsWith("http"))throw new Error(w.concat("`url` should be a valid URL"));return e}},handle:{validate:e=>{if(typeof e!="string")throw new Error(w.concat("`handle` should be a string"));if(typeof e=="string"&&!e.startsWith("@"))throw new Error(w.concat("`handle` should start with `@`"));return e}}};function rt(e){let t=[];for(let r of Object.keys(e))switch(r){case"title":{let n=K(z.title,e.title),a=Jt(e?.titleTemplate,n);if(!a)break;t.push(T("title",{title:a}),T("meta",{property:"og:title",content:a}),T("meta",{name:"twitter:title",content:a}));break}case"description":{let n=K(z.description,e.description);if(!n)break;t.push(T("meta",{name:"description",content:n}),T("meta",{property:"og:description",content:n}),T("meta",{name:"twitter:description",content:n}));break}case"url":{let n=K(z.url,e.url);if(!n)break;let a=n.split("?")[0];t.push(T("link",{rel:"canonical",href:a}),T("meta",{property:"og:url",content:a}));break}case"handle":{let n=K(z.handle,e.handle);if(!n)break;t.push(T("meta",{name:"twitter:site",content:n}),T("meta",{name:"twitter:creator",content:n}));break}case"media":{let n,a=Te(e.media);for(let s of a)if(typeof s=="string"&&t.push(T("meta",{name:"og:image",content:s})),s&&typeof s=="object"){let o=s.type||"image",i=s?{url:s?.url,secure_url:s?.url,type:Yt(s.url),width:s?.width,height:s?.height,alt:s?.altText}:{};for(let p of Object.keys(i))i[p]&&(n=i[p],t.push(T("meta",{property:`og:${o}:${p}`,content:n},i.url)));}break}case"jsonLd":{let n=Te(e.jsonLd),a=0;for(let s of n){if(typeof s!="object")continue;let o=T("script",{type:"application/ld+json",children:JSON.stringify(s)},`json-ld-${s?.["@type"]||s?.name||a++}`);t.push(o);}break}case"alternates":{let n=Te(e.alternates);for(let a of n){if(!a)continue;let{language:s,url:o,default:i}=a,p=s?`${s}${i?"-default":""}`:void 0;t.push(T("link",{rel:"alternate",hrefLang:p,href:o}));}break}case"robots":{if(!e.robots)break;let{maxImagePreview:n,maxSnippet:a,maxVideoPreview:s,noArchive:o,noFollow:i,noImageIndex:p,noIndex:d,noSnippet:u,noTranslate:c,unavailableAfter:f}=e.robots,l=[o&&"noarchive",p&&"noimageindex",u&&"nosnippet",c&&"notranslate",n&&`max-image-preview:${n}`,a&&`max-snippet:${a}`,s&&`max-video-preview:${s}`,f&&`unavailable_after:${f}`],C=(d?"noindex":"index")+","+(i?"nofollow":"follow");for(let y of l)y&&(C+=`,${y}`);t.push(T("meta",{name:"robots",content:C}));break}}return t.flat().sort((r,n)=>r.key.localeCompare(n.key))}function T(e,t,r){let n={tag:e,props:{},key:""};return e==="title"?(n.children=t.title,n.key=Re(n),n):e==="script"?(n.children=typeof t.children=="string"?t.children:"",n.key=Re(n,r),delete t.children,n.props=t,n):(n.props=t,Object.keys(n.props).forEach(a=>!n.props[a]&&delete n.props[a]),n.key=Re(n,r),n)}function Re(e,t){let{tag:r,props:n}=e;if(r==="title")return "0-title";if(r==="meta"){let a=n.content===t&&typeof n.property=="string"&&!n.property.endsWith("secure_url")&&"0";return [r,...[t,a],n.property||n.name].filter(o=>o).join("-")}return r==="link"?[r,n.rel,n.hrefLang||n.media].filter(s=>s).join("-").replace(/\s+/g,"-"):r==="script"?`${r}-${t}`:`${r}-${n.type}`}function Jt(e,t){if(t)return e?typeof e=="function"?e(t):e.replace("%s",t??""):t}function Yt(e){switch(e&&e.split(".").pop()){case"svg":return "image/svg+xml";case"png":return "image/png";case"gif":return "image/gif";case"swf":return "application/x-shockwave-flash";case"mp3":return "audio/mpeg";case"jpg":case"jpeg":default:return "image/jpeg"}}function Te(e){return Array.isArray(e)?e:[e]}function K(e,t){try{return e.validate(t)}catch(r){return console.warn(r.message),t}}var sr=react.lazy(()=>Promise.resolve().then(()=>(st(),ot)));function ir({debug:e}){let t=react$1.useMatches(),r=react$1.useLocation(),n=react.useMemo(()=>t.flatMap(o=>{let{handle:i,...p}=o,d={...p,...r},u=i?.seo,c=p?.data?.seo;return !u&&!c?[]:u?J(u,d):[c]}).reduce((o,i)=>{Object.keys(i).forEach(d=>!i[d]&&delete i[d]);let{jsonLd:p}=i;return p?o?.jsonLd?Array.isArray(p)?{...o,...i,jsonLd:[...o.jsonLd,...p]}:{...o,...i,jsonLd:[...o.jsonLd,p]}:{...o,...i,jsonLd:[p]}:{...o,...i}},{}),[t,r]),{html:a,loggerMarkup:s}=react.useMemo(()=>{let o=rt(n),i=o.map(d=>d.tag==="script"?react.createElement(d.tag,{...d.props,key:d.key,dangerouslySetInnerHTML:{__html:d.children}}):react.createElement(d.tag,{...d.props,key:d.key},d.children)),p=react.createElement(react.Suspense,{fallback:null},react.createElement(sr,{headTags:o}));return {html:i,loggerMarkup:p}},[n]);return react.createElement(react.Fragment,null,a,e&&s)}function J(e,...t){if(e instanceof Function)return J(e(...t),...t);let r={};return Array.isArray(e)?(r=e.reduce((n,a)=>[...n,J(a)],[]),r):e instanceof Object?(Object.entries(e).forEach(([a,s])=>{r[a]=J(s,...t);}),r):e}function fr({connection:e,children:t=()=>(console.warn("<Pagination> requires children to work properly"),null)}){let n=react$1.useNavigation().state==="loading",{endCursor:a,hasNextPage:s,hasPreviousPage:o,nextPageUrl:i,nodes:p,previousPageUrl:d,startCursor:u}=gr(e),c=react.useMemo(()=>({pageInfo:{endCursor:a,hasPreviousPage:o,startCursor:u},nodes:p}),[a,o,u,p]),f=react.useMemo(()=>react.forwardRef(function(y,g){return s?react.createElement(react$1.Link,{preventScrollReset:!0,...y,to:i,state:c,replace:!0,ref:g}):null}),[s,i,c]),l=react.useMemo(()=>react.forwardRef(function(y,g){return o?react.createElement(react$1.Link,{preventScrollReset:!0,...y,to:d,state:c,replace:!0,ref:g}):null}),[o,d,c]);return t({state:c,hasNextPage:s,hasPreviousPage:o,isLoading:n,nextPageUrl:i,nodes:p,previousPageUrl:d,NextLink:f,PreviousLink:l})}function X(e){let t=new URLSearchParams(e);return t.delete("cursor"),t.delete("direction"),t.toString()}function k(e){throw new Error(`The Pagination component requires ${"`"+e+"`"} to be a part of your query. See the guide on how to setup your query to include ${"`"+e+"`"}: https://shopify.dev/docs/custom-storefronts/hydrogen/data-fetching/pagination#setup-the-paginated-query`)}function gr(e){e.pageInfo||k("pageInfo"),typeof e.pageInfo.startCursor>"u"&&k("pageInfo.startCursor"),typeof e.pageInfo.endCursor>"u"&&k("pageInfo.endCursor"),typeof e.pageInfo.hasNextPage>"u"&&k("pageInfo.hasNextPage"),typeof e.pageInfo.hasPreviousPage>"u"&&k("pageInfo.hasPreviousPage");let t=react$1.useNavigate(),{state:r,search:n,pathname:a}=react$1.useLocation(),i=new URLSearchParams(n).get("direction")==="previous",[p,d]=react.useState(hydrogenReact.flattenConnection(e)),[u,c]=react.useState({startCursor:e.pageInfo.startCursor,endCursor:e.pageInfo.endCursor,hasPreviousPage:e.pageInfo.hasPreviousPage,hasNextPage:e.pageInfo.hasNextPage}),f=react.useRef({params:X(n),pathname:a});react.useEffect(()=>{if(X(n)!==f.current.params||a!==f.current.pathname)f.current={pathname:a,params:X(n)},t(`${a}?${X(n)}`,{replace:!0,preventScrollReset:!0,state:{nodes:void 0,pageInfo:void 0}});else if(r?.nodes){if(d(i?[...hydrogenReact.flattenConnection(e),...r.nodes]:[...r.nodes,...hydrogenReact.flattenConnection(e)]),r?.pageInfo){let y=r?.pageInfo?.startCursor===void 0?e.pageInfo.startCursor:r.pageInfo.startCursor,g=r?.pageInfo?.endCursor===void 0?e.pageInfo.endCursor:r.pageInfo.endCursor,m=r?.pageInfo?.hasPreviousPage===void 0?e.pageInfo.hasPreviousPage:r.pageInfo.hasPreviousPage,h=r?.pageInfo?.hasNextPage===void 0?e.pageInfo.hasNextPage:r.pageInfo.hasNextPage;i?(y=e.pageInfo.startCursor,m=e.pageInfo.hasPreviousPage):(g=e.pageInfo.endCursor,h=e.pageInfo.hasNextPage),c({startCursor:y,endCursor:g,hasPreviousPage:m,hasNextPage:h});}}else d(hydrogenReact.flattenConnection(e)),c({startCursor:e.pageInfo.startCursor,endCursor:e.pageInfo.endCursor,hasPreviousPage:e.pageInfo.hasPreviousPage,hasNextPage:e.pageInfo.hasNextPage});},[r,e,i,n,t,a]);let l=react.useMemo(()=>{let y=new URLSearchParams(n);return y.set("direction","previous"),u.startCursor&&y.set("cursor",u.startCursor),`?${y.toString()}`},[n,u.startCursor]),C=react.useMemo(()=>{let y=new URLSearchParams(n);return y.set("direction","next"),u.endCursor&&y.set("cursor",u.endCursor),`?${y.toString()}`},[n,u.endCursor]);return {...u,previousPageUrl:l,nextPageUrl:C,nodes:p}}function yr(e,t={pageBy:20}){if(typeof e?.url>"u")throw new Error("getPaginationVariables must be called with the Request object passed to your loader function");let{pageBy:r}=t,n=new URLSearchParams(new URL(e.url).search),a=n.get("cursor")??void 0;return (n.get("direction")==="previous"?"previous":"next")==="previous"?{last:r,startCursor:a??null}:{first:r,endCursor:a??null}}var x=class extends Response{constructor(t,r){super(`Bad request: ${t}`,{status:400});}};var F=`Shopify Hydrogen ${_}`,mr="30243aa5-17c1-465a-8493-944bcc4e88aa";function Z(e,t={}){let r=t.headers?new Headers(t.headers):new Headers({});return r.set("location",e),new Response(null,{status:t.status||302,headers:r})}async function hr({session:e,customerAccountId:t,customerAccountUrl:r,origin:n}){let a=new URLSearchParams,s=e.get("refresh_token");if(!s)throw new x("Unauthorized","No refresh_token in the session. Make sure your session is configured correctly and passed to `createCustomerClient`.");a.append("grant_type","refresh_token"),a.append("refresh_token",s),a.append("client_id",t);let o={"content-type":"application/x-www-form-urlencoded","User-Agent":F,Origin:n},i=await fetch(`${r}/auth/oauth/token`,{method:"POST",headers:o,body:a});if(!i.ok){let l=await i.text();throw new Response(l,{status:i.status,headers:{"Content-Type":"text/html; charset=utf-8"}})}let{access_token:p,expires_in:d,id_token:u,refresh_token:c}=await i.json();e.set("customer_authorization_code_token",p),e.set("expires_at",new Date(new Date().getTime()+(d-120)*1e3).getTime()+""),e.set("id_token",u),e.set("refresh_token",c);let f=await we(e,t,r,n);e.set("customer_access_token",f);}function $(e){e.unset("code-verifier"),e.unset("customer_authorization_code_token"),e.unset("expires_at"),e.unset("id_token"),e.unset("refresh_token"),e.unset("customer_access_token"),e.unset("state"),e.unset("nonce");}async function Ae({locks:e,expiresAt:t,session:r,customerAccountId:n,customerAccountUrl:a,origin:s}){if(parseInt(t,10)-1e3<new Date().getTime())try{e.refresh||(e.refresh=hr({session:r,customerAccountId:n,customerAccountUrl:a,origin:s})),await e.refresh,delete e.refresh;}catch(o){throw $(r),o&&o.status!==401?o:new x("Unauthorized","Login before querying the Customer Account API.")}}async function lt(){let e=Cr();return gt(e)}async function ft(e){let t=await crypto.subtle.digest({name:"SHA-256"},new TextEncoder().encode(e)),r=Sr(t);return gt(r)}function Cr(){let e=new Uint8Array(32);return crypto.getRandomValues(e),String.fromCharCode.apply(null,Array.from(e))}function gt(e){return btoa(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Sr(e){let t=new Uint8Array(e),r=Array.from(t);return String.fromCharCode(...r)}async function yt(){let e=Date.now().toString(),t=Math.random().toString(36).substring(2);return e+t}async function we(e,t,r,n){let a=t,s=e.get("customer_authorization_code_token");if(!s)throw new x("Unauthorized","No access token found in the session. Make sure your session is configured correctly and passed to `createCustomerClient`.");let o=new URLSearchParams;o.append("grant_type","urn:ietf:params:oauth:grant-type:token-exchange"),o.append("client_id",a),o.append("audience",mr),o.append("subject_token",s),o.append("subject_token_type","urn:ietf:params:oauth:token-type:access_token"),o.append("scopes","https://api.customers.com/auth/customer.graphql");let i={"content-type":"application/x-www-form-urlencoded","User-Agent":F,Origin:n},d=await(await fetch(`${r}/auth/oauth/token`,{method:"POST",headers:i,body:o})).json();if(d.error)throw new x(d.error_description);return d.access_token}function mt(e){return Ir(e).payload.nonce}function Ir(e){let[t,r,n]=e.split("."),a=JSON.parse(atob(t)),s=JSON.parse(atob(r));return {header:a,payload:s,signature:n}}function ee(){return Tr(Rr())}function Rr(){try{return crypto.getRandomValues(new Uint8Array(16))}catch{return new Uint8Array(16).map(()=>Math.random()*255|0)}}function Tr(e){return Array.from(e,function(t){return ("0"+(t&255).toString(16)).slice(-2)}).join("")}function xr({session:e,customerAccountId:t,customerAccountUrl:r,customerApiVersion:n="2023-10",request:a,waitUntil:s}){if(!a?.url)throw new Error("[h2:error:createCustomerClient] The request object does not contain a URL.");let o=new URL(a.url),i=o.protocol==="http:"?o.origin.replace("http","https"):o.origin,p={},d=void 0;async function u({query:c,type:f,variables:l={}}){let C=e.get("customer_access_token"),y=e.get("expires_at");if(!C||!y)throw new x("Unauthorized","Login before querying the Customer Account API.");await Ae({locks:p,expiresAt:y,session:e,customerAccountId:t,customerAccountUrl:r,origin:i});new Date().getTime();let m=await fetch(`${r}/account/customer/api/${n}/graphql`,{method:"POST",headers:{"Content-Type":"application/json","User-Agent":F,Origin:i,Authorization:C},body:JSON.stringify({operationName:"SomeQuery",query:c,variables:l})});let h=await m.text(),A={response:m,type:f,query:c,queryVariables:l,errors:void 0,client:"customer"};if(!m.ok){let R;try{R=P(h);}catch{R=[{message:h}];}U({...A,errors:R});}try{return P(h).data}catch{U({...A,errors:[{message:h}]});}}return {login:async()=>{let c=new URL(r+"/auth/oauth/authorize"),f=await yt(),l=await ee();c.searchParams.set("client_id",t),c.searchParams.set("scope","openid email"),c.searchParams.append("response_type","code"),c.searchParams.append("redirect_uri",i+"/authorize"),c.searchParams.set("scope","openid email https://api.customers.com/auth/customer.graphql"),c.searchParams.append("state",f),c.searchParams.append("nonce",l);let C=await lt(),y=await ft(C);return e.set("code-verifier",C),e.set("state",f),e.set("nonce",l),c.searchParams.append("code_challenge",y),c.searchParams.append("code_challenge_method","S256"),Z(c.toString(),{headers:{"Set-Cookie":await e.commit()}})},logout:async()=>{let c=e.get("id_token");return $(e),Z(`${r}/auth/logout?id_token_hint=${c}`,{status:302,headers:{"Set-Cookie":await e.commit()}})},isLoggedIn:async()=>{let c=e.get("expires_at");if(!e.get("customer_access_token")||!c)return !1;let f=new Date().getTime();try{await Ae({locks:p,expiresAt:c,session:e,customerAccountId:t,customerAccountUrl:r,origin:i}),d?.(" check expires",f);}catch{return !1}return !0},mutate(c,f){return c=E(c),W(c,"customer.mutate"),u({query:c,type:"mutation",...f})},query(c,f){return c=E(c),j(c,"customer.query"),u({query:c,type:"query",...f})},authorize:async(c="/")=>{let f=o.searchParams.get("code"),l=o.searchParams.get("state");if(!f||!l)throw $(e),new x("Unauthorized","No code or state parameter found in the redirect URL.");if(e.get("state")!==l)throw $(e),new x("Unauthorized","The session state does not match the state parameter. Make sure that the session is configured correctly and passed to `createCustomerClient`.");let C=t,y=new URLSearchParams;y.append("grant_type","authorization_code"),y.append("client_id",C),y.append("redirect_uri",i+"/authorize"),y.append("code",f);let g=e.get("code-verifier");if(!g)throw new x("Unauthorized","No code verifier found in the session. Make sure that the session is configured correctly and passed to `createCustomerClient`.");y.append("code_verifier",g);let m={"content-type":"application/x-www-form-urlencoded","User-Agent":F,Origin:i},h=await fetch(`${r}/auth/oauth/token`,{method:"POST",headers:m,body:y});if(!h.ok)throw new Response(await h.text(),{status:h.status,headers:{"Content-Type":"text/html; charset=utf-8"}});let{access_token:A,expires_in:R,id_token:M,refresh_token:re}=await h.json(),O=e.get("nonce"),v=await mt(M);if(O!==v)throw new x("Unauthorized",`Returned nonce does not match: ${O} !== ${v}`);e.set("customer_authorization_code_token",A),e.set("expires_at",new Date(new Date().getTime()+(R-120)*1e3).getTime()+""),e.set("id_token",M),e.set("refresh_token",re);let H=await we(e,t,r,i);return e.set("customer_access_token",H),Z(c,{headers:{"Set-Cookie":await e.commit()}})}}}var ht="cartFormInput";function te({children:e,action:t,inputs:r,route:n}){let a=react$1.useFetcher();return jsxRuntime.jsxs(a.Form,{action:n||"",method:"post",children:[(t||r)&&jsxRuntime.jsx("input",{type:"hidden",name:ht,value:JSON.stringify({action:t,inputs:r})}),typeof e=="function"?e(a):e]})}te.INPUT_NAME=ht;te.ACTIONS={AttributesUpdateInput:"AttributesUpdateInput",BuyerIdentityUpdate:"BuyerIdentityUpdate",Create:"Create",DiscountCodesUpdate:"DiscountCodesUpdate",LinesAdd:"LinesAdd",LinesRemove:"LinesRemove",LinesUpdate:"LinesUpdate",NoteUpdate:"NoteUpdate",SelectedDeliveryOptionsUpdate:"SelectedDeliveryOptionsUpdate",MetafieldsSet:"MetafieldsSet",MetafieldDelete:"MetafieldDelete"};function wr(e){let t={};for(let o of e.entries()){let i=o[0],p=e.getAll(i);t[i]=p.length>1?p:o[1];}let{cartFormInput:r,...n}=t,{action:a,inputs:s}=r?JSON.parse(String(r)):{};return {action:a,inputs:{...s,...n}}}te.getFormInput=wr;var S=`#graphql
|
|
94
132
|
fragment CartApiError on CartUserError {
|
|
95
133
|
message
|
|
96
134
|
field
|
|
97
135
|
code
|
|
98
136
|
}
|
|
99
|
-
`,
|
|
137
|
+
`,I=`#graphql
|
|
100
138
|
fragment CartApiMutation on Cart {
|
|
101
139
|
id
|
|
102
140
|
totalQuantity
|
|
103
141
|
}
|
|
104
|
-
`;function
|
|
142
|
+
`;function Oe(e){return async(t,r)=>{let{cartId:n,...a}=r||{},{cartCreate:s}=await e.storefront.mutate(br(e.cartFragment),{variables:{input:t,...a}});return s}}var br=(e=I)=>`#graphql
|
|
105
143
|
mutation cartCreate(
|
|
106
144
|
$input: CartInput!
|
|
107
145
|
$country: CountryCode = ZZ
|
|
@@ -118,8 +156,8 @@ var lt=Object.defineProperty;var ft=(e,t)=>()=>(e&&(t=e(e=0)),t);var yt=(e,t)=>{
|
|
|
118
156
|
}
|
|
119
157
|
}
|
|
120
158
|
${e}
|
|
121
|
-
${
|
|
122
|
-
`;function
|
|
159
|
+
${S}
|
|
160
|
+
`;function Pe(e){return async t=>{let r=e.getCartId();if(!r)return null;let{cart:n}=await e.storefront.query(Dr(e.cartFragment),{variables:{cartId:r,...t},cache:e.storefront.CacheNone()});return n}}var Dr=(e=Er)=>`#graphql
|
|
123
161
|
query CartQuery(
|
|
124
162
|
$cartId: ID!
|
|
125
163
|
$numCartLines: Int = 100
|
|
@@ -132,7 +170,7 @@ var lt=Object.defineProperty;var ft=(e,t)=>()=>(e&&(t=e(e=0)),t);var yt=(e,t)=>{
|
|
|
132
170
|
}
|
|
133
171
|
|
|
134
172
|
${e}
|
|
135
|
-
`,
|
|
173
|
+
`,Er=`#graphql
|
|
136
174
|
fragment CartApiQuery on Cart {
|
|
137
175
|
id
|
|
138
176
|
checkoutUrl
|
|
@@ -238,7 +276,7 @@ var lt=Object.defineProperty;var ft=(e,t)=>()=>(e&&(t=e(e=0)),t);var yt=(e,t)=>{
|
|
|
238
276
|
width
|
|
239
277
|
height
|
|
240
278
|
}
|
|
241
|
-
`;function
|
|
279
|
+
`;function be(e){return async(t,r)=>{let{cartLinesAdd:n}=await e.storefront.mutate(Ur(e.cartFragment),{variables:{cartId:e.getCartId(),lines:t,...r}});return n}}var Ur=(e=I)=>`#graphql
|
|
242
280
|
mutation cartLinesAdd(
|
|
243
281
|
$cartId: ID!
|
|
244
282
|
$lines: [CartLineInput!]!
|
|
@@ -256,8 +294,8 @@ var lt=Object.defineProperty;var ft=(e,t)=>()=>(e&&(t=e(e=0)),t);var yt=(e,t)=>{
|
|
|
256
294
|
}
|
|
257
295
|
|
|
258
296
|
${e}
|
|
259
|
-
${
|
|
260
|
-
`;function
|
|
297
|
+
${S}
|
|
298
|
+
`;function De(e){return async(t,r)=>{let{cartLinesUpdate:n}=await e.storefront.mutate(Mr(e.cartFragment),{variables:{cartId:e.getCartId(),lines:t,...r}});return n}}var Mr=(e=I)=>`#graphql
|
|
261
299
|
mutation cartLinesUpdate(
|
|
262
300
|
$cartId: ID!
|
|
263
301
|
$lines: [CartLineUpdateInput!]!
|
|
@@ -275,8 +313,8 @@ var lt=Object.defineProperty;var ft=(e,t)=>()=>(e&&(t=e(e=0)),t);var yt=(e,t)=>{
|
|
|
275
313
|
}
|
|
276
314
|
|
|
277
315
|
${e}
|
|
278
|
-
${
|
|
279
|
-
`;function
|
|
316
|
+
${S}
|
|
317
|
+
`;function Ee(e){return async(t,r)=>{let{cartLinesRemove:n}=await e.storefront.mutate(vr(e.cartFragment),{variables:{cartId:e.getCartId(),lineIds:t,...r}});return n}}var vr=(e=I)=>`#graphql
|
|
280
318
|
mutation cartLinesRemove(
|
|
281
319
|
$cartId: ID!
|
|
282
320
|
$lineIds: [ID!]!
|
|
@@ -294,8 +332,8 @@ var lt=Object.defineProperty;var ft=(e,t)=>()=>(e&&(t=e(e=0)),t);var yt=(e,t)=>{
|
|
|
294
332
|
}
|
|
295
333
|
|
|
296
334
|
${e}
|
|
297
|
-
${
|
|
298
|
-
`;function
|
|
335
|
+
${S}
|
|
336
|
+
`;function Ue(e){return async(t,r)=>{let n=t.filter((s,o,i)=>i.indexOf(s)===o),{cartDiscountCodesUpdate:a}=await e.storefront.mutate(Lr(e.cartFragment),{variables:{cartId:e.getCartId(),discountCodes:n,...r}});return a}}var Lr=(e=I)=>`#graphql
|
|
299
337
|
mutation cartDiscountCodesUpdate(
|
|
300
338
|
$cartId: ID!
|
|
301
339
|
$discountCodes: [String!]
|
|
@@ -312,8 +350,8 @@ var lt=Object.defineProperty;var ft=(e,t)=>()=>(e&&(t=e(e=0)),t);var yt=(e,t)=>{
|
|
|
312
350
|
}
|
|
313
351
|
}
|
|
314
352
|
${e}
|
|
315
|
-
${
|
|
316
|
-
`;function
|
|
353
|
+
${S}
|
|
354
|
+
`;function Me(e){return async(t,r)=>{let{cartBuyerIdentityUpdate:n}=await e.storefront.mutate(_r(e.cartFragment),{variables:{cartId:e.getCartId(),buyerIdentity:t,...r}});return n}}var _r=(e=I)=>`#graphql
|
|
317
355
|
mutation cartBuyerIdentityUpdate(
|
|
318
356
|
$cartId: ID!
|
|
319
357
|
$buyerIdentity: CartBuyerIdentityInput!
|
|
@@ -330,8 +368,8 @@ var lt=Object.defineProperty;var ft=(e,t)=>()=>(e&&(t=e(e=0)),t);var yt=(e,t)=>{
|
|
|
330
368
|
}
|
|
331
369
|
}
|
|
332
370
|
${e}
|
|
333
|
-
${
|
|
334
|
-
`;function
|
|
371
|
+
${S}
|
|
372
|
+
`;function ve(e){return async(t,r)=>{let{cartNoteUpdate:n}=await e.storefront.mutate(Nr(e.cartFragment),{variables:{cartId:e.getCartId(),note:t,...r}});return n}}var Nr=(e=I)=>`#graphql
|
|
335
373
|
mutation cartNoteUpdate(
|
|
336
374
|
$cartId: ID!
|
|
337
375
|
$note: String
|
|
@@ -348,8 +386,8 @@ var lt=Object.defineProperty;var ft=(e,t)=>()=>(e&&(t=e(e=0)),t);var yt=(e,t)=>{
|
|
|
348
386
|
}
|
|
349
387
|
}
|
|
350
388
|
${e}
|
|
351
|
-
${
|
|
352
|
-
`;function
|
|
389
|
+
${S}
|
|
390
|
+
`;function Le(e){return async(t,r)=>{let{cartSelectedDeliveryOptionsUpdate:n}=await e.storefront.mutate(kr(e.cartFragment),{variables:{cartId:e.getCartId(),selectedDeliveryOptions:t,...r}});return n}}var kr=(e=I)=>`#graphql
|
|
353
391
|
mutation cartSelectedDeliveryOptionsUpdate(
|
|
354
392
|
$cartId: ID!
|
|
355
393
|
$selectedDeliveryOptions: [CartSelectedDeliveryOptionInput!]!
|
|
@@ -366,8 +404,8 @@ var lt=Object.defineProperty;var ft=(e,t)=>()=>(e&&(t=e(e=0)),t);var yt=(e,t)=>{
|
|
|
366
404
|
}
|
|
367
405
|
}
|
|
368
406
|
${e}
|
|
369
|
-
${
|
|
370
|
-
`;function
|
|
407
|
+
${S}
|
|
408
|
+
`;function _e(e){return async(t,r)=>{let{cartAttributesUpdate:n}=await e.storefront.mutate(qr(e.cartFragment),{variables:{cartId:r?.cartId||e.getCartId(),attributes:t}});return n}}var qr=(e=I)=>`#graphql
|
|
371
409
|
mutation cartAttributesUpdate(
|
|
372
410
|
$cartId: ID!
|
|
373
411
|
$attributes: [AttributeInput!]!
|
|
@@ -382,8 +420,8 @@ var lt=Object.defineProperty;var ft=(e,t)=>()=>(e&&(t=e(e=0)),t);var yt=(e,t)=>{
|
|
|
382
420
|
}
|
|
383
421
|
}
|
|
384
422
|
${e}
|
|
385
|
-
${
|
|
386
|
-
`;function
|
|
423
|
+
${S}
|
|
424
|
+
`;function Ne(e){return async(t,r)=>{let n=r?.cartId||e.getCartId(),a=t.map(o=>({...o,ownerId:n})),{cartMetafieldsSet:s}=await e.storefront.mutate(Fr(),{variables:{metafields:a}});return {cart:{id:n},errors:s.errors}}}var Fr=()=>`#graphql
|
|
387
425
|
mutation cartMetafieldsSet(
|
|
388
426
|
$metafields: [CartMetafieldsSetInput!]!
|
|
389
427
|
$language: LanguageCode
|
|
@@ -398,7 +436,7 @@ var lt=Object.defineProperty;var ft=(e,t)=>()=>(e&&(t=e(e=0)),t);var yt=(e,t)=>{
|
|
|
398
436
|
}
|
|
399
437
|
}
|
|
400
438
|
}
|
|
401
|
-
`;function
|
|
439
|
+
`;function ke(e){return async(t,r)=>{let n=r?.cartId||e.getCartId(),{cartMetafieldDelete:a}=await e.storefront.mutate($r(),{variables:{input:{ownerId:n,key:t}}});return {cart:{id:n},errors:a.errors}}}var $r=()=>`#graphql
|
|
402
440
|
mutation cartMetafieldDelete(
|
|
403
441
|
$input: CartMetafieldDeleteInput!
|
|
404
442
|
) {
|
|
@@ -410,7 +448,7 @@ var lt=Object.defineProperty;var ft=(e,t)=>()=>(e&&(t=e(e=0)),t);var yt=(e,t)=>{
|
|
|
410
448
|
}
|
|
411
449
|
}
|
|
412
450
|
}
|
|
413
|
-
`;var
|
|
451
|
+
`;var Hr=new Set(["domain","path","max-age","expires","samesite","secure","httponly"]);function Ct(e){let t={},r,n,a=0,s=e.split(/;\s*/g),o,i;for(;a<s.length;a++)if(n=s[a],r=n.indexOf("="),~r){if(o=n.substring(0,r++).trim(),i=n.substring(r).trim(),i[0]==='"'&&(i=i.substring(1,i.length-1)),~i.indexOf("%"))try{i=decodeURIComponent(i);}catch{}Hr.has(n=o.toLowerCase())?n==="expires"?t.expires=new Date(i):n==="max-age"?t.maxage=+i:t[n]=i:t[o]=i;}else (o=n.trim().toLowerCase())&&(o==="httponly"||o==="secure")&&(t[o]=!0);return t}function St(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}var Qr=e=>{let t=Ct(e.get("Cookie")||"");return ()=>t.cart?`gid://shopify/Cart/${t.cart}`:void 0};var Gr=e=>t=>{let r=new Headers;return r.append("Set-Cookie",St("cart",t.split("/").pop()||"",{path:"/",...e})),r};function Vr(e){let{getCartId:t,setCartId:r,storefront:n,cartQueryFragment:a,cartMutateFragment:s}=e,o={storefront:n,getCartId:t,cartFragment:s},i=t(),p=Oe(o),d={get:Pe({storefront:n,getCartId:t,cartFragment:a}),getCartId:t,setCartId:r,create:p,addLines:async(u,c)=>i||c?.cartId?await be(o)(u,c):await p({lines:u},c),updateLines:De(o),removeLines:Ee(o),updateDiscountCodes:async(u,c)=>i||c?.cartId?await Ue(o)(u,c):await p({discountCodes:u},c),updateBuyerIdentity:async(u,c)=>i||c?.cartId?await Me(o)(u,c):await p({buyerIdentity:u},c),updateNote:async(u,c)=>i||c?.cartId?await ve(o)(u,c):await p({note:u},c),updateSelectedDeliveryOption:Le(o),updateAttributes:async(u,c)=>i||c?.cartId?await _e(o)(u,c):await p({attributes:u},c),setMetafields:async(u,c)=>i||c?.cartId?await Ne(o)(u,c):await p({metafields:u},c),deleteMetafield:ke(o)};return "customMethods"in e?{...d,...e.customMethods??{}}:d}function Kr({handle:e,options:t=[],variants:r=[],productPath:n="products",children:a}){let s=r instanceof Array?r:hydrogenReact.flattenConnection(r),{searchParams:o,path:i,alreadyOnProductPage:p}=Yr(e,n),d=t.filter(u=>u?.values?.length===1);return react.createElement(react.Fragment,null,...react.useMemo(()=>t.filter(u=>u?.values?.length>1).map(u=>{let c,f=[];for(let l of u.values){let C=new URLSearchParams(p?o:void 0);C.set(u.name,l),d.forEach(A=>{C.set(A.name,A.values[0]);});let y=s.find(A=>A?.selectedOptions?.every(R=>C.get(R?.name)===R?.value)),g=o.get(u.name),m=g?g===l:!1;m&&(c=l);let h="?"+C.toString();f.push({value:l,isAvailable:y?y.availableForSale:!0,to:i+h,search:h,isActive:m});}return a({option:{name:u.name,value:c,values:f}})}),[t,s,a]))}var Jr=e=>{if(typeof e?.url>"u")throw new TypeError(`Expected a Request instance, got ${typeof e}`);let t=new URL(e.url).searchParams,r=[];return t.forEach((n,a)=>{r.push({name:a,value:n});}),r};function Yr(e,t){let{pathname:r,search:n}=react$1.useLocation();return react.useMemo(()=>{let a=/(\/[a-zA-Z]{2}-[a-zA-Z]{2}\/)/g.exec(r),s=a&&a.length>0;t=t.startsWith("/")?t.substring(1):t;let o=s?`${a[0]}${t}/${e}`:`/${t}/${e}`;return {searchParams:new URLSearchParams(n),alreadyOnProductPage:o===r,path:o}},[r,n,e,t])}var Rt=react.createContext(void 0),rn=Rt.Provider,qe=()=>react.useContext(Rt);function nn(e={}){let t=ee(),r=an(t,e);return {nonce:t,header:r,NonceProvider:({children:a})=>react.createElement(rn,{value:t},a)}}function an(e,t={}){let r=`'nonce-${e}'`,a=Object.assign({},{baseUri:["'self'"],defaultSrc:["'self'",r,"https://cdn.shopify.com","https://shopify.com"],frameAncestors:["none"],styleSrc:["'self'","'unsafe-inline'","https://cdn.shopify.com"],connectSrc:["'self'","https://monorail-edge.shopifysvc.com"]},t);return a.scriptSrc instanceof Array&&!a.scriptSrc.includes(r)?a.scriptSrc.push(r):a.defaultSrc instanceof Array&&!a.defaultSrc.includes(r)&&a.defaultSrc.push(r),tn__default.default({directives:a})}var sn=react.forwardRef((e,t)=>{let r=qe();return jsxRuntime.jsx("script",{suppressHydrationWarning:!0,...e,nonce:r,ref:t})});function un(e){let t=react$1.useFetchers(),r={};for(let{formData:n}of t)if(n?.get("optimistic-identifier")===e)try{if(n.has("optimistic-data")){let a=JSON.parse(String(n.get("optimistic-data")));Object.assign(r,a);}}catch{}return r}function dn({id:e,data:t}){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("input",{type:"hidden",name:"optimistic-identifier",value:e}),jsxRuntime.jsx("input",{type:"hidden",name:"optimistic-data",value:JSON.stringify(t)})]})}//! @see: https://shopify.dev/docs/api/storefront/latest/mutations/cartCreate
|
|
414
452
|
//! @see https://shopify.dev/docs/api/storefront/latest/queries/cart
|
|
415
453
|
//! @see: https://shopify.dev/docs/api/storefront/latest/mutations/cartLinesAdd
|
|
416
454
|
//! @see: https://shopify.dev/docs/api/storefront/latest/mutations/cartLinesUpdate
|
|
@@ -420,7 +458,7 @@ var lt=Object.defineProperty;var ft=(e,t)=>()=>(e&&(t=e(e=0)),t);var yt=(e,t)=>{
|
|
|
420
458
|
//! @see https://shopify.dev/docs/api/storefront/latest/mutations/cartNoteUpdate
|
|
421
459
|
//! @see https://shopify.dev/docs/api/storefront/latest/mutations/cartSelectedDeliveryOptionsUpdate
|
|
422
460
|
//! @see https://shopify.dev/docs/api/storefront/latest/mutations/cartMetafieldsSet
|
|
423
|
-
//! @see https://shopify.dev/docs/api/storefront/2023-
|
|
461
|
+
//! @see https://shopify.dev/docs/api/storefront/2023-10/mutations/cartMetafieldDelete
|
|
424
462
|
|
|
425
463
|
Object.defineProperty(exports, 'AnalyticsEventName', {
|
|
426
464
|
enumerable: true,
|
|
@@ -506,43 +544,44 @@ Object.defineProperty(exports, 'useShopifyCookies', {
|
|
|
506
544
|
enumerable: true,
|
|
507
545
|
get: function () { return hydrogenReact.useShopifyCookies; }
|
|
508
546
|
});
|
|
509
|
-
exports.CacheCustom =
|
|
510
|
-
exports.CacheLong =
|
|
511
|
-
exports.CacheNone =
|
|
512
|
-
exports.CacheShort =
|
|
513
|
-
exports.CartForm =
|
|
514
|
-
exports.InMemoryCache =
|
|
515
|
-
exports.OptimisticInput =
|
|
516
|
-
exports.Pagination =
|
|
517
|
-
exports.Script =
|
|
518
|
-
exports.Seo =
|
|
519
|
-
exports.StorefrontApiError =
|
|
520
|
-
exports.VariantSelector =
|
|
521
|
-
exports.cartAttributesUpdateDefault =
|
|
522
|
-
exports.cartBuyerIdentityUpdateDefault =
|
|
523
|
-
exports.cartCreateDefault =
|
|
524
|
-
exports.cartDiscountCodesUpdateDefault =
|
|
525
|
-
exports.cartGetDefault =
|
|
526
|
-
exports.cartGetIdDefault =
|
|
527
|
-
exports.cartLinesAddDefault =
|
|
528
|
-
exports.cartLinesRemoveDefault =
|
|
529
|
-
exports.cartLinesUpdateDefault =
|
|
530
|
-
exports.cartMetafieldDeleteDefault =
|
|
531
|
-
exports.cartMetafieldsSetDefault =
|
|
532
|
-
exports.cartNoteUpdateDefault =
|
|
533
|
-
exports.cartSelectedDeliveryOptionsUpdateDefault =
|
|
534
|
-
exports.cartSetIdDefault =
|
|
535
|
-
exports.createCartHandler =
|
|
536
|
-
exports.createContentSecurityPolicy =
|
|
537
|
-
exports.
|
|
538
|
-
exports.
|
|
539
|
-
exports.
|
|
540
|
-
exports.
|
|
541
|
-
exports.
|
|
542
|
-
exports.
|
|
543
|
-
exports.
|
|
544
|
-
exports.
|
|
545
|
-
exports.
|
|
546
|
-
exports.
|
|
547
|
+
exports.CacheCustom = pe;
|
|
548
|
+
exports.CacheLong = ce;
|
|
549
|
+
exports.CacheNone = se;
|
|
550
|
+
exports.CacheShort = b;
|
|
551
|
+
exports.CartForm = te;
|
|
552
|
+
exports.InMemoryCache = Ie;
|
|
553
|
+
exports.OptimisticInput = dn;
|
|
554
|
+
exports.Pagination = fr;
|
|
555
|
+
exports.Script = sn;
|
|
556
|
+
exports.Seo = ir;
|
|
557
|
+
exports.StorefrontApiError = Xe;
|
|
558
|
+
exports.VariantSelector = Kr;
|
|
559
|
+
exports.cartAttributesUpdateDefault = _e;
|
|
560
|
+
exports.cartBuyerIdentityUpdateDefault = Me;
|
|
561
|
+
exports.cartCreateDefault = Oe;
|
|
562
|
+
exports.cartDiscountCodesUpdateDefault = Ue;
|
|
563
|
+
exports.cartGetDefault = Pe;
|
|
564
|
+
exports.cartGetIdDefault = Qr;
|
|
565
|
+
exports.cartLinesAddDefault = be;
|
|
566
|
+
exports.cartLinesRemoveDefault = Ee;
|
|
567
|
+
exports.cartLinesUpdateDefault = De;
|
|
568
|
+
exports.cartMetafieldDeleteDefault = ke;
|
|
569
|
+
exports.cartMetafieldsSetDefault = Ne;
|
|
570
|
+
exports.cartNoteUpdateDefault = ve;
|
|
571
|
+
exports.cartSelectedDeliveryOptionsUpdateDefault = Le;
|
|
572
|
+
exports.cartSetIdDefault = Gr;
|
|
573
|
+
exports.createCartHandler = Vr;
|
|
574
|
+
exports.createContentSecurityPolicy = nn;
|
|
575
|
+
exports.createCustomerClient__unstable = xr;
|
|
576
|
+
exports.createStorefrontClient = Gn;
|
|
577
|
+
exports.createWithCache = Kn;
|
|
578
|
+
exports.generateCacheControlHeader = L;
|
|
579
|
+
exports.getPaginationVariables = yr;
|
|
580
|
+
exports.getSelectedProductOptions = Jr;
|
|
581
|
+
exports.graphiqlLoader = Kt;
|
|
582
|
+
exports.isStorefrontApiError = Vt;
|
|
583
|
+
exports.storefrontRedirect = jt;
|
|
584
|
+
exports.useNonce = qe;
|
|
585
|
+
exports.useOptimisticData = un;
|
|
547
586
|
//# sourceMappingURL=out.js.map
|
|
548
587
|
//# sourceMappingURL=index.cjs.map
|