1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6750],{6124:(e,t,l)=>{"use strict";l.d(t,{u:()=>a});let a=function(e,t){if(void 0===e)throw Error(t);return e}("6412394","Missing environment variable: NEXT_PUBLIC_HUBSPOT_PORTAL_ID")},22983:(e,t,l)=>{"use strict";l.d(t,{A:()=>r});var a=l(87358);let i=n("production","Missing environment variable: NEXT_PUBLIC_SANITY_DATASET"),s=n("2xvhb43x","Missing environment variable: NEXT_PUBLIC_SANITY_PROJECT_ID");function n(e,t){if(void 0===e)throw Error(t);return e}a.env.SANITY_API_WRITE_TOKEN;let r={projectId:s,dataset:i,apiVersion:a.env.NEXT_PUBLIC_SANITY_API_VERSION||"v2024-01-11",useCdn:!0,perspective:"published",stega:{studioUrl:"https://".concat("www.ikhokha.com","/admin"),filter:e=>{let{sourcePath:t}=e;return!["displayOptions","color","heading","subHeading","button","backgroundColor","muxVideoId","navbarBgColor","navbarOverlay"].some(e=>t.includes(e))&&e.filterDefault(e)}}}},29866:(e,t,l)=>{"use strict";l.d(t,{default:()=>n});var a=l(95155),i=l(63554),s=l(6124);let n=()=>(0,a.jsx)(i.default,{type:"text/javascript",id:"hs-script-loader",strategy:"afterInteractive",src:"//js-eu1.hs-scripts.com/".concat(s.u,".js")})},34584:(e,t,l)=>{"use strict";l.d(t,{default:()=>n});var a=l(12115),i=l(4845),s=l(26690);function n(){return(0,a.useEffect)(()=>{let e=(0,i.lx)();e&&((0,i.ch)(e),(0,s.logInfo)("[AffiliateTracking]: Affiliate code captured from URL",{affiliate:e,url:window.location.href}))},[]),i.S_,null}},39746:(e,t,l)=>{"use strict";l.d(t,{default:()=>r});var a=l(95155),i=l(12115),s=l(65125);let n=["scroll","pointerdown","keydown","touchstart"];function r(e){let{gtmId:t}=e,[l,r]=(0,i.useState)(!1);return((0,i.useEffect)(()=>{let e,t=!1,l=()=>{t||(t=!0,a(),r(!0))},a=()=>{if(globalThis.clearTimeout(i),void 0!==e){var t,a;null==(t=(a=globalThis).cancelIdleCallback)||t.call(a,e)}n.forEach(e=>globalThis.removeEventListener(e,l))},i=globalThis.setTimeout(l,4e3),s=globalThis.requestIdleCallback;return s&&(e=s(l,{timeout:4e3})),n.forEach(e=>globalThis.addEventListener(e,l,{once:!0,passive:!0})),a},[]),l)?(0,a.jsx)(s.GoogleTagManager,{gtmId:t}):null}},40529:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});let a={nonTextBehavior:"remove"};function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e)return e;let l=Object.assign({},a,t);return e.map(e=>"block"===e._type&&e.children?e.children.map(e=>e.text).join(""):"remove"===l.nonTextBehavior?"":"[".concat(e._type," block]")).join("\n\n")}},40725:(e,t,l)=>{Promise.resolve().then(l.t.bind(l,57728,23)),Promise.resolve().then(l.bind(l,58402)),Promise.resolve().then(l.bind(l,76845)),Promise.resolve().then(l.bind(l,59225)),Promise.resolve().then(l.bind(l,58399)),Promise.resolve().then(l.bind(l,98361)),Promise.resolve().then(l.bind(l,46007)),Promise.resolve().then(l.bind(l,93175)),Promise.resolve().then(l.bind(l,62681)),Promise.resolve().then(l.bind(l,96255)),Promise.resolve().then(l.bind(l,94997)),Promise.resolve().then(l.bind(l,34584)),Promise.resolve().then(l.bind(l,71635)),Promise.resolve().then(l.bind(l,92728)),Promise.resolve().then(l.bind(l,94389)),Promise.resolve().then(l.bind(l,29866)),Promise.resolve().then(l.bind(l,39746)),Promise.resolve().then(l.bind(l,18677)),Promise.resolve().then(l.bind(l,82546)),Promise.resolve().then(l.bind(l,13353)),Promise.resolve().then(l.bind(l,47978)),Promise.resolve().then(l.t.bind(l,69243,23)),Promise.resolve().then(l.bind(l,62146)),Promise.resolve().then(l.bind(l,10255)),Promise.resolve().then(l.t.bind(l,31894,23)),Promise.resolve().then(l.t.bind(l,79453,23))},44038:(e,t,l)=>{"use strict";l.d(t,{S:()=>s});var a=l(45126),i=l(22983);let s=(0,a.UU)(i.A)},46007:(e,t,l)=>{"use strict";l.d(t,{default:()=>s});var a=l(95155);l(12115);var i=l(33898);function s(){return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:"pointer-events-none fixed left-0 top-0 z-[99999] h-full w-full border-4 border-orange opacity-50",children:(0,a.jsx)("div",{className:"absolute bottom-0 left-0 flex w-full justify-end",children:(0,a.jsxs)("div",{className:"relative flex items-center gap-1 rounded-tl-md bg-orange px-2 py-0.5 text-xs text-white",children:[(0,a.jsx)("span",{children:(0,a.jsx)(i.C,{className:"text-sm"})}),(0,a.jsx)("span",{style:{fontFamily:"Roboto, Inter, sans-serif"},children:"Staging Dataset"})]})})})})}},57003:(e,t,l)=>{"use strict";l.d(t,{$g:()=>a,M9:()=>i});let a=e=>0===e?"FREE":new Intl.NumberFormat("en",{currency:"ZAR",style:"currency",useGrouping:!0}).format(e).replace("ZAR","R"),i=e=>0===e?"FREE":new Intl.NumberFormat("en",{currency:"ZAR",style:"currency",minimumFractionDigits:0,maximumFractionDigits:0,useGrouping:!1}).format(e).replace("ZAR","R")},57728:()=>{},58399:(e,t,l)=>{"use strict";l.d(t,{PopupManager:()=>x});var a=l(95155),i=l(13353),s=l(35695),n=l(2495),r=l(12115),o=l(25758),d=l(91614);let c=(e,t)=>{let l=(0,i.useSetAtom)(n.or),a=(0,i.useSetAtom)(n.s_),s=(0,i.useAtomValue)(n.MJ),c=(0,r.useRef)(new Set);(0,r.useEffect)(()=>{!(!e||s.has(e))&&(a(t=>new Set(t).add(e)),c.current.has(e)||(c.current.add(e),l(t=>{var l;return{...t,[e]:(null!=(l=t[e])?l:0)+1}}),(0,o.R)(e),(0,d.Wg)(null!=t?t:e)))},[e,t,l,a,s])};var u=l(98361),m=l(22964);let x=()=>{let e=(0,s.usePathname)(),t=(0,i.useAtomValue)(n.PH)(e);return m.s.render("popup-manager","PopupManager: ".concat(t.length," active popup(s) on route ").concat(e),{route:e},{popups:t.map(e=>({id:e.id,name:e.name}))}),(0,a.jsx)(a.Fragment,{children:t.map(e=>(0,a.jsx)(p,{popup:e},e.id))})};function p(e){let{popup:t}=e;return c(t.id,t.name),m.s.render(t.id,"Rendering popup: ".concat(t.name),{route:t.routes},{popup:t}),(0,a.jsx)(u.PopupRenderer,{popup:t})}},58402:(e,t,l)=>{"use strict";l.d(t,{default:()=>u});var a=l(95155),i=l(12115),s=l(6874),n=l.n(s),r=l(81727),o=l(91614),d=l(3371),c=l(77784);function u(){let[e,t]=(0,i.useState)(!1),[l,s]=(0,i.useState)(!1),u=(0,c.E)();(0,i.useEffect)(()=>
1{if(!u&&!(0,r.UV)()){let e=setTimeout(()=>{t(!0)},500);return()=>clearTimeout(e)}},[u]);let m=async()=>{let e=(0,r.F6)(),l={status:r.PI.ACCEPTED,timestamp:Date.now(),version:r.aL,userId:e||void 0,userAgent:"undefined"!=typeof navigator?navigator.userAgent:""};(0,r.xQ)(e||void 0),window._hsq&&(window._hsq.push(["doNotTrack",{track:!0}]),(0,d.logInfo)("â HubSpot tracking enabled via consent API")),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"dnt_status",doNotTrack:!1}),(0,d.logInfo)("â GTM notified: doNotTrack=false (tracking enabled)"),await (0,o.EX)(l),s(!0),setTimeout(()=>{t(!1)},300),setTimeout(()=>{window.location.reload()},500)},x=async()=>{let e=(0,r.F6)(),l={status:r.PI.DECLINED,timestamp:Date.now(),version:r.aL,userId:e||void 0,userAgent:"undefined"!=typeof navigator?navigator.userAgent:""};(0,r.Nk)(e||void 0),window._hsq&&(window._hsq.push(["revokeCookieConsent"]),(0,d.logInfo)("â HubSpot tracking cookies revoked via consent API")),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"dnt_status",doNotTrack:!0}),(0,d.logInfo)("â GTM notified: doNotTrack=true (tracking disabled)"),await (0,o.EX)(l),s(!0),setTimeout(()=>{t(!1)},300)};return u||!e?null:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"cookie-overlay"}),(0,a.jsx)("div",{className:"cookie-banner-wrapper ".concat(l?"cookie-banner-closing":""),children:(0,a.jsx)("div",{className:"cookie-banner",id:"ik-cookie-banner",children:(0,a.jsxs)("div",{className:"cookie-banner-content",children:[(0,a.jsxs)("div",{className:"cookie-banner-header",children:[(0,a.jsx)("strong",{className:"cookie-banner-heading",children:"Life's better with cookies"}),(0,a.jsx)("img",{src:"/cookie.svg",alt:"Cookie",width:40,height:40,className:"cookie-banner-icon"})]}),(0,a.jsx)("p",{className:"cookie-banner-text",children:(0,a.jsxs)("span",{className:"cookie-banner-body",children:["We use cookies across iKhokha websites to improve your experience and provide personalised services to you! See our"," ",(0,a.jsx)(n(),{href:"/terms-and-conditions",target:"_blank",rel:"noopener noreferrer",className:"cookie-banner-link",children:"Terms and Conditions"}),"."]})}),(0,a.jsxs)("div",{className:"cookie-banner-buttons",children:[(0,a.jsx)("button",{onClick:m,className:"cookie-banner-btn cookie-banner-btn-accept","aria-label":"Accept cookies",children:"Bring on the cookies"}),(0,a.jsx)("button",{onClick:x,className:"cookie-banner-btn cookie-banner-btn-decline","aria-label":"Decline non-essential cookies",children:"No, thanks"})]})]})})})]})}},59225:(e,t,l)=>{"use strict";l.d(t,{PopupInitializerClient:()=>r});var a=l(12115),i=l(13353),s=l(2495),n=l(22964);let r=(0,a.memo)(function(e){let{initialPopups:t,isDraftMode:l=!1}=e,r=(0,i.useSetAtom)(s.XD);return(0,a.useEffect)(()=>{if(n.s.setDraftMode(l),n.s.init("Initializing popup system with ".concat(t.length," popup(s)"),t.map(e=>({id:e.id,name:e.name,routes:e.routes,triggerType:e.trigger.type}))),r(t),t.some(e=>{var t;return(null==(t=e.display)?void 0:t.variant)==="banner"})){let e=document.createElement("link");e.rel="preload",e.as="image",e.href="/images/popup/popup-background-long.svg",document.head.appendChild(e)}},[t,r,l]),null})},62208:(e,t,l)=>{"use strict";l.d(t,{i:()=>i});var a=l(12115);let i=e=>{(0,a.useEffect)(()=>{let t=t=>{"Escape"===t.key&&e()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e])}},65856:(e,t,l)=>{"use strict";l.d(t,{Q:()=>i});var a=l(34477);let i=(0,a.createServerReference)("7ff8a8624fe449cab4132f142f323de0341744130d",a.callServer,void 0,a.findSourceMapURL,"revalidateSyncTags")},71635:(e,t,l)=>{"use strict";l.d(t,{default:()=>n});var a=l(12115),i=l(81727),s=l(26690);function n(){return(0,a.useEffect)(()=>{let e=()=>{let e=(0,i.XW)();window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"dnt_status",doNotTrack:!e}),(0,s.logInfo)("â GTM consent status pushed: doNotTrack=".concat(!e))},t=0,l=null,a=()=>{window.dataLayer&&window.dataLayer.some(e=>"gtm.js"===e.event)?(l&&clearInterval(l),e()):t>=50&&(l&&clearInterval(l),e(),(0,s.logInfo)("GTM: Pushed consent status after maximum wait time")),t++};a(),t<50&&!l&&(l=setInterval(a,100));let n=e=>{let t="accepted"===e.detail.status;window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"dnt_status",doNotTrack:!t}),(0,s.logInfo)("â GTM consent updated: doNotTrack=".concat(!t))};
1return window.addEventListener("consentChange",n),()=>{l&&clearInterval(l),window.removeEventListener("consentChange",n)}},[]),null}},76845:(e,t,l)=>{"use strict";l.d(t,{default:()=>f});var a=l(95155),i=l(12115),s=l(27863),n=l(97847),r=l(3652),o=l(38348),d=l(66625),c=l(11622),u=l(9891),m=l(68446),x=l(22964);function p(e){let{popup:t,isExpanded:l,onToggle:i}=e,r={active:{icon:"â
",color:"text-green-400",bgColor:"bg-green-900/30"},blocked:{icon:"â",color:"text-red-400",bgColor:"bg-red-900/30"},skipped:{icon:"âï¸",color:"text-gray-400",bgColor:"bg-gray-800/50"}}[t.finalStatus];return(0,a.jsxs)("div",{className:"rounded ".concat(r.bgColor," mb-1"),children:[(0,a.jsxs)("button",{onClick:i,className:"flex w-full items-center gap-2 px-2 py-1.5 text-left text-xs hover:bg-white/5",children:[l?(0,a.jsx)(s.a,{className:"h-3 w-3 text-gray-400"}):(0,a.jsx)(n.K,{className:"h-3 w-3 text-gray-400"}),(0,a.jsx)("span",{className:"flex-1 truncate font-medium text-white",children:t.popupName}),(0,a.jsxs)("span",{className:"".concat(r.color," text-[10px] uppercase"),children:[r.icon," ",t.finalStatus]})]}),l&&(0,a.jsxs)("div",{className:"border-t border-gray-700/50 px-2 py-1.5",children:[t.steps.map((e,t)=>{let l={passed:{icon:"â",color:"text-green-400"},failed:{icon:"â",color:"text-red-400"},skipped:{icon:"â",color:"text-gray-500"}}[e.status];return(0,a.jsxs)("div",{className:"flex items-start gap-1.5 py-0.5 text-[10px] ".concat(l.color),children:[(0,a.jsx)("span",{className:"w-3 flex-shrink-0",children:l.icon}),(0,a.jsxs)("span",{className:"text-gray-400",children:["[",e.checkpoint,"]"]}),(0,a.jsx)("span",{className:"flex-1",children:e.reason})]},t)}),0===t.steps.length&&(0,a.jsx)("div",{className:"py-0.5 text-[10px] text-gray-500",children:"No steps recorded"})]})]})}function h(e){let{runs:t,currentRunId:l,onSelect:i}=e;return t.length<=1?null:(0,a.jsxs)("div",{className:"mb-2 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-[10px] text-gray-500",children:"History:"}),(0,a.jsx)("div",{className:"flex gap-1",children:t.slice(0,5).map((e,t)=>(0,a.jsx)("button",{onClick:()=>i(e.id),className:"rounded px-1.5 py-0.5 text-[10px] ".concat(e.id===l?"bg-purple-600 text-white":"bg-gray-700 text-gray-300 hover:bg-gray-600"),title:"".concat(e.route," - ").concat(new Date(e.startTime).toLocaleTimeString()),children:t+1},e.id))})]})}let g="popup-debug-dismissed",v="popup-debug-position";function f(){let[e,t]=(0,i.useState)(!1),[l,s]=(0,i.useState)(!1),[n,f]=(0,i.useState)(!1),[b,j]=(0,i.useState)(null),[y,w]=(0,i.useState)([]),[N,k]=(0,i.useState)(new Set),[C,P]=(0,i.useState)({x:16,y:16}),[I,S]=(0,i.useState)(!1),E=(0,i.useRef)({x:0,y:0,posX:0,posY:0});(0,i.useEffect)(()=>{{"true"===sessionStorage.getItem(g)&&s(!0);let e=sessionStorage.getItem(v);if(e)try{let t=JSON.parse(e);P(t)}catch(e){}}},[]),(0,i.useEffect)(()=>{(16!==C.x||16!==C.y)&&sessionStorage.setItem(v,JSON.stringify(C))},[C]);let A=(0,i.useCallback)(()=>{t(!1),s(!0),sessionStorage.setItem(g,"true")},[]),D=(0,i.useCallback)(e=>{e.preventDefault(),S(!0),E.current={x:e.clientX,y:e.clientY,posX:C.x,posY:C.y}},[C]);(0,i.useEffect)(()=>{if(!I)return;let e=e=>{let t=E.current.x-e.clientX,l=E.current.y-e.clientY;P({x:Math.max(0,E.current.posX+t),y:Math.max(0,E.current.posY+l)})},t=()=>{S(!1)};return window.addEventListener("mousemove",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("mousemove",e),window.removeEventListener("mouseup",t)}},[I]),(0,i.useEffect)(()=>{let e=x.s.onRunComplete(e=>{j(e),w(x.s.getRuns()),e.totalPopups>0&&!l&&t(!0)}),a=x.s.getRuns();return a.length>0&&(w(a),j(a[0])),e},[]),(0,i.useEffect)(()=>{let e=e=>{e.ctrlKey&&e.shiftKey&&"P"===e.key&&(e.preventDefault(),l?(s(!1),sessionStorage.removeItem(g),t(!0)):t(e=>!e))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[l]),(0,i.useEffect)(()=>(window.__popupDebug={showPanel:()=>{s(!1),sessionStorage.removeItem(g),t(!0)},hidePanel:()=>t(!1),togglePanel:()=>{l?(s(!1),sessionStorage.removeItem(g),t(!0)):t(e=>!e)},getLastRun:()=>x.s.getLastRun(),getRuns:()=>x.s.getRuns(),logLastRun:()=>x.s.logLastRun()},()=>{delete window.__popupDebug}),[l]);let T=(0,i.useCallback)(e=>{k(t=>{let l=new Set(t);return l.has(e)?l.delete(e):l.add(e),l})},[]),R=(0,i.useCallback)(()=>{let e=x.s.getLastRun();e&&(j(e),w(x.s.getRuns()))},[]),L=(0,i.useCallback)(e=>{let t=x.s.getRuns().find(t=>
1t.id===e);t&&j(t)},[]);return l?null:e?(0,a.jsxs)("div",{style:{right:C.x,bottom:C.y},className:"font-mono fixed z-[99999] overflow-hidden rounded-lg border border-gray-700 bg-gray-900 text-white shadow-2xl transition-all ".concat(n?"h-[80vh] w-[500px]":"h-[400px] w-[360px]"," ").concat(I?"cursor-grabbing":""),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between border-b border-gray-700 bg-gray-800 px-3 py-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{onMouseDown:D,className:"cursor-grab rounded p-0.5 text-gray-500 hover:bg-gray-700 hover:text-gray-300 active:cursor-grabbing",title:"Drag to move",children:(0,a.jsx)(o.H,{className:"h-4 w-4"})}),(0,a.jsx)(r.z,{className:"h-4 w-4 text-purple-400"}),(0,a.jsx)("span",{className:"text-sm font-semibold",children:"Popup Debug"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("button",{onClick:R,className:"rounded p-1 text-gray-400 hover:bg-gray-700 hover:text-white",title:"Refresh",children:(0,a.jsx)(d.S,{className:"h-4 w-4"})}),(0,a.jsx)("button",{onClick:()=>f(!n),className:"rounded p-1 text-gray-400 hover:bg-gray-700 hover:text-white",title:n?"Collapse":"Expand",children:n?(0,a.jsx)(c.O,{className:"h-4 w-4"}
1):(0,a.jsx)(u.j,{className:"h-4 w-4"})}),(0,a.jsx)("button",{onClick:A,className:"rounded p-1 text-gray-400 hover:bg-gray-700 hover:text-white",title:"Dismiss for this session (Ctrl+Shift+P to reopen)",children:(0,a.jsx)(m.X,{className:"h-4 w-4"})})]})]}),(0,a.jsx)("div",{className:"h-[calc(100%-44px)] overflow-y-auto p-3",children:b?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mb-3 rounded bg-gray-800 p-2",children:[(0,a.jsxs)("div",{className:"mb-1 flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-[10px] uppercase text-gray-500",children:"Route"}),(0,a.jsx)("span",{className:"text-xs text-purple-400",children:b.route})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-[10px] uppercase text-gray-500",children:"Result"}),(0,a.jsxs)("span",{className:"text-xs",children:[(0,a.jsx)("span",{className:"text-gray-400",children:"Evaluated:"})," ",(0,a.jsx)("span",{className:"text-white",children:b.totalPopups}),(0,a.jsx)("span",{className:"mx-1 text-gray-600",children:"|"}),(0,a.jsx)("span",{className:"text-gray-400",children:"Active:"})," ",(0,a.jsx)("span",{className:"text-green-400",children:b.activeCount})]})]}),b.firedEvents.length>0&&(0,a.jsxs)("div",{className:"mt-1.5 border-t border-gray-700 pt-1.5",children:[(0,a.jsx)("span",{className:"text-[10px] uppercase text-gray-500",children:"Events"}),(0,a.jsx)("div",{className:"mt-0.5 flex flex-wrap gap-1",children:b.firedEvents.map((e,t)=>(0,a.jsxs)("span",{className:"flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] ".concat(e._persisted?"bg-amber-900/50 text-amber-300":"bg-blue-900/50 text-blue-300"),title:e._persisted?"Replayed from previous session":void 0,children:[e.type,e._persisted&&(0,a.jsx)("span",{className:"text-amber-500",children:"â©"})]},t))})]})]}),(0,a.jsx)(h,{runs:y,currentRunId:b.id,onSelect:L}),(0,a.jsx)("div",{className:"mb-2 text-[10px] uppercase text-gray-500",children:"Popup Decisions"}),b.popupDecisions.length>0?b.popupDecisions.map(e=>(0,a.jsx)(p,{popup:e,isExpanded:N.has(e.popupId),onToggle:()=>T(e.popupId)},e.popupId)):(0,a.jsx)("div",{className:"rounded bg-gray-800 p-3 text-center text-xs text-gray-500",children:"No popups configured"})]}):(0,a.jsxs)("div",{className:"flex h-full flex-col items-center justify-center text-center",children:[(0,a.jsx)(r.z,{className:"mb-2 h-8 w-8 text-gray-600"}),(0,a.jsx)("div",{className:"text-sm text-gray-400",children:"No evaluation runs yet"}),(0,a.jsx)("div",{className:"mt-1 text-[10px] text-gray-600",children:"Navigate to a page to trigger popup evaluation"})]})})]}):(0,a.jsxs)("button",{onClick:()=>t(!0),style:{right:C.x,bottom:C.y},className:"fixed z-[99999] flex items-center gap-1.5 rounded-full bg-purple-600 px-3 py-1.5 text-xs font-medium text-white shadow-lg transition-all hover:bg-purple-500",title:"Open Popup Debug Panel (Ctrl+Shift+P)",children:[(0,a.jsx)(r.z,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{children:"Popup Debug"})]})}},77784:(e,t,l)=>{"use strict";l.d(t,{E:()=>i});var a=l(35695);let i=()=>"true"===(0,a.useSearchParams)().get("embedded")},92052:(e,t,l)=>{"use strict";l.d(t,{y:()=>i});var a=l(12115);let i=()=>{(0,a.useEffect)(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}),[])}},92728:(e,t,l)=>{"use strict";l.d(t,{default:()=>d});var a=l(95155),i=l(63554),s=l(12115),n=l(81727),r=l(6124),o=l(26690);function d(){return(0,s.useEffect)(()=>{let e=()=>{(0,n.XW)()?(window._hsq.push(["doNotTrack",{track:!0}]),(0,o.logInfo)("HubSpot: Tracking enabled (consent given)")):(window._hsq.push(["doNotTrack"]),(0,o.logInfo)("HubSpot: Tracking disabled by default (no consent)"))},t=0,l=null,a=()=>{window._hsq?(l&&clearInterval(l),e()):t>=50&&(l&&clearInterval(l),(0,o.logInfo)("HubSpot: Script not ready after maximum wait time")),t++};return a(),!window._hsq&&t<50&&(l=setInterval(a,100)),()=>{l&&clearInterval(l)}},[]),(0,a.jsx)(i.default,{type:"text/javascript",id:"hs-script-loader",strategy:"afterInteractive",src:"//js-eu1.hs-scripts.com/".concat(r.u,".js"),onLoad:()=>{(0,o.logInfo)("â HubSpot script loaded (chat + tracking controlled by consent)")}})}},93175:(e,t,l)=>{"use strict";l.r(t),l.d(t,{default:()=>c});var a=l(95155),i=l(19830),s=l(99289),n=l(44038),r=l(12115);function o(){let[e,t]=(0,r.useTransition)();return window!==window.parent?null:(0,a.jsx)("div",{className:"fixed bottom-4 left-4 z-50",children:(0,a.jsx)("button",{type:"button",onClick:()=>t(async()=>{location.href="/api/disable-draft"}),className:"rounded-lg bg-red-600 px-4 py-2 font-semibold text-white shadow-md transition-all hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-opacity-50",children:e?"Disabling...":"Disable Draft Mode"})})}let d=n.S.withConfig({stega:!0});function c(){return(0,i.XL)({client:d}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o,{}),(0,a.jsx)(s.FV,{})]})}},94389:(e,t,l)=>{"use strict";l.d(t,{default:()=>s});var a=l(43524),i=l(12115);function s(){return(0,i.useEffect)(()=>{a.KV&&Promise.resolve().then(l.bind(l,26690))},[]),null}},94997:(e,t,l)=>{"use strict";l.d(t,{default:()=>h});var a=l(95155),i=l(12747),s=l(31530);let n={success:"#16a34a",error:"#dc2626",loading:"#9ca3af"},r=()=>(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,a.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),o=()=>(0,a.jsx)("svg",{"aria-hidden":"true",viewBox:"0 0 14 16",width:"14",height:"16",fill:"currentColor",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})}),d=e=>"function"==typeof e.message?e.message(e):e.message;function c(e){let{id:t,className:l,children:i}=e;return(0,a.jsx)("button",{onClick:()=>s.oR.dismiss(t),"aria-label":"Dismiss",className:l,children:i})}
1function u(e){let{duration:t,color:l,height:i}=e;return t===1/0?null:(0,a.jsx)("div",{className:"toast-progress-bar group-hover:[animation-play-state:paused]",style:{animationDuration:"".concat(t,"ms"),background:l,...i?{height:i}:{}}})}function m(e){var t,l;let{t:s}=e,n=null!=(t=s.duration)?t:4e3,r="error"===s.type;return(0,a.jsxs)("div",{className:"group relative flex min-h-[64px] items-center overflow-hidden rounded-md p-5 shadow-[0px_4px_12px_rgba(0,0,0,0.1)] !text-white ".concat(r?"w-[min(400px,92vw)]":"w-[min(350px,92vw)]"," ").concat(null!=(l=s.className)?l:""),style:{animation:"".concat(s.visible?"toast-bounce-in-left":"toast-bounce-out-left"," 0.5s both")},children:[r&&(0,a.jsx)(i.i,{size:22,weight:"fill",className:"mr-2.5 flex-shrink-0 text-white"}),(0,a.jsx)("div",{className:"flex-1 text-sm",children:d(s)}),(0,a.jsx)(c,{id:s.id,className:"absolute right-1.5 top-1.5 transition-opacity hover:!opacity-100 ".concat(r?"text-white opacity-70":"!text-black opacity-30"),children:(0,a.jsx)(o,{})}),(0,a.jsx)(u,{duration:n,color:"#1D1D1B",height:5})]})}function x(e){var t,l;let{t:i}=e,o=null!=(t=i.duration)?t:4e3,d=null!=(l=n[i.type])?l:"#9ca3af";return(0,a.jsx)(s.bv,{toast:i,style:{background:"transparent",boxShadow:"none",padding:0,minWidth:0,maxWidth:"100%"},children:e=>{let{icon:t,message:l}=e;return(0,a.jsxs)("div",{className:"group relative flex w-full min-w-[280px] max-w-sm items-center gap-3 overflow-hidden rounded-md bg-white px-4 py-3 text-gray-800 shadow-lg",children:[t&&(0,a.jsx)("span",{className:"flex-shrink-0",children:t}),(0,a.jsx)("div",{className:"flex-1 text-sm leading-snug",children:l}),(0,a.jsx)(c,{id:i.id,className:"ml-1 flex-shrink-0 opacity-60 transition-opacity hover:opacity-100",children:(0,a.jsx)(r,{})}),(0,a.jsx)(u,{duration:o,color:d})]})}})}let p=e=>{var t,l;return!!((null==(t=e.className)?void 0:t.includes("gradient"))||(null==(l=e.className)?void 0:l.includes("from-")))};function h(){return(0,a.jsx)(s.l$,{toastOptions:{style:{padding:0,background:"transparent",boxShadow:"none",borderRadius:0,maxWidth:"100%"}},children:e=>"custom"===e.type?(0,a.jsx)(a.Fragment,{children:d(e)}):p(e)?(0,a.jsx)(m,{t:e}):(0,a.jsx)(x,{t:e})})}},96255:(e,t,l)=>{"use strict";l.d(t,{default:()=>p});var a=l(95155),i=l(91614),s=l(40529),n=l(57334),r=l(70161),o=l(13353),d=l(12115),c=l(31530),u=l(99430),m=l(35695),x=l(87358);function p(e){var t,l,u,p,g,v,f;let{toast:b}=e,j=(0,o.useAtomValue)(n.I),y=(0,o.useAtomValue)(r.B),[w,N]=(0,o.useAtom)(r.o),k=(0,m.usePathname)(),C=(0,m.useSearchParams)(),P=(0,d.useRef)(!1),I=(0,d.useRef)(null),S=()=>{I.current&&(clearTimeout(I.current),I.current=null)},E=(null==b||null==(t=b.displayOptions)?void 0:t.delay)?1e3*b.displayOptions.delay:5e3,A=(null==b||null==(l=b.displayOptions)?void 0:l.duration)?(null==b||null==(u=b.displayOptions)?void 0:u.duration)*1e3:1e4,D=(e,t)=>t.some(t=>{if(t.endsWith("*")){let l=t.slice(0,-1);return e.startsWith(l)}return e===t}),T=(e,t,l)=>{let a=t.toString();return l.some(t=>{let{path:l,query:i}=t;return e===l&&(!i||i.every(e=>a.includes(e)))})},R=()=>{N(e=>{let t=Array.isArray(e)?e:[];return t.includes(b._key)?t:[b._key,...t]})};(0,d.useEffect)(()=>{try{var e,t,l,n;let r=j&&(null==b||null==(t=b.button)||null==(e=t.link)?void 0:e.linkType)==="ssu",o=(null==b?void 0:b._key)&&(null==w?void 0:w.includes(null==b?void 0:b._key)),d=null===y&&(null==b||null==(n=b.button)||null==(l=n.link)?void 0:l.url)==="purchase-journey";if(r||o||d)return void S();P.current||(P.current=!0,I.current=setTimeout(()=>{var e,t,l,n,r,o;let d=(null==(t=b.displayOptions)||null==(e=t.include)?void 0:e.routes)||[],u=(null==(n=b.displayOptions)||null==(l=n.exclude)?void 0:l.routes)||[];if(d.length>0){if(!T(window.location.pathname,C,d))return}else if(u.length>0&&D(window.location.pathname,u))return;let m=(null==b||null==(r=b.displayOptions)?void 0:r.type)==="error"?"from-red-600 to-red-700":"!bg-gradient-teal";(0,i.Wg)((0,s.A)(null==b?void 0:b.message)),R(),c.oR.custom(e=>(0,a.jsx)(h,{t:e,toastData:b,bgClass:m,onDismiss:R}),{duration:A,position:null==b||null==(o=b.displayOptions)?void 0:o.position}),S()},E))}catch(e){}},[j,w,k,C,y,b]);let L=j&&(null==b||null==(g=b.button)||null==(p=g.link)?void 0:p.linkType)==="ssu",F=(null==b?void 0:b._key)&&(null==w?void 0:w.includes(null==b?void 0:b._key)),_=null===y&&(null==b||null==(f=b.button)||null==(v=f.link)?void 0:v.url)==="purchase-journey";return L||F||_||"true"===x.env.NEXT_PUBLIC_MAINTENANCE_MODE?null:(0,a.jsx)(a.Fragment,{})}function h(e){var t;let{t:l,toastData:i,bgClass:s,onDismiss:n}=e;(0,d.useEffect)(()=>{l.visible||n()},[l.visible,n]);let r=(null==i||null==(t=i.displayOptions)?void 0:t.duration)?1e3*i.displayOptions.duration:1e4;return(0,a.jsxs)("div",{className:"group relative w-[min(400px,90vw)] overflow-hidden rounded-md !bg-gradient-to-r ".concat(s," !text-white !shadow !shadow-lg"),children:[(0,a.jsx)("div",{className:"relative z-10 p-3.5 pr-9",children:(0,a.jsx)(u.A,{toast:i})}),(0,a.jsx)("button",{type:"button",onClick:()=>{n(),c.oR.dismiss(l.id)},"aria-label":"Dismiss",className:"absolute right-2 top-2 z-10 opacity-70 transition-opacity hover:opacity-100",children:(0,a.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,a.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,a.jsx)("div",{className:"toast-progress-bar group-hover:[animation-play-state:paused]",style:{animationDuration:"".concat(r,"ms"),background:"rgba(255,255,255,0.4)"}})]})}},98361:(e,t,l)=>{"use strict";l.d(t,{PopupRenderer:()=>Q});var a=l(95155),i=l(12115),s=l(62649),n=l(30596);let r=e=>{let{show:t,onClick:l,opacity:i=.5}=e;return(0,a.jsx)(n.N,{children:t&&(0,a.jsx)(s.P.div,{initial:{opacity:0}
1,animate:{opacity:i},exit:{opacity:0},transition:{duration:.2},onClick:l,className:"fixed inset-0 bg-black z-40","aria-hidden":"true"})})};var o=l(68446);let d=e=>{let{onClick:t,variant:l="dark",className:i=""}=e;return(0,a.jsx)("button",{onClick:e=>{e.stopPropagation(),t()},className:"absolute right-4 top-4 z-50 rounded-full p-1 transition-colors ".concat("light"===l?"text-[#343434] hover:text-gray-200 bg-white":"text-yellow-500 hover:text-gray-900 bg-[#343434]"," ").concat(i),"aria-label":"Close popup",children:(0,a.jsx)(o.X,{size:24,weight:"bold"})})};var c=l(7919),u=l(13799),m=l(92126);let x=e=>{let{popup:t,onCtaClick:l,className:i=""}=e,s=t.content,n=(null==s?void 0:s.heading)||null,r=null==s?void 0:s.body,o=null==s?void 0:s.cta,d=(null==o?void 0:o.label)||t.ctaText,x=(null==o?void 0:o.link)||(t.ctaUrl?{url:t.ctaUrl,type:"external"}:null);return(0,a.jsxs)("div",{className:"space-y-4 ".concat(i),children:[(null==n?void 0:n.length)?(0,a.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:(0,a.jsx)(c.RK,{value:n,components:m.dK})}):null,(null==r?void 0:r.length)?(0,a.jsx)("div",{className:"text-body1 leading-relaxed [&_a]:text-teal [&_a]:underline",children:(0,a.jsx)(c.RK,{value:r,components:m.dK})}):null,d&&x&&(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(u.A,{link:x,onClick:l,color:"teal",className:"inline-block",children:d})})]})};var p=l(66766),h=l(57003),g=l(8055);let v=e=>({id:e._id,title:e.title,slug:e.slug,categorySlug:e.categorySlug,price:e.price,compareAtPrice:e.compareAtPrice,image:e.image,quantity:1}),f=e=>{var t;return{id:e.id,title:e.product.title||e.product.sanityTitle||"Product",slug:e.product.slug,categorySlug:e.product.categorySlug,price:e.product.price,image:e.product.previewImageUrl||(null==(t=e.product.images)?void 0:t.url),quantity:e.quantity}},b=e=>{let{product:t,isCartItem:l}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-5",children:[t.image&&(0,a.jsxs)("div",{className:"relative h-[4.5rem] w-[4.5rem] flex-shrink-0 rounded-md bg-[#ffcd00]",children:[(0,a.jsx)(p.default,{src:t.image,alt:t.title,fill:!0,className:"object-contain p-1"}),l&&(0,a.jsx)("div",{className:"text-body1 absolute -right-3 -top-3 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-white text-center font-normal text-charcoal",children:(0,a.jsx)("span",{children:t.quantity})})]}),(0,a.jsx)("span",{className:"text-body1 truncate font-normal text-white",children:t.title})]}),(0,a.jsxs)("div",{className:"flex flex-shrink-0 flex-row-reverse items-center gap-5",children:[!l&&(0,a.jsx)("div",{className:"text-body1 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-yellow-500 text-center font-normal text-charcoal",children:(0,a.jsx)("span",{children:t.quantity})}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-0.5",children:[t.price&&(0,a.jsx)("span",{className:"text-body1 font-semibold leading-4 text-white",children:(0,h.M9)(t.price*t.quantity)}),t.compareAtPrice&&t.compareAtPrice>(t.price||0)&&(0,a.jsx)("span",{className:"text-body1 leading-4 text-[#757575] line-through",children:(0,h.M9)(t.compareAtPrice*t.quantity)})]})]})]})},j="flex items-center justify-between gap-3 rounded-lg p-2",y=e=>{let{product:t,isCartItem:l,linkable:i}=e,s=!!(t.slug&&t.categorySlug);return i&&s?(0,a.jsx)(g.default,{link:{url:t.slug,category:t.categorySlug,type:"internal",document:"product"},className:"".concat(j," transition-colors hover:bg-white/20"),children:(0,a.jsx)(b,{product:t,isCartItem:l})}):(0,a.jsx)("div",{className:j,children:(0,a.jsx)(b,{product:t,isCartItem:l})})},w=e=>{let{products:t,cartItems:l,className:i="",linkable:s=!1}=e,n=(null==l?void 0:l.length)?l.filter(e=>!e.hideLineItem).map(f):(null==t?void 0:t.map(v))||[];if(0===n.length)return null;let r=!!(null==l?void 0:l.length);return(0,a.jsxs)("div",{className:"flex flex-col gap-5 ".concat(r?"w-[90%]":""," ").concat(i),children:[(0,a.jsx)("div",{className:"flex flex-col gap-2",children:n.map(e=>(0,a.jsx)(y,{product:e,isCartItem:r,linkable:s},e.id))}),!r&&(0,a.jsx)("div",{className:"h-px bg-[#424242]"})]})},N=e=>({"slide-in-top":{initial:{y:"-100%",opacity:0}
1,animate:{y:0,opacity:1},exit:{y:"-100%",opacity:0}},"slide-in-bottom":{initial:{y:"100%",opacity:0},animate:{y:0,opacity:1},exit:{y:"100%",opacity:0}},"slide-in-left":{initial:{x:"-100%",opacity:0},animate:{x:0,opacity:1},exit:{x:"-100%",opacity:0}},"slide-in-right":{initial:{x:"100%",opacity:0},animate:{x:0,opacity:1},exit:{x:"100%",opacity:0}},"zoom-in":{initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.8,opacity:0}},"fade-in":{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}})[e],k={duration:.3,ease:[.4,0,.2,1]},C={initial:{y:"100%"},animate:{y:0},exit:{y:"100%"}};var P=l(97847),I=l(59515),S=l(62208),E=l(92052);let A=e=>{let{index:t,filled:l,rating:n}=e,[r,o]=(0,i.useState)(!1),d=.2*t;return(0,i.useEffect)(()=>{if(l&&!r){let e=setTimeout(()=>o(!0),1e3*d);return()=>clearTimeout(e)}},[l,r,d]),(0,a.jsx)(s.P.svg,{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",initial:{y:0},animate:l&&r?{y:[0,-4,0],transition:{delay:d,duration:.6,ease:"easeOut"}}:{},children:(0,a.jsx)(s.P.path,{d:"M9.5 1.5L11.5 7.5H17.5L12.5 11.5L14.5 17.5L9.5 13.5L4.5 17.5L6.5 11.5L1.5 7.5H7.5L9.5 1.5Z",initial:{fill:"#9ca3af"},animate:{fill:l?"#ffcd00":"#9ca3af",transition:{delay:d,duration:.5}}})})},D=e=>{var t,l,i,o,x,g,v,f,b,j,y,w,D,T,R;let{popup:L,onClose:F}=e,_=L.display,z=N((null==_?void 0:_.animation)||"zoom-in"),K=L.content,B=(0,I.B)();(0,E.y)(),(0,S.i)(F);let O=(null==K?void 0:K.heading)||null,U=null==K?void 0:K.body,M=null==K?void 0:K.ctaPrimary,V=e=>{var t;let l=null!=(t=null==K?void 0:K.imageFit)?t:"auto";return"cover"===l||"contain"===l?l:(null==e?void 0:e.isOpaque)?"cover":"contain"},X=e=>"cover"===V(e)?"object-cover":"object-contain",q=(e,t)=>"cover"===V(e)?"":t,H=null==K||null==(t=K.products)?void 0:t[0];return(0,a.jsxs)("div",{className:"fixed inset-0 z-[900]",children:[(0,a.jsx)(r,{show:!0,onClick:F,opacity:B?.95:.5}),(0,a.jsx)("div",{className:"pointer-events-none fixed inset-0 flex ".concat(B?"z-[60] items-end":"z-50 items-center justify-center p-4"),children:(0,a.jsx)(n.N,{children:(0,a.jsxs)(s.P.div,{initial:B?C.initial:z.initial,animate:B?C.animate:z.animate,exit:B?C.exit:z.exit,transition:k,className:"pointer-events-auto relative w-full overflow-visible ".concat(B?"rounded-t-xl":"max-w-[1235px] rounded-[10px]"),style:B?{height:"calc(95dvh - env(safe-area-inset-bottom, 0px))"}:{perspective:"1000px"},role:"dialog","aria-modal":"true","aria-labelledby":"modal-title",children:[!(null==K?void 0:K.detachedImage)&&!B&&(0,a.jsx)(d,{onClick:F,variant:(null==_?void 0:_.closeButtonVariant)||"light"}),B&&(0,a.jsx)(d,{onClick:F,variant:(null==_?void 0:_.closeButtonVariant)||"light",className:"!right-6 !top-6 z-30"}),!B&&(0,a.jsx)("svg",{width:"0",height:"0",className:"absolute",children:(0,a.jsxs)("defs",{children:[(0,a.jsx)("clipPath",{id:"wave-flag",clipPathUnits:"objectBoundingBox",children:(0,a.jsx)("path",{d:"M 0.5,0.057 C 0.78,0.17 0.958,0.077 0.993,0.059 0.997,0.058 1,0.063 1,0.07 V 0.943 C 1,0.949 0.998,0.954 0.995,0.955 0.967,0.971 0.805,1.047 0.5,0.953 0.207,0.862 0.046,0.929 0.009,0.948 0.005,0.951 0,0.944 0,0.935 V 0.697 V 0.07 C 0,0.063 0.004,0.056 0.007,0.054 0.042,0.037 0.219,-0.056 0.5,0.057 Z",transform:"scale(1, 1)"})}),(0,a.jsxs)("linearGradient",{id:"wave-gradient",x1:"50%",y1:"0%",x2:"50%",y2:"100%",children:[(0,a.jsx)("stop",{offset:"0%",stopColor:"#FFCD00"}),(0,a.jsx)("stop",{offset:"30%",stopColor:"#F7AA04"}),(0,a.jsx)("stop",{offset:"60%",stopColor:"#FF4081"}),(0,a.jsx)("stop",{offset:"100%",stopColor:"#009EAC"})]})]})}),(0,a.jsxs)("div",{className:"relative overflow-visible ".concat(B?"h-full":""),style:B?{}:{transformStyle:"preserve-3d",animation:"popup-modal-wave-flag 3s ease-in-out infinite"},children:[!B&&(0,a.jsx)("svg",{className:"pointer-events-none absolute inset-0 z-10 h-full w-full",viewBox:"0 0 1 1",preserveAspectRatio:"none",children:(0,a.jsx)("path",{d:"M 0.5,0.057 C 0.78,0.17 0.958,0.077 0.993,0.059 0.997,0.058 1,0.063 1,0.07 V 0.943 C 1,0.949 0.998,0.954 0.995,0.955 0.967,0.971 0.805,1.047 0.5,0.953 0.207,0.862 0.046,0.929 0.009,0.948 0.005,0.951 0,0.944 0,0.935 V 0.697 V 0.07 C 0,0.063 0.004,0.056 0.007,0.054 0.042,0.037 0.219,-0.056 0.5,0.057 Z",fill:"none",stroke:"url
1(#wave-gradient)",strokeWidth:"0.005"})}),(0,a.jsxs)("div",{className:"relative ".concat(B?"h-full overflow-y-auto rounded-t-[20px]":""),style:B?{backgroundImage:"url(/images/popup/popup-background-large.svg)",backgroundSize:"cover",backgroundPosition:"center"}:{clipPath:"url(#wave-flag)",WebkitClipPath:"url(#wave-flag)",backgroundImage:"url(/images/popup/popup-background-large.svg)",backgroundSize:"cover",backgroundPosition:"center"},children:[B&&(0,a.jsx)("div",{className:"absolute left-0 right-0 rounded-t-xl",style:{background:"linear-gradient(90deg, #FFCD00 0%, #F7AA04 25%, #FF4081 50%, #009EAC 100%)",height:"calc(5rem + env(safe-area-inset-top, 0px))"}}),(0,a.jsxs)("div",{className:"flex min-h-[400px] flex-col md:min-h-[605px] md:flex-row ".concat(B?"pt-2":""),children:[B&&((null==K||null==(l=K.mobileImage)?void 0:l.url)||(null==K||null==(i=K.image)?void 0:i.url))&&(0,a.jsxs)("div",{className:"relative h-60 overflow-hidden rounded-t-[20px] bg-[#ffcd00]",children:[(null==K||null==(o=K.mobileImage)?void 0:o.url)&&(0,a.jsx)("div",{className:"relative h-full w-full ".concat(q(K.mobileImage,"p-6")),children:(0,a.jsx)(p.default,{src:K.mobileImage.url,alt:K.mobileImage.alt||"Product image",fill:!0,className:X(K.mobileImage),placeholder:K.mobileImage.blurDataUrl?"blur":"empty",blurDataURL:K.mobileImage.blurDataUrl})}),(null==K||null==(x=K.image)?void 0:x.url)&&!(null==K||null==(g=K.mobileImage)?void 0:g.url)&&(0,a.jsx)("div",{className:"relative h-full w-full ".concat(q(K.image,"p-6")),children:(0,a.jsx)(p.default,{src:K.image.url,alt:K.image.alt||"Product image",fill:!0,className:X(K.image),placeholder:K.image.blurDataUrl?"blur":"empty",blurDataURL:K.image.blurDataUrl})})]}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-4 p-6 md:gap-6 md:px-12 md:pb-[5.5rem] md:pt-20 ".concat((null==K?void 0:K.detachedImage)?"md:max-w-[600px] md:pr-8":""),children:[(null==K?void 0:K.tag)&&(0,a.jsx)("div",{className:"text-[34px] font-normal leading-[1.235] tracking-[0.25px] text-white",children:K.tag}),O&&(0,a.jsx)("h2",{id:"modal-title",className:"font-sans text-xl font-normal leading-10 tracking-[0.01563rem] md:text-4xl",children:(0,a.jsx)(c.RK,{value:O,components:m.dK})}),(null==H?void 0:H.price)&&(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("span",{className:"md:heading-lg !font-sans text-4xl font-normal leading-[2.62rem] tracking-[0.05rem] text-white md:leading-[3.52rem]",children:(0,h.M9)(H.price)}),H.compareAtPrice&&H.compareAtPrice>H.price&&(0,a.jsx)("span",{className:"md:heading-sm !font-sans text-xl font-normal leading-8 text-gray-500 line-through",children:(0,h.M9)(H.compareAtPrice)})]}),H.compareAtPrice&&H.compareAtPrice>H.price&&(0,a.jsxs)("div",{className:"flex items-center justify-center gap-0.5 rounded-xl bg-pink px-1 uppercase md:px-2 md:py-1",children:[(0,a.jsx)("span",{className:"text-[1.5rem] font-bold text-white sm:leading-[3rem] md:text-[2.16rem] md:font-normal md:leading-none",children:Math.round((H.compareAtPrice-H.price)/H.compareAtPrice*100)}),(0,a.jsxs)("div",{className:"flex flex-col items-start justify-center leading-none",children:[(0,a.jsx)("span",{className:"text-base font-normal leading-none text-white md:text-xl",children:"%"}),(0,a.jsx)("span",{className:"text-xs font-normal leading-none text-white",children:"off"})]})]})]}),(null==K?void 0:K.reviews)&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("div",{className:"flex gap-1",children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>{let l=t+1<=Math.floor(K.reviews.stars);return(0,a.jsx)(A,{index:t,filled:l,rating:K.reviews.stars},t)})}),(0,a.jsx)("div",{className:"text-[16px] leading-[24px] text-[#efe9db]",children:(0,a.jsx)(c.RK,{value:K.reviews.text,components:m.dK})})]}),U&&(0,a.jsx)("div",{className:"text-body1 max-w-[426px] leading-6 [&_a]:text-teal [&_a]:underline",children:(0,a.jsx)(c.RK,{value:U,components:m.dK})}),(null==K?void 0:K.features)&&K.features.length>0&&(0,a.jsx)("div",{className:"flex flex-wrap gap-3",children:K.features.map((e,t)=>{var l;return(0,a.jsxs)("div",{className:"flex items-center gap-2.5 rounded-[5px] bg-[#ffeab1] px-4 py-2.5",children:[(null==(l=e.icon)?void 0:l.url)&&(0,a.jsx)("div",{className:"h-[22px] w-[22px]",children:(0,a.jsx)(p.default,{src:e.icon.url,alt:"",width:22,height:22})}),(0,a.jsx)("span",{className:"text-sm font-bold leading-4 text-[#282825]",children:e.text})]},t)})}),M&&(0,a.jsx)("div",{className:"mt-2 flex justify-center md:justify-start",children:(0,a.jsxs)(u.A,{link:M.link,onClick:F,color:"yellow",className:"flex w-full min-w-72 items-center justify-center gap-1.5 rounded-[10px] !bg-[#ffcd00] px-8 text-center text-lg font-semibold tracking-[0.54px] !text-[#1d1d1b] sm:w-[initial] md:py-4",children:[M.label,(0,a.jsx)(P.K,{size:21,weight:"regular",className:"text-currentColor font-semibold transition-transform duration-500 group-hover:translate-x-2"})]})})]}),!(null==K?void 0:K.detachedImage)&&!B&&(0,a.jsxs)("div",{className:"relative flex flex-1 items-center justify-center rounded-br-[10px] rounded-tr-[10px] bg-[#ffcd00] p-6 md:p-12",children:[(null==K||null==(v=K.image)?void 0:v.url)&&(0,a.jsx)("div",{className:"relative h-full min-h-[300px] w-full md:min-h-[500px]",children:(0,a.jsx)(p.default,{src:K.image.url,alt:K.image.alt||"Product image",f
1ill:!0,className:"object-contain",placeholder:K.image.blurDataUrl?"blur":"empty",blurDataURL:K.image.blurDataUrl})}),(null==K||null==(f=K.mobileImage)?void 0:f.url)&&!(null==K||null==(b=K.image)?void 0:b.url)&&(0,a.jsx)("div",{className:"relative h-full min-h-[300px] w-full",children:(0,a.jsx)(p.default,{src:K.mobileImage.url,alt:K.mobileImage.alt||"Product image",fill:!0,className:"object-contain",placeholder:K.mobileImage.blurDataUrl?"blur":"empty",blurDataURL:K.mobileImage.blurDataUrl})})]})]})]}),(null==K?void 0:K.detachedImage)&&((null==K||null==(j=K.image)?void 0:j.url)||(null==K||null==(y=K.mobileImage)?void 0:y.url))&&(0,a.jsxs)("div",{className:"absolute bottom-8 right-8 z-20 hidden w-[539px] md:block",children:[(0,a.jsx)(d,{onClick:F,variant:(null==_?void 0:_.closeButtonVariant)||"light",className:"!top-10 z-30"}),(0,a.jsx)("div",{className:"relative h-[585px]",children:(0,a.jsx)("div",{className:"relative h-full",style:{clipPath:'path("M0 549.922V8.0266C0 2.83637 4.89896 -0.971033 9.95097 0.218779C238.67 54.0849 443.739 24.9857 528.62 0.927883C533.822 -0.546662 539 3.3354 539 8.74281V550.728C539 554.202 536.809 557.271 533.487 558.286C376.808 606.162 121.807 578.715 6.4217 557.744C2.63587 557.056 0 553.77 0 549.922Z")',background:"linear-gradient(180deg, #FFCD00 0%, #F7AA04 100%)"},children:(0,a.jsxs)("div",{className:"relative h-full w-full ".concat(q(null!=(R=K.image)?R:K.mobileImage,"p-8 pt-24")),children:[(null==K||null==(w=K.image)?void 0:w.url)&&(0,a.jsx)(p.default,{src:K.image.url,alt:K.image.alt||"Product image",fill:!0,className:X(K.image),placeholder:K.image.blurDataUrl?"blur":"empty",blurDataURL:K.image.blurDataUrl}),(null==K||null==(D=K.mobileImage)?void 0:D.url)&&!(null==K||null==(T=K.image)?void 0:T.url)&&(0,a.jsx)(p.default,{src:K.mobileImage.url,alt:K.mobileImage.alt||"Product image",fill:!0,className:X(K.mobileImage),placeholder:K.mobileImage.blurDataUrl?"blur":"empty",blurDataURL:K.mobileImage.blurDataUrl})]})})})]})]})]})})})]})};var T=l(47719),R=l(62681),L=l(20617);let F=(e,t)=>{let[l,a]=(0,i.useState)((null==e?void 0:e.duration)||0);(0,i.useEffect)(()=>{if(!(null==e?void 0:e.enabled)||!e.duration)return;let t=setInterval(()=>{a(e=>{let t=e-.1;return t<=0?0:t})},100);return()=>clearInterval(t)},[null==e?void 0:e.enabled,null==e?void 0:e.duration]),(0,i.useEffect)(()=>{(null==e?void 0:e.enabled)&&l<=0&&e.duration&&t()},[l,null==e?void 0:e.enabled,null==e?void 0:e.duration,t]);let s=(null==e?void 0:e.duration)?l/e.duration*100:0;return{timeRemaining:l,progressPercentage:s}},_={background:"linear-gradient(to bottom, #FFCD00 0%, #FFCD00 40%, #FF4081 70%, #009EAC 100%)",padding:"1px"},z=(e,t)=>{let l=t?"max-w-[29rem]":"max-w-96",a={"top-left":"inset-x-4 mx-auto sm:inset-x-auto sm:mx-0 sm:left-8 top-4 sm:top-0 h-auto ".concat(l),"top-right":"inset-x-4 mx-auto sm:inset-x-auto sm:mx-0 sm:right-8 top-4 sm:top-24 h-auto ".concat(l),"bottom-left":"inset-x-4 mx-auto sm:inset-x-auto sm:mx-0 sm:left-8 bottom-4 sm:bottom-0 h-auto ".concat(l),"bottom-right":"inset-x-4 mx-auto sm:inset-x-auto sm:mx-0 sm:right-8 bottom-4 sm:bottom-0 h-auto ".concat(l),"middle-left":"inset-x-4 mx-auto sm:inset-x-auto sm:mx-0 sm:left-8 top-1/2 -translate-y-1/2 h-auto ".concat(l),"middle-right":"inset-x-4 mx-auto sm:inset-x-auto sm:mx-0 sm:right-8 top-1/2 -translate-y-1/2 h-auto ".concat(l)};return a[e]||a["bottom-right"]},K=e=>({"top-left":"slide-in-left","top-right":"slide-in-right","bottom-left":"slide-in-left","bottom-right":"slide-in-right","middle-left":"slide-in-left","middle-right":"slide-in-right"})[e]||"slide-in-right",B=e=>{var t,l,i,o,m;let{popup:x,onClose:h}=e,g=x.display,v=(null==g?void 0:g.position)||"bottom-right",f=N((null==g?void 0:g.animation)||K(v)),b=x.content,j=x.timeout,y=(null==b?void 0:b.drawerType)||"simple",P=(null==b?void 0:b.productSource)||"featured",{items:A}=(0,L.default)(),D=(0,I.B)();(0,E.y)(),(0,S.i)(h);let{progressPercentage:B}=F(j,h),O="cart"===P?A.filter(e=>!e.hideLineItem).length>0:((null==b||null==(t=b.products)?void 0:t.length)||0)>0;return D?(0,a.jsxs)("div",{className:"fixed inset-0 z-[99999]",children:[(0,a.jsx)(r,{show:!0,onClick:h}),(0,a.jsx)("div",{className:"pointer-events-none fixed inset-0 z-[60] flex items-end",children:(0,a.jsx)(n.N,{children:(0,a.jsxs)(s.P.div,{initial:C.initial,animate:C.animate,exit:C.exit,transition:k,className:"pointer-events-auto relative max-h-[95vh] w-full overflow-hidden rounded-t-xl shadow-2xl",role:"dialog","aria-modal":"true","aria-labelledby":"drawer-title",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-0 z-10 h-1.5 rounded-t-xl",style:{background:"linear-gradient(90deg, #FFCD00 0%, #F7AA04 25%, #FF4081 50%, #009EAC 100%)"}}),(0,a.jsxs)("div",{className:"relative h-full overflow-y-auto overflow-x-hidden rounded-t-xl pt-1.5",style:{backgroundImage:"url(/images/popup/popup-background-small.svg)",backgroundSize:"cover",backgroundPosition:"center"},children:[(0,a.jsx)(d,{onClick:h,variant:(null==g?void 0:g.closeButtonVariant)||"light",className:"!right-0 !top-2 z-30 sm:!right-4 sm:!top-4"}),"simple"===y&&(0,a.jsxs)(a.Fragment,{children:["cart"===P&&O&&(0,a.jsx)("div",{className:"px-4 pb-2 pt-8",children:(0,a.jsx)(w,{cartItems:A,linkable:null==b?void 0:b.linkProductsInCart})}),"cart"!==P&&(null==b||null==(o=b.image)?void 0:o.url)&&(0,a.jsx)("div",{className:"relative h-48 w-full overflow-hidden",children:(0,a.jsx)(p.default,{src:b.image.url,alt:b.image.alt||"Drawer image",f
1ill:!0,className:"object-cover"})}),(0,a.jsxs)("div",{className:"flex flex-col gap-4 px-4 pb-5 pt-4",children:[(null==b?void 0:b.heading)&&(0,a.jsx)("h2",{id:"drawer-title",className:"text-h4 font-semibold text-white",children:(0,a.jsx)(c.RK,{value:b.heading})}),"cart"!==P&&(null==b?void 0:b.body)&&(0,a.jsx)("div",{className:"text-body1 text-white",children:(0,a.jsx)(c.RK,{value:b.body})}),"featured"===P&&O&&(0,a.jsx)(w,{products:null==b?void 0:b.products,className:"my-5",linkable:null==b?void 0:b.linkProductsInCart}),"cart"===P&&(null==b?void 0:b.body)&&(0,a.jsx)("div",{className:"text-body1 text-white",children:(0,a.jsx)(c.RK,{value:b.body})}),(null==b||null==(m=b.ctaPrimary)?void 0:m.label)&&(0,a.jsx)(u.A,{link:b.ctaPrimary.link,onClick:h,color:"yellow",className:"text-body1 w-full rounded-lg !bg-[#ffcd00] px-6 py-3 text-center font-semibold !text-[#1d1d1b]",children:b.ctaPrimary.label}),(null==b?void 0:b.ctaSecondary)&&(0,a.jsx)(u.A,{link:b.ctaSecondary.link,onClick:h,className:"text-body1 w-full text-center text-sm text-teal underline",children:b.ctaSecondary.label}),(null==b?void 0:b.subtitle)&&(0,a.jsx)("p",{className:"text-center text-xs text-gray-500",children:b.subtitle}),(null==b?void 0:b.bottomText)&&(0,a.jsx)("div",{className:"text-body1 -mx-4 -mb-5 mt-2 bg-[#424242] px-4 pb-5 pt-5 text-gray-300",children:(0,a.jsx)(c.RK,{value:b.bottomText})})]})]}),"survey"===y&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 px-4 pb-5 pt-8",children:[(null==b?void 0:b.heading)&&(0,a.jsx)("h2",{id:"drawer-title",className:"text-h5 font-semibold text-white",children:(0,a.jsx)(c.RK,{value:b.heading})}),(null==b?void 0:b.body)&&(0,a.jsx)("div",{className:"text-body1 text-white",children:(0,a.jsx)(c.RK,{value:b.body})}),(null==b?void 0:b.surveyOptions)&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:b.surveyOptions.map((e,t)=>{var l;return(0,a.jsx)(s.P.div,{className:"group rounded-lg border border-[#5D5D5D] bg-[#343434] hover:border-transparent hover:bg-gradient-to-r hover:from-[#FFD700] hover:via-[#FF69B4] hover:to-[#00CED1]",whileHover:{scale:[1,1.015,1,1.015,1],transition:{scale:{duration:.8,repeat:1/0,ease:"easeInOut"}}},children:(0,a.jsxs)(R.IKLink,{link:e.link,onClick:h,className:"flex items-center gap-3 rounded-lg bg-[#343434] px-4 py-3 text-left transition-all group-hover:bg-transparent",children:[(null==(l=e.icon)?void 0:l.url)&&(0,a.jsx)("div",{className:"relative h-8 w-8 flex-shrink-0",children:(0,a.jsx)(p.default,{src:e.icon.url,alt:e.icon.alt||e.label,fill:!0,className:"object-contain"})}),(0,a.jsx)("span",{className:"text-body1 font-medium text-white",children:e.label}),(0,a.jsx)(T.K,{className:"ml-auto text-gray-400",size:20})]})},t)})})]}),(null==j?void 0:j.enabled)&&j.showProgressBar&&(0,a.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-2 bg-teal",children:(0,a.jsx)(s.P.div,{className:"h-full bg-[#54BEC7]",initial:{width:"100%"},animate:{width:"".concat(B,"%")},transition:{duration:.1}})})]})]})})})]}):(0,a.jsxs)("div",{className:"fixed inset-0 z-[99999]",children:[(0,a.jsx)(r,{show:!0,onClick:h}),(0,a.jsx)(n.N,{children:(0,a.jsx)(s.P.div,{initial:f.initial,animate:(e=>{let t=f.animate;return"middle-left"===e||"middle-right"===e?{...t,y:"-50%"}:t})(v),exit:f.exit,transition:k,className:"fixed max-h-[35rem] ".concat(z(v,O)," z-50 overflow-hidden rounded-2xl shadow-2xl"),style:_,role:"dialog","aria-modal":"true","aria-labelledby":"drawer-title",children:(0,a.jsxs)("div",{className:"relative h-full overflow-y-auto overflow-x-hidden rounded-2xl",style:{backgroundImage:"url(/images/popup/popup-background-small.svg)",backgroundSize:"cover",backgroundPosition:"center"},children:[(0,a.jsx)(d,{onClick:h,variant:(null==g?void 0:g.closeButtonVariant)||"light",className:"z-10 ".concat("cart"===P&&O?"absolute right-4 top-11":"")}),"simple"===y&&(0,a.jsxs)(a.Fragment,{children:["cart"===P&&O&&(0,a.jsx)("div",{className:"px-4 pb-2 pt-4",children:(0,a.jsx)(w,{cartItems:A,linkable:null==b?void 0:b.linkProductsInCart})}),"cart"!==P&&(null==b||null==(l=b.image)?void 0:l.url)&&(0,a.jsx)("div",{className:"relative -mx-px -mt-px h-48 w-[calc(100%+2px)] overflow-hidden rounded-t-2xl md:h-56",children:(0,a.jsx)(p.default,{src:b.image.url,alt:b.image.alt||"Drawer image",f
1ill:!0,className:"object-cover"})}),(0,a.jsxs)("div",{className:"flex flex-col gap-4 px-4 pb-5 pt-4",children:[(null==b?void 0:b.heading)&&(0,a.jsx)("h2",{id:"drawer-title",className:"text-h4 font-semibold text-white",children:(0,a.jsx)(c.RK,{value:b.heading})}),"cart"!==P&&(null==b?void 0:b.body)&&(0,a.jsx)("div",{className:"text-body1 text-white",children:(0,a.jsx)(c.RK,{value:b.body})}),"featured"===P&&O&&(0,a.jsx)(w,{products:null==b?void 0:b.products,className:"my-5",linkable:null==b?void 0:b.linkProductsInCart}),"cart"===P&&(null==b?void 0:b.body)&&(0,a.jsx)("div",{className:"text-body1 text-white",children:(0,a.jsx)(c.RK,{value:b.body})}),(null==b||null==(i=b.ctaPrimary)?void 0:i.label)&&(0,a.jsx)(u.A,{link:b.ctaPrimary.link,onClick:h,color:"yellow",className:"text-body1 w-full rounded-lg !bg-[#ffcd00] px-6 py-3 text-center font-semibold !text-[#1d1d1b]",children:b.ctaPrimary.label}),(null==b?void 0:b.ctaSecondary)&&(0,a.jsx)(u.A,{link:b.ctaSecondary.link,onClick:h,className:"text-body1 w-full text-center text-sm text-teal underline",children:b.ctaSecondary.label}),(null==b?void 0:b.subtitle)&&(0,a.jsx)("p",{className:"text-center text-xs text-gray-500",children:b.subtitle}),(null==b?void 0:b.bottomText)&&(0,a.jsx)("div",{className:"text-body1 -mx-4 -mb-5 mt-2 bg-[#424242] px-4 pb-5 pt-5 text-gray-300",children:(0,a.jsx)(c.RK,{value:b.bottomText})})]})]}),"survey"===y&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 px-4 pb-5 pt-4",children:[(null==b?void 0:b.heading)&&(0,a.jsx)("h2",{id:"drawer-title",className:"text-h5 font-semibold text-white",children:(0,a.jsx)(c.RK,{value:b.heading})}),(null==b?void 0:b.body)&&(0,a.jsx)("div",{className:"text-body1 text-white",children:(0,a.jsx)(c.RK,{value:b.body})}),(null==b?void 0:b.surveyOptions)&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:b.surveyOptions.map((e,t)=>{var l;return(0,a.jsx)(s.P.div,{className:"group rounded-lg border border-[#5D5D5D] bg-[#343434] hover:border-transparent hover:bg-gradient-to-r hover:from-[#FFD700] hover:via-[#FF69B4] hover:to-[#00CED1]",whileHover:{scale:[1,1.015,1,1.015,1],transition:{scale:{duration:.8,repeat:1/0,ease:"easeInOut"}}},children:(0,a.jsxs)(R.IKLink,{link:e.link,onClick:h,className:"flex items-center gap-3 rounded-lg bg-[#343434] px-4 py-3 text-left transition-all group-hover:bg-transparent",children:[(null==(l=e.icon)?void 0:l.url)&&(0,a.jsx)("div",{className:"relative h-8 w-8 flex-shrink-0",children:(0,a.jsx)(p.default,{src:e.icon.url,alt:e.icon.alt||e.label,fill:!0,className:"object-contain"})}),(0,a.jsx)("span",{className:"text-body1 font-medium text-white",children:e.label}),(0,a.jsx)(T.K,{className:"ml-auto text-gray-400",size:20})]})},t)})})]}),(null==j?void 0:j.enabled)&&j.showProgressBar&&(0,a.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-2 bg-teal",children:(0,a.jsx)(s.P.div,{className:"h-full bg-[#54BEC7]",initial:{width:"100%"},animate:{width:"".concat(B,"%")},transition:{duration:.1}})})]})})})]})},O=e=>{let{position:t}=e;return(0,a.jsx)(s.P.div,{className:"absolute left-0 ".concat("top"===t?"bottom-0":"top-0"," z-50 h-1 overflow-hidden bg-gradient-to-r from-yellow-500 via-pink-500 to-teal-500"),initial:{width:"0%"},animate:{width:"100%"},transition:{duration:1.2,ease:[.25,.1,.25,1]},children:(0,a.jsx)(s.P.div,{className:"absolute inset-0 w-1/3 bg-gradient-to-r from-transparent via-white/60 to-transparent",initial:{x:"-100%"},animate:{x:"400%"},transition:{duration:1.5,ease:"linear",delay:1.2,repeat:1/0,repeatDelay:3}})})},U=e=>{let t={top:"top-0",bottom:"bottom-0"};return t[e]||t.top},M=e=>({top:"slide-in-top",bottom:"slide-in-bottom"})[e],V=e=>{let{popup:t,onClose:l}=e,[r,o]=(0,i.useState)(!0),c=t.display,u=(null==c?void 0:c.position)||"top",m=N((null==c?void 0:c.animation)||M(u)),p=(0,i.useRef)(null),h=()=>{l(),o(!1)};return(0,i.useEffect)(()=>{let e=()=>{if("top"===u&&p.current){let e=p.current.offsetHeight;document.body.style.paddingTop="".concat(e,"px")}};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),"top"===u&&(document.body.style.paddingTop="")}},[u]),(0,a.jsx)(n.N,{onExitComplete:()=>{"top"===u&&(document.body.style.paddingTop="")},children:r&&(0,a.jsxs)(s.P.div,{ref:p,initial:m.initial,animate:m.animate,exit:m.exit,transition:k,className:"fixed ".concat(U(u)," left-0 right-0 z-50 text-white shadow-lg"),style:{backgroundImage:"url(/images/popup/popup-background-long.svg)",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"},role:"banner","aria-live":"polite",children:[(0,a.jsxs)("div",{className:"relative mx-auto max-w-7xl px-6 py-4 sm:px-10",children:[(0,a.jsx)(d,{onClick:h,variant:(null==c?void 0:c.closeButtonVariant)||"light"}),(0,a.jsx)(x,{popup:t,onCtaClick:h,className:"pr-12"})]}),(0,a.jsx)(O,{position:u})]})})},X={background:"linear-gradient(to bottom, #FFCD00 0%, #FFCD00 40%, #FF4081 70%, #009EAC 100%)",padding:"1px"},q=e=>{let t={"top-left":"top-4 left-4","top-right":"top-4 right-4","bottom-left":"bottom-4 left-4","bottom-right":"bottom-4 right-4","middle-left":"left-4 top-1/2 -translate-y-1/2","middle-right":"right-4 top-1/2 -translate-y-1/2"};return t[e]||t["top-right"]},H=e=>({"top-left":"slide-in-left","top-right":"slide-in-right","bottom-left":"slide-in-left","bottom-right":"slide-in-right","middle-left":"slide-in-left","middle-right":"slide-in-right"})[e],W=e=>{var t,l;let{popup:o,onClose:u}=e,m=o.display,x=(null==m?void 0:m.position)||"top-right",h=N((null==m?void 0:m.animation)||H(x)),v=o.content,f=(0,I.B)(),b=(null==v?void 0:v.contentMode)==="socialProof",{currentPurchase:j,isVisible:y,isLoading:w}=function(e){let{enabled:t,refreshInterval:l=8,productFilter:a,displayDuration:s=5}=e,[n,r]=(0,i.useState)([]),[o,d]=(0,i.useState)(0),[c,u]=(0,i.useState)(!1),[m,x]=(0,i.useState)(!0),[p,h]=(0,i.useState)(null),g=(0,i.useRef)(null),v=(0,i.useRef)(null),f=(0,i.useCallback)(async()=>
1{if(t)try{let e=new URLSearchParams;a&&e.set("productId",a),e.set("limit","20");let t=await fetch("/api/social-proof?".concat(e.toString()));if(!t.ok)throw Error("Failed to fetch social proof data");let l=await t.json();r(l.purchases||[]),h(null)}catch(e){h(e instanceof Error?e.message:"Unknown error")}finally{x(!1)}},[t,a]);return(0,i.useEffect)(()=>t?(f(),v.current=setInterval(f,3e5),()=>{v.current&&clearInterval(v.current)}):void x(!1),[t,f]),(0,i.useEffect)(()=>{if(!t||0===n.length)return;let e=()=>{u(!0),g.current=setTimeout(()=>{u(!1),g.current=setTimeout(()=>{d(e=>(e+1)%n.length),g.current=setTimeout(e,Math.max((l-s-.5)*1e3,500))},500)},1e3*s)};return e(),()=>{g.current&&clearTimeout(g.current)}},[t,n.length,l,s]),(0,i.useEffect)(()=>{d(0)},[n]),{currentPurchase:t&&n.length>0?n[o]:null,isVisible:c,isLoading:m,error:p}}({enabled:b,refreshInterval:(null==v?void 0:v.socialProofRefreshInterval)||8,productFilter:null==v?void 0:v.socialProofProductFilter,displayDuration:5});return!b||j||w?f?(0,a.jsxs)("div",{className:"fixed z-[99999] ".concat(b?"bottom-0 left-0 right-0":"inset-0"),children:[!b&&(0,a.jsx)(r,{show:!0,onClick:u}),(0,a.jsx)("div",{className:"pointer-events-none fixed z-[60] flex items-end ".concat(b?"bottom-0 left-0 right-0":"inset-0"),children:(0,a.jsx)(n.N,{mode:"wait",children:(!b||y)&&(0,a.jsxs)(s.P.div,{initial:C.initial,animate:C.animate,exit:C.exit,transition:k,className:"pointer-events-auto relative w-full overflow-hidden rounded-t-xl shadow-2xl",role:"alert","aria-live":"assertive",children:[(0,a.jsx)("div",{className:"absolute left-0 right-0 top-0 z-10 h-1.5 rounded-t-xl",style:{background:"linear-gradient(90deg, #FFCD00 0%, #F7AA04 25%, #FF4081 50%, #009EAC 100%)"}}),(0,a.jsxs)("div",{className:"relative overflow-y-auto overflow-x-hidden rounded-t-xl pt-1.5",style:{backgroundImage:"url(/images/popup/popup-background-small.svg)",backgroundSize:"cover",backgroundPosition:"center"},children:[(0,a.jsx)(d,{onClick:u,variant:(null==m?void 0:m.closeButtonVariant)||"light",className:"!right-4 !top-4 z-30"}),(0,a.jsx)("div",{className:"flex items-center gap-4 px-4 pb-6 pt-8",children:b?j&&(j.productLink?(0,a.jsxs)(g.default,{link:{url:j.productLink,type:"internal",document:"page"},className:"flex flex-1 items-center gap-4",onClick:()=>setTimeout(u,100),children:[j.productImage&&(0,a.jsx)("div",{className:"relative h-14 w-14 flex-shrink-0 overflow-hidden rounded-full",children:(0,a.jsx)(p.default,{src:j.productImage,alt:j.productName,fill:!0,className:"object-cover"})}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-0.5 pr-8",children:[(0,a.jsxs)("div",{className:"text-sm font-semibold text-white",children:["Someone from ",j.location]}),(0,a.jsxs)("div",{className:"text-xs text-gray-300",children:["Just bought ",j.productName]})]})]}):(0,a.jsxs)("div",{className:"flex flex-1 items-center gap-4",children:[j.productImage&&(0,a.jsx)("div",{className:"relative h-14 w-14 flex-shrink-0 overflow-hidden rounded-full",children:(0,a.jsx)(p.default,{src:j.productImage,alt:j.productName,fill:!0,className:"object-cover"})}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-0.5 pr-8",children:[(0,a.jsxs)("div",{className:"text-sm font-semibold text-white",children:["Someone from ",j.location]}),(0,a.jsxs)("div",{className:"text-xs text-gray-300",children:["Just bought ",j.productName]})]})]})):(0,a.jsxs)(a.Fragment,{children:[(null==v||null==(l=v.image)?void 0:l.url)&&(0,a.jsx)("div",{className:"relative h-14 w-14 flex-shrink-0 overflow-hidden rounded-full",children:(0,a.jsx)(p.default,{src:v.image.url,alt:v.image.alt||"Notification image",fill:!0,className:"object-cover"})}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-0.5 pr-8",children:[(null==v?void 0:v.heading)&&(0,a.jsx)("div",{className:"text-sm font-semibold text-white",children:(0,a.jsx)(c.RK,{value:v.heading})}),(null==v?void 0:v.body)&&(0,a.jsx)("div",{className:"text-xs text-gray-300",children:(0,a.jsx)(c.RK,{value:v.body})})]})]})})]})]},b?"social-proof-mobile-".concat(null==j?void 0:j.timestamp):"static-mobile")})})]}):(0,a.jsx)(n.N,{children:(!b||y)&&(0,a.jsx)(s.P.div,{initial:h.initial,animate:h.animate,exit:h.exit,transition:k,className:"fixed ".concat(q(x)," z-[99999] min-w-[29rem] max-w-lg overflow-hidden rounded-xl shadow-2xl"),style:X,role:"alert","aria-live":"assertive",children:(0,a.jsxs)("div",{className:"relative flex items-center gap-3 rounded-xl px-4 py-3 pr-10",style:{backgroundImage:"url(/images/popup/popup-background-small.svg)",backgroundSize:"cover",backgroundPosition:"center"},children:[(0,a.jsx)(d,{onClick:u,variant:(null==m?void 0:m.closeButtonVariant)||"light",className:"!right-2 !top-1/2 !-translate-y-1/2"}),b?j&&(j.productLink?(0,a.jsxs)(g.default,{link:{url:j.productLink,type:"internal",document:"page"},className:"flex flex-1 items-center gap-3",onClick:()=>setTimeout(u,100),children:[j.productImage&&(0,a.jsx)("div",{className:"relative h-16 w-16 flex-shrink-0 overflow-hidden rounded-xl",children:(0,a.jsx)(p.default,{src:j.productImage,alt:j.productName,fill:!0,className:"object-cover"})}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"text-h5 font-semibold text-white",children:["Someone from ",j.location]}),(0,a.jsxs)("div",{className:"text-body1 text-gray-300",children:["Just bought ",j.productName]})]})]}):(0,a.jsxs)("div",{className:"flex flex-1 items-center gap-3",children:[j.productImage&&(0,a.jsx)("div",{className:"relative h-16 w-16 flex-shrink-0 overflow-hidden rounded-xl",children:(0,a.jsx)(p.default,{src:j.productImage,alt:j.productName,fill:!0,className:"object-cover"})}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"text-h5 font-semibold text-white",children:["Someone from ",j.location]}),(0,a.jsxs)("div",{className:"text-body1 text-gray-300",children:["Just bought ",j.productName]})]})]})):(0,a.jsxs)(a.Fragment,{children:[(null==v||null==(t=v.image)?void 0:t.url)&&(0,a.jsx)("div",{className:"relative h-16 w-16 flex-shrink-0 overflow-hidden rounded-xl",children:(0,a.jsx)(p.default,{src:v.image.url,alt:v.image.alt||"Notification image",f
1ill:!0,className:"object-cover"})}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(null==v?void 0:v.heading)&&(0,a.jsx)("div",{className:"text-h5 font-semibold text-white [&_p]:m-0",children:(0,a.jsx)(c.RK,{value:v.heading})}),(null==v?void 0:v.body)&&(0,a.jsx)("div",{className:"text-body1 text-gray-300 [&_p]:m-0",children:(0,a.jsx)(c.RK,{value:v.body})})]})]})]})},b?"social-proof-".concat(null==j?void 0:j.timestamp):"static")}):null};var G=l(13353),J=l(2495),Y=l(22964);let Z=()=>{let e=(0,G.useSetAtom)(J.MJ),t=(0,G.useSetAtom)(J.A$),l=(0,G.useSetAtom)(J.s_),a=(0,G.useAtomValue)(J.A$);return(0,i.useCallback)(i=>{Y.s.render(i,"Popup dismissed by user",{},{timestamp:Date.now()}),l(e=>{let t=new Set(e);return t.delete(i),t}),e(e=>new Set([...e,i])),a===i&&t(null)},[e,t,l,a])},$=e=>{var t;let l=e.display||{variant:"modal",position:"center",animation:"zoom-in"};if(window.innerWidth<I.D&&(null==(t=l.mobileOverride)?void 0:t.enabled)){let e=l.mobileOverride;return{variant:e.variant||l.variant,position:e.position||l.position,animation:e.animation||l.animation}}return l};function Q(e){let{popup:t}=e,[l,s]=(0,i.useState)(!0),n=Z(),r=()=>{n(t.id),s(!1)};if(!l)return null;let o=$(t),d={...t,display:o};switch(o.variant){case"modal":default:return(0,a.jsx)(D,{popup:d,onClose:r});case"drawer":return(0,a.jsx)(B,{popup:d,onClose:r});case"banner":return(0,a.jsx)(V,{popup:d,onClose:r});case"notification":return(0,a.jsx)(W,{popup:d,onClose:r})}}},99430:(e,t,l)=>{"use strict";l.d(t,{A:()=>o});var a=l(95155),i=l(92126),s=l(62681),n=l(7919),r=l(40529);function o(e){var t;let{toast:l}=e,o="Toast - ".concat("string"==typeof l.message?l.message:(0,r.A)(l.message));return(0,a.jsxs)("div",{className:"flex items-center justify-between gap-5",children:[(0,a.jsx)("div",{children:(0,a.jsx)("span",{className:"text-sm font-medium text-white",children:l.message&&("string"==typeof l.message?l.message:(0,a.jsx)(n.RK,{value:l.message,components:i.jp}))})}),(0,a.jsx)("div",{className:"ml-auto flex-shrink-0 pr-3",children:(null==l||null==(t=l.button)?void 0:t.text)&&(0,a.jsx)(s.IKButton,{cardTitle:o,link:l.button.link,size:"sm",color:"light-blue",className:"!bg-teal-50 !px-4 !py-2 !text-lg !text-charcoal md:!text-base",children:(0,a.jsx)("span",{children:l.button.text})})}),(0,a.jsx)("div",{className:"absolute"})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[4911,3574,9933,601,3468,9570,3243,9362,3063,9251,8874,7451,488,6722,7971,1530,1736,2649,1049,9830,8611,5402,2681,3829,8441,1684,7358],()=>t(40725)),_N_E=e.O()}]); 2//# sourceMappingURL=layout-2da3659fffcb93d0.js.map
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.