1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94909,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n={default:function(){return c},getImageProps:function(){return d}};for(var r in n)Object.defineProperty(a,r,{enumerable:!0,get:n[r]});let s=e.r(55682),o=e.r(8927),l=e.r(5500),i=s._(e.r(1948));function d(e){let{props:t}=(0,o.getImgProps)(e,{defaultLoader:i.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,a]of Object.entries(t))void 0===a&&delete t[e];return{props:t}}let c=l.Image},57688,(e,t,a)=>{t.exports=e.r(94909)},47926,e=>{"use strict";var t=e.i(43476),a=e.i(57688),n=e.i(22016),r=e.i(71645),s=e.i(18687),o=e.i(1744),l=e.i(84388);let i="earthborn-paypal-coupon",d="earthborn-paypal-pending-coupon",c="earthborn-thankyou20-used",u="THANKYOU20";function m(e){return Number.isFinite(e)?Math.max(1,Math.min(24,Math.floor(e))):1}function p(e){window.localStorage.setItem(l.CART_STORAGE_KEY,JSON.stringify(e)),window.dispatchEvent(new Event("earthborn-cart-updated"))}function x(e){return e.toUpperCase().replace(/[^A-Z0-9-_]/g,"").slice(0,40)}function h(e){e?window.localStorage.setItem(i,e):window.localStorage.removeItem(i)}e.s(["CartClient",0,function({catalogItems:e,checkoutReady:f,returnUrl:b,cancelUrl:g}){let[v,w]=(0,r.useState)([]),[y,j]=(0,r.useState)(""),[N,S]=(0,r.useState)(!1),P=(0,r.useMemo)(()=>new Map(e.map(e=>[e.variantId,e])),[e]);(0,r.useEffect)(()=>{let e=()=>{let e;!function(){let e=new URLSearchParams(window.location.search).get("paypal");if("return"!==e&&"cancel"!==e)return;let t=window.localStorage.getItem(d);"return"===e&&t===u&&(window.localStorage.setItem(c,"true"),window.localStorage.removeItem(i)),window.localStorage.removeItem(d)}(),w(function(){try{let e=window.localStorage.getItem(l.CART_STORAGE_KEY);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch{return[]}}());let t=x((e=new URLSearchParams(window.location.search)).get("coupon")||e.get("coupon_code")||e.get("apply_coupon")||"");j(t||window.localStorage.getItem(i)||""),t&&h(t),S("true"===window.localStorage.getItem(c))};return e(),window.addEventListener("earthborn-cart-updated",e),window.addEventListener("storage",e),()=>{window.removeEventListener("earthborn-cart-updated",e),window.removeEventListener("storage",e)}},[]);let _=(0,r.useMemo)(()=>v.map(e=>{let t=P.get(e.variantId);if(!t)return null;let a=m(e.quantity),n=t.price||e.price||"";return{...e,...t,quantity:a,lineTotal:Number(n||0)*a}}).filter(e=>!!e),[P,v]),I=_.reduce((e,t)=>{let a;return e+(!Number.isFinite(a=Number(t.price||0))||a<=0?0:Math.round(100*a))*t.quantity},0),C=y===u,E=C&&!N?Math.round(.2*I):0,T=Math.max(0,I-E),A=E>0,O=y?A?"THANKYOU20 applied: 20% off for first-time customers. One use per customer.":C?"THANKYOU20 has already been used in this browser. Contact Earthborn if you need help with your first order.":"That code is not set for an automatic discount here. It will be included with the PayPal order for Earthborn review.":"One coupon code can be used per order.";function M(e){let t=x(e);j(t),h(t)}return _.length?(0,t.jsxs)("div",{className:"mt-10 grid gap-6 lg:grid-cols-[1fr_360px]",children:[(0,t.jsx)("section",{className:"space-y-4",children:_.map(e=>(0,t.jsxs)("article",{className:"grid gap-4 rounded-[2rem] border border-stone-200 bg-white p-5 shadow-sm sm:grid-cols-[120px_1fr]",children:[(0,t.jsx)(n.default,{href:`/products/${e.productHandle}`,className:"relative aspect-square rounded-2xl bg-[#f6fcfb] p-3",children:e.image?(0,t.jsx)(a.default,{src:e.image,alt:`${e.productTitle} product photo`,fill:!0,sizes:"120px",className:"object-contain p-3"}):null}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-start sm:justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-stone-950",children:(0,t.jsx)(n.default,{href:`/products/${e.productHandle}`,className:"hover:text-[#008a72]",children:e.productTitle})}),(0,t.jsx)("p",{className:"mt-1 text-sm text-stone-600",children:e.variantTitle}),(0,t.jsxs)("p",{className:"mt-2 text-sm font-semibold text-[#0878b8]",children:[(0,s.formatPrice)(e.price)," each"]})]}),(0,t.jsx)("p",{className:"text-lg font-semibold text-stone-950",children:(0,s.formatPrice)(e.lineTotal)})]}),(0,t.jsxs)("div",{className:"mt-5 flex flex-wrap items-center gap-3",children:[(0,t.jsxs)("label",{className:"text-sm font-semibold text-stone-700",children:["Qty",(0,t.jsx)("input",{type:"number",min:"1",max:"24",value:e.quantity,onChange:t=>{var a,n;let r;return a=e.variantId,n=Number(t.target.value),void(w(r=v.map(e=>e.variantId===a?{...e,quantity:m(n)}:e)),p(r))},className:"ml-2 w-20 rounded-xl border border-stone-200 bg-[#f6fcfb] px-3 py-2 text-stone-950 outline-none focus:border-[#008a
172]"})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{var t;let a;return t=e.variantId,void(w(a=v.filter(e=>e.variantId!==t)),p(a))},className:"text-sm font-semibold text-stone-500 hover:text-[#0878b8]",children:"Remove"})]})]})]},e.variantId))}),(0,t.jsxs)("aside",{className:"h-fit rounded-[2rem] border border-[#62cfe0] bg-[#e9f8ff] p-6 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-2xl font-semibold text-stone-950",children:"Order summary"}),(0,t.jsxs)("div",{className:"mt-5 space-y-3 text-sm text-stone-700",children:[(0,t.jsxs)("div",{className:"flex justify-between gap-4",children:[(0,t.jsx)("span",{children:"Subtotal"}),(0,t.jsx)("span",{className:"font-semibold text-stone-950",children:(0,s.formatPrice)(I/100)})]}),A?(0,t.jsxs)("div",{className:"flex justify-between gap-4 text-[#008a72]",children:[(0,t.jsx)("span",{children:"THANKYOU20 first-time customer discount"}),(0,t.jsxs)("span",{className:"font-semibold",children:["-",(0,s.formatPrice)(E/100)]})]}):null,(0,t.jsxs)("div",{className:"flex justify-between gap-4 border-t border-[#62cfe0] pt-3 text-base",children:[(0,t.jsx)("span",{className:"font-semibold text-stone-950",children:"Estimated total before shipping/tax"}),(0,t.jsx)("span",{className:"font-semibold text-stone-950",children:(0,s.formatPrice)(T/100)})]}),(0,t.jsx)("p",{className:"leading-6",children:"Secure checkout will collect shipping details. Shipping or tax adjustments may be finalized by Earthborn after review."})]}),(0,t.jsxs)("div",{className:"mt-5 rounded-2xl bg-white/70 p-4",children:[(0,t.jsx)("label",{className:"text-sm font-semibold text-stone-800",htmlFor:"coupon-code",children:"Have a promotional code?"}),(0,t.jsxs)("div",{className:"mt-3 flex flex-col gap-2 sm:flex-row",children:[(0,t.jsx)("input",{id:"coupon-code",value:y,onChange:e=>M(e.target.value),placeholder:"Enter coupon code",className:"min-w-0 flex-1 rounded-full border border-stone-200 bg-white px-4 py-2.5 text-sm uppercase text-stone-950 outline-none focus:border-[#008a72]"}),y?(0,t.jsx)("button",{type:"button",onClick:()=>M(""),className:"rounded-full border border-stone-200 px-4 py-2.5 text-sm font-semibold text-stone-600 transition hover:bg-[#f6fcfb]",children:"Clear"}):null]}),(0,t.jsx)("p",{className:"mt-3 text-xs leading-5 text-stone-600",children:O})]}),(0,t.jsx)(n.default,{href:"/pages/shipping-coupon-policies",className:"mt-4 inline-flex text-sm font-semibold text-[#005b4f] hover:text-[#0878b8]",children:"Shipping & coupon policies"}),f?(0,t.jsxs)("form",{action:o.paypalCheckoutUrl,method:"post",onSubmit:function(){A?window.localStorage.setItem(d,y):window.localStorage.removeItem(d)},className:"mt-6",children:[(0,t.jsx)("input",{type:"hidden",name:"checkout_type",value:"cart"}),(0,t.jsx)("input",{type:"hidden",name:"item_count",value:String(_.length)}),(0,t.jsx)("input",{type:"hidden",name:"currency_code",value:"USD"}),(0,t.jsx)("input",{type:"hidden",name:"return_url",value:b}),(0,t.jsx)("input",{type:"hidden",name:"cancel_url",value:g}),y?(0,t.jsx)("input",{type:"hidden",name:"coupon_code",value:y}):null,_.map((e,a)=>{let n=a+1;return(0,t.jsxs)("div",{children:[(0,t.jsx)("input",{type:"hidden",name:`product_handle_${n}`,value:e.productHandle}),(0,t.jsx)("input",{type:"hidden",name:`variant_id_${n}`,value:e.variantId}),(0,t.jsx)("input",{type:"hidden",name:`quantity_${n}`,value:String(e.quantity)})]},e.variantId)}),(0,t.jsx)("button",{name:"payment_method",value:"card",type:"submit",className:"w-full rounded-full bg-[#005b4f] px-6 py-3 text-sm font-bold text-white transition hover:bg-[#008a72]",children:"Pay with debit or credit card"}),(0,t.jsx)("p",{className:"mt-3 text-center text-xs leading-5 text-stone-600",children:"No PayPal account required. Visa, Mastercard, American Express, and Discover are accepted through PayPal Payflow merchant processing."}),(0,t.jsx)("button",{name:"payment_method",value:"paypal",type:"submit",className:"mt-3 w-full rounded-full bg-[#ffc439] px-6 py-3 text-sm font-bold text-[#111820] transition hover:bg-[#f4b800]",children:"Pay with PayPal"})]}):(0,t.jsxs)("div",{className:"mt-6 rounded-2xl bg-white/70 p-4 text-sm leading-6 text-stone-700",children:[(0,t.jsx)("p",{children:"PayPal PayFlow checkout is being reconnected. Contact Earthborn with your cart details and the team can help finish the order."}),(0,t.jsx)(n.default,{href:"/contact",className:"mt-4 inline-flex rounded-full bg-[#005b4f] px-5 py-2.5 text-sm font-semibold text-white transition hover:bg-[#008a
172]",children:"Contact Earthborn"})]}),(0,t.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[(0,t.jsx)(n.default,{href:"/shop",className:"inline-flex justify-center rounded-full border border-[#005b4f]/20 bg-white px-5 py-2.5 text-sm font-semibold text-[#005b4f] transition hover:bg-[#f6fcfb]",children:"Continue shopping"}),(0,t.jsx)("button",{type:"button",onClick:function(){w([]),j(""),p([]),h("")},className:"text-sm font-semibold text-stone-500 hover:text-[#0878b8]",children:"Clear cart"})]})]})]}):(0,t.jsxs)("div",{className:"mt-10 rounded-[2rem] bg-white p-7 shadow-sm",children:[(0,t.jsx)("h2",{className:"text-2xl font-semibold text-stone-950",children:"Your cart is empty"}),(0,t.jsx)("p",{className:"mt-3 text-sm leading-6 text-stone-600",children:"Add Colloidal Silver, mushroom extracts, pet-labeled spray, or value packs to build an order before checking out with PayPal."}),(0,t.jsx)(n.default,{href:"/shop",className:"mt-5 inline-flex rounded-full bg-[#005b4f] px-6 py-3 text-sm font-semibold text-white transition hover:bg-[#008a72]",children:"Shop products"})]})}])}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.