PageSourceSearch

https://healf.com/_next/static/chunks/app/%5Blocale%5D/(main)/page…?dpl=dpl_FxXVFz84e8cuBx3dG2nNh5zXwcLM

js healf.com collected 2026-09-24 23:45:10 UTC 52,852 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[937,2761,9645],{569:(e,t,r)=>{"use strict";r.d(t,{c:()=>o});var n=r(44871),a=r(76063);function o(e,t,r){let[o,i]=(0,n.x)(null==r?void 0:r.in,e,t),c=s(o,i),l=Math.abs((0,a.m)(o,i));o.setDate(o.getDate()-c*l);let u=Number(s(o,i)===-c),d=c*(l-u);return 0===d?0:d}function s(e,t){let r=e.getFullYear()-t.getFullYear()||e.getMonth()-t.getMonth()||e.getDate()-t.getDate()||e.getHours()-t.getHours()||e.getMinutes()-t.getMinutes()||e.getSeconds()-t.getSeconds()||e.getMilliseconds()-t.getMilliseconds();return r<0?-1:r>0?1:r}},623:(e,t,r)=>{"use strict";r.d(t,{useInfiniteQuery:()=>o});var n=r(82997),a=r(49220);function o(e,t){return(0,a.t)(e,n.z,t)}},1753:(e,t,r)=>{"use strict";r.d(t,{D:()=>c});var n=r(36671),a=r(64487),o=r(21532),s=r(90059);let i=(0,a.F)([],{variants:{size:{jumbo:"text-5xl md:text-6xl lg:text-8xl",display1:"text-4xl md:text-5xl lg:text-6xl",display2:"text-2xl md:text-3xl lg:text-4xl",display:"text-3xl md:text-4xl lg:text-5xl",display3:"text-2xl md:text-3xl",display4:"text-xl md:text-2xl",display5:"text-4xl md:text-5xl lg:text-display-54",h1:"text-2xl font-regular",h2:"text-xl font-regular",h3:"text-base font-regular",h4:"text-sm font-regular",h5:"text-xs font-regular"},tracking:{tight:"tracking-tight",normal:"tracking-normal",wide:"tracking-wide","3-percent":"-tracking-[3%]"}},defaultVariants:{tracking:"normal"}}),c=e=>{let{as:t,size:r,tracking:a,className:c,...l}=e;return(0,n.jsx)(o.a,{as:t,className:(0,s.cn)(i({size:r,tracking:a}),c),...l})}},1931:(e,t,r)=>{"use strict";r.d(t,{a:()=>l});var n=r(79828),a=r(53243),o=r(19799),s=r(5183);let i="session",c=async()=>{try{let e=(0,s.U)(),{data:{session:t}}=await e.auth.getSession();return t}catch(e){return console.error({error:e}),null}};function l(){let e=(0,n.useQueryClient)();(0,o.useEffect)(()=>{let{data:{subscription:t}}=(0,s.U)().auth.onAuthStateChange((t,r)=>{e.setQueryData([i],r)});return()=>t.unsubscribe()},[e]);let{data:t,isLoading:r}=(0,a.useQuery)({queryKey:[i],queryFn:c});return{session:t,isLoading:r}}},2761:(e,t,r)=>{"use strict";r.d(t,{U:()=>a,g:()=>n});var n=function(e){return e["ingredient-widget-compliant"]="ingredient-widget-compliant",e["add-product-to-upcoming-subscription"]="add-product-to-upcoming-subscription",e["cart-special-offers"]="cart-special-offers",e["new-hz-pdp-relaunch"]="new-hz-pdp-relaunch",e["for-you-page-test"]="for-you-page-test",e["collection-magic-merchandising-test-v02"]="collection-magic-merchandising-test-v02",e["signed-ndd-label-test-with-price-threshold"]="signed-ndd-label-test-with-price-threshold",e["one-off-hz-test"]="one-off-hz-test",e["magic-sort-test-v2"]="magic-sort-test-v2",e["collection-recommended-products"]="collection-recommended-products",e["leave-review-incentive"]="leave-review-incentive",e["collection-additinal-filters"]="collection-additinal-filters",e["holiday-shipping-promo-test"]="holiday-shipping-promo-test",e["twenty-percent-discount-for-nbpure"]="twenty-percent-discount-for-nbpure",e["twenty-percent-discount-for-thorne"]="twenty-percent-discount-for-thorne",e["twenty-percent-discount-for-bodyhealth"]="twenty-percent-discount-for-bodyhealth",e["twenty-percent-discount-for-ancient-brave"]="twenty-percent-discount-for-ancient-brave",e["twenty-percent-discount-for-ancient-nutrition"]="twenty-percent-discount-for-ancient-nutrition",e["twenty-percent-discount-for-mary-ruths"]="twenty-percent-discount-for-mary-ruths",e["twenty-percent-discount-for-transparent-labs"]="twenty-percent-discount-for-transparent-labs",e["twenty-percent-discount-for-biocare"]="twenty-percent-discount-for-biocare",e["twenty-percent-discount-for-renue-by-science"]="twenty-percent-discount-for-renue-by-science",e["twenty-percent-discount-for-wild-nutrition"]="twenty-percent-discount-for-wild-nutrition",e["twenty-percent-discount-for-artah"]="twenty-percent-discount-for-artah",e["twenty-percent-discount-for-invivo"]="twenty-percent-discount-for-invivo",e["twenty-percent-discount-for-quicksilver-scientific"]="twenty-percent-discount-for-quicksilver-scientific",e["twenty-percent-discount-for-lmnt"]="twenty-percent-discount-for-lmnt",e["campaign-homepage-cta-test"]="campaign-homepage-cta-test",e["fbt-helix-recommended"]="fbt-helix-recommended",e["4for3-dots-experiment"]="4for3-dots-experiment",e["helix-entry-point-collection-
1pages"]="helix-entry-point-collection-pages",e["helix-db-context-routing"]="helix-db-context-routing",e["backend-search-experiment-with-personalization"]="backend-search-experiment-with-personalization",e["search-grid-helix-render"]="search-grid-helix-render",e["helix-entry-point-collection-experiment"]="helix-entry-point-collection-experiment",e["best-sellers-curated-collection-test"]="best-sellers-curated-collection-test",e["subscription-always-expanded"]="subscription-always-expanded",e["helix-entry-point-animated"]="helix-entry-point-animated",e["four-for-three-variant-dots-v2"]="four-for-three-variant-dots-v2",e["variant-selection-abc-test"]="variant-selection-abc-test",e["collection-product-card-test"]="collection-product-card-test",e["wearables-integration-test-v4"]="wearables-integration-test-v4",e["wearable-test-v4"]="wearable-test-v4",e["4for3-always-show-in-cart"]="4for3-always-show-in-cart",e["homepage-campaign-video-test"]="homepage-campaign-video-test",e["free-shipping-over-30"]="free-shipping-over-30",e["fbt-v2"]="fbt-v2",e["consultation-link"]="consultation-link",e["consultation-link-pdp"]="consultation-link-pdp",e["consultation-link-v2"]="consultation-link-v2",e["cart-recommendations-engine-abc-test"]="cart-recommendations-engine-abc-test",e["4for3-subscription-upsell-v2"]="4for3-subscription-upsell-v2",e["4for3-subscription-upsell-v3"]="4for3-subscription-upsell-v3",e["cart-stack-builder-experiment"]="cart-stack-builder-experiment",e["helix-sidekick-v2"]="helix-sidekick-v2",e["helix-sidekick-v3"]="helix-sidekick-v3",e["image-carousel-personalisation-v1"]="image-carousel-personalisation-v1",e["is-this-right-for-me-all-skus"]="is-this-right-for-me-all-skus",e["personalized-recommendations-across-site"]="personalized-recommendations-across-site",e["homepage-hero-helix"]="homepage-hero-helix",e["wearables-v3"]="wearables-v3",e["collections-rerank-variant"]="collections-rerank-variant",e["search-fusion-variant"]="search-fusion-variant",e["search-engine"]="search-engine",e["kg-fyp-variant"]="kg-fyp-variant",e["helix-rebrand-test"]="helix-rebrand-test",e["checkout-double-up-test"]="checkout-double-up-test",e["zone-landing-redesign-v1"]="zone-landing-redesign-v1",e["zone-pricing-redesign-v1"]="zone-pricing-redesign-v1",e["zone-pricing-hero-position-v1"]="zone-pricing-hero-position-v1",e["zone-cinematic-hero-v1"]="zone-cinematic-hero-v1",e["fbt-personalization-pdp"]="fbt-personalization-pdp",e["fbt-brand-preference"]="fbt-brand-preference",e["fbt-quality"]="fbt-quality",e["fbt-narrative-relax"]="fbt-narrative-relax",e["fbt-rerank"]="fbt-rerank",e["hz-collection-banner-test"]="hz-collection-banner-test",e["healf-zone-name-test"]="healf-zone-name-test",e["subscription-cancel-flow-v2"]="subscription-cancel-flow-v2",e["omni-search-client-router"]="omni-search-client-router",e["rrp-display"]="rrp-display",e["pdp-social-proof"]="pdp-social-proof",e["cart-bloods-activation-experiment"]="cart-bloods-activation-experiment",e["cart-bloods-activation-ec-experiment"]="cart-bloods-activation-ec-experiment",e["cart-bloods-trackable-experiment"]="cart-bloods-trackable-experiment",e["cart-bloods-banner-redesign-v3-experiment"]="cart-bloods-banner-redesign-v3-experiment",e["homepage-design-experiment"]="homepage-design-experiment",e["homepage-redesign-v4"]="homepage-redesign-v4",e["pdp-bloods-trackable-banner"]="pdp-bloods-trackable-banner",e["pdp-bloods-at-home-test-banner"]="pdp-bloods-at-home-test-banner",e["pdp-bloods-symptoms-banner"]="pdp-bloods-symptoms-banner",e["thank-you-cross-sell-upsell"]="thank-you-cross-sell-upsell",e["subscription-discount-code"]="subscription-discount-code",e["subscription-gift-card-redemption"]="subscription-gift-card-redemption",e["contact-us-call-widget"]="contact-us-call-widget",e["pdp-simplified-layout"]="pdp-simplified-layout",e["pdp-product-elements"]="pdp-product-elements",e["pdp-cost-per-serving"]="pdp-cost-per-serving",e["pdp-variant-thumbnail-v2"]="pdp-variant-thumbnail-v2",e["collection-card-variant-selector-v2"]="collection-card-variant-selector-v2",e["collection-bloods-activation-banner"]="collection-bloods-activation-banner",e["search-bloods-activation-banner"]="search-bloods-activation-banner",e["welcome-popup-bloods-activation-images"]="welcome-popup-bloods-activation-images",e["cart-redesign-v1"]="cart-redesign-v1",e["lmnt-nav-bar-ab-test"]="lmnt-nav-bar-ab-test",e["attentive-sms-pilot"]="attentive-sms-pilot",e["4for3-opt-in-v1"]="4for3-opt-in-v1",e["4for3-removal-en-uk-v1"]="4for3-removal-en-uk-v1",e}({}),a=function(e){return e["christmas-collection-enabled"]="christmas-collection-enabled",e["wearables-feature-enabled"]="wearables-feature-enabled",e["returns-entry-points-enabled"]="returns-entry-points-enabled",e["disable-tracking"]="disable-tracking",e}({})},5234:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>l});var n=r(36671),a=r(21727),o=r.n(a),s=r(78464),i=r(19799),c=r(77616);let l=(0,i.forwardRef)(function(e,t){let{href:r,...a}=e,i=(0,s.useParams)(),l=(0,s.usePathname)(),u=null==i?void 0:i.locale,d=l.split("/").filter(
1Boolean)[0],p=(0,c.W2)(u)?u:(0,c.W2)(d)?d:void 0,m=r;if("string"==typeof r){let e=r.startsWith("#"),t=r.startsWith("http://")||r.startsWith("https://")||r.startsWith("mailto:")||r.startsWith("tel:")||r.startsWith("sms:");e||t||!p||(m="/".concat(p).concat(r))}return(0,n.jsx)(o(),{ref:t,href:m,...a})})},10424:(e,t,r)=>{"use strict";r.d(t,{ZD:()=>a,oS:()=>s,rg:()=>o,sM:()=>n});let n={INVALID_REQUEST:"INVALID_REQUEST",SESSION_EXPIRED:"SESSION_EXPIRED",OWNERSHIP_EMAIL_MISMATCH:"OWNERSHIP_EMAIL_MISMATCH",OWNERSHIP_VERIFY_FAILED:"OWNERSHIP_VERIFY_FAILED",RECHARGE_CUSTOMER_NOT_FOUND:"RECHARGE_CUSTOMER_NOT_FOUND",CART_OWNERSHIP_MISMATCH:"CART_OWNERSHIP_MISMATCH",CART_NOT_FOUND:"CART_NOT_FOUND",NO_SHOPIFY_CUSTOMER:"NO_SHOPIFY_CUSTOMER",GIFT_CARD_MINT_FAILED:"GIFT_CARD_MINT_FAILED",REDEMPTION_RECORD_FAILED:"REDEMPTION_RECORD_FAILED",NETWORK:"NETWORK",UNKNOWN:"UNKNOWN"};class a extends Error{constructor(e,t,r,n){var a;super(r,n),this.name="StoreCreditError",this.code=e,this.status=t,this.stage=null!=(a=null==n?void 0:n.stage)?a:"NETWORK"===e?"network":"unknown"}}function o(e){return e===n.CART_OWNERSHIP_MISMATCH||e===n.OWNERSHIP_EMAIL_MISMATCH||e===n.SESSION_EXPIRED||e===n.NO_SHOPIFY_CUSTOMER||e===n.CART_NOT_FOUND||e===n.RECHARGE_CUSTOMER_NOT_FOUND}function s(e,t){if(e instanceof a)return t&&"unknown"===e.stage&&(e.stage=t),e;let r=e instanceof Error?e.message:String(e),o=/failed to fetch|load failed|networkerror|the operation was aborted/i.test(r);return new a(o?n.NETWORK:n.UNKNOWN,0,r,{cause:e,stage:o?"network":t})}},27045:(e,t,r)=>{"use strict";r.d(t,{PL:()=>a,RQ:()=>c,rB:()=>i});var n=r(84762);function a(e){return{onFetch:(t,r)=>{let a=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,c=t.state.data?.pages||[],l=t.state.data?.pageParams||[],u={pages:[],pageParams:[]},d=0,p=async()=>{let r=!1,p=(0,n.ZM)(t.options,t.fetchOptions),m=async(e,a,o)=>{if(r)return Promise.reject();if(null==a&&e.pages.length)return Promise.resolve(e);let s={client:t.client,queryKey:t.queryKey,pageParam:a,direction:o?"backward":"forward",meta:t.options.meta};Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",()=>{r=!0}),t.signal)});let i=await p(s),{maxPages:c}=t.options,l=o?n.ZZ:n.y9;return{pages:l(e.pages,i,c),pageParams:l(e.pageParams,a,c)}};if(i&&c.length){let e="backward"===i,t={pages:c,pageParams:l},r=(e?s:o)(a,t);u=await m(t,r,e)}else{let t=e??c.length;do{let e=0===d?l[0]??a.initialPageParam:o(a,u);if(d>0&&null==e)break;u=await m(u,e),d++}while(d<t)}return u};t.options.persister?t.fetchFn=()=>t.options.persister?.(p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=p}}}function o(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function s(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}function i(e,t){return!!t&&null!=o(e,t)}function c(e,t){return!!t&&!!e.getPreviousPageParam&&null!=s(e,t)}},32538:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(36671);r(19799);var a=r(90059);function o(e){let{className:t}=e;return(0,n.jsxs)("div",{role:"status",children:[(0,n.jsxs)("svg",{"aria-hidden":"true",className:(0,a.cn)("size-6 animate-spin fill-text-secondary text-text-quaternary",t),viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.
11071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),(0,n.jsx)("span",{className:"sr-only",children:"Loading..."})]})}},37228:(e,t,r)=>{"use strict";r.d(t,{ContactUsPage:()=>z});var n=r(36671),a=r(3351),o=r(19799),s=r(81713),i=r(22651),c=r(32605),l=r(15947),u=r(96006),d=r(23683),p=r(53515),m=function(e){return e.Card="call-us-card",e.StatusBadge="call-us-card-status-badge",e.CallCta="call-us-card-call-cta",e}({}),f=r(93169),h=function(e){return e.CONTACT_CALL_CTA_CLICKED="contact_call_cta_clicked",e.CONTACT_FORM_FIELD_ENGAGED="contact_form_field_engaged",e.CONTACT_FORM_SUBMITTED="contact_form_submitted",e.CONTACT_FORM_SUBMIT_FAILED="contact_form_submit_failed",e.CONTACT_FORM_WHATSAPP_CLICKED="contact_form_whatsapp_clicked",e}({});let b=()=>{let e=(0,p.sf)(),t=(0,o.useMemo)(()=>e,[e]),r=(0,o.useCallback)((e,r)=>{t.capture(e,{...r})},[t]),n=(0,o.useCallback)(e=>r(h.CONTACT_CALL_CTA_CLICKED,e),[r]),a=(0,o.useCallback)(e=>r(h.CONTACT_FORM_FIELD_ENGAGED,e),[r]),s=(0,o.useCallback)(e=>r(h.CONTACT_FORM_SUBMITTED,e),[r]);return{trackCallCtaClicked:n,trackFormFieldEngaged:a,trackFormSubmitted:s,trackFormSubmitFailed:(0,o.useCallback)(e=>r(h.CONTACT_FORM_SUBMIT_FAILED,e),[r]),trackFormWhatsAppClicked:(0,o.useCallback)(e=>r(h.CONTACT_FORM_WHATSAPP_CLICKED,e),[r])}};function g(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,r=Number(null==(e=new Intl.DateTimeFormat("en-GB",{timeZone:"Europe/London",hour:"numeric",hourCycle:"h23"}).formatToParts(t).find(e=>"hour"===e.type))?void 0:e.value);return r>=9&&r<17}var x=r(2761),y=r(55291),v=r(90059);let w=()=>(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"})}),N=e=>{let{enabled:t}=e,{t:r}=(0,i.Bd)("page"),{trackCallCtaClicked:a}=b(),{locale:s}=(0,y.M)();(0,p._C)(x.g["contact-us-call-widget"]);let[c,l]=(0,o.useState)(()=>g());return((0,o.useEffect)(()=>{let e=setInterval(()=>l(g()),6e4);return()=>clearInterval(e)},[]),t)?(0,n.jsxs)("div",{"data-testid":m.Card,className:"mb-6 flex w-full flex-col gap-4 roun
1ded-xl bg-background-secondary px-5 py-5 md:max-w-[400px]",children:[(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsxs)("span",{"data-testid":m.StatusBadge,className:"inline-flex w-fit items-center gap-1 rounded-full bg-background-primary px-3 py-0.5 text-xs text-text-secondary",children:[(0,n.jsx)("span",{className:(0,v.cn)("size-1.5 rounded-full",{"bg-green-600":c,"bg-text-tertiary":!c})}),r(c?"contact.index.callBlock.available":"contact.index.callBlock.offline")]}),(0,n.jsx)(f.f,{className:"text-xl text-text-primary",children:r("contact.index.callBlock.title")}),(0,n.jsx)(f.f,{className:"text-sm text-text-secondary",children:r("contact.index.callBlock.hours")}),(0,n.jsx)(f.f,{className:"text-sm text-text-secondary",children:r(c?"contact.index.callBlock.copyAvailable":"contact.index.callBlock.copyOffline")})]}),c?(0,n.jsxs)("a",{href:"tel:".concat("+447476961687"),"data-testid":m.CallCta,onClick:()=>a({support_online:!0,locale:s}),className:"flex h-10 w-full items-center justify-center gap-2 rounded-full bg-background-primary-inverse text-sm text-button-primary-text-default",children:[(0,n.jsx)(w,{}),r("contact.index.callBlock.callNow")]}):(0,n.jsxs)("button",{type:"button",disabled:!0,"data-testid":m.CallCta,className:"flex h-10 w-full cursor-not-allowed items-center justify-center gap-2 rounded-full bg-background-quaternary text-sm text-text-tertiary",children:[(0,n.jsx)(w,{}),r("contact.index.callBlock.callNow")]})]}):null};var j=r(91683),E=r(86882),k=r(81612),C=r(1753),_=r(36120),O=r(32538),T=r(77896),S=r(64087),P=r(37200),R=r(93161),F=r(53748),A=r(54612);let M=[{nameKey:"contact.form.subjectOrderStatus",value:"Order Status"},{nameKey:"contact.form.subjectSubscription",value:"Subscription"},{nameKey:"contact.form.subjectDiscountAndPricing",value:"Discount and Pricing"},{nameKey:"contact.form.subjectShipping",value:"Shipping"},{nameKey:"contact.form.subjectReturn",value:"Return"},{nameKey:"contact.form.subjectWebsiteAndApp",value:"Website & App"},{nameKey:"contact.form.subjectProductQuery",value:"Product Query"},{nameKey:"contact.form.subjectBrandOrHealf",value:"Brand or Healf Related"},{nameKey:"contact.form.subjectDeactivateAccount",value:"Deactivate Account"},{nameKey:"contact.form.subjectOther",value:"Other"}],I=["image/jpeg","image/png","application/pdf"],z=e=>{var t,r,p,m,h;let{callWidgetEnabled:g=!1}=e,{t:x}=(0,i.Bd)("page"),v=(0,R.R)(),[w,z]=(0,o.useState)(!1),[D,L]=(0,o.useState)(!1),K=(0,o.useRef)(null),{customer:q}=(0,P.c)(),{locale:U}=(0,y.M)(),{whatsapp:W}=(0,A.$)(U),{trackFormFieldEngaged:B,trackFormSubmitted:H,trackFormSubmitFailed:J,trackFormWhatsAppClicked:Z}=b(),Q=(0,o.useRef)(new Set),V=e=>{Q.current.has(e)||(Q.current.add(e),B({field:e,locale:U}))},G=(0,o.useMemo)(()=>(e=>l.object({name:l.string().min(2,e("contact.form.errorNameRequired")),email:l.string().min(1,e("contact.form.errorEmailRequired")).email(e("contact.form.errorEmailInvalid")),phone:l.string().optional(),subject:l.string().min(1,e("contact.form.errorReasonRequired")),orderNo:l.string().optional(),comment:l.string().min(1,e("contact.form.errorMessageRequired")),attachments:l.custom().optional().refine(e=>!e||e.length<=3,e("contact.form.errorMaxFiles",{max:3})).refine(e=>!e||Array.from(e).every(e=>e.size<=0xa00000),e("contact.form.errorFileSize",{mb:10})).refine(e=>!e||Array.from(e).every(e=>I.includes(e.type)),e("contact.form.errorFileType"))}).refine(e=>"Order Status"!==e.subject&&"Subscription"!==e.subject&&"Shipping"!==e.subject&&"Return"!==e.subject||!!e.orderNo&&e.orderNo.length>0,{message:e("contact.form.errorOrderNoRequired"),path:["orderNo"]}))(x),[x]),{register:Y,handleSubmit:X,formState:{errors:$,isSubmitting:ee},control:et,watch:er,setValue:en,reset:ea,getValues:eo,trigger:es}=(0,s.mN)({resolver:(0,a.u)(G),mode:"onBlur",defaultValues:{email:(null==q?void 0:q.email)||""}}),{ref:ei,onChange:ec,...el}=Y("attachments"),eu=er("subject"),ed=er("attachments");(0,o.useEffect)(()=>{q&&en("email",q.email)},[q,en]);let ep=async e=>{L(!0);let t=new FormData;Object.entries(e).forEach(e=>{let[r,n]=e;"attachments"!==r&&t.append(r,n)}
1),e.attachments&&Array.from(e.attachments).forEach(e=>{t.append("attachments",e)}),t.append("locale",U);try{if((await fetch("/api/posthog/contact-form",{method:"POST",body:t})).ok){var r,n;L(!1),z(!0),H({subject:e.subject,attachment_count:null!=(n=null==(r=e.attachments)?void 0:r.length)?n:0,locale:U}),c.oR.success("We have received your message!"),ea();return}L(!1),console.error("Failed to submit form"),J({subject:e.subject,locale:U}),c.oR.error("Failed to send the message. Try again.")}catch(t){console.error("Error submitting form:",t),J({subject:e.subject,locale:U}),c.oR.error("Error submitting form")}finally{L(!1),ea()}},em=async()=>{let e=await es();if(Z({validation_passed:e,subject:eo("subject")||null,locale:U}),!e)return;let t=eo(),r=x("contact.form.whatsAppNotProvided"),n=M.find(e=>e.value===t.subject),a=n?x(n.nameKey):t.subject,o="".concat(x("contact.form.whatsAppTitle"),"\n\n");o+="".concat(x("contact.form.whatsAppName",{name:t.name}),"\n"),o+="".concat(x("contact.form.whatsAppEmail",{email:t.email||r}
1),"\n"),o+="".concat(x("contact.form.whatsAppPhone",{phone:t.phone||r}),"\n"),o+="".concat(x("contact.form.whatsAppSubject",{subject:a}),"\n"),["Order Status","Subscription","Shipping","Return"].includes(t.subject)&&t.orderNo&&(o+="".concat(x("contact.form.whatsAppOrderNo",{orderNo:t.orderNo}),"\n")),o+="\n".concat(x("contact.form.whatsAppComment",{comment:t.comment}));let s="https://wa.me/".concat(W,"?text=").concat(encodeURIComponent(o));window.open(s,"_blank")};return(0,n.jsx)(T.f,{children:(0,n.jsxs)("div",{className:"wrapper pb-20 pt-10 md:max-w-[1220px] md:py-16 xl:max-w-[1440px]",children:[!v&&(0,n.jsx)(u.O,{}),(0,n.jsxs)("div",{className:"flex flex-col gap-8 md:flex-row md:gap-10",children:[!v&&(0,n.jsx)(d.A,{}),(0,n.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col",children:[(0,n.jsx)("span",{className:"mb-2 block text-sm text-text-secondary",children:x("contact.index.eyebrow")}),(0,n.jsx)(C.D,{as:"h1",size:"display2",className:"mb-4",children:x("contact.index.heading")}),!(0,F.Ne)(U)&&(0,n.jsx)(f.f,{className:"mb-4 text-base text-text-secondary",children:x("contact.index.paragraph2")}),(0,F.rs)(U)&&(0,n.jsx)(N,{enabled:g}),(0,n.jsxs)("form",{onSubmit:X(ep),className:"space-y-4",children:[(0,n.jsx)(E.Z,{label:x("contact.form.nameLabel"),...Y("name"),error:null==(t=$.name)?void 0:t.message,isRequired:!0,type:"text",className:"border-none bg-background-secondary",onFocus:()=>V("name")}),(0,n.jsx)(E.Z,{label:x("contact.form.emailLabel"),...Y("email"),error:null==(r=$.email)?void 0:r.message,isRequired:!0,type:"email",className:"border-none bg-background-secondary",disabled:!!q,helperTextPosition:"up",helperText:q?"":x("contact.form.emailHelperText"),onFocus:()=>V("email")}),(0,n.jsx)(E.Z,{label:x("contact.form.phoneLabel"),...Y("phone"),error:null==(p=$.phone)?void 0:p.message,type:"tel",className:"border-none bg-background-secondary",onFocus:()=>V("phone")}),(0,n.jsx)(s.xI,{name:"subject",control:et,render:e=>{var t,r;let{field:a}=e;return(0,n.jsxs)("div",{className:"flex flex-col gap-y-2",children:[(0,n.jsxs)("div",{className:"text-sm font-medium text-text-secondary",children:[x("contact.index.subjectLabel"),(0,n.jsx)("span",{className:"text-text-error",children:" *"})]}),(0,n.jsxs)(S.l6,{name:a.name,required:!0,value:a.value||"",onValueChange:e=>{a.onChange(e),V("subject"),es("subject")},children:[(0,n.jsx)(S.bq,{children:(0,n.jsx)(S.yv,{placeholder:x("contact.form.chooseReasonPlaceholder"),className:"text-sm font-medium"})}),(0,n.jsx)(S.gC,{sideOffset:2,children:(0,n.jsx)(S.s3,{children:M.map(e=>(0,n.jsx)(S.eb,{value:e.value,className:"px-4 text-sm font-medium",children:(0,n.jsx)("div",{className:"flex items-center gap-2",children:x(e.nameKey)})},e.value))})})]}),$.subject&&(0,n.jsx)(f.f,{className:"mt-1 text-sm text-text-error",children:null!=(r=null==(t=$.subject)?void 0:t.message)?r:""})]})}}),("Order Status"===eu||"Subscription"===eu||"Shipping"===eu||"Return"===eu)&&(0,n.jsx)(E.Z,{isRequired:!0,label:x("contact.form.orderNoLabel"),...Y("orderNo"),error:null==(m=$.orderNo)?void 0:m.message,type:"tel",className:"border-none bg-background-secondary",onFocus:()=>V("order_no")}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("label",{className:"text-sm font-medium text-text-secondary",children:x("contact.index.attachmentsLabel")}),(0,n.jsx)(f.f,{className:"text-xs text-text-secondary",children:x("contact.index.attachmentsDescription")}),(0,n.jsx)("input",{type:"file",multiple:!0,accept:".jpg,.jpeg,.png,.pdf",...el,ref:e=>{ei(e),K.current=e},className:"hidden",onChange:e=>{ec(e),es("attachments")}}),(0,n.jsxs)("button",{type:"button",onClick:()=>{var e;V("attachments"),null==(e=K.current)||e.click()},className:"flex w-full items-center justify-center gap-2 rounded-md border-border-tertiary bg-background-secondary px-4 py-3 text-sm font-medium text-text-secondary transition-colors hover:bg-background-secondary",children:[(0,n.jsx)(_.In,{icon:"Paperclip",className:"size-4"}),x("contact.index.addFilesButton")]}),ed&&Array.from(ed).length>0&&(0,n.jsx)("div",{className:"mt-2 space-y-2",children:Array.from(ed).map((e,t)=>(0,n.jsxs)("div",{className:"flex items-center justify-between rounded-md border border-border-secondary bg-background-secondary p-2 text-sm",children:[(0,n.jsx)("span",{className:"truncate font-medium text-text-secondary",children:e.name}),(0,n.jsx)("button",{type:"button",onClick:()=>(e=>{if(!ed)return;let t=Array.from(ed).filter((t,r)=>r!==e),r=new DataTransfer;
1t.forEach(e=>r.items.add(e)),en("attachments",r.files,{shouldValidate:!0})})(t),className:"rounded-full p-1 text-text-secondary hover:bg-background-tertiary hover:text-text-error",children:(0,n.jsx)(_.In,{icon:"X",className:"size-4"})})]},t))}),$.attachments&&(0,n.jsx)(f.f,{className:"mt-1 text-sm text-text-error",children:$.attachments.message})]}),(0,n.jsx)(k.h,{label:x("contact.form.commentLabel"),...Y("comment"),error:null==(h=$.comment)?void 0:h.message,isRequired:!0,placeholder:x("contact.form.commentPlaceholder"),className:"min-h-[120px] resize-none",onFocus:()=>V("comment")}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsxs)(j.$n,{type:"submit",disabled:ee||w,children:[D&&(0,n.jsx)(O.A,{})," ",w?x("contact.form.sentButton"):ee?x("contact.form.sendingButton"):x("contact.form.sendButton")]}),(0,n.jsxs)(j.$n,{type:"button",onClick:em,className:"border-green-600 bg-green-600",children:[(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",children:(0,n.jsx)("path",{d:"M13.601 2.326A7.85 7.85 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.9 7.9 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.9 7.9 0 0 0 13.6 2.326zM7.994 14.521a6.6 6.6 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.56 6.56 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592m3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.73.73 0 0 0-.529.247c-.182.198-.691.677-.691 1.654s.71 1.916.81 2.049c.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"})}),x("contact.index.sendViaWhatsApp")]})]})]})]})]})]})})}},54612:(e,t,r)=>{"use strict";r.d(t,{$:()=>o});var n=r(28843),a=r(26684);function o(e){var t;let r=null!=(t=(0,a.E0)(null!=e?e:n.h.EN_UK))?t:(0,a.E0)(n.h.EN_UK);if(!r)throw Error("[market] no en-uk registry entry for contact fallback");return r.contact}},57690:(e,t,r)=>{"use strict";r.d(t,{c:()=>n.c,m:()=>n.m});var n=r(35447)},57931:(e,t,r)=>{"use strict";r.d(t,{QK:()=>u,Zl:()=>l,gZ:()=>c,pd:()=>d});var n=r(36671),a=r(64487),o=r(19799),s=r(21532),i=r(90059);let c=(0,a.F)(["w-full","rounded-full","outline-none","transition-colors","disabled:cursor-not-allowed","disabled:opacity-50","focus-visible:ring-2","ring-offset-[1px]"]),l=(0,a.F)([],{variants:{size:{sm:"h-form-element-sm px-4",default:"h-form-element-default px-4",lg:"h-form-element-lg px-5"}}}),u=(0,a.F)([],{variants:{variant:{solid:"",outline:""},state:{default:"",error:""}},compoundVariants:[{variant:"solid",state:"default",className:["bg-input-bg-default","text-input-text-default","placeholder:text-input-text-placeholder","focus-visible:ring-focus-outer-default","ring-offset-focus-inner-default"]},{variant:"solid",state:"error",className:["bg-input-bg-error","border","border-input-outline-border-error","text-input-text-error","placeholder:text-input-text-error","focus-visible:ring-focus-outer-destructive","ring-offset-focus-inner-destructive"]},{variant:"outline",state:"default",className:["bg-transparent","text-input-outline-text-default","placeholder:text-input-outline-text-placeholder","border","border-input-outline-border-default","hover:border-input-outline-border-hover","focus:border-input-outline-border-focus","focus-visible:ring-focus-outer-default","ring-offset-focus-inner-default"]},{variant:"outline",state:"error",className:["bg-transparent","border","border-input-outline-border-error","hover:border-input-outline-border-error","focus:border-input-outline-border-error","text-input-outline-text-error","placeholder:text-input-outline-text-error","focus-visible:ring-focus-outer-destructive","ring-offset-focus-inner-destructive"]}]}),d=(0,o.forwardRef)((e,t)=>{let{className:r,type:a="text",size:o="default",variant:d="solid",state:p="default",...m}=e;return(0,n.jsx)(s.a,{as:"input",type:a,className:(0,i.cn)((e=>{let{size:t="default",variant:r="solid",state:n="default"}=e;return(0,i.cn)(c(),l({size:t}),u({variant:r,state:n}))})({size:o,variant:d,state:p}),r),ref:t,...m})});d.displayName="Input"},59607:(e,t,r)=>{"use strict";r.d(t,{XL:()=>c,fI:()=>l,SD:()=>w,cz:()=>_,qf:()=>i,Pd:()=>h,NW:()=>b,QX:()=>j,xF:()=>y,B3:()=>x,JH:()=>C,T9:()=>g,nQ:()=>s,Zt:()=>u,pE:()=>N,kF:()=>v,Ot:()=>m,Wz:()=>d,uK:()=>E,Gk:()=>k,zg:()=>f,z3:()=>p});var n=r(10424);async function a(e){try{let t=await e.json();return t.error||t.message||(Array.isArray(t.errors)?t.errors.join(", "):void 0)||JSON.stringify(t)}catch(t){return await e.text()}}async function o(e){let t=n.sM.UNKNOWN,r="Store-credit operation failed";try{let a=await e.json();(null==a?void 0:a.error)&&(r=a.error),(null==a?void 0:a.code)&&Object.values(n.sM).includes(a.code)&&(t=a.code)}catch(e){}throw new n.ZD(t,e.status,r)}let s=async e=>{let{shopifyCustomerId:t,status:r}=e,n=await fetch("/api/recharge/subscriptions?shopify_customer_id=".concat(t,"&status=").concat(r));if(!n.ok)throw Error("Failed to fetch subscriptions");return{subscriptions:(await n.json()).subscriptions||[]}},i=async e=>{let{subId:t,cancellationReason:r,cancellationReasonComments:n}=e,a=await fetch("/api/recharge/subscriptions",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({subId:t,cancellationReason:r,cancellationReasonComments:n})});if(!a.ok)throw Error("Failed to cancel subscription");return a.json()},c=async e=>{let{subId:t}=e,r=await fetch("/api/recharge/subscriptions",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({subId:t})});if(!r.ok)throw Error("Failed to activate subscription");return r.json()},l=async e=>{let t=await fetch("/api/recharge/subscriptions/onetimes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e})});if(!t.ok)throw Error("Failed to update subscription");return t.json()},u=async e=>{let{onetimeId:t}=e,r=await fetch("/api/recharge/subscriptions/onetimes?onetime_id=".concat(t),{method:"DELETE"});if(!r.ok){let e;try{let t=await r.json();"string"==typeof(null==t?void 0:t.error)&&(e=t.error)}catch(e){}throw Error(null!=e?e:"removeFailed")}return r.json()},d=async e=>{let t=await fetch("/api/recharge/subscriptions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e})});if(!t.ok)throw Error("Failed to update subscription");return t.json()},p=async(e,t)=>{let r=await fetch("/api/recharge/subscriptions",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({subId:e,...t})});if(!r.ok){let e=Error("Failed to update subscription");throw e.status=r.status,e}return r.json()},m=async e=>{let{subId:t,date:r}=e,n=await fetch("/api/recharge/subscriptions/next-charge-interval",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({subId:t,date:r})});if(!n.ok){let e=Error("Failed to update next charge date");throw e.status=n.status,e}return n.json()},f=async e=>{let{subId:t,address_id:r}=e,n=await fetch("/api/recharge/subscriptions/change-address",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({subId:t,address_id:r})});if(!n.ok)throw Error("Failed to change subscription address");return n.json()},h=async e=>{let{addressId:t}=e,r=await fetch("/api/recharge/addresses/?address_id=".concat(t));if(!r.ok)throw Error("Failed to fetch address");return r.json()},b=async e=>{let{customerId:t}=e,r=await fetch("/api/recharge/addresses?customer_id=".concat(t));if(!r.ok)throw Error("Failed to fetch addresses");return r.json()},g=async e=>{let{external_product_id:t}=e,r=new URLSearchParams;t&&r.append("external_product_id",t),r.append("type","subscription");let n=await fetch("/api/recharge/plans?".concat(r.toString()));if(!n.ok)throw Error("Failed to fetch plans");return n.json()},x=async e=>{let{customer_id:t}=e,r=await fetch("/api/recharge/payments?customer_id=".concat(t));if(!r.ok)throw Error("Failed to fetch payment methods");return r.json()},y=async e=>{let{customer_id:t}=e,r=await fetch("/api/recharge/credits?customer_id=".concat(t));if(!r.ok)throw Error("Failed to fetch store credits");return r.json()},v=async e=>{let{customer_id:t,enabled:r}=e,n=await fetch("/api/recharge/credits/apply-to-next-charge",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({customer_id:t,enabled:r})});if(!n.ok)throw Error("Failed to update store-credit preference");return n.json()},w=async e=>{let t,{customer_id:r,cartId:a}=e;try{t=await fetch("/api/recharge/credits/cart-discount",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({customer_id:r,cartId:a})})}catch(e){throw(0,n.oS)(e)}return t.ok||await o(t),t.json()},N=async e=>{let t,{customer_id:r,cartId:a}=e;try{t=await fetch("/api/recharge/credits/cart-discount",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({customer_id:r,cartId:a})})}catch(e){throw(0,n.oS)(e)}return t.ok||await o(t),t.json()},j=async e=>{let{customer_id:t,address_id:r,status:n}=e,a=new URLSearchParams;t&&a.set("customer_id",String(t)),r&&a.set("address_id",String(r)),n&&a.set("status",n);let o=await fetch("/api/recharge/charges?".concat(a.toString()));if(!o.ok)throw Error("Failed to fetch charges");return o.json()},E=async(e,t)=>{let r=await fetch("/api/recharge/addresses",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({addressId:e,...t})});if(!r.ok)throw Error("Failed to update address");return r.json()},k=async e=>{let{addressId:t,customerId:r,templateType:n}=e,o=await fetch("/api/recharge/notify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({addressId:t,customerId:r,templateType:n})});if(!o.ok)throw Error(await a(o));return o.json()},C=async e=>{let t=await fetch("/api/recharge/subscriptions/hz/subscriber?shopify_customer_id=".concat(e));if(!t.ok)throw Error("Failed to get HZ subscriber");return t.json()},_=async e=>{let t;try{t=await fetch("/api/recharge/subscriptions/bulk",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:e})})}catch(t){let e=t instanceof Error?t.message:"Network error: Failed to connect to subscription API";throw Error("Fetch error: ".concat(e))}if(!t.ok){let e;try{e=await t.json()}catch(e){throw Error("API error (".concat(t.status,"): ").concat(t.statusText||"Failed to process bulk subscription items",". Response parsing failed: ").concat(e instanceof Error?e.message:"Unknown error"))}let r=e.error||"Failed to process bulk subscription items",n=e.details?" Details: ".concat(e.details):"";throw Error("".concat(r).concat(n))}try{return await t.json()}catch(e){throw Error("Response parsing error: Failed to parse API response as JSON. ".concat(e instanceof Error?e.message:"Unknown error"))}}},59645:(e,t,r)=>{"use strict";r.d(t,{Az:()=>f,Oh:()=>l,W0:()=>u,Yf:()=>x,bV:()=>p,eU:()=>i,jR:()=>b});var n=r(88946),a=r(53243),o=r(53768);let s=async(e,t)=>(0,o.A6)("/wearable-connections/generate-session",{...t,method:"POST",headers:{"Content-Type":"application/json",...null==t?void 0:t.headers},body:JSON.stringify(e)}),i=(e,t)=>(0,n.useMutation)((e=>{let t=["generateWearableSession"],{mutation:r,request:n}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{data:t}=null!=e?e:{};return s(t,n)},...r}})(e),t),c=async e=>(0,o.A6)("/wearable-connections",{...e,method:"GET"}),l=()=>["/wearable-connections"];function u(e,t){let r=(e=>{var t;let{query:r,request:n}=null!=e?e:{};return{queryKey:null!=(t=null==r?void 0:r.queryKey)?t:l(),queryFn:e=>{let{signal:t}=e;return c({signal:t,...n})},...r}})(e);return{...(0,a.useQuery)(r,t),queryKey:r.queryKey}}let d=async(e,t)=>(0,o.A6)("/wearable-connections",{...t,method:"DELETE",headers:{"Content-Type":"application/json",...null==t?void 0:t.headers},body:JSON.stringify(e)}),p=(e,t)=>(0,n.useMutation)((e=>{let t=["disconnectWearable"],{mutation:r,request:n}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{data:t}=null!=e?e:{};return d(t,n)},...r}})(e),t),m=async(e,t)=>(0,o.A6)("/wearable-data",{...t,method:"DELETE",headers:{"Content-Type":"application/json",...null==t?void 0:t.headers},body:JSON.stringify(e)}),f=(e,t)=>(0,n.useMutation)((e=>{let t=["deleteWearableData"],{mutation:r,request:n}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{data:t}=null!=e?e:{};return m(t,n)},...r}})(e),t),h=async(e,t)=>(0,o.A6)("/wearable-connections/merge",{...t,method:"POST",headers:{"Content-Type":"application/json",...null==t?void 0:t.headers},body:JSON.stringify(e)}),b=(e,t)=>(0,n.useMutation)((e=>{let t=["mergeAnonymousConnection"],{mutation:r,request:n}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{data:t}=null!=e?e:{};return h(t,n)},...r}})(e),t),g=async(e,t)=>(0,o.G8)("/anonymous/generate-session",{...t,method:"POST",headers:{"Content-Type":"application/json",...null==t?void 0:t.headers},body:JSON.stringify(e)}),x=(e,t)=>(0,n.useMutation)((e=>{let t=["generateAnonymousSession"],{mutation:r,request:n}=e?e.mutation&&"mutationKey"in e.mutation&&e.mutation.mutationKey?e:{...e,mutation:{...e.mutation,mutationKey:t}}:{mutation:{mutationKey:t},request:void 0};return{mutationFn:e=>{let{data:t}=null!=e?e:{};return g(t,n)},...r}})(e),t)},61594:(e,t,r)=>{"use strict";r.d(t,{P:()=>o});var n=r(8975),a=r(27119);function o(e,t,r){let o=(0,a.a)(e,null==r?void 0:r.in);if(isNaN(t))return(0,n.w)((null==r?void 0:r.in)||e,NaN);if(!t)return o;let s=o.getDate(),i=(0,n.w)((null==r?void 0:r.in)||e,o.getTime());return(i.setMonth(o.getMonth()+t+1,0),s>=i.getDate())?i:(o.setFullYear(i.getFullYear(),i.getMonth(),s),o)}},64087:(e,t,r)=>{"use strict";r.d(t,{bq:()=>x,eb:()=>v,gC:()=>y,l6:()=>h,s3:()=>b,yv:()=>g});var n=r(36671),a=r(37568),o=r(64487),s=r(19799),i=r(36120),c=r(57931),l=r(94282),u=r(90059);let[d,p]=(0,l.q)(),m=(0,o.F)("flex cursor-pointer items-center justify-between outline-none radix-highlighted:bg-background-tertiary",{variants:{size:{sm:"h-form-element-sm px-4 text-sm",default:"h-form-element-default px-4 text-sm",lg:"h-form-element-lg px-5"}},defaultVariants:{size:"default"}}),f=(0,o.F)([],{variants:{size:{sm:"h-form-element-sm pl-4 pr-3 text-sm",default:"h-form-element-default pl-4 pr-3 text-sm",lg:"h-form-element-lg pl-5 pr-3"}}}),h=e=>{let{size:t="default",...r}=e;return(0,n.jsx)(d,{value:t,children:(0,n.jsx)(a.bL,{...r})})},b=a.YJ,g=a.WT,x=s.forwardRef((e,t)=>
1{let{className:r,children:o,size:s,variant:l="solid",state:d="default",...m}=e,h=p();return(0,n.jsxs)(a.l9,{ref:t,className:(0,u.cn)((0,c.gZ)(),f({size:null!=s?s:h}),(0,c.QK)({variant:l,state:d}),"flex","items-center","justify-between","rounded-full",r),...m,children:[o,(0,n.jsx)(i.In,{icon:"ChevronDown",className:"size-4"})]})});x.displayName=a.l9.displayName;let y=s.forwardRef((e,t)=>{let{className:r,children:o,position:s="popper",container:i,...c}=e;return(0,n.jsx)(a.ZL,{container:i,children:(0,n.jsx)(a.UC,{ref:t,className:(0,u.cn)("z-50 overflow-hidden rounded-sm border bg-dialog-bg-default py-1",r),position:s,...c,children:(0,n.jsx)(a.LM,{className:(0,u.cn)("h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:o})})})});y.displayName=a.UC.displayName;let v=s.forwardRef((e,t)=>{let{className:r,children:o,...s}=e,c=p();return(0,n.jsxs)(a.q7,{ref:t,className:(0,u.cn)(m({size:c}),r),...s,children:[(0,n.jsx)(a.p4,{children:(0,n.jsx)("span",{children:o})}),(0,n.jsx)(a.VF,{children:(0,n.jsx)(i.In,{icon:"Check",className:"size-4"})})]})});v.displayName=a.q7.displayName},64871:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=r(19799);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=o(e,n)),t&&(a.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},68631:(e,t,r)=>{"use strict";r.d(t,{B0:()=>s,HY:()=>i,fr:()=>o});var n=r(28843),a=r(53748);function o(e,t){let r=t[n.h.DE_DE];return(0,a.Ne)(e)&&void 0!==r?r:t[n.h.EN_UK]}function s(e,t){let r=t[n.h.DE_DE];return(0,a.Ne)(e)&&void 0!==r?r:t[n.h.EN_UK]}function i(e,t){let r=t[n.h.DE_DE];return(0,a.Ne)(e)&&void 0!==r?r:t[n.h.EN_UK]}},70623:(e,t,r)=>{Promise.resolve().then(r.bind(r,37228))},77896:(e,t,r)=>{"use strict";r.d(t,{f:()=>o});var n=r(36671),a=r(90059);let o=e=>{let{className:t,...r}=e;return(0,n.jsx)("div",{className:(0,a.cn)("",t),...r})}},81461:(e,t,r)=>{"use strict";r.d(t,{T:()=>s});var n=r(36671);r(19799);var a=r(90059),o=r(57931);function s(e){let{className:t,...r}=e,{variant:s="solid",state:i="default"}=r;return(0,n.jsx)("textarea",{"data-slot":"textarea",className:(0,a.cn)((0,o.gZ)(),(0,o.QK)({variant:s,state:i}),"rounded-sm px-4 py-3",t),...r})}},81612:(e,t,r)=>{"use strict";r.d(t,{h:()=>c});var n=r(36671),a=r(19799),o=r(93169),s=r(81461),i=r(90059);let c=a.forwardRef((e,t)=>{let{className:r,label:a,error:c,labelClassName:l="",isRequired:u=!1,...d}=e;return(0,n.jsxs)("div",{children:[a&&(0,n.jsxs)("label",{className:(0,i.cn)("block text-sm font-medium text-text-secondary",l),children:[a,u&&(0,n.jsx)("span",{className:"text-text-error",children:" *"})]}),(0,n.jsx)(s.T,{className:(0,i.cn)("mt-1 flex min-h-[80px] w-full px-3 py-2",{"border-red-500":c},r),state:c?"error":"default",...d,ref:t}),c&&(0,n.jsx)(o.f,{className:"mt-1 text-xs text-text-error",children:c})]})});c.displayName="FormTextarea"},82476:(e,t,r)=>{"use strict";r.d(t,{y:()=>i});var n=r(53243),a=r(37200),o=r(59607);let s=async e=>{if(!e)return null;try{return await (0,o.JH)(e)}catch(e){return console.error("Error fetching HZ subscriber:",e),null}};function i(){let{customer:e}=(0,a.c)(),{data:t,isLoading:r,isFetching:o,isError:i,error:c,refetch:l}=(0,n.useQuery)({queryKey:["hz-subscriber",null==e?void 0:e.legacyResourceId],queryFn:()=>s(Number(null==e?void 0:e.legacyResourceId)),enabled:!!(null==e?void 0:e.legacyResourceId),refetchOnWindowFocus:!1});return{data:t,isLoading:r||o,isError:i,error:c,refetch:l}}},82997:(e,t,r)=>{"use strict";r.d(t,{z:()=>o});var n=r(77265),a=r(27045),o=class extends n.${constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:(0,a.PL)()},t)}getOptimisticResult(e){return e.behavior=(0,a.PL)(),super.getOptimisticResult(e)}
1fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){let{state:r}=e,n=super.createResult(e,t),{isFetching:o,isRefetching:s,isError:i,isRefetchError:c}=n,l=r.fetchMeta?.fetchMore?.direction,u=i&&"forward"===l,d=o&&"forward"===l,p=i&&"backward"===l,m=o&&"backward"===l;return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,a.rB)(t,r.data),hasPreviousPage:(0,a.RQ)(t,r.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:c&&!u&&!p,isRefetching:s&&!d&&!m}}}},86882:(e,t,r)=>{"use strict";r.d(t,{Z:()=>c});var n=r(36671),a=r(19799),o=r(57931),s=r(93169),i=r(90059);let c=(0,a.forwardRef)((e,t)=>{let{label:r,error:a,helperText:c,helperTextPosition:l="down",className:u="",labelClassName:d="",isRequired:p=!1,...m}=e;return(0,n.jsxs)("div",{children:[r&&(0,n.jsxs)("label",{className:(0,i.cn)("mb-1 block text-sm font-medium text-text-secondary",d),children:[r,p&&(0,n.jsx)("span",{className:"text-text-error",children:" *"})]}),"up"===l&&c&&(0,n.jsx)(s.f,{className:"mt-1 text-xs text-text-secondary",children:c}),(0,n.jsx)(o.pd,{...m,ref:t,size:"lg",state:a?"error":"default",className:(0,i.cn)("mt-1",u)}),"down"===l&&c&&(0,n.jsx)(s.f,{className:"mt-1 text-xs text-text-secondary",children:c}),a&&(0,n.jsx)(s.f,{className:"mt-1 text-xs text-text-error",children:a})]})});c.displayName="FormInput"},91683:(e,t,r)=>{"use strict";r.d(t,{$n:()=>f,Wj:()=>d,hs:()=>p});var n=r(36671),a=r(64487),o=r(19799),s=r(21532),i=r(36120),c=r(90059);let l=(0,a.F)(["inline-flex","items-center","justify-center","text-center","transition-colors","duration-250","rounded-full","text-sm","gap-x-1","font-regular","whitespace-nowrap","outline-none","disabled:cursor-not-allowed","disabled:opacity-50","focus-visible:ring-2","ring-offset-[1px]"]),u=(0,a.F)([],{variants:{variant:{primary:["bg-button-primary-bg-default","text-button-primary-text-default","hover:bg-button-primary-bg-hover","disabled:hover:bg-button-primary-bg-default","active:bg-button-primary-bg-pressed","focus-visible:ring-focus-outer-default","ring-offset-focus-inner-default"],secondary:["bg-button-secondary-bg-default","text-button-secondary-text-default","hover:bg-button-secondary-bg-hover","disabled:hover:bg-button-secondary-bg-default","active:bg-button-primary-bg-pressed","focus-visible:ring-focus-outer-default","ring-offset-focus-inner-default"],tertiary:["bg-button-tertiary-bg-default","text-button-secondary-text-default","hover:bg-button-secondary-bg-hover","disabled:hover:bg-button-secondary-bg-default","active:bg-button-primary-bg-pressed","focus-visible:ring-focus-outer-default","ring-offset-focus-inner-default"],outline:["text-button-outline-text-default","border","border-button-outline-border-default","hover:border-button-outline-border-hover","disabled:hover:border-button-outline-border-default","focus-visible:ring-focus-outer-default","ring-offset-focus-inner-default"],destructive:["bg-button-destructive-bg-default","text-button-destructive-text-default","hover:bg-button-destructive-bg-hover","disabled:hover:bg-button-destructive-bg-default","active:bg-button-destructive-bg-pressed","focus-visible:ring-focus-outer-destructive","ring-offset-focus-inner-destructive"],zonePromo:["bg-button-destructive-bg-default","text-button-destructive-text-default","hover:bg-button-destructive-bg-hover","disabled:hover:bg-button-destructive-bg-default","active:bg-button-destructive-bg-pressed","focus-visible:ring-focus-outer-destructive","ring-offset-focus-inner-destructive"],zonePromoSecondary:["bg-button-primary-bg-default","text-button-primary-text-default","hover:bg-button-destructive-bg-default","hover:text-button-destructive-text-default","disabled:hover:bg-button-primary-bg-default","active:bg-button-destructive-bg-pressed","focus-visible:ring-focus-outer-destructive","ring-offset-focus-inner-destructive"],ghost:["hover:bg-background-secondary","disabled:hover:bg-transparent","focus-visible:ring-focus-outer-default","ring-offset-focus-inner-default"],link:["underline","!h-auto","!p-0"]}}}),d=(0,a.F)([],{variants:{appearance:{default:"",icon:""},size:{sm:"",default:"",lg:""}},compoundVariants:[{appearance:"default",size:"sm",class:"h-form-element-sm px-3 pt-px text-xs"},{appearance:"default",size:"default",class:"h-form-element-default px-4 text-sm"},{appearance:"default",size:"lg",class:"h-form-element-lg px-6 text-sm"},{appearance:"icon",size:"sm",class:"size-form-element-sm [&_svg]:size-4 [&_svg]:shrink-0"},{appearance:"icon",size:"default",class:"size-form-element-default [&_svg]:size-4.5 [&_svg]:shrink-0"},{appearance:"icon",size:"lg",class:"size-form-element-lg [&_svg]:size-5 [&_svg]:shrink-0"}]}),p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{appearance:t="default",size:r="default",variant:n="primary"}=e;return(0,c.cn)(l(),d({appearance:t,size:r}),u({variant:n}))},m=e=>{let{appearance:t,loadingText:r}=e;return"icon"===t?(0,n.jsx)(i.In,{icon:"Loader",className:"animate-spin"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.In,{icon:"Loader",className:"size-4 animate-spin"}),(0,n.jsx)("span",{children:r||"Adding..."})]})},f=(0,o.forwardRef)((e,t)=>{let{as:r="button",children:a,type:o="button",size:i="default",variant:l="primary",appearance:u="default",className:d,disabled:f,isLoading:h,loadingText:b,...g}=e;
1return(0,n.jsx)(s.a,{as:r,ref:t,type:o,className:(0,c.cn)(p({appearance:u,variant:l,size:i}),d),disabled:f||h,...g,children:h?(0,n.jsx)(m,{appearance:u,loadingText:b}):a})});f.displayName="Button"},93161:(e,t,r)=>{"use strict";r.d(t,{V:()=>i,R:()=>c});var n=r(36671),a=r(78464);let[o,s]=(0,r(94282).q)({strict:!1,name:"EmbeddedModeContext"});function i(e){let{value:t,children:r}=e;return(0,n.jsx)(o,{value:t,children:r})}function c(){var e;let t=null!=(e=s())&&e;return(0,a.useSearchParams)(),!!t}},94282:(e,t,r)=>{"use strict";r.d(t,{q:()=>a});var n=r(19799);function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{strict:t=!0,errorMessage:r="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:a}=e,o=(0,n.createContext)(void 0);return o.displayName=a,[o.Provider,function(){let e=(0,n.useContext)(o);if(!e&&t)throw Error(r);return e},o]}},96006:(e,t,r)=>{"use strict";r.d(t,{O:()=>s});var n=r(36671),a=r(26324),o=r(37200);let s=()=>{let{customer:e}=(0,o.c)();return e?(0,n.jsx)("div",{className:"sticky top-[24px] z-30 mb-4 flex min-h-16 w-full items-center bg-background-primary py-2 md:hidden",children:(0,n.jsx)(a.A,{})}):null}},98565:(e,t,r)=>{"use strict";r.d(t,{W:()=>o});var n=r(1931),a=r(14785);function o(){var e,t;let{session:r,isLoading:o}=(0,n.a)(),{data:s,isLoading:i}=(0,a.Kr)({query:{enabled:!!r}});return o||r&&i?{hasAccess:!1,isLoading:!0}:{hasAccess:!!((null==s?void 0:s.status)===200&&null!=(t=null==(e=s.data)?void 0:e.earliestTestKitCreatedAt)?t:null),isLoading:!1}}}},e=>{e.O(0,[2184,5947,8873,3588,2651,8478,3243,1727,4632,3248,7127,5050,2605,7495,5623,912,3351,4996,7568,7616,8668,64,1525,4785,6174,2457,2590,3119,7358],()=>e(e.s=70623)),_N_E=e.O()}]);
2//# sourceMappingURL=page-5b103618f66796e8.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.