PageSourceSearch

https://www.everlywell.com/3bc87cd0acb88219a33ad13113d57bb7561a8f07-31743c5a-f69f3009b896fea16fd3.js

js everlywell.com collected 2026-09-24 17:57:05 UTC 145,519 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkwww=self.webpackChunkwww||[]).push([[6131],{30504:function(e,t,a){a.d(t,{A:function(){return r}});var o=a(45574),n=a(96540);var r=function(e){const{price:t,strikeThrough:a,ratio:r=16/24,...i}=e,[s,l]=t.toFixed(2).split("."),c=`max(${r}em, 12px)`;return n.createElement(o.EY,Object.assign({fontSize:"3xl",fontWeight:"medium"},i,{as:"div",role:a?"deletion":void 0,"data-element":"Text","data-component":"Price","data-source-file":"Price.tsx"}),n.createElement(o.s6,{"data-element":"VisuallyHidden","data-source-file":"Price.tsx"},a?"Before ":null," ",s," dollars and"," ","00"!==l?`${l} cents`:"no cents"),n.createElement(o.az,{"aria-hidden":!0,whiteSpace:"pre",position:"relative",lineHeight:1,"data-element":"Box","data-source-file":"Price.tsx"},a?n.createElement(o.EY,{as:"span",fontSize:c,fontWeight:"inherit",color:"inherit",lineHeight:1,position:"absolute",bottom:"0.5px",width:"100%",sx:{":before":{content:'"$"'},":after":{content:'""',display:"block",width:"105%",height:"0.08em",background:"utility.sale",borderRadius:"0.08em",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}}):null,n.createElement(o.EY,{as:"span",fontSize:c,fontWeight:"inherit",color:"inherit",lineHeight:1,"data-element":"Text","data-source-file":"Price.tsx"},"$"),n.createElement(o.EY,{as:"span",fontSize:"1em",fontWeight:"inherit",color:"inherit",lineHeight:1,"data-element":"Text","data-source-file":"Price.tsx"},s),n.createElement(o.EY,{as:"span",fontSize:c,fontWeight:"inherit",color:"inherit",lineHeight:1,"data-element":"Text","data-source-file":"Price.tsx"},".",l)))}},97189:function(e,t,a){a.d(t,{A:function(){return v}});var o=a(45574),n=a(20011),r=a(76960),i=a(96540),s=a(11616),l=a(47654),c=a(52218),d=a(99151),u=a(3411),m=a(43325),h=a(31067),p=a(66360),g=a(90087),f=a(45619),_=a(64898);var y=({promoMessage:e,promotions:t,promotion:a,order:n,showLoadingState:r,isLoading:c,removePromoCodeHandler:d,removeSinglePromoHandler:y,handlePromoCodeSubmit:v,control:b,applyPromoMutation:T,formState:E,clearErrors:k,advertisedPromosElement:H,wasAdvertisedPromoSubmitted:x,promoCodeInputValue:A,setPromoCodeInputValue:I,shouldShowInputIcon:C,isVariant:S=!1,hidePromoCodeEntry:w=!1,hiddenPromoCodeEntryMessage:D})=>{var O,N,P,L;const F=t||(a?[{code:a}]:[]),M=E.isDirty&&T.isError&&!T.isSuccess,R=E.isDirty&&Boolean(null===(O=E.errors.promoCode)||void 0===O?void 0:O.message),Y=T.isError&&!T.isSuccess&&x,W="manual"===(null===(N=E.errors.promoCode)||void 0===N?void 0:N.type),B=M||R||Y||W;return i.createElement(i.Fragment,null,i.createElement(o.s6,{"aria-live":"polite","aria-atomic":"true"},e),F.length>0&&i.createElement(i.Fragment,null,i.createElement(p.A,{promos:F.map((e=>({code:e.code||e,id:e.id}))),onRemove:y||(()=>d({})),isLoading:c,showLoadingState:r}),1===F.length&&!y&&i.createElement(o.az,{display:"flex",width:"100%",gap:2,background:"tints.white",padding:4,borderRadius:12,marginBottom:2},i.createElement(o.az,{display:"flex",alignItems:"flex-start",gap:2,flex:1},i.createElement(o.az,{display:"flex",flexDirection:"column",gap:1,flexGrow:"1"},i.createElement(o.EY,{fontSize:"md",fontWeight:"medium"},(null===(P=F[0])||void 0===P||null===(L=P.code)||void 0===L?void 0:L.toUpperCase())||F[0]," ",i.createElement(o.EY,{as:"span",fontSize:"md",color:"tints.darkGrey"},"applied")))),i.createElement(o.az,{display:"flex",alignItems:"center"},i.createElement(o.K0,{icon:i.createElement(u.l,null),variant:"primary",colorScheme:"whiteCS",color:"utility.sale","aria-label":"Remove promo code",size:"sm",padding:4,marginY:-4,isLoading:r&&c,_loading:{backgroundColor:"tints.white"},sx:{"& svg":{fontSize:"1.25rem !important"}},onClick:e=>{d(e),I("")}})))),w?D?i.createElement(o.EY,{marginTop:F.length>0?2:0},D):null:i.createElement(i.Fragment,null,i.createElement(o.az,{as:"form",display:"flex",noValidate:!0,alignItems:"flex-start",justifyContent:"space-between",gap:2,onSubmit:v,marginTop:F.length>0?2:0},i.createElement(o.MJ,{isInvalid:B},i.createElement(f.xI,{control:b,name:"promoCode",render:e=>i.createElement(o.MG,null,C?i.createElement(o.Wf,{pointerEvents:"none"},i.createElement(o.In,{as:m.v,color:"tints.darkGrey"})):null,i.createElement(o.pd,Object.assign({},e,{onChange:t=>{T.reset(),null==k||k("promoCode"),e.onChange(t),I(t.target.value)},placeholder:"Add promo code",name:"promoCode","aria-label":"promoCode"},S&&{borderColor:"tints.lightGrey"},{readOnly:r&&c,value:A||""})))}),i.createElement(o.Wt,{sx:{a:{"&:hover":{textDecoration:"underline"},"&:focus":{textDecoration:"underline"}}}},((e,t)=>{var a,o,n;const r=e.errors.promoCode;if(null!=r&&r.message&&"manual"===r.type)return r.message;if(null!=t&&t.isSuccess||null!=t&&t.isLoading)return"";if(null!=r&&r.message&&(e.isDirty||"manual"===r.type))return r.message;if(null==t||!t.isError)return"";const s=null==t?void 0:t.error;if(s instanceof TypeError||s instanceof Error&&/failed to fetch|networkerror|load failed/i.test(s.message))return"Unable to apply that coupon right now. Please check your connection and try again.";const l=null==s||null===(a=s.response)||void 0===a||null===(o=a.data)||void 0===o?void 0:o.errors;if(null!=l&&null!==(n=l[0])&&void 0!==n&&n.message)return(null==l?void 0:l[0]).message;if(null!=l&&l[0]){const e=l[0];if("string"==typeof e&&e.includes("login")){const a=new URL(`${_.$C}/login`);return a.searchParams.set("my_results_redirect",window.location.href),a.searchParams.set(g.ll,t.variables.code),i.createElement("div",{dangerouslySetInnerHTML:{__html:e.replace("login",`<a href="${a.toString()}">login</a>`)}})}return e}return"The coupon code you entered doesn't exist. Please try again."})(E,T))),i.createElement(o.so,{alignItems:"center"},i.createElement(o.K0,{icon:i.createElement(h.F,null),type:"submit",variant:"primary",colorScheme:"whiteCS",color:"tints.darkGrey",padding:"2",isLoading:r&&c,"aria-label":"Apply promo code",size:"sm",marginTop:"5px",onClick:()=>{return e=A,void s.Ay.track({event:l.r.EVENTS.CLICKED_BUTTON,data:{label:"Free promo code submitted",promoCode:e}});var e}}))),H))};var v=({promotions:e,promotion:t,order:a,showLoadingState:u,isLoading:m,applyPromoMutation:h,removePromoCodeHandler:p,removeSinglePromoHandler:g,handleSubmit:f,formState:_,control:v,clearErrors:b,promoCodeSubmitHandler:T,showAdvertisedPromos:E=!1,isVariant:k=!1,hidePromoCodeEntry:H=!1,hiddenPromoCodeEntryMessage:x})=>{const A=e||(t?[t]:[]),{0:I,1:C}=(0,i.useState)(""),{0:S,1:w}=(0,i.useState)(!1),{0:D,1:O}=(0,i.useState)(""),{order:N}=(0,n._)(),{advertisedPromos:P,isLoading:L}=(0,d.A)({isEnabled:E}),F=P.filter((e=>!!N&&(!A.some((t=>t.code===e.code))&&N.line_items.some((t=>{switch(e.type){case"product":return(0,c.i4)(t.product_id,e);case"variant":return e.rules.included_variant_ids.includes(t.variant_id);default:return!1}}
1))))),M=e=>{T(e),C(`${e.promoCode} promo code applied`),O("")},R=E&&F.length>0?i.createElement(o.so,{gap:"2",marginTop:"2",flexDirection:"column"},F.map((e=>{var t;return i.createElement(o.so,{key:e.id,justifyContent:"space-between",alignItems:"center",padding:"3",width:"100%",backgroundColor:"tints.white",borderRadius:"xl",minHeight:"56px",gap:"3",onClick:()=>{var t;O(e.code),M({promoCode:e.code}),w(!0),t=e.code,s.Ay.track({event:l.r.EVENTS.CLICKED_BUTTON,data:{label:"Advertised promo code submitted",promoCode:t}})},_hover:{cursor:"pointer"}},i.createElement(o.so,{flexDirection:"column"},i.createElement(o.EY,{fontSize:"md",fontWeight:"medium"},(e=>{if(e.discounts.flat_percent)return`${e.discounts.flat_percent}% Discount`;if(e.discounts.flat_rate)return`$${e.discounts.flat_rate} OFF`;const t=e.discounts.tiered;if(t&&t.length>0)return`Up to ${t.reduce(((e,t)=>t.percent>e.percent?t:e),t[0]).percent}% Discount`})(e)),i.createElement(o.EY,{fontSize:"sm",color:"tints.darkGrey"},(null==e?void 0:e.description)||"Applicable on purchase")),i.createElement(o.$n,{height:"32px",paddingX:"2 !important",paddingY:"0.5 !important",backgroundColor:"tints.cream",color:"tints.black",variant:"secondary",boxShadow:"none",borderRadius:"lg",_active:{boxShadow:"inset 0 0 0 2px tints.darkGrey",color:"tints.darkGrey"},_hover:{cursor:"pointer"},fontSize:["md"],"aria-label":`Apply promo code ${e.code}`},(null==e||null===(t=e.code)||void 0===t?void 0:t.toUpperCase())||"Apply"))}))):null,Y=i.createElement(y,{promoMessage:I,promotions:A,promotion:A[0],order:a||N,showLoadingState:u,isLoading:m,applyPromoMutation:h,removePromoCodeHandler:p,removeSinglePromoHandler:g,handlePromoCodeSubmit:f(M),formState:_,control:v,clearErrors:b,advertisedPromosElement:R,wasAdvertisedPromoSubmitted:S,promoCodeInputValue:D,setPromoCodeInputValue:O,shouldShowInputIcon:!E,isVariant:k,hidePromoCodeEntry:H,hiddenPromoCodeEntryMessage:x});return E?i.createElement(o.nD,{backgroundColor:"tints.cream",defaultIndex:A.length>0?0:void 0,borderRadius:"xl",padding:"3",allowToggle:!0},i.createElement(o.As,null,(({isExpanded:e})=>i.createElement(i.Fragment,null,i.createElement(o.J2,{padding:"0",marginBottom:e?4:0,sx:{svg:{color:"tints.uiGrey"}},onClick:()=>{return t=e,void s.Ay.track({event:l.r.EVENTS.CLICKED_ACCORDION,data:{label:"Accordion promo code clicked",action:t?"to open":"to close"}});var t}},i.createElement(o.so,{justifyContent:"space-between",alignItems:"center",width:"100%"},i.createElement(o.so,{gap:"1"},i.createElement(r.Ay,{icon:"Tag"}),i.createElement(o.EY,null,"Add a promo code")),F.length>0&&!L?i.createElement(o.EY,null,`${F.length} available`):null,L?i.createElement(o.EA,{height:"24px",borderRadius:"md",fitContent:!0},i.createElement(o.az,{width:"80px",marginRight:"1"})):null),i.createElement(o.QJ,null)),i.createElement(o.vr,{paddingBottom:"0"},Y))))):Y}},53823:function(e,t,a){a.d(t,{GS:function(){return s},Jd:function(){return n},ah:function(){return i},oe:function(){return r}});var o=a(96540);const n=(0,o.createContext)(void 0),r=()=>{const e=o.useContext(n);if(void 0===e)throw new Error("useAvailablePurchaseOptions must be used within a PurchaseOptionsOverlayProvider");return e},i=()=>o.useContext(n),s=()=>({isEnabled:!1,isLoading:!1})},82633:function(e,t,a){a.d(t,{e:function(){return s}});var o=a(45574),n=a(96540),r=(a(11616),a(47654),a(6456),a(74339)),i=a(6712);const s=({selectedSubscription:e,onSelect:t,variants:a,isEWPlus:s})=>{if((0,n.useEffect)((()=>{t(e)}),[e,t]),s){var l,c;const s=(null==a||null===(l=a[0])||void 0===l?void 0:l.total)||"",d=(null==a||null===(c=a[1])||void 0===c?void 0:c.total)||"";return n.createElement(o.z6,{onChange:e=>{t(e)},value:e,display:"flex",flexDirection:"column",gap:"3"},n.createElement(o.sx,{value:i.Wq.YearlyMembership,"data-testid":i.Wq.YearlyMembership},n.createElement(o.so,{justifyContent:"space-between",flex:"1",gap:"2"},n.createElement(o.az,null,n.createElement(r.v2,null,"Pay for 12 months upfront"),n.createElement(r.BH,null,n.createElement(o.az,{as:"span",color:"tints.darkGrey"},"Commit to a year of taking care of your wellness for only $",d.split(".")[0]," billed annually and"," ",n.createElement(o.EY,{as:"span",color:"eggplant.base"},"enjoy 2 bonus credits.")))),n.createElement(o.az,null,n.createElement(r.Fk,{dollars:d.split(".")[0],cents:"00",unitLabel:"/year"})))),n.createElement(o.sx,{value:i.Wq.MonthlyMembership,"data-testid":i.Wq.MonthlyMembership},n.createElement(o.so,{justifyContent:"space-between",flex:"1",gap:"1"},n.createElement(o.az,null,n.createElement(r.v2,null,"Pay monthly"),n.createElement(r.BH,null,n.createElement(o.az,{as:"span",color:"tints.darkGrey"},"Earn one credit per month, cancel any time"))),n.createElement(o.az,null,n.createElement(r.Fk,{dollars:s.split(".")[0],cents:"00",unitLabel:"/month"})))))}{const i=null==a?void 0:a.map(((e,t)=>{const a="string"==typeof e.frequency?0===e.frequency.length?e.frequency:`/${e.frequency}`:"/month";return n.createElement(o.sx,{key:`radio-button-${t}`,value:e.slug,"data-testid":e.slug},n.createElement(o.so,{justifyContent:"space-between",flex:"1",gap:"2"},n.createElement(o.az,null,n.createElement(r.v2,null,e.heading),n.createElement(r.BH,null,n.createElement(o.az,{as:"span",color:"tints.darkGrey"},e.description))),n.createElement(o.az,null,n.createElement(r.Fk,{dollars:e.total.split(".")[0],cents:"00",unitLabel:a}))))}
1));return n.createElement(o.z6,{onChange:e=>{t(e)},value:e,display:"flex",flexDirection:"column",gap:"3"},i)}}},98447:function(e,t,a){a.d(t,{BH:function(){return s},Fk:function(){return l},v2:function(){return i}});var o=a(45574),n=a(96540);var r;t.Ay=(r=function(e){const{id:t,onSelected:a,isSelected:r}=e,[i,s]=e.price.amount.toFixed(2).split("."),c=Boolean(e.isSelected);return(0,n.useEffect)((()=>{r&&a(t)}),[r,t,a]),n.createElement(o.az,{backgroundColor:"tints.lightCream",borderColor:c?"viridian.base":"transparent",borderRadius:"16px",borderStyle:"solid",borderWidth:"1px",padding:4,_focusWithin:{borderColor:"viridian.base",outline:"none"},"data-element":"Box","data-component":"PurchaseOption","data-source-file":"PurchaseOption.tsx"},n.createElement("h3",null,n.createElement(o.J2,{"data-testid":`option-${t}`,padding:0,alignItems:"flex-start","data-element":"AccordionButton","data-source-file":"PurchaseOption.tsx"},n.createElement(o.sx,{isChecked:c,isDisabled:e.disableOnSelect,removeCircle:e.disableOnSelect,"data-element":"Radio","data-source-file":"PurchaseOption.tsx"},n.createElement(o.az,{display:"flex",alignItems:"flex-start",justifyContent:"space-between",flex:"1",gap:"1","data-element":"Box","data-source-file":"PurchaseOption.tsx"},n.createElement(o.az,{alignItems:"flex-start",display:"flex",flexDirection:"column",width:"100%","data-element":"Box","data-source-file":"PurchaseOption.tsx"},n.createElement("div",null,e.heading),n.createElement("div",null,e.description)),n.createElement(o.az,{flexShrink:0,display:"flex",flexDirection:"column",alignItems:"end",fontWeight:"medium","data-element":"Box","data-source-file":"PurchaseOption.tsx"},n.createElement(l,{dollars:i,cents:s,unitLabel:e.price.unitLabel,"data-element":"PriceComponent","data-source-file":"PurchaseOption.tsx"})))))),e.children?n.createElement(o.vr,{paddingBottom:0},n.createElement(o.az,{as:"hr",marginY:4,color:"tints.darkCream"}),e.children):null)},e=>n.createElement(o.As,{border:"none"},(({isExpanded:t})=>n.createElement(r,Object.assign({isSelected:t},e)))));const i=e=>n.createElement(o.EY,Object.assign({fontSize:"lg"},e,{"data-element":"Text","data-component":"PurchaseOptionHeading","data-source-file":"PurchaseOption.tsx"})),s=e=>n.createElement(o.EY,Object.assign({fontSize:"md",color:"tints.darkGrey"},e,{"data-element":"Text","data-component":"PurchaseOptionDescription","data-source-file":"PurchaseOption.tsx"})),l=({dollars:e,cents:t,unitLabel:a})=>n.createElement(n.Fragment,null,n.createElement(o.EY,{fontSize:"xl",fontWeight:"medium",as:"h2"},n.createElement(o.EY,{as:"span",fontSize:"0.6em",fontWeight:"inherit"},"$"),n.createElement(o.EY,{as:"span",fontSize:"1em",fontWeight:"inherit"},e),n.createElement(o.EY,{as:"span",fontSize:"0.6em",fontWeight:"inherit"},".",t)),n.createElement(o.EY,{color:"tints.darkGrey",fontSize:"sm"}," ",a))},74339:function(e,t,a){a.d(t,{Ay:function(){return o.Ay},BH:function(){return o.BH},Fk:function(){return o.Fk},v2:function(){return o.v2}});var o=a(98447)},6712:function(e,t,a){a.d(t,{Wq:function(){return k},zU:function(){return E},Ay:function(){return H}});var o=a(66401),n=a(72473),r=a(45574),i=a(98863),s=a(96540),l=a(11616),c=a(47654),d=a(6456),u=a(33263),m=a(52218),h=a(99151),p=a(53823),g=a(30504);var f=function(e){var t,a;const{selectedOption:o,variant:n,price:i,onClick:l,isEverlywellPlus:c,isLoading:d,selectedSubscriptionOption:u,product:h,activePromo:p}=e,f=o===E.SubscribeAndSave,_=o===E.OneTime,y=null==n||null===(t=n.subscription_plan)||void 0===t?void 0:t.name.toLowerCase(),v=parseFloat(null!=i?i:"0"),b=u&&c,T=parseFloat((0,m.Ko)(null!=i?i:"0",p||void 0)),k=Boolean(p&&(null==h?void 0:h.promotionable))&&v>T,H=c?b?{label:"Join Now",to:`/ewplus-checkout/?slug=${u}`,testId:"pre-cart-cta-join-now"}:{label:"Join today",to:"/360-full-body-test/",testId:"pre-cart-cta-view-membership-options"}:{label:"Add to Cart",to:"",testId:"pre-cart-cta-add-to-cart"};return s.createElement(r.az,{backgroundColor:"tints.lightCream",borderRadius:"24px 24px 0 0",paddingTop:"20px",paddingBottom:"34px",paddingX:6,boxShadow:"0px 4px 35px 0px rgba(0, 0, 0, 0.2)","data-element":"Box","data-component":"PreCartFooter","data-source-file":"PreCartFooter.tsx"},s.createElement(r.az,{display:"flex",flexDirection:"row",justifyContent:"space-between","data-element":"Box","data-source-file":"PreCartFooter.tsx"}
1,s.createElement(r.EY,{display:"flex",flexDirection:"column",fontWeight:"medium",fontSize:"lg","data-element":"Text","data-source-file":"PreCartFooter.tsx"},"Subtotal",s.createElement(r.EY,{color:"tints.darkGrey",fontSize:"md","data-element":"Text","data-source-file":"PreCartFooter.tsx"},f?`Billed ${y}`:"One time purchase")),k&&_?s.createElement(r.so,{flexDirection:"column"},s.createElement(r.so,{color:"tints.uiGrey",justifyContent:"flex-end"},s.createElement(g.A,{price:v,strikeThrough:!0})),s.createElement(r.so,{color:"utility.sale",flexDirection:"row",justifyContent:"flex-end",alignItems:"baseline",gap:1,flexWrap:"wrap"},s.createElement(r.so,{flexDirection:"row",alignItems:"baseline",gap:1},s.createElement(g.A,{price:T}),s.createElement(r.EY,null,"with code")),s.createElement(r.EY,{wordBreak:"break-word",overflowWrap:"break-word"},null==p||null===(a=p.code)||void 0===a?void 0:a.toUpperCase()))):s.createElement(g.A,{price:v})),s.createElement(r.$n,{"data-testid":H.testId,variant:"primary",colorScheme:"greenCS",size:"wide",marginTop:3,onClick:()=>l(H.label),isLoading:d,"data-element":"Button","data-source-file":"PreCartFooter.tsx"},H.label))},_=a(74339),y=a(10651),v=a(26666),b=a(98447);var T=function(e){var t,a;const{product:o,isExpanded:n,onSubscriptionVariantChange:i}=e,[l,c]=s.useState("0"),u=(0,s.useMemo)((()=>{var e;return(0,y.A)(null!==(e=null==o?void 0:o.subscriptionVariants)&&void 0!==e?e:[],(e=>{var t,a;return null!==(t=null===(a=e.subscription_plan)||void 0===a?void 0:a.percent_discount)&&void 0!==t?t:0}))}),[null==o?void 0:o.subscriptionVariants]);if((0,s.useEffect)((()=>{if(!n||!o)return;const e=parseInt(l),t=u[e];t&&i(t)}),[n,o,i,l,u]),!o||!d.wk.includes(null==o?void 0:o.slug)||null!=o&&o.hideSubscription||0===u.length)return null;const m=(0,v.A)(u);return s.createElement(b.Ay,{id:e.id,onSelected:e.onSelected,heading:s.createElement(b.v2,null,"Subscribe & Save"),description:s.createElement(b.BH,{color:"utility.sale"},"Save up to $",null==m||null===(t=m.subscription_plan)||void 0===t?void 0:t.percent_discount,"%"),price:{amount:parseFloat(null!==(a=null==m?void 0:m.price)&&void 0!==a?a:"0"),unitLabel:"/month"},"data-element":"PurchaseOption","data-component":"SubscribeAndSaveOption","data-source-file":"SubscribeAndSaveOption.tsx"},s.createElement(r.z6,{name:"subscriptionOption",value:l,onChange:e=>{c(e)},display:"flex",flexDirection:"column",gap:5,"data-element":"RadioGroup","data-source-file":"SubscribeAndSaveOption.tsx"},u.map(((e,t)=>{var a,o,n;return s.createElement(r.sx,{key:e.id,value:t.toString()},s.createElement(b.BH,null,null!==(a=null===(o=e.subscription_plan)||void 0===o?void 0:o.name)&&void 0!==a?a:""," ",s.createElement(r.az,{as:"span",color:"utility.sale"},"Save ",(null===(n=e.subscription_plan)||void 0===n?void 0:n.percent_discount)||0,"%")))}))))};let E=function(e){return e.OneTime="one-time-purchase",e.SubscribeAndSave="subscribe-and-save",e.EverlywellPlusMembership="everlywell-plus-membership",e.MonthlyMembership="everlywell-plus-membership-1-month",e.YearlyMembership="everlywell-plus-membership-1-year",e.WeightCareMembership="weight-management-membership",e}({}),k=function(e){return e.MonthlyMembership="everlywell-plus-membership-1-month",e.YearlyMembership="everlywell-plus-membership-1-year",e.WeightCareMembership="weight-management-membership",e}({});var H=function(e){var t,a,g;const{product:y,clearProduct:v}=(0,p.oe)(),{addItemToCartAsync:b,isAddItemToCartLoading:k}=(0,i._$)({addItemToCart:{onError:()=>Promise.resolve(!1)}}),{advertisedPromos:H}=(0,h.A)(),{0:x,1:A}=(0,s.useState)(0),{0:I,1:C}
1=(0,s.useState)(null),{0:S,1:w}=(0,s.useState)(null),D=S?S.price:null==y?void 0:y.price,O=!(0,o.A)(y),N=d.wk.includes(null!==(t=null==y?void 0:y.slug)&&void 0!==t?t:""),P=(null==y?void 0:y.slug)===d.sg,L=P?"3-month program with 1:1 coaching sessions":N?"30-day supply":"Test kit + results",F=(0,m.L)(null!==(a=null==y?void 0:y.productId)&&void 0!==a?a:0,H)||null;(0,s.useEffect)((()=>{O||(A(0),C(null),w(null))}),[O]);const M=Boolean(null==y?void 0:y.preSelectedSubscription)&&!(null!=y&&y.hideSubscription)&&!(0,o.A)(null==y?void 0:y.subscriptionVariants);return(0,s.useEffect)((()=>{O&&null===I&&M&&A(1)}),[O,I,M]),n.uQ.useDisableScroll(O),(0,s.useEffect)((()=>{O&&l.Ay.track({event:c.r.EVENTS.VIEWED_COMPONENT,data:{label:"Pre-Cart",experience:"Pre-Cart",version:"v1"}})}),[O]),(0,s.useEffect)((()=>{I&&y&&l.Ay.track({event:c.r.EVENTS.CLICKED_BUTTON,data:{label:"Pre-Cart - Purchase Option",optionId:I,experience:"Pre-Cart","Product Name":y.name}})}),[y,I]),s.createElement(r._s,{isOpen:O,placement:"bottom",onClose:()=>{v(),l.Ay.track({event:c.r.EVENTS.CLICKED_BUTTON,data:{label:"Pre Cart Close",experience:"Pre-Cart",optionId:I}})},blockScrollOnMount:!1,"data-element":"Drawer","data-component":"PurchaseOptionsDrawer","data-source-file":"PurchaseOptionsDrawer.tsx"},s.createElement(r.QP,{zIndex:9997,"data-element":"DrawerOverlay","data-source-file":"PurchaseOptionsDrawer.tsx"}),s.createElement(r.zj,{position:"relative",gap:0,containerProps:{zIndex:9998},minHeight:"90vh",top:"auto !important",borderRadius:"24px 24px 0 0","data-element":"DrawerContent","data-source-file":"PurchaseOptionsDrawer.tsx"},s.createElement(r.BE,{paddingX:[4,8],paddingBottom:4,"data-element":"DrawerHeader","data-source-file":"PurchaseOptionsDrawer.tsx"},s.createElement(r.DZ,{as:"h1",size:"md","data-element":"Heading","data-source-file":"PurchaseOptionsDrawer.tsx"},"Select options"),s.createElement(r.s1,{"data-element":"DrawerCloseButton","data-source-file":"PurchaseOptionsDrawer.tsx"})),s.createElement(r.ys,{paddingY:4,paddingX:[4,8],overflow:"auto","data-element":"DrawerBody","data-source-file":"PurchaseOptionsDrawer.tsx"},s.createElement(r.nD,{display:"flex",flexDirection:"column",gap:3,onChange:e=>{"number"==typeof e&&A(e)},index:x,defaultIndex:0,"data-element":"Accordion","data-source-file":"PurchaseOptionsDrawer.tsx"},s.createElement(_.Ay,{id:E.OneTime,heading:s.createElement(_.v2,null,"One-time purchase"),description:s.createElement(_.BH,null,L),onSelected:()=>{C(E.OneTime),w(null)},price:{amount:parseFloat(null!==(g=null==y?void 0:y.price)&&void 0!==g?g:"0"),unitLabel:"/each"},"data-element":"PurchaseOption","data-source-file":"PurchaseOptionsDrawer.tsx"}),s.createElement(T,{id:E.SubscribeAndSave,onSelected:e=>{C(e)},product:y,onSubscriptionVariantChange:e=>{w(e)},isExpanded:E.SubscribeAndSave===I,"data-element":"SubscribeAndSaveOption","data-source-file":"PurchaseOptionsDrawer.tsx"}))),s.createElement(r.tb,{background:"tints.lightCream",padding:0,display:"flex",flexDirection:"column",alignItems:"stretch",position:"relative","data-element":"DrawerFooter","data-source-file":"PurchaseOptionsDrawer.tsx"},s.createElement(f,{selectedOption:I,variant:S||void 0,price:null!=D?D:"",onClick:e=>{let t=I||"No option";if(l.Ay.track({event:c.r.EVENTS.CLICKED_BUTTON,data:{label:`Pre-Cart - ${e}`,"Product Name":null==y?void 0:y.name,experience:"Pre-Cart",optionId:t}}),!P&&!N){var a;const e=null!==(a=null==S?void 0:S.id)&&void 0!==a?a:null==y?void 0:y.variantId;e&&(async({variantId:e})=>{try{await b({variant_id:e,quantity:1}),v()}catch(t){(0,u.vV)("There was an issue adding the item to the cart",{component:"PurchaseOptionsDrawer",method:"handleAddToCart",experience:"Pre-Cart"})}})({variantId:e})}},isLoading:k,product:y,activePromo:F,"data-element":"PreCartFooter","data-source-file":"PurchaseOptionsDrawer.tsx"}))))}},10419:function(e,t,a){a.d(t,{Ay:function(){return i}});var o=a(96540),n=a(6712),r=a(53823);var i=({children:e})=>{const{0:t,1:a}=(0,o.useState)(null),i={product:t,setProduct:e=>a(e),clearProduct:()=>a(null)};return o.createElement(r.Jd.Provider,{value:i,"data-element":"Provider","data-component":"PurchaseOptionsDrawerProvider","data-source-file":"PurchaseOptionsDrawerProvider.tsx"},e,o.createElement(n.Ay,{"data-element":"PurchaseOptionsDrawer","data-source-file":"PurchaseOptionsDrawerProvider.tsx"}))};a(74339),a(82633)},42733:function(e,t,a){var o=a(45574),n=a(22926),r=a(94204),i=a(96540),s=a(11616),l=a(47654),c=a(55128),d=a(6456),u=a(33263);t.A=({cartTotal:e,setTOS:t,optionType:a="default",optionTheme:m="dark",label:h,handlePaymentConfirm:p,variantsSkus:g,withApplePayWidget:f=!0,
1className:_,onStripeLoadingError:y,buttonHeight:v})=>{const{0:b,1:T}=(0,i.useState)(),{0:E,1:k}=(0,i.useState)(!1),{0:H,1:x}=(0,i.useState)(!1),{0:A,1:I}=(0,i.useState)(!1),C=null!=v?v:48,S=(null!=g?g:[]).some((e=>e.startsWith(d.D_.CARIS_DETECT))),w=(0,i.useRef)(p),D=(0,i.useRef)(g);w.current=p,D.current=g;const O=i.useCallback((e=>{null==y||y(e)}),[y]),N=(0,n.useStripe)();(0,i.useEffect)((()=>{b&&b.update({total:{label:"Everly Wellness, Inc",amount:Number(e.toFixed(2))}})}),[b,e]),(0,i.useEffect)((()=>{E&&(null==t||t(!0))}),[E,t]),(0,i.useEffect)((()=>{if(!N)return;let e=!1;const t=N.paymentRequest({country:"US",currency:"usd",total:{label:"Everly Wellness, Inc",amount:0},requestPayerName:!0,requestPayerEmail:!0,...S&&{requestPayerPhone:!0},requestShipping:!0,shippingOptions:[{id:"free-shipping",label:"Free shipping",detail:"Arrives in 2 to 8 business days",amount:0}]});return t.canMakePayment().then((a=>{if(!e){if(s.Ay.track({event:l.r.EVENTS.EXPRESS_PAY_OPTIONS,data:{...a}}),x(!0),!a)throw new Error("Stripe payment request not available");k(!!a),T(t)}})).catch((t=>{e||(I(!0),O(!0),(0,u.vV)(`Error setting canMakePayment method in Stripe: ${t}`,{progname:"order_processing",component:"StripePayment",method:"canMakePayment",error:t}))})),()=>{e=!0}}),[N,O,S]),(0,i.useEffect)((()=>{const e=e=>{const{token:t,complete:a,...o}=e;s.Ay.track({event:l.r.EVENTS.EXPRESS_PAY,data:{label:o.walletName,variant_skus:D.current}}),w.current(o,t).then((()=>{a("success")}))};return null==b||b.on("token",e),()=>{null==b||b.off("token",e)}}),[b]),(0,i.useEffect)((()=>{const e=function(){s.Ay.track({event:l.r.EVENTS.CLICKED_BUTTON,data:{label:l.r.LABELS.EXPRESS_PAY_CANCEL}})};return null==b||b.on("cancel",e),()=>{null==b||b.off("cancel",e)}}),[b]);const P={style:{paymentRequestButton:{type:a,theme:m,height:`${C}px`,borderRadius:"28px"},base:{fontsize:"14px"}}},L=()=>{s.Ay.track({event:l.r.EVENTS.CLICKED_BUTTON,data:{label:l.r.LABELS.EXPRESS_PAY_CHECKOUT}})};return A?null:H?E&&b?i.createElement(o.az,{"data-testid":c.$b.STRIPE_EXPRESS_PAY,className:_,width:"100%"},i.createElement(n.PaymentRequestButtonElement,{options:{...P,paymentRequest:b},className:"payment-request-btn",onClick:L}),f&&i.createElement(r.A,{amount:null!==(F=null===(M=e/100)||void 0===M?void 0:M.toString())&&void 0!==F?F:"0"})):null:i.createElement(o.$n,{variant:"primary",size:"wide",colorScheme:"greenCS",isLoading:!0,height:C},"Loading");var F,M}},99592:function(e,t,a){a.d(t,{A:function(){return l}});var o=a(22926),n=a(22037),r=a(96540),i=a(53211);const s=(0,n.c)(i.I);var l=e=>{const{amount:t,fontSizeBase:a,textAlign:n="center",theme:i="stripe"}=e,l=(0,r.useMemo)((()=>({theme:"none"===i?void 0:i,variables:{fontSizeBase:a||"14px"},rules:{".PaymentMethodMessaging":{textAlign:n}}})),[i,a,n]),c=(0,r.useMemo)((()=>({appearance:l})),[l]),d=(0,r.useMemo)((()=>({amount:Math.round(t),currency:"USD",countryCode:"US",paymentMethodTypes:["klarna","affirm","afterpay_clearpay"]})),[t]);return"number"==typeof t&&!isNaN(t)&&isFinite(t)&&t>0?r.createElement(o.Elements,{stripe:s,options:c,"data-element":"Elements","data-component":"StripeMerchandisingWidget","data-source-file":"StripeMerchandisingWidget.tsx"},r.createElement(o.PaymentMethodMessagingElement,{options:d,"data-element":"PaymentMethodMessagingElement","data-source-file":"StripeMerchandisingWidget.tsx"})):null}},47210:function(e,t,a){a.d(t,{Dx:function(){return r},Sx:function(){return n}});var o=a(96540);let n=function(e){return e[e.Default=0]="Default",e[e.Winter2020=1]="Winter2020",e}({});const r=(0,o.createContext)(n.Default)},86674:function(e,t,a){a.d(t,{Y:function(){return s},t:function(){return l}});var o=a(45574),n=a(1005),r=a(96540);const i=(0,r.createContext)({showToast:()=>{}}),s=()=>(0,r.useContext)(i),l=({children:e})=>{const{0:t,1:a}=(0,r.useState)(null);return r.createElement(i.Provider,{value:{showToast:e=>{a(e),setTimeout((()=>{a(null)}),1e4)}},"data-element":"Provider","data-component":"ToastProvider","data-source-file":"ToastContext.tsx"},e,t&&r.createElement(o.so,{position:"fixed",top:20,left:"50%",width:["90%","75%","500px"],transform:"translateX(-50%)",backgroundColor:"success"===t.status?"utility.success":"terracotta.dark",color:"tints.white",padding:"10px 20px",borderRadius:"md",alignItems:"center",justifyContent:"space-between",zIndex:1e4},r.createElement(o.so,null," ",t.message),r.createElement(o.K0,{icon:r.createElement(n.X,null),size:"sm",variant:"ghost",color:"white",marginLeft:4,onClick:()=>{a(null)},"aria-label":"Close toast message"})))}},33493:function(e,t,a){a.d(t,{A:function(){return f}});var o=a(45574),n=a(98863),r=a(96540),i=a(11616),s=a(47654),l=a(6456),c=a(73599),d=a(21108),u=a(89546),m=a(11659),h=a(26296);const p={status:"initial",animations:{initialView:!1,undoLink:!1,expandedText:!1,buttons:!1},ui:{isFromAccepted:!1,shouldCenter:!1}},g=(e,t)=>{switch(t.type){case"SET_STATUS":return{...e,status:t.payload};case"SET_ANIMATION":return{...e,animations:{...e.animations,[t.payload.key]:t.payload.value}};case"SET_UI_CONTEXT":return{...e,ui:{...e.ui,[t.payload.key]:t.payload.value}};case"RESET_ANIMATIONS":return{...e,animations:{initialView:!1,undoLink:!1,expandedText:!1,buttons:!1}};case"RESET_UI_CONTEXT":return{...e,ui:{isFromAccepted:"expanded"===e.status&&e.ui.isFromAccepted,shouldCenter:!1}};case"TRANSITION_TO_EXPANDED":return{...e,status:"expanded",animations:{...e.animations,initialView:!1}};case"TRANSITION_TO_ACCEPTED":return{...e,status:"accepted",animations:{initialView:!1,undoLink:!1,expandedText:!1,buttons:!1},ui:{isFromAccepted:!1,shouldCenter:!1}};case"TRANSITION_TO_DECLINED":return{...e,status:"declined",animations:{initialView:!1,undoLink:!1,expandedText:!1,buttons:!1},ui:{isFromAccepted:!1,shouldCenter:!1}};default:return e}};var f=({isExpandedByDefault:e=!1})=>{var t,a,f,_;const{0:y,1:v}=(0,r.useReducer)(g,p),{order:b,addItemToCartAsync:T,removeProduct:E}=(0,n._$)(),k=(0,c.A)(),{rule:H,shouldShow:x}=(0,m.JW)({preferCartSidebar:!0,freezeRule:!e&&"expanded"===y.status||"idle"===y.status||"accepted"===y.status||"declined"===y.status}),A=(0,r.useRef)(null),I=(0,r.useRef)(null),C=(0,r.useRef)(null),S=(0,r.useRef)(null),w=(0,r.useRef)(!1),D=(0,r.useRef)(!1);(0,r.useLayoutEffect)((()=>{D.current=(0,m.Li)()}),[]);const O=(0,r.useRef)(!1),[N,P]=r.useState(!1),L=(0,r.useRef)(null),F=(0,r.useRef)(null),M=(0,r.useRef)(null),R=(0,r.useRef)(!0),Y=(0,r.useRef)(y.status),W=(0,r.useRef)(null==H?void 0:H.id),[B,U]=r.useState(199);(0,r.useEffect)((()=>()=>{I.current&&clearTimeout(I.current),C.current&&clearTimeout(C.current),S.current&&clearTimeout(S.current)}),[]),(0,r.useEffect)((()=>{e&&"initial"===y.status&&v({type:"TRANSITION_TO_EXPANDED"})}),[e,y.status]),(0,r.useEffect)((()=>{v({type:"RESET_ANIMATIONS"}),v({type:"RESET_UI_CONTEXT"})}),[y.status]),(0,r.useEffect)((()=>
1{if("accepted"===y.status||"declined"===y.status){const e=setTimeout((()=>{v({type:"SET_UI_CONTEXT",payload:{key:"shouldCenter",value:!0}})}),500);return()=>clearTimeout(e)}v({type:"SET_UI_CONTEXT",payload:{key:"shouldCenter",value:!1}})}),[y.status]),(0,r.useEffect)((()=>{const e=null==H?void 0:H.id,t=e!==W.current;t&&"accepted"!==y.status&&"idle"!==y.status&&"expanded"!==y.status&&"declined"!==y.status&&v({type:"SET_STATUS",payload:"initial"}),t&&(O.current=!1),W.current=e}),[null==H?void 0:H.id,y.status]),(0,r.useEffect)((()=>{var e;H&&x&&"initial"===y.status&&!O.current&&(O.current=!0,i.Ay.track({event:s.r.EVENTS.SIDEBAR_UPSELL_SHOWN,data:{product_id:null==H?void 0:H.triggerLineItem.product_id,copy:null==H?void 0:H.copy.initialMessage,order_id:null==b?void 0:b.id,recommended_product_id:null==H?void 0:H.action.addProducts[0],upsell_type:null==H?void 0:H.action.type,recommendation_priority:null==H?void 0:H.step,test_variant:"sidebar_only",cart_contents:null==b||null===(e=b.line_items)||void 0===e?void 0:e.map((e=>{var t;return{product_id:e.product_id,price:parseFloat(null!==(t=e.base_price)&&void 0!==t?t:"0"),quantity:e.quantity}}))}}))}),[H,x,y.status,b]),(0,r.useEffect)((()=>{"idle"===y.status&&v({type:"SET_STATUS",payload:"accepted"})}),[y.status]);const V="accepted"===y.status||"idle"===y.status||"declined"===y.status?null!==(t=null===(a=A.current)||void 0===a?void 0:a.rule)&&void 0!==t?t:null:H,z="accepted"===y.status||"idle"===y.status?(null===(f=A.current)||void 0===f?void 0:f.acceptedMessage)||(null==H?void 0:H.copy.acceptedMessage):"declined"===y.status?(null===(_=A.current)||void 0===_?void 0:_.acceptedMessage)||(null==H?void 0:H.copy.declinedMessage):void 0,G=(0,r.useMemo)((()=>{const e=null==V?void 0:V.copy.expandedMessageWithMarkdown;return e?(0,h.U)(e):[]}),[null==V?void 0:V.copy.expandedMessageWithMarkdown]);(0,r.useEffect)((()=>{"expanded"!==Y.current&&"idle"!==Y.current||"expanded"===y.status||"idle"===y.status||(R.current=!0)}),[y.status]),(0,r.useEffect)((()=>{const e=Y.current,t=("accepted"===e||"declined"===e)&&"expanded"===y.status;Y.current=y.status;requestAnimationFrame((()=>{(()=>{const e=t?32:16;if(R.current&&(R.current=!1),"expanded"===y.status&&F.current){const t=F.current.scrollHeight;U(t+e)}else if("idle"===y.status&&M.current){const t=M.current.scrollHeight;U(t+e)}})()}))}),[y.status,G,V]),(0,r.useEffect)((()=>{const e=()=>{const e=Y.current,t=("accepted"===e||"declined"===e)&&"expanded"===y.status;requestAnimationFrame((()=>{(()=>{const e=t?32:16;if(R.current&&(R.current=!1),"expanded"===y.status&&F.current){const t=F.current.scrollHeight;U(t+e)}else if("idle"===y.status&&M.current){const t=M.current.scrollHeight;U(t+e)}})()}))};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[y.status]);(0,r.useEffect)((()=>
1{const e=(0,m.pF)("cart-sidebar");if(e){const t=e.acceptedMessage||(null==H?void 0:H.copy.acceptedMessage)||"Great choice! I've updated your cart.",a="dismissed"===e.status;A.current=H?{rule:H,acceptedMessage:t,removedLineItems:e.removedLineItems,addedVariantIds:e.addedVariantIds,interactionKind:a?"dismiss":"accept"}:{rule:null,acceptedMessage:t,removedLineItems:e.removedLineItems,addedVariantIds:e.addedVariantIds,interactionKind:a?"dismiss":"accept"},w.current||(w.current=!0,D.current&&P(!0),v({type:"SET_STATUS",payload:a?"declined":"accepted"}))}}),[H]);return(void 0!==H||null!==A.current)&&!N?r.createElement(r.Fragment,null,r.createElement(o.az,{ref:L,padding:4,backgroundColor:"eggplant.wash",borderRadius:"8px",sx:{transition:"height 500ms cubic-bezier(0.4, 0, 0.2, 1), place-content 500ms cubic-bezier(0.4, 0, 0.2, 1)",overflow:"hidden",height:"initial"===y.status||"accepted"===y.status||"declined"===y.status?"72px":`${B}px`,placeContent:y.ui.shouldCenter?"center":"initial",animation:u.Is.container.fadeIn.animation,...u.Is.container.fadeIn.keyframes}},r.createElement(o.az,Object.assign({ref:"idle"===y.status?M:void 0,display:"flex",flexDirection:"expanded"===y.status?"column":"row",alignItems:"center",justifyContent:"space-between"},"expanded"===y.status&&{height:"100%"}),r.createElement(o.az,{display:"flex",flexDirection:"row",gap:4,alignItems:"center",height:"100%"},r.createElement(o.az,{backgroundColor:"violet.lighter",borderRadius:"full",padding:2,display:"flex",alignItems:"center",justifyContent:"left",placeSelf:"flex-start",sx:{animation:u.Is.evaIcon.slideInBounce.cartAnimation,...u.Is.evaIcon.slideInBounce.keyframes}},r.createElement(d.m,null)),("initial"===y.status||"accepted"===y.status||"idle"===y.status||"declined"===y.status)&&r.createElement(o.EY,{color:"tints.darkGrey",size:"lg",sx:{animation:y.animations.initialView?u.Is.text.fadeOut.animation:!y.animations.undoLink||"accepted"!==y.status&&"idle"!==y.status&&"declined"!==y.status?"accepted"===y.status||"idle"===y.status||"declined"===y.status?u.Is.text.fadeInAccepted.animation:u.Is.text.fadeIn.animation:u.Is.link.fadeOut.animation,...y.animations.initialView?u.Is.text.fadeOut.keyframes:!y.animations.undoLink||"accepted"!==y.status&&"idle"!==y.status&&"declined"!==y.status?"accepted"===y.status||"idle"===y.status||"declined"===y.status?u.Is.text.fadeInAccepted.keyframes:u.Is.text.fadeIn.keyframes:u.Is.link.fadeOut.keyframes}},"initial"===y.status&&(null==V?void 0:V.copy.initialMessage),("accepted"===y.status||"idle"===y.status||"declined"===y.status)&&z),"expanded"===y.status&&r.createElement(o.az,{ref:F,display:"flex",flexDirection:"column",justifyContent:"space-between",height:"100%",sx:{animation:"expanded"===y.status?u.Is.expandContent.expand.animation:"none",..."expanded"===y.status?u.Is.expandContent.expand.keyframes:{}}},r.createElement(o.EY,{color:"tints.darkGrey",size:"lg",sx:{animation:y.animations.expandedText?u.Is.global.fadeOut.animation:u.Is.text.expandedFadeIn.animation,...y.animations.expandedText?u.Is.global.fadeOut.keyframes:u.Is.text.expandedFadeIn.keyframes}},G.map(((e,t)=>e.isHighlight?r.createElement(o.az,{key:t,fontWeight:"500",as:"span",backgroundColor:"violet.lighter",color:"tints.black",sx:{position:"relative",animation:u.Is.backgroundHighlight.fadeIn.animation,"&::before":{content:'""',position:"absolute",top:0,left:0,height:"1em",backgroundColor:"violet.lighter",zIndex:-1,...y.ui.isFromAccepted?{animation:u.Is.backgroundHighlight.fadeIn.animation,...u.Is.backgroundHighlight.fadeIn.keyframes}:{animation:u.Is.backgroundHighlight.growFromLeft.animation,...u.Is.backgroundHighlight.growFromLeft.keyframes}},...u.Is.backgroundHighlight.fadeIn.keyframes}},e.text):r.createElement(r.Fragment,{key:t},e.text)))),r.createElement(o.az,null,r.createElement(o.so,{flexDirection:"row",marginTop:4,gap:2,sx:{animation:y.animations.buttons?u.Is.global.fadeOut.animation:"expanded"===y.status?y.ui.isFromAccepted?u.Is.buttonsContainer.fadeInOnly.animation:u.Is.buttonsContainer.fadeIn.animation:"none",...y.animations.buttons?u.Is.global.fadeOut.keyframes:"expanded"===y.status?y.ui.isFromAccepted?u.Is.buttonsContainer.fadeInOnly.keyframes:u.Is.buttonsContainer.fadeIn.keyframes:{}}
1},r.createElement(o.$n,{variant:"secondary",height:"40px",borderColor:"eggplant.base",boxShadow:"inset 0 0 0 2px rgb(107,46,113)",_hover:{boxShadow:"inset 0 0 0 2px rgb(107,46,113)",borderColor:"eggplant.base",filter:"brightness(0.95)"},width:"100%",onClick:()=>{var e;(H&&(A.current={rule:H,acceptedMessage:H.copy.declinedMessage,removedLineItems:[],addedVariantIds:[],interactionKind:"dismiss"},v({type:"TRANSITION_TO_DECLINED"})),H&&x&&null!=b&&b.id)&&((0,m.bc)({rule:H,acceptedMessage:H.copy.declinedMessage,removedLineItems:[],addedVariantIds:[]},"cart-sidebar","dismissed",b.id),i.Ay.track({event:s.r.EVENTS.SIDEBAR_UPSELL_DISMISSED,data:{product_id:null==H?void 0:H.triggerLineItem.product_id,order_id:b.id,recommended_product_id:null==H?void 0:H.action.addProducts[0],upsell_type:null==H?void 0:H.action.type,recommendation_priority:null==H?void 0:H.step,test_variant:"sidebar_only",price_delta:null==H?void 0:H.action.priceDelta,dismiss_method:"No thanks",cart_contents:null==b||null===(e=b.line_items)||void 0===e?void 0:e.map((e=>{var t;return{product_id:e.product_id,price:parseFloat(null!==(t=e.base_price)&&void 0!==t?t:"0"),quantity:e.quantity}}))}}))},sx:{transition:"all 200ms ease-out"}},r.createElement(o.EY,{fontSize:"lg",color:"eggplant.base"},"No, thanks")),r.createElement(o.$n,{height:"40px",backgroundColor:"eggplant.base",_hover:{backgroundColor:"eggplant.base",filter:"brightness(0.95)"},width:"100%",onClick:()=>{var e;((async()=>{if(!H)return;C.current&&clearTimeout(C.current),v({type:"SET_ANIMATION",payload:{key:"expandedText",value:!0}}),v({type:"SET_ANIMATION",payload:{key:"buttons",value:!0}});const e=[];if("REPLACE"===H.action.type&&H.action.removeProducts){const t=null==b?void 0:b.line_items.filter((e=>{var t;return null===(t=H.action.removeProducts)||void 0===t?void 0:t.includes(e.product_id||0)}));null==t||t.forEach((t=>{t.id&&void 0!==t.variant_id&&(e.push({lineItemId:t.id,variantId:t.variant_id,quantity:t.quantity||1}),E(t.id))}))}const t=[],a=H.action.addProducts.map((e=>{const a=Number(e),o=k[a]||k[String(a)];if(null!=o&&o.variantId){let e=o.variantId;if(o.sku===l.D_.EVERLYWELL_360_FEMALE){const t=o.subscriptionVariants.find((e=>"360-full-body-test-female-member-annual"===e.sku));e=t?t.id:o.variantId}if(o.sku===l.D_.EVERLYWELL_360_MALE){const t=o.subscriptionVariants.find((e=>"360-full-body-test-male-member-annual"===e.sku));e=t?t.id:o.variantId}return t.push(e),null!=b&&b.id?T({variant_id:e,quantity:1}).catch((e=>{throw e})):null}return null})).filter((e=>null!==e));try{var o;await Promise.all(a),A.current={rule:H,acceptedMessage:H.copy.acceptedMessage,removedLineItems:e,addedVariantIds:t},null!=b&&b.id&&(0,m.bc)({rule:H,acceptedMessage:H.copy.acceptedMessage,removedLineItems:e,addedVariantIds:t},"cart-sidebar","accepted",b.id),H&&x&&null!=b&&b.id&&i.Ay.track({event:s.r.EVENTS.SIDEBAR_CART_UPDATED,data:{product_id:null==H?void 0:H.triggerLineItem.product_id,order_id:b.id,recommended_product_id:null==H?void 0:H.action.addProducts[0],upsell_type:null==H?void 0:H.action.type,recommendation_priority:null==H?void 0:H.step,test_variant:"sidebar_only",cart_contents:null==b||null===(o=b.line_items)||void 0===o?void 0:o.map((e=>{var t;return{product_id:e.product_id,price:parseFloat(null!==(t=e.base_price)&&void 0!==t?t:"0"),quantity:e.quantity}}))}})}catch(r){var n;i.Ay.track({event:s.r.EVENTS.CART_UPDATE_ERROR,data:{product_id:null==H?void 0:H.triggerLineItem.product_id,order_id:null==b?void 0:b.id,recommended_product_id:null==H?void 0:H.action.addProducts[0],upsell_type:null==H?void 0:H.action.type,recommendation_priority:null==H?void 0:H.step,test_variant:"sidebar_only",cart_contents:null==b||null===(n=b.line_items)||void 0===n?void 0:n.map((e=>{var t;return{product_id:e.product_id,price:parseFloat(null!==(t=e.base_price)&&void 0!==t?t:"0"),quantity:e.quantity}}))}})}C.current=setTimeout((()=>v({type:"SET_STATUS",payload:"idle"})),100)})(),H&&x)&&i.Ay.track({event:s.r.EVENTS.SIDEBAR_UPSELL_ACCEPTED,data:{product_id:null==H?void 0:H.triggerLineItem.product_id,order_id:null==b?void 0:b.id,recommended_product_id:null==H?void 0:H.action.addProducts[0],upsell_type:null==H?void 0:H.action.type,recommendation_priority:null==H?void 0:H.step,test_variant:"sidebar_only",price_delta:null==H?void 0:H.action.priceDelta,cart_contents:null==b||null===(e=b.line_items)||void 0===e?void 0:e.map((e=>{var t;return{product_id:e.product_id,price:parseFloat(null!==(t=e.base_price)&&void 0!==t?t:"0"),quantity:e.quantity}}))}})},sx:{transition:"all 200ms ease-out"}},r.createElement(o.EY,{fontSize:"lg"},null==V?void 0:V.copy.buttonText))),r.createElement(o.EY,{fontSize:"xs",color:"tints.darkGrey",marginTop:4,textAlign:"center",sx:{animation:y.animations.buttons?u.Is.global.fadeOut.animation:"expanded"===y.status?y.ui.isFromAccepted?u.Is.buttonsContainer.fadeInOnly.animation:u.Is.buttonsContainer.fadeIn.animation:"none",...y.animations.buttons?u.Is.global.fadeOut.keyframes:"expanded"===y.status?y.ui.isFromAccepted?u.Is.buttonsContainer.fadeInOnly.keyframes:u.Is.buttonsContainer.fadeIn.keyframes:{}}
1},(null==V?void 0:V.copy.disclaimerText)||"* Price does not include taxes and fees")))),"initial"===y.status&&r.createElement(o.$n,{height:"40px",backgroundColor:"eggplant.base",_hover:{backgroundColor:"eggplant.base",filter:"brightness(0.95)"},onClick:()=>{var e;(I.current&&clearTimeout(I.current),v({type:"SET_ANIMATION",payload:{key:"initialView",value:!0}}),I.current=setTimeout((()=>v({type:"TRANSITION_TO_EXPANDED"})),500),H&&x)&&i.Ay.track({event:s.r.EVENTS.SIDEBAR_UPSELL_EXPANDED,data:{product_id:null==H?void 0:H.triggerLineItem.product_id,copy:null==H?void 0:H.copy.expandedMessage,order_id:null==b?void 0:b.id,recommended_product_id:null==H?void 0:H.action.addProducts[0],upsell_type:null==H?void 0:H.action.type,recommendation_priority:null==H?void 0:H.step,test_variant:"sidebar_only",cart_contents:null==b||null===(e=b.line_items)||void 0===e?void 0:e.map((e=>{var t;return{product_id:e.product_id,price:parseFloat(null!==(t=e.base_price)&&void 0!==t?t:"0"),quantity:e.quantity}}))}})},sx:{animation:y.animations.initialView?u.Is.button.fadeOut.animation:u.Is.button.fadeIn.animation,...y.animations.initialView?u.Is.button.fadeOut.keyframes:u.Is.button.fadeIn.keyframes}},r.createElement(o.EY,{fontSize:"lg"},"View")),("accepted"===y.status||"idle"===y.status||"declined"===y.status)&&A.current&&r.createElement(o.N_,{onClick:async()=>{if(!A.current)return;const{removedLineItems:e,addedVariantIds:t,interactionKind:a}=A.current;if(S.current&&clearTimeout(S.current),"dismiss"===a)return(0,m.Nm)("cart-sidebar"),A.current=null,v({type:"SET_ANIMATION",payload:{key:"undoLink",value:!0}}),v({type:"SET_UI_CONTEXT",payload:{key:"isFromAccepted",value:!0}}),void(S.current=setTimeout((()=>v({type:"TRANSITION_TO_EXPANDED"})),500));if(null!=b&&b.line_items&&t.length>0){b.line_items.filter((e=>void 0!==e.variant_id&&t.includes(e.variant_id))).forEach((e=>{e.id&&E(e.id)}))}if(e.length>0&&null!=b&&b.id){const t=e.map((({variantId:e,quantity:t})=>T({variant_id:e,quantity:t}).catch((e=>{throw e}))));try{await Promise.all(t)}catch(o){}}(0,m.Nm)("cart-sidebar"),A.current=null,v({type:"SET_ANIMATION",payload:{key:"undoLink",value:!0}}),v({type:"SET_UI_CONTEXT",payload:{key:"isFromAccepted",value:!0}}),S.current=setTimeout((()=>v({type:"TRANSITION_TO_EXPANDED"})),500)},color:"eggplant.base",sx:{animation:y.animations.undoLink?u.Is.link.fadeOut.animation:u.Is.link.fadeIn.animation,transition:"all 200ms ease-out","&:hover":{},...y.animations.undoLink?u.Is.link.fadeOut.keyframes:u.Is.link.fadeIn.keyframes}},"Undo")))):null}},89546:function(e,t,a){a.d(t,{Is:function(){return r}});const o={"@keyframes fadeOut":{"0%":{opacity:1},"100%":{opacity:0}}},n={"@keyframes fadeIn":{"0%":{opacity:0},"100%":{opacity:1}}},r={container:{fadeIn:{animation:"fadeIn 500ms ease-in-out",keyframes:n}},evaIcon:{slideInBounce:{animation:"slideInBounce 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards, pulse 1.5s ease-in-out infinite",cartAnimation:"slideInBounceCart 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards, pulse 1.5s ease-in-out infinite",pulseAnimation:"pulse 1.5s ease-in-out infinite",keyframes:{"@keyframes slideInBounce":{"0%":{transform:"translateX(200px) rotate(360deg)",opacity:0}
1,"60%":{transform:"translateX(0) rotate(0deg)",opacity:1},"80%":{transform:"translateX(-8px) rotate(0deg)",opacity:1},"100%":{transform:"translateX(0) rotate(0deg)",opacity:1}},"@keyframes slideInBounceCart":{"0%":{transform:"translateX(500px) rotate(360deg)",opacity:0},"60%":{transform:"translateX(0) rotate(0deg)",opacity:1},"80%":{transform:"translateX(-8px) rotate(0deg)",opacity:1},"100%":{transform:"translateX(0) rotate(0deg)",opacity:1}},"@keyframes pulse":{"0%, 100%":{boxShadow:"0 0 0 0 rgba(230,173,255, 0)"},"50%":{boxShadow:"0 0 0 8px rgba(230,173,255, 0.4)"}}}}},centerContent:{center:{animation:"centerContent 500ms ease-out 200ms both",keyframes:{"@keyframes centerContent":{"0%":{transform:"translateX(0)"},"100%":{transform:"translateX(0)"}}}}},button:{fadeIn:{animation:"fadeIn 500ms ease-in-out 200ms both",keyframes:n},fadeOut:{animation:"fadeOut 500ms ease-in-out both",keyframes:o}},backgroundHighlight:{fadeIn:{animation:"backgroundFadeIn 500ms ease-in 1s both",keyframes:{"@keyframes backgroundFadeIn":{"0%":{backgroundColor:"transparent"},"100%":{backgroundColor:"violet.lighter"}}}},growFromLeft:{animation:"growFromLeft 500ms ease-in 1s both",keyframes:{"@keyframes growFromLeft":{"0%":{width:"0%"},"100%":{width:"100%"}}}}},text:{fadeIn:{animation:"fadeIn 500ms ease-in-out 200ms both",keyframes:n},fadeInAccepted:{animation:"fadeIn 500ms ease-in-out 500ms both",keyframes:n},fadeOut:{animation:"fadeOut 500ms ease-in-out both",keyframes:o},expandedFadeIn:{animation:"fadeIn 1s ease-in-out both",keyframes:n}},expandContent:{expand:{animation:"expandContent 500ms ease-out both",keyframes:{"@keyframes expandContent":{"0%":{opacity:0,transform:"translateY(20px) scale(0.95)"},"100%":{opacity:1,transform:"translateY(0) scale(1)"}}}}},link:{fadeIn:{animation:"fadeIn 500ms ease-in-out 500ms both",keyframes:n},fadeOut:{animation:"fadeOut 500ms ease-in-out both",keyframes:o}},global:{fadeOut:{animation:"fadeOut 1s ease-in-out 0s both !important",keyframes:o},fadeOutFast:{animation:"fadeOut 500ms ease-in-out 0s both !important",keyframes:o}},buttonsContainer:{fadeIn:{animation:"fadeIn 1s ease-in-out, buttonsBounceSlideUp 1s ease-in-out both",keyframes:{...n,"@keyframes buttonsBounceSlideUp":{"0%":{transform:"translateY(24px)"},"100%":{transform:"translateY(0)"}}}},fadeInOnly:{animation:"fadeIn 1s ease-in-out both",keyframes:n}},disclaimer:{slideUp:{animation:"disclaimerSlideUp 500ms ease-out 300ms both",keyframes:{"@keyframes disclaimerSlideUp":{"0%":{opacity:0,transform:"translateY(10px)"},"100%":{opacity:1,transform:"translateY(0)"}}}}}}},11659:function(e,t,a){a.d(t,{vq:function(){return d},pF:function(){return k},Li:function(){return H},fj:function(){return E},Nm:function(){return T},bc:function(){return b},JW:function(){return f}});var o=a(98863),n=a(93859),r=a(96540),i=a(41783),s=a(73599),l=JSON.parse('{"metadata":{"version":"2.1","last_updated":"2025-12-14","total_recommendations":31,"description":"Cart upsell recommendation rules and Eva copy - v2.1 production release with vitamins removed (site no longer sells vitamins), maintains smart trigger logic (OR vs AND matching) for multi-product cart handling","priority_order":"Check steps 1-5 in order, stop at first match","one_recommendation_max":true},"coordination":{"cart_sidebar_and_checkout":{"rule":"If customer dismissed recommendation in cart sidebar, don\'t show SAME product in checkout","track_sidebar_state":{"recommended_product_id":"number","expanded":"boolean","action":"accepted | dismissed | null"},"checkout_logic":"If action === \'dismissed\' AND current recommendation === sidebar product ID, return null"}},"recommendations":[{"id":"1.1","step":1,"type":"CATEGORY_SWAP","name":"Testosterone → Men\'s Health","trigger":{"cart_contains":[153],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"REPLACE","remove_products":[153],"add_products":[13],"price_delta":180},"copy":{"cart_sidebar":"Low energy and mood changes often involve multiple hormones. Our **Men\'s Health Test checks all 4**.","checkout":{"under_35":"Low energy, muscle loss, and mood changes often involve 4 key hormones working together - not just testosterone. Our **Men\'s Health Test measures testosterone, cortisol, DHEA, and estradiol**.","35_44":"Fatigue, weight gain, and low motivation can involve stress hormones or hormone conversion - not just testosterone. Our **Men\'s Health Test checks all 4 hormones**.","45_54":"Low energy and muscle changes often trace to hormone imbalances - not just testosterone alone. Our **Men\'s Health Test measures all 4 hormones** for complete insights.","55_plus":"Energy, muscle mass, and mood all depend on 4 key hormones - testosterone, cortisol, DHEA, and estradiol. Our **Men\'s Health Test measures them all**."}}}
1,{"id":"1.2","step":1,"type":"CATEGORY_SWAP","name":"Food Sensitivity → Comprehensive","trigger":{"cart_contains":[55],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"REPLACE","remove_products":[55],"add_products":[65],"price_delta":100},"copy":{"cart_sidebar":"Bloating, fatigue, and inflammation often trace to foods not in basic panels. **Food Sensitivity Comprehensive tests 204 foods, not 96**.","checkout":{"under_35":"Persistent bloating, skin issues, or fatigue can trace to foods not in basic panels. **Food Sensitivity Comprehensive tests 204 foods** - the 108 additional foods include shellfish, tree nuts, and specialty items often overlooked.","35_44":"Ongoing digestive issues, headaches, or joint pain often involve foods missed in basic testing. **Food Sensitivity Comprehensive tests 204 foods instead of 96** - includes varieties that commonly trigger reactions.","45_54":"Fatigue, inflammation, and weight issues can connect to unexpected food triggers. **Food Sensitivity Comprehensive tests 204 foods vs 96** - the 108 additional foods often reveal hidden culprits.","55_plus":"Joint pain, inflammation, and digestive concerns often trace to specific foods. **Food Sensitivity Comprehensive tests 204 foods, not just 96** - helps identify triggers affecting overall health."}}},{"id":"1.3","step":1,"type":"CATEGORY_SWAP","name":"Cholesterol → Heart Health","trigger":{"cart_contains":[67],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"REPLACE","remove_products":[67],"add_products":[69],"price_delta":50},"copy":{"cart_sidebar":"Blood sugar affects your heart too. Our **Heart Health Test includes HbA1c** with your cholesterol panel.","checkout":{"under_35":"Cholesterol is just one piece. Our **Heart Health Test adds HbA1c** to track blood sugar alongside lipids - high blood sugar affects cholesterol and heart disease risk.","35_44":"High blood sugar damages blood vessels and affects cholesterol. Our **Heart Health Test includes HbA1c** with your cholesterol panel - both markers matter for heart health.","45_54":"Diabetes doubles heart disease risk. Our **Heart Health Test includes cholesterol PLUS HbA1c** to monitor both blood sugar and lipids affecting cardiovascular health.","55_plus":"Blood sugar and cholesterol both affect heart disease risk. Our **Heart Health Test checks both** - HbA1c reveals prediabetes that cholesterol alone misses."}}},{"id":"1.4","step":1,"type":"CATEGORY_SWAP","name":"C&G → 5-Panel STD","trigger":{"cart_contains":[109],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"REPLACE","remove_products":[109],"add_products":[347],"price_delta":100},"copy":{"cart_sidebar":"Most STIs have no symptoms. Our **5-Panel STD Test screens for 5 infections, not just 2**.","checkout":{"under_35":"70% of STIs show no symptoms. Our **5-Panel STD Test screens for 5 infections** instead of 2 - adds Hepatitis C, Trichomoniasis, and Syphilis that are often silent but treatable.","35_44":"Most STIs are asymptomatic. Our **5-Panel STD Test checks 5 infections, not just 2** - adds Hepatitis C, Trichomoniasis, and Syphilis. Complete screening provides real peace of mind.","45_54":"STIs at any age often have no symptoms. Our **5-Panel STD Test screens for 5 infections** - adds Hepatitis C, Trichomoniasis, and Syphilis for comprehensive screening.","55_plus":"Comprehensive STI screening matters at any age. Our **5-Panel STD Test checks 5 infections instead of 2** - adds Hepatitis C, Trichomoniasis, and Syphilis."}}},{"id":"3.1","step":3,"type":"GALLERI_ADD_ON","name":"Galleri + Everlywell 360","trigger":{"cart_contains":[317],"age_min":22,"age_max":null,"sex_logic":"SELECT_360_PANEL","excluded_states":["AK","AZ","HI","NJ","NY","RI"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":"352_if_male_OR_353_if_female","price_delta":399},"copy":{"cart_sidebar":"Add ongoing health monitoring. **Everlywell 360 tracks 86 biomarkers, 2x/year** alongside your cancer screening.","checkout":{"under_35":"Cancer screening and health tracking work together. **Everlywell 360 monitors 86 biomarkers** including inflammation and immune markers. Test 2x/year at Quest.","35_44":"Complete your preventive health strategy. **Everlywell 360 tracks 86 biomarkers** twice yearly - inflammation, metabolic health, and immune function all affect cancer risk. Both at Quest.","45_54":"Cancer risk connects to inflammation, metabolic health, and immune function. **Everlywell 360 tracks 86 biomarkers** affecting these areas - both tests at Quest PSC. Monitor health 2x/year.","55_plus":"Inflammation, blood sugar, and immune markers all affect cancer risk. **Everlywell 360 tracks 86 biomarkers** twice yearly - see what\'s happening in your body alongside cancer screening. Both at Quest."}}},{"id":"3.2","step":3,"type":"GALLERI_ADD_ON","name":"Galleri + Heart Health","trigger":{"cart_contains":[317],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Monitor heart health markers alongside cancer screening. Add our **Heart Health Test**.","checkout":{"under_35":"Heart health monitoring complements cancer screening. Add our **Heart Health Test to track cholesterol, triglycerides, and HbA1c** - cardiovascular health affects cancer risk.","35_44":"Cardiovascular health and cancer risk connect. Add our **Heart Health Test to monitor cholesterol and blood sugar** alongside your cancer screening.","45_54":"Heart disease and cancer are leading health concerns. Add our **Heart Health Test to track cholesterol, triglycerides, and HbA1c** alongside Galleri screening.","55_plus":"Complete preventive health includes heart monitoring. Add our **Heart Health Test to check cholesterol and blood sugar** alongside your multi-cancer screening."}}},{"id":"3.3","step":3,"type":"GALLERI_ADD_ON","name":"Galleri + FIT Colon","trigger":{"cart_contains":[317],"age_min":45,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[110],"price_delta":49},"copy":{"cart_sidebar":"Add specific colon screening. **FIT Colon Test** complements Galleri\'s broad screening.","checkout":{"under_35":null,"35_44":null,"45_54":"Colon cancer screening is recommended starting at 45. **FIT Colon Test provides specific colon screening** - complements Galleri\'s broad multi-cancer detection.","5
15_plus":"Add targeted colon screening to your cancer monitoring. **FIT Colon Test provides stool-based colon screening** complementing Galleri\'s blood-based detection."}}},{"id":"4.1","step":4,"type":"TEST_ADD_ON","name":"FSC + Celiac","trigger":{"cart_contains":[65],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[224],"price_delta":119},"copy":{"cart_sidebar":"Severe gluten reactions may be celiac disease, not just sensitivity. Our **Celiac Test checks autoimmune markers**.","checkout":{"under_35":"Gluten reactions can be IgG sensitivity or autoimmune celiac disease. Our **Celiac Screening Test checks for autoimmune markers** - celiac requires strict gluten avoidance, sensitivity doesn\'t.","35_44":"Severe gluten reactions, chronic diarrhea, or unexplained weight loss can signal celiac disease. Our **Celiac Test checks autoimmune markers** - different from IgG testing, different management needed.","45_54":"Bloating, fatigue, and nutrient deficiencies can indicate celiac disease. Our **Celiac Test checks autoimmune response to gluten** - undiagnosed celiac affects bone health and nutrient absorption.","55_plus":"Gluten sensitivity vs celiac disease require different approaches. Our **Celiac Screening Test checks autoimmune markers** - celiac can cause osteoporosis and malabsorption if undiagnosed."}}},{"id":"4.2","step":4,"type":"TEST_ADD_ON","name":"Men\'s Health + Heart Health","trigger":{"cart_contains":[13],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Hormones affect cholesterol and heart disease risk. Monitor both with our **Heart Health Test**.","checkout":{"under_35":"Testosterone affects cholesterol levels and cardiovascular function. Add our **Heart Health Test to monitor lipids, triglycerides, and blood sugar (HbA1c)** alongside hormone testing.","35_44":"Testosterone affects cholesterol levels and cardiovascular function. Add our **Heart Health Test to monitor lipids, triglycerides, and blood sugar (HbA1c)** alongside hormone testing.","45_54":"Hormone changes can affect cholesterol and heart disease risk. Add our **Heart Health Test to track lipids, triglycerides, and HbA1c** - complete cardiovascular and metabolic monitoring.","55_plus":"Heart health and hormones affect each other. Add our **Heart Health Test to monitor cholesterol, triglycerides, and blood sugar** alongside your hormone testing."}}},{"id":"4.3","step":4,"type":"TEST_ADD_ON","name":"Thyroid + FSC","trigger":{"cart_contains":[9],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[65],"price_delta":299},"copy":{"cart_sidebar":"Bloating, weight gain, and fatigue can involve both thyroid and food. **Food Sensitivity Comprehensive tests 204 foods**.","checkout":{"under_35":"Fatigue and weight issues can involve thyroid function AND food sensitivities. **Food Sensitivity Comprehensive tests 204 foods** - inflammation from food affects thyroid hormones.","35_44":"Digestive issues, fatigue, and weight gain often involve thyroid and food working together. **Food Sensitivity Comprehensive tests 204 foods** - food-induced inflammation can disrupt thyroid function.","45_54":"Constipation, weight changes, and low energy can trace to thyroid or inflammatory foods. **Food Sensitivity Comprehensive tests 204 foods** - food reactions affect thyroid and metabolism.","55_plus":"Fatigue, digestive concerns, and inflammation often involve both thyroid and food triggers. **Food Sensitivity Comprehensive tests 204 foods** - comprehensive investigation matters."}}},{"id":"4.4","step":4,"type":"TEST_ADD_ON","name":"Metabolism + FSC","trigger":{"cart_contains":[17],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[65],"price_delta":299},"copy":{"cart_sidebar":"Weight and energy issues often trace to inflammatory foods. **Food Sensitivity Comprehensive tests 204 foods** for hidden triggers.","checkout":{"under_35":"Unexplained weight gain, fatigue, or bloating can involve inflammatory food reactions. **Food Sensitivity Comprehensive tests 204 foods** - hidden triggers affect metabolism, thyroid, and energy.","35_44":"Weight struggles and low energy often trace to foods causing chronic inflammation. **Food Sensitivity Comprehensive tests 204 foods** - inflammation disrupts thyroid, insulin, and cortisol.","45_54":"Stubborn weight, fatigue, and brain fog can involve inflammatory food triggers. **Food Sensitivity Comprehensive tests 204 foods** - reactions affect thyroid, blood sugar, and energy metabolism.","55_plus":"Weight and energy changes often connect to inflammatory foods. **Food Sensitivity Comprehensive tests 204 foods** - food reactions can disrupt metabolic hormones and function."}}},{"id":"4.5","step":4,"type":"TEST_ADD_ON","name":"Vitamin D + FSC","trigger":{"cart_contains":[23],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[65],"price_delta":299},"copy":{"cart_sidebar":"Joint pain, fatigue, and high inflammation often trace to specific foods. **Food Sensitivity Comprehensive tests 204 foods** for triggers.","checkout":{"under_35":"Joint pain, skin issues, or chronic fatigue can involve inflammatory food triggers. **Food Sensitivity Comprehensive tests 204 foods** - identifying and removing triggers helps reduce inflammation.","35_44":"Chronic inflammation, joint pain, or persistent fatigue often trace to specific food reactions. **Food Sensitivity Comprehensive tests 204 foods** - hidden triggers drive ongoing inflammation.","45_54":"High hs-CRP, joint pain, or fatigue can indicate food-related inflammation. **Food Sensitivity Comprehensive tests 204 foods** - inflammatory foods are a common but fixable cause.","55_plus":"Inflammation markers, joint discomfort, and fatigue often connect to dietary triggers. **Food Sensitivity Comprehensive tests 204 foods** - food reactions affect overall inflammation and health."}}},{"id":"4.6","step":4,"type":"TEST_ADD_ON","name":"Heart Health + Women\'s Health","trigger":{"cart_contains":[69],"age_min":18,"age_max":null,"sex_logic":"IF_FEMALE","excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[5],"price_delta":249},"copy":{"cart_sidebar":"Irregular periods, fatigue, and heart health all connect to hormones. **Women\'s Health Test checks 11 biomarkers**.","checkout":{"under_35":"Cycle irregularities, mood changes, and cardiovascular health all involve reproductive and thyroid hormones. **Women\'s Health Test checks 11 biomarkers** including estradiol, progesterone, cortisol, and thyroid markers.","35_44":"Perimenopause changes affect mood, cycles, and heart health. **Women\'s Health Test monitors 11 hormones** - estrogen, progesterone, thyroid, and cortisol all affect cardiovascular function.","45_54":"Hormone shifts affect heart health, weight, and energy. **Women\'s Health Test checks 11 biomarkers** - estrogen changes impact cholesterol, blood pressure, and metabolic health.","5
15_plus":"Post-menopause hormone changes affect heart disease risk. **Women\'s Health Test monitors 11 hormone biomarkers** - estrogen, thyroid, and cortisol all influence cardiovascular health."}}},{"id":"4.7","step":4,"type":"TEST_ADD_ON","name":"Heart Health + Men\'s Health","trigger":{"cart_contains":[69],"age_min":18,"age_max":null,"sex_logic":"IF_MALE","excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[13],"price_delta":249},"copy":{"cart_sidebar":"Hormones affect heart health. **Men\'s Health Test monitors 4 key hormones**.","checkout":{"under_35":"Low energy, high cholesterol, or weight gain can involve testosterone, cortisol, or DHEA. **Men\'s Health Test checks all 4 hormones** affecting heart health and metabolism.","35_44":"Low energy, high cholesterol, or weight gain can involve testosterone, cortisol, or DHEA. **Men\'s Health Test checks all 4 hormones** affecting heart health and metabolism.","45_54":"Fatigue, cholesterol changes, or decreased muscle mass often trace to hormone shifts. **Men\'s Health Test monitors 4 hormones** - testosterone, cortisol, DHEA, and estradiol all affect heart function.","55_plus":"Energy, cholesterol, and heart health all involve hormones. **Men\'s Health Test checks 4 key hormones** affecting cardiovascular and metabolic function."}}},{"id":"4.8","step":4,"type":"TEST_ADD_ON","name":"HbA1c/Cholesterol + Women\'s Health","trigger":{"cart_contains":[66,67],"age_min":18,"age_max":null,"sex_logic":"IF_FEMALE","excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[5],"price_delta":249},"copy":{"cart_sidebar":"Weight changes, fatigue, and irregular cycles often involve hormones. **Women\'s Health Test checks 11 biomarkers**.","checkout":{"under_35":"Weight gain, fatigue, or irregular periods can involve hormone changes affecting metabolism. **Women\'s Health Test checks 11 biomarkers** including thyroid, cortisol, estrogen, and progesterone.","35_44":"Weight gain, fatigue, or irregular periods can involve hormone changes affecting metabolism. **Women\'s Health Test checks 11 biomarkers** including thyroid, cortisol, estrogen, and progesterone.","45_54":"Perimenopause changes affect weight, cholesterol, and blood sugar. **Women\'s Health Test monitors 11 hormones** - estrogen, thyroid, and cortisol all influence metabolic function.","55_plus":"Post-menopause hormone shifts affect weight, cholesterol, and energy. **Women\'s Health Test checks 11 hormone biomarkers** affecting metabolic and cardiovascular health."}}},{"id":"4.9","step":4,"type":"TEST_ADD_ON","name":"HbA1c/Cholesterol + Men\'s Health","trigger":{"cart_contains":[66,67],"age_min":18,"age_max":null,"sex_logic":"IF_MALE","excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[13],"price_delta":249},"copy":{"cart_sidebar":"Low energy, weight gain, and cholesterol issues often involve hormones. **Men\'s Health Test checks 4 key hormones**.","checkout":{"under_35":"Fatigue, weight changes, or cholesterol issues can involve testosterone, cortisol, or DHEA imbalances. **Men\'s Health Test checks all 4 hormones** affecting metabolism and energy.","35_44":"Fatigue, weight changes, or cholesterol issues can involve testosterone, cortisol, or DHEA imbalances. **Men\'s Health Test checks all 4 hormones** affecting metabolism and energy.","45_54":"Weight gain, low energy, or metabolic changes often trace to hormone shifts. **Men\'s Health Test monitors 4 hormones** - testosterone, cortisol, DHEA, and estradiol all affect metabolism.","55_plus":"Energy, weight, and metabolic health all involve hormones. **Men\'s Health Test checks 4 key hormones** - testosterone, cortisol, DHEA, and estradiol affecting metabolic function."}}},{"id":"4.10","step":4,"type":"COMBINATION_RULE","name":"Women\'s Health + → 360 Female","trigger":{"cart_contains":[5],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["AK","AZ","HI","NJ","NY","RI"],"trigger_logic":"AND"},"action":{"type":"ADD","add_products":[353],"price_delta":399},"copy":{"cart_sidebar":"Complete your hormone insights with comprehensive monitoring. **Everlywell 360 Female Panel tracks 86 biomarkers** including all hormones, heart, metabolism, and inflammation.","checkout":{"under_35":"Comprehensive health monitoring complements hormone testing. **Everlywell 360 Female Panel tracks 86 biomarkers** - hormones, thyroid, heart health, metabolism, inflammation, and nutrients. Includes care plan and WellScore.","35_44":"Expand hormone insights with full-body monitoring. **Everlywell 360 Female Panel tests 86 biomarkers** including all reproductive hormones plus cardiovascular, metabolic, and immune markers. Includes care plan.","45_54":"Perimenopause affects more than hormones. **Everlywell 360 Female Panel tracks 86 biomarkers** - hormone changes impact heart, metabolism, and inflammation. Complete picture with care plan support.","55_plus":"Comprehensive health monitoring complements hormone testing. **Everlywell 360 Female Panel tests 86 biomarkers** - see how hormones connect to heart health, metabolism, and overall wellness. Includes care plan."}}},{"id":"4.11","step":4,"type":"COMBINATION_RULE","name":"Men\'s Health + → 360 Male","trigger":{"cart_contains":[13],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["AK","AZ","HI","NJ","NY","RI"],"trigger_logic":"AND"},"action":{"type":"ADD","add_products":[352],"price_delta":399},"copy":{"cart_sidebar":"Complete your hormone insights with comprehensive monitoring. **Everlywell 360 Male Panel tracks 86 biomarkers** including all hormones, heart, metabolism, and inflammation.","checkout":{"under_35":"Comprehensive health monitoring complements hormone testing. **Everlywell 360 Male Panel tracks 86 biomarkers** - testosterone, cortisol, DHEA, estradiol plus heart health, metabolism, inflammation, and nutrients. Includes care plan and WellScore.","35_44":"Expand hormone insights with full-body monitoring. **Everlywell 360 Male Panel tests 86 biomarkers** including all testosterone-related hormones plus cardiovascular, metabolic, and immune markers. Includes care plan.","45_54":"Hormone changes affect overall health. **Everlywell 360 Male Panel tracks 86 biomarkers** - see how testosterone, cortisol, and DHEA connect to heart health, metabolism, and inflammation. Includes care plan.","55_plus":"Comprehensive health monitoring complements hormone testing. **Everlywell 360 Male Panel tests 86 biomarkers** - hormones, cardiovascular health, metabolic function, and inflammation. Complete picture with care plan support."}}},{"id":"4.12","step":4,"type":"COMBINATION_RULE","name":"Women\'s Health + FSC → Heart Health","trigger":{"cart_contains":[5,65],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"AND"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Hormones and digestive health both affect cardiovascular function. **Heart Health Test checks cholesterol and blood sugar** for complete wellness monitoring.","checkout":{"under_35":"Hormone balance and digestive health both affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive heart and metabolic 
1screening.","35_44":"Hormones and diet affect heart health. **Heart Health Test checks cholesterol and blood sugar** - complete your wellness picture with cardiovascular screening.","45_54":"Perimenopause, digestive health, and cardiovascular function are connected. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive assessment.","55_plus":"Hormones, digestion, and heart health all affect overall wellness. **Heart Health Test checks cholesterol and blood sugar** for complete health monitoring."}}},{"id":"4.13","step":4,"type":"COMBINATION_RULE","name":"Women\'s Health + Food Sensitivity → Heart Health","trigger":{"cart_contains":[5,55],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"AND"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Hormones and food sensitivities both affect cardiovascular health. **Heart Health Test checks cholesterol and blood sugar** for complete monitoring.","checkout":{"under_35":"Hormone balance and food reactions both affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive wellness assessment.","35_44":"Hormones and inflammatory foods affect heart health. **Heart Health Test checks cholesterol and blood sugar** - complete your health picture with cardiovascular screening.","45_54":"Hormone changes and food sensitivities both affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for complete assessment.","55_plus":"Hormones, food reactions, and heart health are interconnected. **Heart Health Test checks cholesterol and blood sugar** for comprehensive wellness monitoring."}}},{"id":"4.14","step":4,"type":"COMBINATION_RULE","name":"Metabolism + Food Sensitivity → Heart Health","trigger":{"cart_contains":[17,55],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"AND"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Metabolism and diet both affect cardiovascular health. **Heart Health Test checks cholesterol and blood sugar** for complete wellness monitoring.","checkout":{"under_35":"Metabolic hormones and food reactions both affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive heart and metabolic screening.","35_44":"Metabolism and diet affect heart health. **Heart Health Test checks cholesterol and blood sugar** - complete your wellness picture with cardiovascular screening.","45_54":"Metabolic health and food sensitivities both affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive assessment.","55_plus":"Metabolism, diet, and heart health work together. **Heart Health Test checks cholesterol and blood sugar** for complete wellness monitoring."}}},{"id":"4.15","step":4,"type":"COMBINATION_RULE","name":"Thyroid + Food Sensitivity → Heart Health","trigger":{"cart_contains":[9,55],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"AND"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Thyroid and digestive health both affect cardiovascular function. **Heart Health Test checks cholesterol and blood sugar** for complete wellness monitoring.","checkout":{"under_35":"Thyroid function and food reactions both affect cardiovascular health. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive screening.","35_44":"Metabolism and digestive health affect heart function. **Heart Health Test checks cholesterol and blood sugar** - complete your wellness assessment with cardiovascular screening.","45_54":"Thyroid, digestive issues, and cardiovascular health are interconnected. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for complete assessment.","55_plus":"Thyroid function, food sensitivities, and heart health all affect overall wellness. **Heart Health Test checks cholesterol and blood sugar** for comprehensive monitoring."}}},{"id":"4.16","step":4,"type":"COMBINATION_RULE","name":"Thyroid + Metabol
1ism → Heart Health","trigger":{"cart_contains":[9,17],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"AND"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Thyroid and metabolism both affect cardiovascular health. **Heart Health Test checks cholesterol and blood sugar** for complete wellness assessment.","checkout":{"under_35":"Metabolic hormones affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** - complete wellness screening with thyroid and metabolism.","35_44":"Thyroid and metabolism affect heart health. **Heart Health Test checks cholesterol and blood sugar** for comprehensive cardiovascular and metabolic assessment.","45_54":"Metabolic health and cardiovascular function are closely connected. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** alongside thyroid and metabolism testing.","55_plus":"Thyroid, metabolism, and heart health work together. **Heart Health Test checks cholesterol and blood sugar** for complete wellness monitoring."}}},{"id":"4.17","step":4,"type":"COMBINATION_RULE","name":"Men\'s Health + FSC → Heart Health","trigger":{"cart_contains":[13,65],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"AND"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Hormones and digestive health both affect cardiovascular function. **Heart Health Test checks cholesterol and blood sugar** for complete wellness monitoring.","checkout":{"under_35":"Testosterone and digestive health both affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive heart and metabolic screening.","35_44":"Hormones and diet affect heart health. **Heart Health Test checks cholesterol and blood sugar** - complete your wellness picture with cardiovascular screening.","45_54":"Hormone changes and digestive health both affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive assessment.","55_plus":"Hormones, digestion, and heart health all affect overall wellness. **Heart Health Test checks cholesterol and blood sugar** for complete health monitoring."}}},{"id":"4.18","step":4,"type":"COMBINATION_RULE","name":"Men\'s Health + Food Sensitivity → Heart Health","trigger":{"cart_contains":[13,55],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"AND"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Hormones and food sensitivities both affect cardiovascular health. **Heart Health Test checks cholesterol and blood sugar** for complete monitoring.","checkout":{"under_35":"Testosterone and food reactions both affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive wellness assessment.","35_44":"Hormones and inflammatory foods affect heart health. **Heart Health Test checks cholesterol and blood sugar** - complete your health picture with cardiovascular screening.","45_54":"Hormone changes and food sensitivities both affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for complete assessment.","55_plus":"Hormones, food reactions, and heart health are interconnected. **Heart Health Test checks cholesterol and blood sugar** for comprehensive wellness monitoring."}}},{"id":"5.1","step":5,"type":"DEFAULT_FALLBACK","name":"Default → Everlywell 360","trigger":{"cart_contains":[],"age_min":18,"age_max":null,"sex_logic":"SELECT_360_PANEL","excluded_states":["AK","AZ","HI","NJ","NY","RI"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":"352_if_male_OR_353_if_female","price_delta":399},"copy":{"cart_sidebar":null,"checkout":{"under_35":"Comprehensive health monitoring helps you understand your body. **Everlywell 360 yearly panel tests 86 biomarkers** including hormones, heart health, metabolism, and inflammation. Includes care plan and your unique WellScore.","35_44":"Track your health over time with our yearly membership. **Everlywell 360 tests 8
16 biomarkers** including hormones, thyroid, cholesterol, and inflammation. Includes care plan support and your unique WellScore.","45_54":"Preventive health monitoring becomes more valuable with age. **Everlywell 360 yearly panel tests 86 biomarkers** covering heart health, hormones, metabolism, and inflammation. Includes care plan and WellScore.","55_plus":"Comprehensive health monitoring is recommended for ages 50+. **Everlywell 360 yearly panel tests 86 biomarkers** including heart health, cancer markers, and metabolic function. Includes care plan and WellScore."}}},{"id":"5.3","step":5,"type":"CART_INFERENCE_FALLBACK","name":"Hormone Tests → Heart Health","trigger":{"cart_contains":[153,13,5,17],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Hormones affect heart health. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** alongside your hormone testing.","checkout":{"under_35":"Hormone balance affects cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** - complete heart and metabolic screening alongside hormone testing.","35_44":"Hormones and heart health are connected. **Heart Health Test checks cholesterol, triglycerides, and HbA1c** for comprehensive cardiovascular monitoring with your hormone test.","45_54":"Hormonal changes affect heart disease risk. **Heart Health Test monitors cholesterol and blood sugar** - essential cardiovascular screening alongside hormone testing.","55_plus":"Heart health monitoring complements hormone testing. **Heart Health Test checks cholesterol, triglycerides, and HbA1c** for complete cardiovascular and metabolic assessment."}}},{"id":"5.4","step":5,"type":"CART_INFERENCE_FALLBACK","name":"Heart/Metabolic Tests → Thyroid","trigger":{"cart_contains":[66,67,69],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[9],"price_delta":149},"copy":{"cart_sidebar":"Weight and energy often connect to thyroid function. **Thyroid Test checks 4 biomarkers** including TSH, T3, T4, and TPO antibodies.","checkout":{"under_35":"Thyroid affects metabolism and heart health. **Thyroid Test checks 4 biomarkers** - TSH, T3, T4, and TPO antibodies for comprehensive thyroid function assessment.","35_44":"Energy, weight, and metabolism depend on thyroid function. **Thyroid Test measures 4 biomarkers** including TSH, T3, T4, and TPO antibodies.","45_54":"Thyroid function affects metabolic health. **Thyroid Test checks 4 biomarkers** - TSH, T3, T4, and TPO for complete thyroid assessment.","55_plus":"Thyroid affects metabolism, energy, and heart health. **Thyroid Test measures 4 biomarkers** - comprehensive thyroid function screening."}}},{"id":"5.5","step":5,"type":"CART_INFERENCE_FALLBACK","name":"Wellness Tests → Heart Health","trigger":{"cart_contains":[9,23,55],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Cardiovascular health completes your wellness picture. **Heart Health Test checks cholesterol and blood sugar** for comprehensive monitoring.","checkout":{"under_35":"Complete wellness includes cardiovascular health. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive heart and metabolic screening.","35_44":"Cardiovascular screening completes your wellness picture. **Heart Health Test checks cholesterol and blood sugar** - essential for comprehensive health monitoring.","45_54":"Heart health is essential for overall wellness. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for complete cardiovascular assessment.","55_plus":"Comprehensive wellness includes heart monitoring. **Heart Health Test checks cholesterol and blood sugar** - cardiovascular screening for complete health picture."}}},{"id":"5.6","step":5,"type":"CART_INFERENCE_FALLBACK","name":"Any Test → Vitamin D + Inflammation","trigger":{"cart_contains":"ANY_TEST_PRODUCT","age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[23],"price_delta":99},"copy":{"cart_sidebar":"Inflammation and vitamin D levels affect overall health. **Vitamin D & Inflammation Test** measures deficiency risk and chronic inflammation markers.","checkout":{"under_35":"Vitamin D and inflammation affect overall health. **Vitamin D & Inflammation Test measures deficiency risk and hs-CRP** - key markers for immunity and chronic disease prevention.","35_44":"Inflammation and nutrient status impact health outcomes. **Vitamin D & Inflammation Test checks vitamin D and hs-CRP** for comprehensive wellness monitoring.","45_54":"Vitamin D and inflammation are key health markers. **Vitamin D & Inflammation Test measures deficiency and chronic inflammation** - both affect disease risk and aging.","55_plus":"Inflammation and vitamin D affect bone health and immunity. **Vitamin D & Inflammation Test checks both markers** - essential for overall health and disease prevention."}}},{"id":"5.7","step":5,"type":"UNIVERSAL_TEST_FALLBACK","name":"Universal → Heart Health","trigger":{"cart_contains":[],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Cardiovascular health matters at every age. **Heart Health Test checks cholesterol, triglycerides, and HbA1c** for comprehensive screening.","checkout":{"under_35":"Cardiovascular health monitoring is essential. **Heart Health Test checks cholesterol, triglycerides, and HbA1c** - establish your baseline for heart and metabolic health.","35_44":"Heart health screening is recommended at 35+. **Heart Health Test monitors cholesterol and blood sugar** - essential cardiovascular and diabetes screening.","45_54":"Cardiovascular monitoring becomes more important with age. **Heart Health Test checks cholesterol, triglycerides, and HbA1c** - comprehensive heart and metabolic assessment.","55_plus":"Heart disease prevention starts with screening. **Heart Health Test monitors cholesterol and blood sugar** - essential cardiovascular health asse
1ssment."}}}],"note":"PRODUCTION v2.1: This JSON includes 31 recommendations (16 specific swaps/add-ons + 9 data-driven combination rules + 6 fallbacks). Vitamins removed as site no longer sells them. Maintains v2 trigger_logic field for smart matching - combination rules (4.10-4.18) use AND logic requiring ALL products in cart_contains array, all other rules use OR logic requiring ANY product. Fallbacks (5.1, 5.3-5.7) catch all remaining scenarios.","implementation_notes":{"highlighting":{"format":"Text between **markers** should be highlighted in UI","example":"Our **Men\'s Health Test checks all 4** → highlight \'Men\'s Health Test checks all 4\'"},"age_brackets":{"under_35":"< 35","35_44":"35-44","45_54":"45-54","55_plus":"55+"},"sex_logic_values":{"SELECT_360_PANEL":"Use customer sex to determine: Male → 352, Female → 353","IF_FEMALE":"Only show if customer sex === Female","IF_MALE":"Only show if customer sex === Male","null":"No sex requirement"},"cart_contains_logic":{"OR":"If ANY product in array is in cart, trigger applies","AND":"ALL products in array must be in cart to trigger","implementation":"Check trigger_logic field on each rule. If missing, default to OR for backward compatibility","example_OR":"Rule with cart_contains: [66, 67] and trigger_logic: OR matches if cart has 66 OR 67","example_AND":"Rule with cart_contains: [5, 65] and trigger_logic: AND matches ONLY if cart has BOTH 5 AND 65"},"priority":"Process recommendations in step order (1, 2, 3, 4, 5). Stop at first match."}}'),c=JSON.parse('{"metadata":{"version":"3.0","last_updated":"2025-12-14","total_recommendations":34,"description":"Optimized rules for 2-cell test - 90% SWAP threshold, no vitamins, data-informed combinations","priority_order":"Check steps 1-5 in order, stop at first match","one_recommendation_max":true},"coordination":{"cart_sidebar_and_checkout":{"rule":"If customer dismissed recommendation in cart sidebar, don\'t show SAME product in checkout","track_sidebar_state":{"recommended_product_id":"number","expanded":"boolean","action":"accepted | dismissed | null"},"checkout_logic":"If action === \'dismissed\' AND current recommendation === sidebar product ID, return null"}},"recommendations":[{"id":"1.1","step":1,"type":"CATEGORY_SWAP","name":"Testosterone → Men\'s Health","trigger":{"cart_contains":[153],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"REPLACE","remove_products":[153],"add_products":[13],"price_delta":180},"copy":{"cart_sidebar":"Low energy and mood changes often involve multiple hormones. Our **Men\'s Health Test checks all 4**.","checkout":{"under_35":"Low energy, muscle loss, and mood changes often involve 4 key hormones working together - not just testosterone. Our **Men\'s Health Test measures testosterone, cortisol, DHEA, and estradiol**.","35_44":"Fatigue, weight gain, and low motivation can involve stress hormones or hormone conversion - not just testosterone. Our **Men\'s Health Test checks all 4 hormones**.","45_54":"Low energy and muscle changes often trace to hormone imbalances - not just testosterone alone. Our **Men\'s Health Test measures all 4 hormones** for complete insights.","55_plus":"Energy, muscle mass, and mood all depend on 4 key hormones - testosterone, cortisol, DHEA, and estradiol. Our **Men\'s Health Test measures them all**."}}},{"id":"1.2","step":1,"type":"CATEGORY_SWAP","name":"Food Sensitivity → Comprehensive","trigger":{"cart_contains":[55],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"REPLACE","remove_products":[55],"add_products":[65],"price_delta":100},"copy":{"cart_sidebar":"Bloating, fatigue, and inflammation often trace to foods not in basic panels. **Food Sensitivity Comprehensive tests 204 foods, not 96**.","checkout":{"under_35":"Persistent bloating, skin issues, or fatigue can trace to foods not in basic panels. **Food Sensitivity Comprehensive tests 204 foods** - the 108 additional foods include shellfish, tree nuts, and specialty items often overlooked.","35_44":"Ongoing digestive issues, headaches, or joint pain often involve foods missed in basic testing. **Fo
1od Sensitivity Comprehensive tests 204 foods instead of 96** - includes varieties that commonly trigger reactions.","45_54":"Fatigue, inflammation, and weight issues can connect to unexpected food triggers. **Food Sensitivity Comprehensive tests 204 foods vs 96** - the 108 additional foods often reveal hidden culprits.","55_plus":"Joint pain, inflammation, and digestive concerns often trace to specific foods. **Food Sensitivity Comprehensive tests 204 foods, not just 96** - helps identify triggers affecting overall health."}}},{"id":"1.3","step":1,"type":"CATEGORY_SWAP","name":"Cholesterol → Heart Health","trigger":{"cart_contains":[67],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"REPLACE","remove_products":[67],"add_products":[69],"price_delta":50},"copy":{"cart_sidebar":"Blood sugar affects your heart too. Our **Heart Health Test includes HbA1c** with your cholesterol panel.","checkout":{"under_35":"Cholesterol is just one piece. Our **Heart Health Test adds HbA1c** to track blood sugar alongside lipids - high blood sugar affects cholesterol and heart disease risk.","35_44":"High blood sugar damages blood vessels and affects cholesterol. Our **Heart Health Test includes HbA1c** with your cholesterol panel - both markers matter for heart health.","45_54":"Diabetes doubles heart disease risk. Our **Heart Health Test includes cholesterol PLUS HbA1c** to monitor both blood sugar and lipids affecting cardiovascular health.","55_plus":"Blood sugar and cholesterol both affect heart disease risk. Our **Heart Health Test checks both** - HbA1c reveals prediabetes that cholesterol alone misses."}}},{"id":"1.4","step":1,"type":"CATEGORY_SWAP","name":"C&G → 5-Panel STD","trigger":{"cart_contains":[109],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"REPLACE","remove_products":[109],"add_products":[347],"price_delta":100},"copy":{"cart_sidebar":"Most STIs have no symptoms. Our **5-Panel STD Test screens for 5 infections, not just 2**.","checkout":{"under_35":"70% of STIs show no symptoms. Our **5-Panel STD Test screens for 5 infections** instead of 2 - adds Hepatitis C, Trichomoniasis, and Syphilis that are often silent but treatable.","35_44":"Most STIs are asymptomatic. Our **5-Panel STD Test checks 5 infections, not just 2** - adds Hepatitis C, Trichomoniasis, and Syphilis. Complete screening provides real peace of mind.","45_54":"STIs at any age often have no symptoms. Our **5-Panel STD Test screens for 5 infections** - adds Hepatitis C, Trichomoniasis, and Syphilis for comprehensive screening.","55_plus":"Comprehensive STI screening matters at any age. Our **5-Panel STD Test checks 5 infections instead of 2** - adds Hepatitis C, Trichomoniasis, and Syphilis."}}},{"id":"3.1","step":3,"type":"GALLERI_ADD_ON","name":"Galleri + Everlywell 360","trigger":{"cart_contains":[317],"age_min":22,"age_max":null,"sex_logic":"SELECT_360_PANEL","excluded_states":["AK","AZ","HI","NJ","NY","RI"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":"352_if_male_OR_353_if_female","price_delta":399},"copy":{"cart_sidebar":"Add ongoing health monitoring. **Everlywell 360 tracks 86 biomarkers, 2x/year** alongside your cancer screening.","checkout":{"under_35":"Cancer screening and health tracking work together. **Everlywell 360 monitors 86 biomarkers** including inflammation and immune markers. Test 2x/year at Quest.","35_44":"Complete your preventive health strategy. **Everlywell 360 tracks 86 biomarkers** twice yearly - inflammation, metabolic health, and immune function all affect cancer risk. Both at Quest.","45_54":"Cancer risk connects to inflammation, metabolic health, and immune function. **Everlywell 360 tracks 86 biomarkers** affecting these areas - both tests at Quest PSC. Monitor health 2x/year.","55_plus":"Inflammation, blood sugar, and immune markers all affect cancer risk. **Everlywell 360 tracks 86 biomarkers** twice yearly - see what\'s happening in your body alongside cancer screening. Both at Quest."}}},{"id":"3.2","step":3,"type":"GALLERI_ADD_ON","name":"Galleri + Heart Health","trigger":{"cart_contains":[317],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Monitor heart health markers alongside cancer screening. Add our **Heart Health Test**.","checkout":{"under_35":"Heart health monitoring complements cancer screening. Add our **Heart Health Test to track cholesterol, triglycerides, and HbA1c** - cardiovascular health affects cancer risk.","35_44":"Cardiovascular health and cancer risk connect. Add our **Heart Health Test to monitor cholesterol and blood sugar** alongside your cancer screening.","45_54":"Heart disease and cancer are leading health concerns. Add our **Heart Health Test to track cholesterol, triglycerides, and HbA1c** alongside Galleri screening.","55_plus":"Complete preventive health includes heart monitoring. Add our **Heart Health Test to check cholesterol and blood sugar** alongside your multi-cancer screening."}}},{"id":"3.3","step":3,"type":"GALLERI_ADD_ON","name":"Galleri + FIT Colon","trigger":{"cart_contains":[317],"age_min":45,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[110],"price_delta":49},"copy":{"cart_sidebar":"Add specific colon screening. **FIT Colon Test** complements Galleri\'s broad screening.","checkout":{"under_35":null,"35_44":null,"45_54":"Colon cancer screening is recommended starting at 45. **FIT Colon Test provides specific colon screening** - complements Galleri\'s broad multi-cancer detection.","5
15_plus":"Add targeted colon screening to your cancer monitoring. **FIT Colon Test provides stool-based colon screening** complementing Galleri\'s blood-based detection."}}},{"id":"4.1","step":4,"type":"TEST_ADD_ON","name":"FSC + Celiac","trigger":{"cart_contains":[65],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[224],"price_delta":119},"copy":{"cart_sidebar":"Severe gluten reactions may be celiac disease, not just sensitivity. Our **Celiac Test checks autoimmune markers**.","checkout":{"under_35":"Gluten reactions can be IgG sensitivity or autoimmune celiac disease. Our **Celiac Screening Test checks for autoimmune markers** - celiac requires strict gluten avoidance, sensitivity doesn\'t.","35_44":"Severe gluten reactions, chronic diarrhea, or unexplained weight loss can signal celiac disease. Our **Celiac Test checks autoimmune markers** - different from IgG testing, different management needed.","45_54":"Bloating, fatigue, and nutrient deficiencies can indicate celiac disease. Our **Celiac Test checks autoimmune response to gluten** - undiagnosed celiac affects bone health and nutrient absorption.","55_plus":"Gluten sensitivity vs celiac disease require different approaches. Our **Celiac Screening Test checks autoimmune markers** - celiac can cause osteoporosis and malabsorption if undiagnosed."}}},{"id":"4.2","step":4,"type":"TEST_ADD_ON","name":"Men\'s Health + Heart Health","trigger":{"cart_contains":[13],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Hormones affect cholesterol and heart disease risk. Monitor both with our **Heart Health Test**.","checkout":{"under_35":"Testosterone affects cholesterol levels and cardiovascular function. Add our **Heart Health Test to monitor lipids, triglycerides, and blood sugar (HbA1c)** alongside hormone testing.","35_44":"Testosterone affects cholesterol levels and cardiovascular function. Add our **Heart Health Test to monitor lipids, triglycerides, and blood sugar (HbA1c)** alongside hormone testing.","45_54":"Hormone changes can affect cholesterol and heart disease risk. Add our **Heart Health Test to track lipids, triglycerides, and HbA1c** - complete cardiovascular and metabolic monitoring.","55_plus":"Heart health and hormones affect each other. Add our **Heart Health Test to monitor cholesterol, triglycerides, and blood sugar** alongside your hormone testing."}}},{"id":"4.3","step":4,"type":"TEST_ADD_ON","name":"Thyroid + FSC","trigger":{"cart_contains":[9],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[65],"price_delta":299},"copy":{"cart_sidebar":"Bloating, weight gain, and fatigue can involve both thyroid and food. **Food Sensitivity Comprehensive tests 204 foods**.","checkout":{"under_35":"Fatigue and weight issues can involve thyroid function AND food sensitivities. **Food Sensitivity Comprehensive tests 204 foods** - inflammation from food affects thyroid hormones.","35_44":"Digestive issues, fatigue, and weight gain often involve thyroid and food working together. **Food Sensitivity Comprehensive tests 204 foods** - food-induced inflammation can disrupt thyroid function.","45_54":"Constipation, weight changes, and low energy can trace to thyroid or inflammatory foods. **Food Sensitivity Comprehensive tests 204 foods** - food reactions affect thyroid and metabolism.","55_plus":"Fatigue, digestive concerns, and inflammation often involve both thyroid and food triggers. **Food Sensitivity Comprehensive tests 204 foods** - comprehensive investigation matters."}}},{"id":"4.4","step":4,"type":"TEST_ADD_ON","name":"Metabolism + FSC","trigger":{"cart_contains":[17],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[65],"price_delta":299},"copy":{"cart_sidebar":"Weight and energy issues often trace to inflammatory foods. **Food Sensitivity Comprehensive tests 204 foods** for hidden triggers.","checkout":{"under_35":"Unexplained weight gain, fatigue, or bloating can involve inflammatory food reactions. **Food Sensitivity Comprehensive tests 204 foods** - hidden triggers affect metabolism, thyroid, and energy.","35_44":"Weight struggles and low energy often trace to foods causing chronic inflammation. **Food Sensitivity Comprehensive tests 204 foods** - inflammation disrupts thyroid, insulin, and cortisol.","45_54":"Stubborn weight, fatigue, and brain fog can involve inflammatory food triggers. **Food Sensitivity Comprehensive tests 204 foods** - reactions affect thyroid, blood sugar, and energy metabolism.","55_plus":"Weight and energy changes often connect to inflammatory foods. **Food Sensitivity Comprehensive tests 204 foods** - food reactions can disrupt metabolic hormones and function."}}},{"id":"4.5","step":4,"type":"TEST_ADD_ON","name":"Vitamin D + FSC","trigger":{"cart_contains":[23],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[65],"price_delta":299},"copy":{"cart_sidebar":"Joint pain, fatigue, and high inflammation often trace to specific foods. **Food Sensitivity Comprehensive tests 204 foods** for triggers.","checkout":{"under_35":"Joint pain, skin issues, or chronic fatigue can involve inflammatory food triggers. **Food Sensitivity Comprehensive tests 204 foods** - identifying and removing triggers helps reduce inflammation.","35_44":"Chronic inflammation, joint pain, or persistent fatigue often trace to specific food reactions. **Food Sensitivity Comprehensive tests 204 foods** - hidden triggers drive ongoing inflammation.","45_54":"High hs-CRP, joint pain, or fatigue can indicate food-related inflammation. **Food Sensitivity Comprehensive tests 204 foods** - inflammatory foods are a common but fixable cause.","55_plus":"Inflammation markers, joint discomfort, and fatigue often connect to dietary triggers. **Food Sensitivity Comprehensive tests 204 foods** - food reactions affect overall inflammation and health."}}},{"id":"4.6","step":4,"type":"TEST_ADD_ON","name":"Heart Health + Women\'s Health","trigger":{"cart_contains":[69],"age_min":18,"age_max":null,"sex_logic":"IF_FEMALE","excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[5],"price_delta":249},"copy":{"cart_sidebar":"Irregular periods, fatigue, and heart health all connect to hormones. **Women\'s Health Test checks 11 biomarkers**.","checkout":{"under_35":"Cycle irregularities, mood changes, and cardiovascular health all involve reproductive and thyroid hormones. **Women\'s Health Test checks 11 biomarkers** including estradiol, progesterone, cortisol, and thyroid markers.","35_44":"Perimenopause changes affect mood, cycles, and heart health. **Women\'s Health Test monitors 11 hormones** - estrogen, progesterone, thyroid, and cortisol all affect cardiovascular function.","45_54":"Hormone shifts affect heart health, weight, and energy. **Women\'s Health Test checks 11 biomarkers** - estrogen changes impact cholesterol, blood pressure, and metabolic health.","5
15_plus":"Post-menopause hormone changes affect heart disease risk. **Women\'s Health Test monitors 11 hormone biomarkers** - estrogen, thyroid, and cortisol all influence cardiovascular health."}}},{"id":"4.7","step":4,"type":"TEST_ADD_ON","name":"Heart Health + Men\'s Health","trigger":{"cart_contains":[69],"age_min":18,"age_max":null,"sex_logic":"IF_MALE","excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[13],"price_delta":249},"copy":{"cart_sidebar":"Hormones affect heart health. **Men\'s Health Test monitors 4 key hormones**.","checkout":{"under_35":"Low energy, high cholesterol, or weight gain can involve testosterone, cortisol, or DHEA. **Men\'s Health Test checks all 4 hormones** affecting heart health and metabolism.","35_44":"Low energy, high cholesterol, or weight gain can involve testosterone, cortisol, or DHEA. **Men\'s Health Test checks all 4 hormones** affecting heart health and metabolism.","45_54":"Fatigue, cholesterol changes, or decreased muscle mass often trace to hormone shifts. **Men\'s Health Test monitors 4 hormones** - testosterone, cortisol, DHEA, and estradiol all affect heart function.","55_plus":"Energy, cholesterol, and heart health all involve hormones. **Men\'s Health Test checks 4 key hormones** affecting cardiovascular and metabolic function."}}},{"id":"4.8","step":4,"type":"TEST_ADD_ON","name":"HbA1c/Cholesterol + Women\'s Health","trigger":{"cart_contains":[66,67],"age_min":18,"age_max":null,"sex_logic":"IF_FEMALE","excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[5],"price_delta":249},"copy":{"cart_sidebar":"Weight changes, fatigue, and irregular cycles often involve hormones. **Women\'s Health Test checks 11 biomarkers**.","checkout":{"under_35":"Weight gain, fatigue, or irregular periods can involve hormone changes affecting metabolism. **Women\'s Health Test checks 11 biomarkers** including thyroid, cortisol, estrogen, and progesterone.","35_44":"Weight gain, fatigue, or irregular periods can involve hormone changes affecting metabolism. **Women\'s Health Test checks 11 biomarkers** including thyroid, cortisol, estrogen, and progesterone.","45_54":"Perimenopause changes affect weight, cholesterol, and blood sugar. **Women\'s Health Test monitors 11 hormones** - estrogen, thyroid, and cortisol all influence metabolic function.","55_plus":"Post-menopause hormone shifts affect weight, cholesterol, and energy. **Women\'s Health Test checks 11 hormone biomarkers** affecting metabolic and cardiovascular health."}}},{"id":"4.9","step":4,"type":"TEST_ADD_ON","name":"HbA1c/Cholesterol + Men\'s Health","trigger":{"cart_contains":[66,67],"age_min":18,"age_max":null,"sex_logic":"IF_MALE","excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[13],"price_delta":249},"copy":{"cart_sidebar":"Low energy, weight gain, and cholesterol issues often involve hormones. **Men\'s Health Test checks 4 key hormones**.","checkout":{"under_35":"Fatigue, weight changes, or cholesterol issues can involve testosterone, cortisol, or DHEA imbalances. **Men\'s Health Test checks all 4 hormones** affecting metabolism and energy.","35_44":"Fatigue, weight changes, or cholesterol issues can involve testosterone, cortisol, or DHEA imbalances. **Men\'s Health Test checks all 4 hormones** affecting metabolism and energy.","45_54":"Weight gain, low energy, or metabolic changes often trace to hormone shifts. **Men\'s Health Test monitors 4 hormones** - testosterone, cortisol, DHEA, and estradiol all affect metabolism.","55_plus":"Energy, weight, and metabolic health all involve hormones. **Men\'s Health Test checks 4 key hormones** - testosterone, cortisol, DHEA, and estradiol affecting metabolic function."}}},{"id":"4.10","step":4,"type":"COMBINATION_RULE","name":"Women\'s Health → 360 Female SWAP","trigger":{"cart_contains":[5],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["AK","AZ","HI","NJ","NY","RI"],"trigger_logic":"AND"},"action":{"type":"REPLACE","remove_products":[5],"add_products":[353],"price_delta":150},"copy":{"cart_sidebar":"Expand beyond hormones to comprehensive health monitoring. **Everlywell 360 Female Panel tracks 86 biomarkers** including all your hormones plus heart, metabolism, and inflammation.","checkout":{"under_35":"Upgrade to comprehensive health monitoring. **Everlywell 360 Female Panel tracks 86 biomarkers** - includes all 10 hormones from Women\'s Health plus cardiovascular, metabolic, immune markers, and care plan support.","35_44":"Upgrade hormone testing to full-body monitoring. **Everlywell 360 Female Panel tests 86 biomarkers** including all reproductive hormones from your current test plus cardiovascular, metabolic, and immune markers.","45_54":"Perimenopause affects more than hormones - upgrade for complete insights. **Everlywell 360 Female Panel tracks 86 biomarkers** including all your hormone tests plus heart, metabolism, and inflammation with care plan.","55_plus":"Upgrade to comprehensive health monitoring. **Everlywell 360 Female Panel tests 86 biomarkers** - includes all hormones from Women\'s Health plus complete heart, metabolic, and wellness markers with care plan."}}},{"id":"4.11","step":4,"type":"COMBINATION_RULE","name":"Men\'s Health → 360 Male SWAP","trigger":{"cart_contains":[13],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["AK","AZ","HI","NJ","NY","RI"],"trigger_logic":"AND"},"action":{"type":"REPLACE","remove_products":[13],"add_products":[352],"price_delta":150},"copy":{"cart_sidebar":"Expand beyond hormones to comprehensive health monitoring. **Everlywell 360 Male Panel tracks 86 biomarkers** including all your hormones plus heart, metabolism, and inflammation.","checkout":{"under_35":"Upgrade to comprehensive health monitoring. **Everlywell 360 Male Panel tracks 86 biomarkers** - includes all 4 hormones from Men\'s Health plus cardiovascular, metabolic, immune markers, and care plan support.","35_44":"Upgrade hormone testing to full-body monitoring. **Everlywell 360 Male Panel tests 86 biomarkers** including testosterone, cortisol, DHEA, estradiol plus cardiovascular, metabolic, and immune markers.","45_54":"Hormone changes affect overall health - upgrade for complete insights. **Everlywell 360 Male Panel tracks 86 biomarkers** including all your hormone tests plus heart, metabolism, and inflammation with care plan.","55_plus":"Upgrade to comprehensive health monitoring. **Everlywell 360 Male Panel tests 86 biomarkers** - includes all hormones from Men\'s Health plus complete cardiovascular, metabolic, and wellness markers with care plan."}}},{"id":"4.12","step":4,"type":"COMBINATION_RULE","name":"Women\'s Health + FSC → Heart Health","trigger":{"cart_contains":[5,65],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"AND"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Hormones and digestive health both affect cardiovascular function. **Heart Health Test checks cholesterol and blood sugar** for complete wellness monitoring.","checkout":{"under_35":"Hormone balance and digestive health both affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive heart and metabolic 
1screening.","35_44":"Hormones and diet affect heart health. **Heart Health Test checks cholesterol and blood sugar** - complete your wellness picture with cardiovascular screening.","45_54":"Perimenopause, digestive health, and cardiovascular function are connected. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive assessment.","55_plus":"Hormones, digestion, and heart health all affect overall wellness. **Heart Health Test checks cholesterol and blood sugar** for complete health monitoring."}}},{"id":"4.13","step":4,"type":"COMBINATION_RULE","name":"Women\'s Health + Food Sensitivity → Heart Health","trigger":{"cart_contains":[5,55],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"AND"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Hormones and food sensitivities both affect cardiovascular health. **Heart Health Test checks cholesterol and blood sugar** for complete monitoring.","checkout":{"under_35":"Hormone balance and food reactions both affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive wellness assessment.","35_44":"Hormones and inflammatory foods affect heart health. **Heart Health Test checks cholesterol and blood sugar** - complete your health picture with cardiovascular screening.","45_54":"Hormone changes and food sensitivities both affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for complete assessment.","55_plus":"Hormones, food reactions, and heart health are interconnected. **Heart Health Test checks cholesterol and blood sugar** for comprehensive wellness monitoring."}}},{"id":"4.14","step":4,"type":"COMBINATION_RULE","name":"Metabolism + Food Sensitivity → Heart Health","trigger":{"cart_contains":[17,55],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"AND"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Metabolism and diet both affect cardiovascular health. **Heart Health Test checks cholesterol and blood sugar** for complete wellness monitoring.","checkout":{"under_35":"Metabolic hormones and food reactions both affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive heart and metabolic screening.","35_44":"Metabolism and diet affect heart health. **Heart Health Test checks cholesterol and blood sugar** - complete your wellness picture with cardiovascular screening.","45_54":"Metabolic health and food sensitivities both affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive assessment.","55_plus":"Metabolism, diet, and heart health work together. **Heart Health Test checks cholesterol and blood sugar** for complete wellness monitoring."}}},{"id":"4.15","step":4,"type":"COMBINATION_RULE","name":"Thyroid + Food Sensitivity → Heart Health","trigger":{"cart_contains":[9,55],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"AND"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Thyroid and digestive health both affect cardiovascular function. **Heart Health Test checks cholesterol and blood sugar** for complete wellness monitoring.","checkout":{"under_35":"Thyroid function and food reactions both affect cardiovascular health. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive screening.","35_44":"Metabolism and digestive health affect heart function. **Heart Health Test checks cholesterol and blood sugar** - complete your wellness assessment with cardiovascular screening.","45_54":"Thyroid, digestive issues, and cardiovascular health are interconnected. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for complete assessment.","55_plus":"Thyroid function, food sensitivities, and heart health all affect overall wellness. **Heart Health Test checks cholesterol and blood sugar** for comprehensive monitoring."}}},{"id":"4.16","step":4,"type":"COMBINATION_RULE","name":"Thyroid + Metabol
1ism → Heart Health","trigger":{"cart_contains":[9,17],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"AND"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Thyroid and metabolism both affect cardiovascular health. **Heart Health Test checks cholesterol and blood sugar** for complete wellness assessment.","checkout":{"under_35":"Metabolic hormones affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** - complete wellness screening with thyroid and metabolism.","35_44":"Thyroid and metabolism affect heart health. **Heart Health Test checks cholesterol and blood sugar** for comprehensive cardiovascular and metabolic assessment.","45_54":"Metabolic health and cardiovascular function are closely connected. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** alongside thyroid and metabolism testing.","55_plus":"Thyroid, metabolism, and heart health work together. **Heart Health Test checks cholesterol and blood sugar** for complete wellness monitoring."}}},{"id":"4.17","step":4,"type":"COMBINATION_RULE","name":"Men\'s Health + FSC → Heart Health","trigger":{"cart_contains":[13,65],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"AND"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Hormones and digestive health both affect cardiovascular function. **Heart Health Test checks cholesterol and blood sugar** for complete wellness monitoring.","checkout":{"under_35":"Testosterone and digestive health both affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive heart and metabolic screening.","35_44":"Hormones and diet affect heart health. **Heart Health Test checks cholesterol and blood sugar** - complete your wellness picture with cardiovascular screening.","45_54":"Hormone changes and digestive health both affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive assessment.","55_plus":"Hormones, digestion, and heart health all affect overall wellness. **Heart Health Test checks cholesterol and blood sugar** for complete health monitoring."}}},{"id":"4.18","step":4,"type":"COMBINATION_RULE","name":"Men\'s Health + Food Sensitivity → Heart Health","trigger":{"cart_contains":[13,55],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"AND"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Hormones and food sensitivities both affect cardiovascular health. **Heart Health Test checks cholesterol and blood sugar** for complete monitoring.","checkout":{"under_35":"Testosterone and food reactions both affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive wellness assessment.","35_44":"Hormones and inflammatory foods affect heart health. **Heart Health Test checks cholesterol and blood sugar** - complete your health picture with cardiovascular screening.","45_54":"Hormone changes and food sensitivities both affect cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for complete assessment.","55_plus":"Hormones, food reactions, and heart health are interconnected. **Heart Health Test checks cholesterol and blood sugar** for comprehensive wellness monitoring."}}},{"id":"4.19","step":4,"type":"COMBINATION_RULE","name":"Thyroid + FSC → Women\'s Health","trigger":{"cart_contains":[9,65],"age_min":18,"age_max":null,"sex_logic":"IF_FEMALE","excluded_states":["NY"],"trigger_logic":"AND"},"action":{"type":"ADD","add_products":[5],"price_delta":249},"copy":{"cart_sidebar":"Thyroid and digestive issues often involve broader hormone imbalances. **Women\'s Health Test checks 11 biomarkers** including reproductive hormones and cortisol.","checkout":{"under_35":"Thyroid and digestive problems frequently connect to reproductive hormones. **Women\'s Health Test checks 11 biomarkers** - estrogen, progesterone, testosterone, and cortisol all affect thyroid and gut health.","35_44":"Food sensitivities and thyroid issues often trace to hormone imbalances. **Women\'s Health Test monitors 11 hormones** including estrogen, progesterone, and cortisol affecting both systems.","45_54":"Perimenopause affects thyroid, digestion, and hormones together. **Women\'s Health Test checks 11 biomarkers** - comprehensive hormone panel for complete assessment.","55_plus":"Thyroid, digestion, and hormone balance are interconnected. **Women\'s Health Test monitors 11 hormone biomarkers** affecting overall wellness and symptom patterns."}}},{"id":"4.20","step":4,"type":"COMBINATION_RULE","name":"Thyroid + Food Sensitivity → Women\'s Health","trigger":{"cart_contains":[9,55],"age_min":18,"age_max":null,"sex_logic":"IF_FEMALE","excluded_states":["NY"],"trigger_logic":"AND"},"action":{"type":"ADD","add_products":[5],"price_delta":249},"copy":{"cart_sidebar":"Thyroid and food reactions often involve reproductive hormones too. **Women\'s Health Test checks 11 biomarkers** for comprehensive assessment.","checkout":{"under_35":"Food sensitivities and thyroid issues frequently trace to broader hormone imbalances. **Women\'s Health Test checks 11 biomarkers** including estrogen, progesterone, and cortisol.","35_44":"Digestive and thyroid symptoms often involve reproductive hormones. **Women\'s Health Test monitors 11 hormones** - comprehensive panel for complete health picture.","45_54":"Food reactions, thyroid, and hormone changes are interconnected. **Women\'s Health Test checks 11 biomarkers** including reproductive hormones affecting all systems.","55_plus":"Thyroid, food sensitivities, and hormones work together. **Women\'s Health Test monitors 11 hormone biomarkers** for comprehensive wellness asse
1ssment."}}},{"id":"5.1","step":5,"type":"DEFAULT_FALLBACK","name":"Default → Everlywell 360","trigger":{"cart_contains":[],"age_min":18,"age_max":null,"sex_logic":"SELECT_360_PANEL","excluded_states":["AK","AZ","HI","NJ","NY","RI"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":"352_if_male_OR_353_if_female","price_delta":399},"copy":{"cart_sidebar":null,"checkout":{"under_35":"Comprehensive health monitoring helps you understand your body. **Everlywell 360 yearly panel tests 86 biomarkers** including hormones, heart health, metabolism, and inflammation. Includes care plan and your unique WellScore.","35_44":"Track your health over time with our yearly membership. **Everlywell 360 tests 86 biomarkers** including hormones, thyroid, cholesterol, and inflammation. Includes care plan support and your unique WellScore.","45_54":"Preventive health monitoring becomes more valuable with age. **Everlywell 360 yearly panel tests 86 biomarkers** covering heart health, hormones, metabolism, and inflammation. Includes care plan and WellScore.","55_plus":"Comprehensive health monitoring is recommended for ages 50+. **Everlywell 360 yearly panel tests 86 biomarkers** including heart health, cancer markers, and metabolic function. Includes care plan and WellScore."}}},{"id":"5.3","step":5,"type":"CART_INFERENCE_FALLBACK","name":"Hormone Tests → Heart Health","trigger":{"cart_contains":[153,13,5,17],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Hormones affect heart health. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** alongside your hormone testing.","checkout":{"under_35":"Hormone balance affects cardiovascular function. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** - complete heart and metabolic screening alongside hormone testing.","35_44":"Hormones and heart health are connected. **Heart Health Test checks cholesterol, triglycerides, and HbA1c** for comprehensive cardiovascular monitoring with your hormone test.","45_54":"Hormonal changes affect heart disease risk. **Heart Health Test monitors cholesterol and blood sugar** - essential cardiovascular screening alongside hormone testing.","55_plus":"Heart health monitoring complements hormone testing. **Heart Health Test checks cholesterol, triglycerides, and HbA1c** for complete cardiovascular and metabolic assessment."}}},{"id":"5.4","step":5,"type":"CART_INFERENCE_FALLBACK","name":"Heart/Metabolic Tests → Thyroid","trigger":{"cart_contains":[66,67,69],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[9],"price_delta":149},"copy":{"cart_sidebar":"Weight and energy often connect to thyroid function. **Thyroid Test checks 4 biomarkers** including TSH, T3, T4, and TPO antibodies.","checkout":{"under_35":"Thyroid affects metabolism and heart health. **Thyroid Test checks 4 biomarkers** - TSH, T3, T4, and TPO antibodies for comprehensive thyroid function assessment.","35_44":"Energy, weight, and metabolism depend on thyroid function. **Thyroid Test measures 4 biomarkers** including TSH, T3, T4, and TPO antibodies.","45_54":"Thyroid function affects metabolic health. **Thyroid Test checks 4 biomarkers** - TSH, T3, T4, and TPO for complete thyroid assessment.","55_plus":"Thyroid affects metabolism, energy, and heart health. **Thyroid Test measures 4 biomarkers** - comprehensive thyroid function screening."}}},{"id":"5.5","step":5,"type":"CART_INFERENCE_FALLBACK","name":"Wellness Tests → Heart Health","trigger":{"cart_contains":[9,23,55],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Cardiovascular health completes your wellness picture. **Heart Health Test checks cholesterol and blood sugar** for comprehensive monitoring.","checkout":{"under_35":"Complete wellness includes cardiovascular health. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for comprehensive heart and metabolic 
1screening.","35_44":"Cardiovascular screening completes your wellness picture. **Heart Health Test checks cholesterol and blood sugar** - essential for comprehensive health monitoring.","45_54":"Heart health is essential for overall wellness. **Heart Health Test monitors cholesterol, triglycerides, and HbA1c** for complete cardiovascular assessment.","55_plus":"Comprehensive wellness includes heart monitoring. **Heart Health Test checks cholesterol and blood sugar** - cardiovascular screening for complete health picture."}}},{"id":"5.6","step":5,"type":"CART_INFERENCE_FALLBACK","name":"Any Test → Vitamin D + Inflammation","trigger":{"cart_contains":"ANY_TEST_PRODUCT","age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[23],"price_delta":99},"copy":{"cart_sidebar":"Inflammation and vitamin D levels affect overall health. **Vitamin D & Inflammation Test** measures deficiency risk and chronic inflammation markers.","checkout":{"under_35":"Vitamin D and inflammation affect overall health. **Vitamin D & Inflammation Test measures deficiency risk and hs-CRP** - key markers for immunity and chronic disease prevention.","35_44":"Inflammation and nutrient status impact health outcomes. **Vitamin D & Inflammation Test checks vitamin D and hs-CRP** for comprehensive wellness monitoring.","45_54":"Vitamin D and inflammation are key health markers. **Vitamin D & Inflammation Test measures deficiency and chronic inflammation** - both affect disease risk and aging.","55_plus":"Inflammation and vitamin D affect bone health and immunity. **Vitamin D & Inflammation Test checks both markers** - essential for overall health and disease prevention."}}},{"id":"5.7","step":5,"type":"UNIVERSAL_TEST_FALLBACK","name":"Universal → Heart Health","trigger":{"cart_contains":[],"age_min":18,"age_max":null,"sex_logic":null,"excluded_states":["NY"],"trigger_logic":"OR"},"action":{"type":"ADD","add_products":[69],"price_delta":99},"copy":{"cart_sidebar":"Cardiovascular health matters at every age. **Heart Health Test checks cholesterol, triglycerides, and HbA1c** for comprehensive screening.","checkout":{"under_35":"Cardiovascular health monitoring is essential. **Heart Health Test checks cholesterol, triglycerides, and HbA1c** - establish your baseline for heart and metabolic health.","35_44":"Heart health screening is recommended at 35+. **Heart Health Test monitors cholesterol and blood sugar** - essential cardiovascular and diabetes screening.","45_54":"Cardiovascular monitoring becomes more important with age. **Heart Health Test checks cholesterol, triglycerides, and HbA1c** - comprehensive heart and metabolic assessment.","55_plus":"Heart disease prevention starts with screening. **Heart Health Test monitors cholesterol and blood sugar** - essential cardiovascular health assessment."}}}],"note":"v3: Removes multivitamin fallback, converts 360 upgrades to REPLACE (90% biomarker overlap), adds 3 data-driven combination rules based on co-purchase patterns. Total 34 recommendations optimized for AOV and acceptance.","implementation_notes":{"highlighting":{"format":"Text between **markers** should be highlighted in UI","example":"Our **Men\'s Health Test checks all 4** → highlight \'Men\'s Health Test checks all 4\'"},"age_brackets":{"under_35":"< 35","35_44":"35-44","45_54":"45-54","55_plus":"55+"},"sex_logic_values":{"SELECT_360_PANEL":"Use customer sex to determine: Male → 352, Female → 353","IF_FEMALE":"Only show if customer sex === Female","IF_MALE":"Only show if customer sex === Male","null":"No sex requirement"},"cart_contains_logic":{"OR":"If ANY product in array is in cart, trigger applies","AND":"ALL products in array must be in cart to trigger","implementation":"Check trigger_logic field on each rule. If missing, default to OR for backward compatibility","example_OR":"Rule with cart_contains: [66, 67] and trigger_logic: OR matches if cart has 66 OR 67","example_AND":"Rule with cart_contains: [5, 65] and trigger_logic: AND matches ONLY if cart has BOTH 5 AND 65"},"priority":"Process recommendations in step order (1, 2, 3, 4, 5). Stop at first match."}}');const d=!1,u=e=>e<35?"under_35":e<=44?"35_44":e<=54?"45_54":"55_plus",m=(e,t,a)=>null==e?null===t&&null===a:!(null!==t&&e<t)&&!(null!==a&&e>a),h=(e,t)=>null===t||null!=e&&("IF_MALE"===t?"male"===e:"IF_FEMALE"!==t||"female"===e),p=(e,t)=>!(!e||0===t.length)&&t.includes(e.toUpperCase()),g=(e,t)=>{if("string"==typeof e){if(e.includes("_if_male_OR_")||e.includes("SELECT_360_PANEL"))return"male"===t?[352]:"female"===t?[353]:[];const a=parseInt(e,10);return isNaN(a)?[]:[a]}return Array.isArray(e)?e:[]},f=(e={})=>{const{order:t}=(0,o._$)(),a=(0,s.A)(),d=(0,i.LE)("sidebar-cart-upsell-v-1"),{customerAge:f,customerSex:_,customerState:y,preferCartSidebar:b=!1,freezeRule:E=!1}=e,k="variant"===d?c:l;(0,r.useEffect)((()=>{var e,a,o,n;if("undefined"==typeof localStorage||null==t||!t.id)return;const r=v(),i=t.id;null!==(null===(e=r.checkout)||void 0===e?void 0:e.orderId)&&void 0!==(null===(a=r.checkout)||void 0===a?void 0:a.orderId)&&r.checkout.orderId!==i&&T("checkout"),null!==(null===(o=r.cart)||void 0===o?void 0:o.orderId)&&void 0!==(null===(n=r.cart)||void 0===n?void 0:n.orderId)&&r.cart.orderId!==i&&T("cart-sidebar")}),[null==t?void 0:t.id]);const H=(0,r.useRef)(null),x=(0,r.useCallback)(((e,o)=>{let n=0,r=0;for(const t of e){const e=Number(t),o=a[e]||a[String(e)];if(null!=o&&o.price){n+=parseFloat(o.price)}}if(o&&o.length>0&&null!=t&&t.line_items)for(const a of o){const e=Number(a),o=t.line_items.find((t=>Number(t.product_id)===e));if(null!=o&&o.base_price){r+=parseFloat(o.base_price)}}const i=n-r;return Math.round(100*i)/100}),[a,null==t?void 0:t.line_items]),A=(0,r.useMemo)((()=>
1{if(null==t||!t.line_items||0===t.line_items.length)return"";const e=t.line_items.map((e=>{const t=void 0!==e.product_id?Number(e.product_id):null,a=e.quantity||0;return null!==t?{productId:t,quantity:a}:null})).filter((e=>null!==e)).sort(((e,t)=>e.productId-t.productId));return JSON.stringify(e)}),[null==t?void 0:t.line_items]),I=(0,r.useMemo)((()=>{if(null==t||!t.line_items||0===t.line_items.length)return{shouldShow:!1,isUpsellInCart:!1};if((0,n.s9)(t))return{shouldShow:!1,isUpsellInCart:!1};const e=t.line_items,a=e.map((e=>void 0!==e.product_id?Number(e.product_id):null)).filter((e=>null!==e)),o=[...k.recommendations].sort(((e,t)=>Number(e.step)-Number(t.step))),r=(e,t,a)=>{const{action:o}=e,n=b&&!_?null:_,r=g(o.add_products,n),i=x(r,o.remove_products),s=a||(e=>{if(b||null==f||null==_)return e.copy.cart_sidebar;const t=u(f);return e.copy.checkout[t]||e.copy.cart_sidebar})(e),l={initialMessage:b?"Here's something to consider":"Something to consider",expandedMessage:(c=s,c.replace(/\*\*(.*?)\*\*/g,"$1")),expandedMessageWithMarkdown:s,acceptedMessage:"Great choice! I've updated your cart.",declinedMessage:"No problem! We'll skip this one.",buttonText:"REPLACE"===o.type?`Swap for $${i} more*`:`Add for $${i} more*`,priceDifferenceText:`$${i} more*`,disclaimerText:"* Price does not include taxes and fees"};var c;return{id:e.id,step:e.step,type:e.type,name:e.name,action:{type:o.type,removeProducts:o.remove_products,addProducts:r,priceDelta:i},copy:l,triggerLineItem:t}},i=()=>{const t=[];for(const n of o){const{trigger:o,action:r}=n,i=Number(n.step);if("AND"!==o.trigger_logic)continue;if("string"==typeof o.cart_contains||!Array.isArray(o.cart_contains)||o.cart_contains.length<2)continue;if(!o.cart_contains.every((e=>{const t=Number(e);return a.includes(t)})))continue;if(b){if("IF_MALE"===o.sex_logic||"IF_FEMALE"===o.sex_logic)continue}else{if(!m(f,o.age_min,o.age_max))continue;if(!h(_,o.sex_logic))continue}if(p(y,o.excluded_states))continue;const s=b&&!_?null:_,l=g(r.add_products,s);if(b){if(l.length>0){if(l.some((e=>a.includes(e))))continue}}else{if(0===l.length&&void 0!==r.add_products)continue;if(l.some((e=>a.includes(e))))continue}const c=o.cart_contains,d=e.find((e=>{if(void 0===e.product_id)return!1;const t=Number(e.product_id);return c.some((e=>{const a=Number(e);return t===a}))}));d&&t.push({recommendation:n,triggerLineItem:d,step:i})}return t},s=[],l={};a.forEach((e=>{l[e]=[]}));for(const t of o){const{trigger:o,action:n}=t,r=Number(t.step),i=o.cart_contains;let c;if("string"==typeof i){if("ANY_TEST_PRODUCT"!==i)continue;c=a.length>0}else{const e=[];Array.isArray(i)&&i.forEach((o=>{const n=Number(o);a.includes(n)&&(e.push(n),l[n]&&l[n].push(t.id))}));const n=o.trigger_logic||"OR";c=0===i.length||("AND"===n?i.every((e=>{const t=Number(e);return a.includes(t)})):i.some((e=>{const t=Number(e);return a.includes(t)})))}if(!c)continue;if(b){if("IF_MALE"===o.sex_logic||"IF_FEMALE"===o.sex_logic)continue}else{if(!m(f,o.age_min,o.age_max))continue;if(!h(_,o.sex_logic))continue}if(p(y,o.excluded_states))continue;const d=b&&!_?null:_,u=g(n.add_products,d);if(b){if(u.length>0){if(u.some((e=>a.includes(e))))continue}}else{if(0===u.length&&void 0!==n.add_products)continue;if(u.some((e=>a.includes(e))))continue}const v=e.find((e=>{if(void 0===e.product_id)return!1;const t=Number(e.product_id);return"string"==typeof o.cart_contains||!!Array.isArray(o.cart_contains)&&o.cart_contains.some((e=>{const a=Number(e);return t===a}))}));v&&s.push({recommendation:t,triggerLineItem:v,step:Number(r)})}const c=a.length>=2;let d=!0;if("undefined"!=typeof localStorage){const e=v(),t=b?e.cart:e.checkout;d=!t||"accepted"!==t.status}if(c&&d){const e=i();if(e.length>0){e.sort(((e,t)=>Number(e.step)-Number(t.step)));const t=e[0],{recommendation:a,triggerLineItem:o}=t;return{shouldShow:!0,rule:r(a,o),isUpsellInCart:!1}}}if(s.length>0){s.sort(((e,t)=>Number(e.step)-Number(t.step)));const e=s[0],{recommendation:t,triggerLineItem:a}=e;return{shouldShow:!0,rule:r(t,a),isUpsellInCart:!1}}if(0===s.length){const t=a.length>=2;let n=!0;if("undefined"!=typeof localStorage){const e=v(),t=b?e.cart:e.checkout;n=!t||"accepted"!==t.status}if(t&&n){const e=i();if(e.length>0){e.sort(((e,t)=>Number(e.step)-Number(t.step)));const t=e[0],{recommendation:a,triggerLineItem:o}=t;return{shouldShow:!0,rule:r(a,o),isUpsellInCart:!1}}}const s=o.find((e=>"DEFAULT_FALLBACK"===e.type&&"5.1"===e.id)),l=o.find((e=>"DEFAULT_FALLBACK"===e.type&&"5.2"===e.id)),c=t=>{if(!t)return null;const{trigger:o,action:n}=t;if("5.1"===t.id&&b)return null;if(!("5.2"===t.id&&b||m(f,o.age_min,o.age_max)))return null;if("SELECT_360_PANEL"===o.sex_logic){if(!_||"male"!==_&&"female"!==_)return null}else if(!h(_,o.sex_logic))return null;if(p(y,o.excluded_states))return null;const i=g(n.add_products,_);if(0===i.length&&void 0!==n.add_products)return null;if(i.some((e=>a.includes(e))))return null;const s=e[0];if(!s)return null;const l=(e=>{if(b)return e.copy.cart_sidebar||e.copy.checkout.under_35||e.copy.checkout["35_44"]||e.copy.checkout["45_54"]||e.copy.checkout["55_plus"]||"";if(null==f||null==_)return e.copy.checkout.under_35||e.copy.checkout["35_44"]||e.copy.checkout["45_54"]||e.copy.checkout["55_plus"]||"";{const t=u(f);return e.copy.checkout[t]||e.copy.checkout.under_35||e.copy.checkout["35_44"]||e.copy.checkout["45_54"]||e.copy.checkout["55_plus"]||""}})(t);return{shouldShow:!0,rule:r(t,s,l),isUpsellInCart:!1}};if(!b){const e=c(s);if(e)return e}const d=c(l);if(d)return d}return{shouldShow:!1,isUpsellInCart:!1}}),[null==t?void 0:t.line_items,f,_,y,b,k,x]);(0,r.useEffect)((()=>{E&&I.shouldShow&&I.rule?H.current=I:E||(H.current=null)}),[E,I,A]);return E&&H.current?H.current:I},_="upsell",y=e=>{if(!e)return!1;try{if(e.expirationTime){const t=new Date(e.expirationTime).getTime();return(new Date).getTime()>t}return!0}catch(t){return!0}},v=()=>{if("undefined"==typeof localStorage)return{checkout:null,cart:null};try{var e,t,a,o,n;let r=localStorage.getItem(_),i=r?JSON.parse(r):null;if(!i){const e=localStorage.getItem("acceptedUpsell");e&&(i=JSON.parse(e))}if(!i)return{checkout:null,cart:null};if(null!==(e=i)&&void 0!==e&&e.source){const e={ruleId:i.ruleId,ruleName:i.ruleName,ruleType:i.ruleType,acceptedMessage:i.acceptedMessage,actionType:i.actionType,removedLineItems:i.removedLineItems||[],addedVariantIds:i.addedVariantIds||[],addedProductIds:i.addedProductIds||[],removedProductIds:i.removedProductIds,priceDelta:i.priceDelta,expirationTime:i.expirationTime||"",status:"accepted",orderId:i.orderId||null},t={checkout:"checkout"===i.source?e:null,cart:"cart-sidebar"===i.source?e:null};return localStorage.setItem(_,JSON.stringify(t)),localStorage.removeItem("acceptedUpsell"),t}let s={checkout:null!==(t=i)&&void 0!==t&&t.checkout?{...i.checkout,status:i.checkout.status||"accepted",orderId:null!==(a=i.checkout.orderId)&&void 0!==a?a:null,expirationTime:i.checkout.expirationTime}:null,cart:null!==(o=i)&&void 0!==o&&o.cart?{...i.cart,status:i.cart.status||"accepted",orderId:null!==(n=i.cart.orderId)&&void 0!==n?n:null,expirationTime:i.cart.expirationTime}:null},l=!1;return y(s.checkout)&&(s.checkout=null,l=!0),y(s.cart)&&(s.cart=null,l=!0),l&&(s.checkout||s.cart?localStorage.setItem(_,JSON.stringify(s)):(localStorage.removeItem(_),localStorage.removeItem("acceptedUpsell"))),s}catch(r){return{checkout:null,cart:null}}},b=(e,t,a,o)=>
1{if("undefined"!=typeof localStorage&&o)try{const n=v(),r=new Date(Date.now()+6e5).toISOString(),i={ruleId:e.rule.id,ruleName:e.rule.name,ruleType:e.rule.type,acceptedMessage:e.acceptedMessage,actionType:e.rule.action.type,removedLineItems:e.removedLineItems,addedVariantIds:e.addedVariantIds,addedProductIds:e.rule.action.addProducts,removedProductIds:e.rule.action.removeProducts,priceDelta:e.rule.action.priceDelta,expirationTime:r,status:a,orderId:o},s="checkout"===t?"checkout":"cart",l={...n,[s]:i};localStorage.setItem(_,JSON.stringify(l))}catch(n){}},T=e=>{if("undefined"!=typeof localStorage)try{if(!e)return localStorage.removeItem(_),void localStorage.removeItem("acceptedUpsell");const t=v(),a="checkout"===e?"checkout":"cart",o={...t,[a]:null};o.checkout||o.cart?localStorage.setItem(_,JSON.stringify(o)):(localStorage.removeItem(_),localStorage.removeItem("acceptedUpsell"))}catch(t){}},E=()=>{if(!d)return!1;return null!==v().checkout},k=(e="checkout")=>{if("checkout"===e&&!d)return null;const t=v(),a="checkout"===e?t.checkout:t.cart;return a?{ruleId:a.ruleId,acceptedMessage:a.acceptedMessage,removedLineItems:a.removedLineItems||[],addedVariantIds:a.addedVariantIds||[],status:a.status}:null},H=()=>null!==v().cart},26296:function(e,t,a){a.d(t,{U:function(){return o}});const o=e=>{const t=/\*\*(.*?)\*\*/g,a=[];let o,n=0;for(;null!==(o=t.exec(e));)o.index>n&&a.push({text:e.substring(n,o.index),isHighlight:!1}),a.push({text:o[1],isHighlight:!0}),n=o.index+o[0].length;return n<e.length&&a.push({text:e.substring(n),isHighlight:!1}),0===a.length&&a.push({text:e,isHighlight:!1}),a}},10368:function(e,t,a){a.d(t,{_M:function(){return u},A7:function(){return h}});var o=a(96540),n=a(72473),r=a(11616),i=a(47654),s=a(55128);const l=a(99035).default.div.withConfig({displayName:"styles__Wrapper",componentId:"sc-vrnbap-0"})(["position:fixed;z-index:11;top:57px;left:0;right:0;margin:","px;","{width:65%;margin:","px auto;}","{width:35%;margin:","px auto;}"],n.Ej.md,n.HP.forTabletVerticalUp,n.Ej.md,n.HP.forTabletHorizontalUp,n.Ej.md),c=e=>{var t;return e.mixpanelLabel?e.mixpanelLabel:null!==(t=e.details)&&void 0!==t?t:e.message};var d=function(e){var t,a,d;const{notification:m,clearNotification:h}=e,p=null!==(t=null==m?void 0:m.type)&&void 0!==t?t:n.Ck.SUCCESS,g=null!==(a=null==m?void 0:m.persist)&&void 0!==a&&a;(0,o.useEffect)((()=>{m&&r.Ay.track({event:i.r.EVENTS.NOTIFICATION,data:{label:c(m),type:m.type,category:i.r.CATEGORIES.NOTIFICATION,component:m.source}})}),[]);const f=null!==(d=null==m?void 0:m.message)&&void 0!==d?d:"",_=null==m?void 0:m.details;return m?o.createElement(l,{"data-testid":m.type===n.Ck.SUCCESS?s.Y8.INFO_NOTIFICATION:s.Y8.ERROR_NOTIFICATION},o.createElement(n.y8,{type:p,content:f,subtext:_,handleClose:()=>{h&&(r.Ay.track({event:i.r.EVENTS.CLEAR_NOTIFICATION,data:{label:i.r.LABELS.NOTIFICATION,type:p,category:i.r.CATEGORIES.NOTIFICATION,component:i.r.CATEGORIES.NOTIFICATION}}),h())},visibleTime:u-500,persistent:g})):null};const u=5e3,m=(0,o.createContext)({setNotificationData:()=>{},notificationData:void 0}),h=e=>{const{0:t,1:a}=(0,o.useState)(!1),{0:n,1:r}=(0,o.useState)(),{0:i,1:s}=(0,o.useState)({}),l=()=>{r(void 0),a(!1)};return(0,o.useEffect)((()=>{const e=null==n?void 0:n.id;e&&!i[e]&&(a(!0),null!=n&&n.onlyShowOnce&&s({...i,[e]:!0}),setTimeout((()=>{l()}),u))}),[n]),o.createElement(m.Provider,{value:{setNotificationData:r},"data-element":"Provider","data-component":"NotificationContextContainer","data-source-file":"index.tsx"},t&&o.createElement(d,{notification:n,clearNotification:l}),e.children)}},87082:function(e,t,a){var o=a(96540);class n extends o.Component{constructor(...e){super(...e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){var e;return this.state.hasError?null!==(e=this.props.fallback)&&void 0!==e?e:null:this.props.children}}t.A=n},8570:function(e,t,a){t.A=a.p+"static/DTC_Image_Cart_DBVeritor_COVIDTest-663d6381f8d1333db297ac1d2f204726.png"},99192:function(e,t,a){t.A=a.p+"static/[email protected]"},98844:function(e,t,a){t.A=a.p+"static/[email protected]"},95029:function(e,t,a){t.A=a.p+"static/fit-colorectal-cancer-box@2x-28b18cff16381e42660d1310a40b0f86.png"},64420:function(e,t,a){t.A=a.p+"static/[email protected]"},85239:function(e,t,a){t.A=a.p+"static/[email protected]"},88181:function(e,t,a){t.A=a.p+"static/[email protected]"},36447:function(e,t,a){t.A=a.p+"static/hiv-box@2x-dab44319beefa8d85845065c727b6f
164.png"},95634:function(e,t,a){t.A=a.p+"static/[email protected]"},76535:function(e,t,a){t.A=a.p+"static/[email protected]"},59439:function(e,t,a){t.A=a.p+"static/[email protected]"},33469:function(e,t,a){t.A=a.p+"static/[email protected]"},17949:function(e,t,a){t.A=a.p+"static/[email protected]"},93980:function(e,t,a){t.A=a.p+"static/[email protected]"},37654:function(e,t,a){t.A=a.p+"static/[email protected]"},47343:function(e,t,a){t.A=a.p+"static/vitamin-d-inflammation-box@2x-40f2ffb4bdf5199fff3893a51ff3e833.png"}}]);
2//# sourceMappingURL=3bc87cd0acb88219a33ad13113d57bb7561a8f07-31743c5a-f69f3009b896fea16fd3.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.