import{a as ue,b as le}from"https://cdn.shopify.com/oxygen-v2/26990/12114/24902/1271030/build/_shared/chunk-TX35JSAS.js";import{c as be,d as Ee,h as _e,n as ce,x as Te}from"https://cdn.shopify.com/oxygen-v2/26990/12114/24902/1271030/build/_shared/chunk-ANEL4B2W.js";import{a as R,b as V}from"https://cdn.shopify.com/oxygen-v2/26990/12114/24902/1271030/build/_shared/chunk-UJLG5X7C.js";import{d as C}from"https://cdn.shopify.com/oxygen-v2/26990/12114/24902/1271030/build/_shared/chunk-CFWRSLVV.js";function U(e){if(!e){let 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?.node)throw new Error("flattenConnection(): Connection edges must contain nodes");return t.node}):[]}var A={PAGE_VIEW:"PAGE_VIEW",ADD_TO_CART:"ADD_TO_CART",PAGE_VIEW_2:"PAGE_VIEW_2",COLLECTION_VIEW:"COLLECTION_VIEW",PRODUCT_VIEW:"PRODUCT_VIEW",SEARCH_VIEW:"SEARCH_VIEW"},$={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"},K={hydrogen:"hydrogen",headless:"headless"},de={hydrogen:"6167201",headless:"12875497473"};var F=C(V(),1);var Q=C(R(),1);var ct=C(V(),1),M=C(R(),1);var Pe="2024-10";var pe={storeDomain:"test",storefrontToken:"abc123",storefrontApiVersion:Pe,countryIsoCode:"US",languageIsoCode:"EN",getStorefrontApiUrl(){return""},getPublicTokenHeaders(){return{}},getShopifyDomain(){return""}},ut=(0,M.createContext)(pe);function J(){let e=(0,M.useContext)(ut);if(!e)throw new Error("'useShop()' must be a descendent of ");return e}function Z(e){let{countryIsoCode:t,languageIsoCode:n}=J(),r=n.includes("_")?n.replace("_","-"):`${n}-${t}`;if(!r)throw new Error("useMoney(): Unable to get 'locale' from 'useShop()', which means that 'locale' was not passed to ''. 'locale' is required for 'useMoney()' to work");let o=parseFloat(e.amount),{defaultFormatter:a,nameFormatter:i,narrowSymbolFormatter:s,withoutTrailingZerosFormatter:l,withoutCurrencyFormatter:u,withoutTrailingZerosOrCurrencyFormatter:h}=(0,Q.useMemo)(()=>{let c={style:"currency",currency:e.currencyCode};return{defaultFormatter:O(r,c),nameFormatter:O(r,{...c,currencyDisplay:"name"}),narrowSymbolFormatter:O(r,{...c,currencyDisplay:"narrowSymbol"}),withoutTrailingZerosFormatter:O(r,{...c,minimumFractionDigits:0,maximumFractionDigits:0}),withoutCurrencyFormatter:O(r),withoutTrailingZerosOrCurrencyFormatter:O(r,{minimumFractionDigits:0,maximumFractionDigits:0})}},[e.currencyCode,r]),d=c=>c.type==="currency",f=(0,Q.useMemo)(()=>({original:()=>e,currencyCode:()=>e.currencyCode,localizedString:()=>a().format(o),parts:()=>a().formatToParts(o),withoutTrailingZeros:()=>o%1===0?l().format(o):a().format(o),withoutTrailingZerosAndCurrency:()=>o%1===0?h().format(o):u().format(o),currencyName:()=>{var c;return((c=i().formatToParts(o).find(d))==null?void 0:c.value)??e.currencyCode},currencySymbol:()=>{var c;return((c=a().formatToParts(o).find(d))==null?void 0:c.value)??e.currencyCode},currencyNarrowSymbol:()=>{var c;return((c=s().formatToParts(o).find(d))==null?void 0:c.value)??""},amount:()=>a().formatToParts(o).filter(c=>["decimal","fraction","group","integer","literal"].includes(c.type)).map(c=>c.value).join("")}),[e,o,i,a,s,u,l,h]);return(0,Q.useMemo)(()=>new Proxy(f,{get:(c,m)=>{var g;return(g=Reflect.get(c,m))==null?void 0:g.call(null)}}),[f])}var ke=new Map;function O(e,t){let n=JSON.stringify([e,t]);return function(){let r=ke.get(n);return r||(r=new Intl.NumberFormat(e,t),ke.set(n,r)),r}}function $e({data:e,as:t,withoutCurrency:n,withoutTrailingZeros:r,measurement:o,measurementSeparator:a="/",...i}){if(!lt(e))throw new Error(" needs a valid 'data' prop that has 'amount' and 'currencyCode'");let s=Z(e),l=t??"div",u=s.localizedString;return(n||r)&&(n&&!r?u=s.amount:!n&&r?u=s.withoutTrailingZeros:u=s.withoutTrailingZerosAndCurrency),(0,F.jsxs)(l,{...i,children:[u,o&&o.referenceUnit&&(0,F.jsxs)(F.Fragment,{children:[a,o.referenceUnit]})]})}function lt(e){return typeof e.amount=="string"&&!!e.amount&&typeof e.currencyCode=="string"&&!!e.currencyCode}var j=C(V(),1),I=C(R(),1);var Re=I.forwardRef(({alt:e,aspectRatio:t,crop:n="center",data:r,decoding:o="async",height:a="auto",loader:i=X,loading:s="lazy",sizes:l,src:u,srcSetOptions:h={intervals:15,startingWidth:200,incrementSize:200,placeholderWidth:100},width:d="100%",...f},c)=>{let m=I.useMemo(()=>{let ie=r?.width&&r?.height?r?.width:void 0,N=r?.width&&r?.height?r?.height:void 0;return{width:ie,height:N,unitsMatch:Boolean(Ue(ie,N))}},[r]),g=I.useMemo(()=>{let N=H((d||"100%").toString()),rt=`${N.number}${N.unit}`,Se=a==null,se=Se?null:H(a.toString()),nt=se?`${se.number}${se.unit}`:"",ot=Se?"auto":nt,at=u||r?.url,it=r?.altText&&!e?r?.altText:e||"",st=t||(m.unitsMatch?[B(m.width),B(m.height)].join("/"):void 0);return{width:rt,height:ot,src:at,alt:it,aspectRatio:st}},[d,a,u,r,e,t,m,f?.key]),{intervals:k,startingWidth:q,incrementSize:Y,placeholderWidth:ae}=h,Ie=I.useMemo(()=>ht(d,k,q,Y),[d,k,q,Y]);return Oe(g.width)?(0,j.jsx)(dt,{aspectRatio:t,crop:n,decoding:o,height:a,imageWidths:Ie,loader:i,loading:s,normalizedProps:g,passthroughProps:f,ref:c,width:d,data:r}):(0,j.jsx)(pt,{aspectRatio:t,crop:n,decoding:o,imageWidths:Ie,loader:i,loading:s,normalizedProps:g,passthroughProps:f,placeholderWidth:ae,ref:c,sizes:l,data:r})}),dt=I.forwardRef(({aspectRatio:e,crop:t,decoding:n,height:r,imageWidths:o,loader:a=X,loading:i,normalizedProps:s,passthroughProps:l,width:u,data:h},d)=>{let f=I.useMemo(()=>{let c=B(u),m=B(r),g=e||(Ue(s.width,s.height)?[c,m].join("/"):s.aspectRatio?s.aspectRatio:void 0),k=o===void 0?void 0:De(o,g,t,{width:h?.width??void 0,height:h?.height??void 0}),q=m||(g&&c?c*(he(g)??1):void 0),Y=Le(s.src,k,a),ae=a({src:s.src,width:c,height:q,crop:s.height==="auto"?void 0:t});return{width:c,aspectRatio:g,height:q,srcSet:Y,src:ae}},[e,t,h,r,o,a,s,u]);return(0,j.jsx)("img",{ref:d,alt:s.alt,decoding:n,height:f.height,loading:i,src:f.src,srcSet:f.srcSet,width:f.width,style:{aspectRatio:f.aspectRatio,...l.style},...l})}),pt=I.forwardRef(({crop:e,decoding:t,imageWidths:n,loader:r=X,loading:o,normalizedProps:a,passthroughProps:i,placeholderWidth:s,sizes:l,data:u},h)=>{let d=I.useMemo(()=>{let f=n===void 0?void 0:De(n,a.aspectRatio,e,{width:u?.width??void 0,height:u?.height??void 0}),c=a.aspectRatio&&s?s*(he(a.aspectRatio)??1):void 0,m=Le(a.src,f,r),g=r({src:a.src,width:s,height:c,crop:e});return{placeholderHeight:c,srcSet:m,src:g}},[e,u,n,r,a,s]);return(0,j.jsx)("img",{ref:h,alt:a.alt,decoding:t,height:d.placeholderHeight,loading:o,sizes:l,src:d.src,srcSet:d.srcSet,width:s,...i,style:{width:a.width,aspectRatio:a.aspectRatio,...i.style}})}),xe="https://placeholder.shopify.com";function X({src:e,width:t,height:n,crop:r}){if(!e)return"";let o=new URL(e,xe);return t&&o.searchParams.append("width",Math.round(t).toString()),n&&o.searchParams.append("height",Math.round(n).toString()),r&&o.searchParams.append("crop",r),o.href.replace(xe,"")}function Ue(e="100%",t="auto"){return H(e.toString()).unit===H(t.toString()).unit}function H(e){let t=e.replace(/[0-9.]/g,""),n=parseFloat(e.replace(t,""));return{unit:t===""?n===void 0?"auto":"px":t,number:n}}function B(e){if(e===void 0)return;let{unit:t,number:n}=H(e.toString());switch(t){case"em":return n*16;case"rem":return n*16;case"px":return n;case"":return n;default:return}}function Oe(e){return typeof e=="number"||/\d(px|em|rem)$/.test(e)}function Le(e,t,n=X){return e?t?.length===0||!t?e:t.map((r,o)=>`${n({src:e,width:r.width,height:r.height,crop:r.crop})} ${t.length===3?`${o+1}x`:`${r.width??0}w`}`).join(", "):""}function ht(e="100%",t,n,r){let o=Array.from({length:t},(i,s)=>s*r+n),a=Array.from({length:3},(i,s)=>(s+1)*(B(e)??0));return Oe(e)?a:o}function he(e){if(!e)return;let[t,n]=e.split("/");return 1/(Number(t)/Number(n))}function De(e,t,n="center",r){if(e)return e.map(o=>({width:o,height:t?o*(he(t)??1):void 0,crop:n})).filter(({width:o,height:a})=>!(r?.width&&o>r.width||r?.height&&a&&a>r.height))}var S="_shopify_y",b="_shopify_s";var qe="xxxx-4xxx-xxxx-xxxxxxxxxxxx";function x(){let e="";try{let t=window.crypto,n=new Uint16Array(31);t.getRandomValues(n);let r=0;e=qe.replace(/[x]/g,o=>{let a=n[r]%16,i=o==="x"?a:a&3|8;return r++,i.toString(16)}).toUpperCase()}catch{e=qe.replace(/[x]/g,n=>{let r=Math.random()*16|0;return(n==="x"?r:r&3|8).toString(16)}).toUpperCase()}return`${ft()}-${e}`}function ft(){let e=0,t=0;e=new Date().getTime()>>>0;try{t=performance.now()>>>0}catch{t=0}return Math.abs(e+t).toString(16).toLowerCase().padStart(8,"0")}function L(e){let t=ue(e);return{[S]:t[S]||"",[b]:t[b]||""}}function v(e,t){return{schema_id:e,payload:t,metadata:{event_created_at_ms:Date.now()}}}function y(e){let t={id:"",resource:null,resourceId:null,search:"",searchParams:new URLSearchParams,hash:""};if(typeof e!="string")return t;try{let{search:n,searchParams:r,pathname:o,hash:a}=new URL(e),i=o.split("/"),s=i[i.length-1],l=i[i.length-2];return!s||!l?t:{id:`${s}${n}${a}`||"",resource:l??null,resourceId:s||null,search:n,searchParams:r,hash:a}}catch{return t}}function w(e,t){return typeof e!="object"?{}:(Object.entries(e).forEach(([n,r])=>{r&&(t[n]=r)}),t)}function Ne(e){return typeof document>"u"?(console.error(`${e} should only be used within the useEffect callback or event handlers`),!0):!1}var mt="trekkie_storefront_page_view/1.4",gt="myshopify.dev";function fe(e){let t=e,{id:n,resource:r}=y(t.resourceId),o=r?r.toLowerCase():void 0;return[v(mt,w({pageType:t.pageType,customerId:parseInt(y(t.customerId).id||"0"),resourceType:o,resourceId:parseInt(n)},yt(t)))]}function yt(e){return{appClientId:e.shopifySalesChannel?de[e.shopifySalesChannel]:de.headless,isMerchantRequest:wt(e.url),hydrogenSubchannelId:e.storefrontId||e.hydrogenSubchannelId||"0",isPersistentCookie:e.hasUserConsent,uniqToken:e.uniqueToken,visitToken:e.visitToken,microSessionId:x(),microSessionCount:1,url:e.url,path:e.path,search:e.search,referrer:e.referrer,title:e.title,shopId:parseInt(y(e.shopId).id),currency:e.currency,contentLanguage:e.acceptedLanguage||"en"}}function wt(e){if(typeof e!="string")return!1;let t=new URL(e).hostname;return t.indexOf(gt)!==-1||t==="localhost"}var Ve="2024.10.0";var E="custom_storefront_customer_tracking/1.2",Me="page_rendered",Fe="collection_page_rendered",je="product_page_rendered",vt="product_added_to_cart",He="search_submitted";function G(e){return{canonical_url:e.canonicalUrl||e.url,customer_id:parseInt(y(e.customerId).id||"0")}}function Be(e){let t=e,n=G(t),r=t.pageType,o=[];switch(o.push(v(E,w({event_name:Me,...n},_(t)))),r){case $.collection:o.push(v(E,w({event_name:Fe,...n,collection_name:t.collectionHandle,collection_id:parseInt(y(t.collectionId).id)},_(t))));break;case $.product:o.push(v(E,w({event_name:je,...n,products:me(t.products),total_value:t.totalValue},_(t))));break;case $.search:o.push(v(E,w({event_name:He,...n,search_string:t.searchString},_(t))));break}return o}function Ge(e){let t=e,n=G(t);return[v(E,w({event_name:Me,...n},_(t)))]}function We(e){let t=e,n=G(t);return[v(E,w({event_name:Fe,...n,collection_name:t.collectionHandle,collection_id:parseInt(y(t.collectionId).id)},_(t)))]}function Ye(e){let t=e,n=G(t);return[v(E,w({event_name:je,...n,products:me(t.products),total_value:t.totalValue},_(t)))]}function Ke(e){let t=e,n=G(t);return[v(E,w({event_name:He,...n,search_string:t.searchString},_(t)))]}function Je(e){let t=e,n=y(t.cartId),r=n?.id?`${n.id}`:null;return[v(E,w({event_name:vt,customerId:t.customerId,cart_token:r,total_value:t.totalValue,products:me(t.products),customer_id:parseInt(y(t.customerId).id||"0")},_(t)))]}function _(e){return{source:e.shopifySalesChannel||K.headless,asset_version_id:e.assetVersionId||Ve,hydrogenSubchannelId:e.storefrontId||e.hydrogenSubchannelId||"0",is_persistent_cookie:e.hasUserConsent,deprecated_visit_token:e.visitToken,unique_token:e.uniqueToken,event_time:Date.now(),event_id:x(),event_source_url:e.url,referrer:e.referrer,user_agent:e.userAgent,navigation_type:e.navigationType,navigation_api:e.navigationApi,shop_id:parseInt(y(e.shopId).id),currency:e.currency,ccpa_enforced:e.ccpaEnforced||!1,gdpr_enforced:e.gdprEnforced||!1,gdpr_enforced_as_string:e.gdprEnforced?"true":"false",analytics_allowed:e.analyticsAllowed||!1,marketing_allowed:e.marketingAllowed||!1,sale_of_data_allowed:e.saleOfDataAllowed||!1}}function me(e){return e?e.map(t=>{let n=w({variant_gid:t.variantGid,category:t.category,sku:t.sku,product_id:parseInt(y(t.productGid).id),variant_id:parseInt(y(t.variantGid).id)},{product_gid:t.productGid,name:t.name,variant:t.variantName||"",brand:t.brand,price:parseFloat(t.price),quantity:Number(t.quantity||0)});return JSON.stringify(n)}):[]}function ge(e,t){let{eventName:n,payload:r}=e;if(!r.hasUserConsent)return Promise.resolve();let o=[],a=r;return n===A.PAGE_VIEW?o=o.concat(fe(a),Be(a)):n===A.ADD_TO_CART?o=o.concat(Je(r)):n===A.PAGE_VIEW_2?o=o.concat(fe(a),Ge(a)):n===A.COLLECTION_VIEW?o=o.concat(We(a)):n===A.PRODUCT_VIEW?o=o.concat(Ye(a)):n===A.SEARCH_VIEW&&(o=o.concat(Ke(a))),o.length?At(o,t):Promise.resolve()}function Ct(){return typeof window>"u"||!window.navigator?!1:/Chrome-Lighthouse/.test(window.navigator.userAgent)}var Qe="sendShopifyAnalytics request is unsuccessful";function At(e,t){if(Ct())return Promise.resolve();let n={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(n)}).then(r=>{if(!r.ok)throw new Error("Response failed");return r.text()}).then(r=>{r&&JSON.parse(r).result.forEach(a=>{a.status!==200&&console.error(Qe,` `,a.message)})}).catch(r=>{console.error(Qe,r)})}catch{return Promise.resolve()}}function ye(){if(Ne("getClientBrowserParameters"))return{uniqueToken:"",visitToken:"",url:"",path:"",search:"",referrer:"",title:"",userAgent:"",navigationType:"",navigationApi:""};let[e,t]=bt(),n=L(document.cookie);return{uniqueToken:n[S],visitToken:n[b],url:location.href,path:location.pathname,search:location.search,referrer:document.referrer,title:document.title,userAgent:navigator.userAgent,navigationType:e,navigationApi:t}}function It(){try{let e=performance?.getEntriesByType&&performance?.getEntriesByType("navigation");if(e&&e[0]){let t=window.performance.getEntriesByType("navigation")[0].type;return t&&t.toString()}}catch{}}function St(){var e,t;try{if(PerformanceNavigation&&((e=performance?.navigation)==null?void 0:e.type)!==null&&((t=performance?.navigation)==null?void 0:t.type)!==void 0){let n=performance.navigation.type;switch(n){case PerformanceNavigation.TYPE_NAVIGATE:return"navigate";case PerformanceNavigation.TYPE_RELOAD:return"reload";case PerformanceNavigation.TYPE_BACK_FORWARD:return"back_forward";default:return`unknown: ${n}`}}}catch{}}function bt(){try{let e="PerformanceNavigationTiming",t=It();return t||(t=St(),e="performance.navigation"),t?[t,e]:["unknown","unknown"]}catch{}return["error","error"]}var z=C(R(),1),Ze={};function Et(e,t){let n=Ze[e];if(n)return n;let r=new Promise((o,a)=>{let i=document.createElement("script");t?.module?i.type="module":i.type="text/javascript",i.src=e,i.onload=()=>{o(!0)},i.onerror=()=>{a(!1)},t?.in==="head"?document.head.appendChild(i):document.body.appendChild(i);let s=t?.attributes;s&&Object.keys(s).forEach(l=>{i.setAttribute(l,s[l])})});return Ze[e]=r,r}function D(e,t){let[n,r]=(0,z.useState)("loading");return(0,z.useEffect)(()=>{Et(e,t).then(()=>r("done")).catch(()=>r("error"))},[e]),n}var we=C(V(),1);var _t="https://cdn.shopify.com/shopifycloud/shop-js/v1.0/client.js";function Tt(e){return e==="headless"||e==="hydrogen"}function ve({channel:e,variantIds:t,className:n,variantIdsAndQuantities:r,width:o,storeDomain:a}){let i=J(),s=a||i?.storeDomain,l=D(_t),u=[],h;if(!s||s===pe.storeDomain)throw new Error(Pt);if(t&&r)throw new Error($t);if(!t&&!r)throw new Error(Xe);if(e)if(Tt(e))h=e;else throw new Error(xt);if(t)u=t.reduce((f,c)=>{let m=y(c).id;return m&&f.push(m),f},[]);else if(r)u=r.reduce((f,c)=>{let m=y(c?.id).id;return m&&f.push(`${m}:${c?.quantity??1}`),f},[]);else throw new Error(Xe);if(u.length===0)throw new Error(kt);return(0,we.jsx)("div",{className:n,style:o?{"--shop-pay-button-width":o}:void 0,children:l==="done"&&(0,we.jsx)("shop-pay-button",{...h?{channel:h}:{},"store-url":s,variants:u.join(",")})})}var Pt='You must pass a "storeDomain" prop to the "ShopPayButton" component, or wrap it in a "ShopifyProvider" component.',kt='You must pass in "variantIds" in the form of ["gid://shopify/ProductVariant/1"]',Xe='You must pass in either "variantIds" or "variantIdsAndQuantities" to ShopPayButton',$t="You must provide either a variantIds or variantIdsAndQuantities prop, but not both in the ShopPayButton component",xt='Invalid channel attribution value. Must be either "headless" or "hydrogen"';var ze=C(R(),1);var Rt=60*60*24*360*1,Ut=60*30;function Ce(e){let{hasUserConsent:t=!1,domain:n="",checkoutDomain:r=""}=e||{};(0,ze.useEffect)(()=>{let o=L(document.cookie),a=n||window.document.location.host;if(r){let s=r.split(".").reverse(),l=a.split(".").reverse(),u=[];s.forEach((h,d)=>{h===l[d]&&u.push(h)}),a=u.reverse().join(".")}/^localhost/.test(a)&&(a="");let i=a?/^\./.test(a)?a:`.${a}`:"";t?(ee(S,o[S]||x(),Rt,i),ee(b,o[b]||x(),Ut,i)):(ee(S,"",0,i),ee(b,"",0,i))},[e,t,n,r])}function ee(e,t,n,r){document.cookie=le(e,t,{maxage:n,domain:r,samesite:"Lax",path:"/"})}var p=C(R(),1);var P=C(V(),1);var Lt="2024.10.0";var un=class extends Error{locations;path;extensions;constructor(e,t={}){let n=(t.clientOperation?`[h2:error:${t.clientOperation}] `:"")+e+(t.requestId?` - Request ID: ${t.requestId}`:"");super(n),this.name="GraphQLError",this.extensions=t.extensions,this.locations=t.locations,this.path=t.path,this.stack=t.stack||void 0;try{this.cause=JSON.stringify({...typeof t.cause=="object"?t.cause:{},requestId:t.requestId})}catch{t.cause&&(this.cause=t.cause)}}get[Symbol.toStringTag](){return this.name}toString(){let e=`${this.name}: ${this.message}`;if(this.path)try{e+=` | path: ${JSON.stringify(this.path)}`}catch{}if(this.extensions)try{e+=` | extensions: ${JSON.stringify(this.extensions)}`}catch{}return e+=` `,this.stack&&(e+=`${this.stack.slice(this.stack.indexOf(` `)+1)} `),e}toJSON(){return{name:"Error",message:""}}};var T="Error in SEO input: ",te={title:{validate:e=>{if(typeof e!="string")throw new Error(T.concat("`title` should be a string"));if(typeof e=="string"&&e.length>120)throw new Error(T.concat("`title` should not be longer than 120 characters"));return e}},description:{validate:e=>{if(typeof e!="string")throw new Error(T.concat("`description` should be a string"));if(typeof e=="string"&&e.length>155)throw new Error(T.concat("`description` should not be longer than 155 characters"));return e}},url:{validate:e=>{if(typeof e!="string")throw new Error(T.concat("`url` should be a string"));if(typeof e=="string"&&!e.startsWith("http"))throw new Error(T.concat("`url` should be a valid URL"));return e}},handle:{validate:e=>{if(typeof e!="string")throw new Error(T.concat("`handle` should be a string"));if(typeof e=="string"&&!e.startsWith("@"))throw new Error(T.concat("`handle` should start with `@`"));return e}}};function Dt(e,t){if(t)return e?typeof e=="function"?e(t):e.replace("%s",t??""):t}function qt(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 re(e){return Array.isArray(e)?e:[e]}function ne(e,t){try{return e.validate(t)}catch(n){return console.warn(n.message),t}}var ln=(0,p.lazy)(()=>import("https://cdn.shopify.com/oxygen-v2/26990/12114/24902/1271030/build/_shared/log-seo-tags-TY72EQWZ-SV4UYGMJ.js"));function dn(...e){let t=[],n=e.reduce((r,o)=>{if(!o)return r;Object.keys(o).forEach(i=>!o[i]&&delete o[i]);let{jsonLd:a}=o;return a?r?.jsonLd?{...r,...o,jsonLd:re(r.jsonLd).concat(a)}:{...r,...o,jsonLd:[a]}:{...r,...o}},{})||{};for(let r of Object.keys(n))switch(r){case"title":{let o=ne(te.title,n.title),a=Dt(n?.titleTemplate,o);if(!a)break;t.push({title:a},{property:"og:title",content:a},{property:"twitter:title",content:a});break}case"description":{let o=ne(te.description,n.description);if(!o)break;t.push({name:"description",content:o},{property:"og:description",content:o},{property:"twitter:description",content:o});break}case"url":{let o=ne(te.url,n.url);if(!o)break;let a=o.split("?")[0].replace(/\/$/,"");t.push({tagName:"link",rel:"canonical",href:a},{property:"og:url",content:a});break}case"handle":{let o=ne(te.handle,n.handle);if(!o)break;t.push({property:"twitter:site",content:o},{property:"twitter:creator",content:o});break}case"media":{let o,a=re(n.media);for(let i of a)if(typeof i=="string"&&t.push({property:"og:image",content:i}),i&&typeof i=="object"){let s=i.type||"image",l=i?{url:i?.url,secure_url:i?.url,type:qt(i.url),width:i?.width,height:i?.height,alt:i?.altText}:{};for(let u of Object.keys(l))l[u]&&(o=l[u],t.push({property:`og:${s}:${u}`,content:o}))}break}case"jsonLd":{let o=re(n.jsonLd);for(let a of o)typeof a!="object"||Object.keys(a).length===0||t.push({"script:ld+json":a});break}case"alternates":{let o=re(n.alternates);for(let a of o){if(!a)continue;let{language:i,url:s,default:l}=a,u=i?`${i}${l?"-default":""}`:void 0;t.push({tagName:"link",rel:"alternate",hrefLang:u,href:s})}break}case"robots":{if(!n.robots)break;let{maxImagePreview:o,maxSnippet:a,maxVideoPreview:i,noArchive:s,noFollow:l,noImageIndex:u,noIndex:h,noSnippet:d,noTranslate:f,unavailableAfter:c}=n.robots,m=[s&&"noarchive",u&&"noimageindex",d&&"nosnippet",f&&"notranslate",o&&`max-image-preview:${o}`,a&&`max-snippet:${a}`,i&&`max-video-preview:${i}`,c&&`unavailable_after:${c}`],g=(h?"noindex":"index")+","+(l?"nofollow":"follow");for(let k of m)k&&(g+=`,${k}`);t.push({name:"robots",content:g});break}}return t}function pn({connection:e,children:t=()=>(console.warn(" requires children to work properly"),null)}){let n=_e().state==="loading",{endCursor:r,hasNextPage:o,hasPreviousPage:a,nextPageUrl:i,nodes:s,previousPageUrl:l,startCursor:u}=Nt(e),h=(0,p.useMemo)(()=>({pageInfo:{endCursor:r,hasPreviousPage:a,hasNextPage:o,startCursor:u},nodes:s}),[r,o,a,u,s]),d=(0,p.useMemo)(()=>(0,p.forwardRef)(function(c,m){return o?(0,p.createElement)(ce,{preventScrollReset:!0,...c,to:i,state:h,replace:!0,ref:m}):null}),[o,i,h]),f=(0,p.useMemo)(()=>(0,p.forwardRef)(function(c,m){return a?(0,p.createElement)(ce,{preventScrollReset:!0,...c,to:l,state:h,replace:!0,ref:m}):null}),[a,l,h]);return t({state:h,hasNextPage:o,hasPreviousPage:a,isLoading:n,nextPageUrl:i,nodes:s,previousPageUrl:l,NextLink:d,PreviousLink:f})}function oe(e){let t=new URLSearchParams(e);return t.delete("cursor"),t.delete("direction"),t.toString()}function W(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 Nt(e){e.pageInfo||W("pageInfo"),typeof e.pageInfo.startCursor>"u"&&W("pageInfo.startCursor"),typeof e.pageInfo.endCursor>"u"&&W("pageInfo.endCursor"),typeof e.pageInfo.hasNextPage>"u"&&W("pageInfo.hasNextPage"),typeof e.pageInfo.hasPreviousPage>"u"&&W("pageInfo.hasPreviousPage");let t=Ee(),{state:n,search:r,pathname:o}=be(),a=new URLSearchParams(r).get("direction")==="previous",i=(0,p.useMemo)(()=>!globalThis?.window?.__hydrogenHydrated||!n||!n?.nodes?U(e):a?[...U(e),...n.nodes]:[...n.nodes,...U(e)],[n,e]),s=(0,p.useMemo)(()=>{let d=globalThis?.window?.__hydrogenHydrated,f=!d||n?.pageInfo?.startCursor===void 0?e.pageInfo.startCursor:n.pageInfo.startCursor,c=!d||n?.pageInfo?.endCursor===void 0?e.pageInfo.endCursor:n.pageInfo.endCursor,m=!d||n?.pageInfo?.hasPreviousPage===void 0?e.pageInfo.hasPreviousPage:n.pageInfo.hasPreviousPage,g=!d||n?.pageInfo?.hasNextPage===void 0?e.pageInfo.hasNextPage:n.pageInfo.hasNextPage;return n?.nodes&&(a?(f=e.pageInfo.startCursor,m=e.pageInfo.hasPreviousPage):(c=e.pageInfo.endCursor,g=e.pageInfo.hasNextPage)),{startCursor:f,endCursor:c,hasPreviousPage:m,hasNextPage:g}},[a,n,e.pageInfo.hasNextPage,e.pageInfo.hasPreviousPage,e.pageInfo.startCursor,e.pageInfo.endCursor]),l=(0,p.useRef)({params:oe(r),pathname:o});(0,p.useEffect)(()=>{window.__hydrogenHydrated=!0},[]),(0,p.useEffect)(()=>{(oe(r)!==l.current.params||o!==l.current.pathname)&&(l.current={pathname:o,params:oe(r)},t(`${o}?${oe(r)}`,{replace:!0,preventScrollReset:!0,state:{nodes:void 0,pageInfo:void 0}}))},[o,r]);let u=(0,p.useMemo)(()=>{let d=new URLSearchParams(r);return d.set("direction","previous"),s.startCursor&&d.set("cursor",s.startCursor),`?${d.toString()}`},[r,s.startCursor]),h=(0,p.useMemo)(()=>{let d=new URLSearchParams(r);return d.set("direction","next"),s.endCursor&&d.set("cursor",s.endCursor),`?${d.toString()}`},[r,s.endCursor]);return{...s,previousPageUrl:u,nextPageUrl:h,nodes:i}}var hn=`Shopify Hydrogen ${Lt}`;var et="cartFormInput";function Ae({children:e,action:t,inputs:n,route:r,fetcherKey:o}){let a=Te({key:o});return(0,P.jsxs)(a.Form,{action:r||"",method:"post",children:[(t||n)&&(0,P.jsx)("input",{type:"hidden",name:et,value:JSON.stringify({action:t,inputs:n})}),typeof e=="function"?e(a):e]})}Ae.INPUT_NAME=et;Ae.ACTIONS={AttributesUpdateInput:"AttributesUpdateInput",BuyerIdentityUpdate:"BuyerIdentityUpdate",Create:"Create",DiscountCodesUpdate:"DiscountCodesUpdate",GiftCardCodesUpdate:"GiftCardCodesUpdate",LinesAdd:"LinesAdd",LinesRemove:"LinesRemove",LinesUpdate:"LinesUpdate",NoteUpdate:"NoteUpdate",SelectedDeliveryOptionsUpdate:"SelectedDeliveryOptionsUpdate",MetafieldsSet:"MetafieldsSet",MetafieldDelete:"MetafieldDelete"};function Vt(e){let t={};for(let i of e.entries()){let s=i[0],l=e.getAll(s);t[s]=l.length>1?l:i[1]}let{cartFormInput:n,...r}=t,{action:o,inputs:a}=n?JSON.parse(String(n)):{};return{action:o,inputs:{...a,...r}}}Ae.getFormInput=Vt;var tt=(0,p.createContext)(void 0),fn=tt.Provider,Mt=()=>(0,p.useContext)(tt);var mn=(0,p.forwardRef)((e,t)=>{let{waitForHydration:n,src:r,...o}=e;if(n)return(0,P.jsx)(Ft,{src:r,options:o});let a=Mt();return(0,P.jsx)("script",{suppressHydrationWarning:!0,...o,src:r,nonce:a,ref:t})});function Ft({src:e,options:t}){if(!e)throw new Error("`waitForHydration` with the Script component requires a `src` prop");return D(e,{attributes:t}),null}function gn(e){return(0,P.jsx)(ve,{channel:"hydrogen",...e})}var jt={canTrack:()=>!1,cart:null,customData:{},prevCart:null,publish:()=>{},shop:null,subscribe:()=>{},register:()=>({ready:()=>{}}),customerPrivacy:null,privacyBanner:null},Ht=(0,p.createContext)(jt);function yn(){let e=(0,p.useContext)(Ht);if(!e)throw new Error("[h2:error:useAnalytics] 'useAnalytics()' must be a descendent of ");return e}export{U as a,A as b,ge as c,ye as d,Z as e,$e as f,Re as g,D as h,Ce as i,dn as j,pn as k,gn as l,yn as m}; /*! Bundled license information: @shopify/hydrogen/dist/production/index.js: (*! @see: https://shopify.dev/docs/api/storefront/latest/mutations/cartCreate *) (*! @see https://shopify.dev/docs/api/storefront/latest/queries/cart *) (*! @see: https://shopify.dev/docs/api/storefront/latest/mutations/cartLinesAdd *) (*! @see: https://shopify.dev/docs/api/storefront/latest/mutations/cartLinesUpdate *) (*! @see: https://shopify.dev/docs/api/storefront/latest/mutations/cartLinesRemove *) (*! @see https://shopify.dev/docs/api/storefront/latest/mutations/cartDiscountCodesUpdate *) (*! @see https://shopify.dev/docs/api/storefront/latest/mutations/cartGiftCardCodesUpdate *) (*! @see https://shopify.dev/docs/api/storefront/latest/mutations/cartBuyerIdentityUpdate *) (*! @see https://shopify.dev/docs/api/storefront/latest/mutations/cartNoteUpdate *) (*! @see https://shopify.dev/docs/api/storefront/latest/mutations/cartSelectedDeliveryOptionsUpdate *) (*! @see https://shopify.dev/docs/api/storefront/latest/mutations/cartMetafieldsSet *) (*! @see https://shopify.dev/docs/api/storefront/2024-10/mutations/cartMetafieldDelete *) */