1console.log("init Proteus treatments -- 1.04"),window.location.pathname=="/practitioner"&&(window.location.href="/account/register?type=practitioner"),setTimeout(()=>{let customer_tags=(window.ARG_CUSTOMER?.tags||[]).map(t=>t.toLowerCase()),is_not_consumer=!customer_tags.some(t=>t==="consumer"),is_practitioner=customer_tags.some(t=>t==="practitioner");window.location.href.indexOf("/collections/exclusive-savings")>-1&&window.location.href.indexOf("/products/")==-1&&(window.sessionStorage.setItem("exclusive savings DTC",!0),is_not_consumer&&(window.location.href="/")),is_not_consumer&&observeSelector('[href*="/collections/exclusive-savings"]',savings_link=>{savings_link.remove()});const waitForInShadow=(host,selector,timeout=5e3)=>new Promise((resolve,reject)=>{const start=Date.now(),iv=setInterval(()=>{const el=host.shadowRoot?.querySelector(selector);el?(clearInterval(iv),resolve(el)):Date.now()-start>timeout&&(clearInterval(iv),reject(new Error(`timeout: ${selector}`)))},100)});observeSelector(".quick-buy-drawer__info recharge-subscription-widget",quickbuy_options=>{window.sessionStorage.getItem("exclusive savings DTC")&&waitForInShadow(quickbuy_options,".rc-selection__onetime label").then(label=>label.click()).catch(err=>console.warn("OTP toggle skipped:",err.message))}),window.sessionStorage.getItem("[ARG-15] active")&&!window.customer_purchased_glandular_adapt&&setTimeout(()=>{is_practitioner&&(proteus.add_cartAttribute("_proteus_discount_1","gwp_tier_1"),observeSelector("free-shipping-bar",fs=>{if(document.querySelectorAll("line-item").length==1||window.sessionStorage.getItem("[ARG-15] first item in cart is glandular adapt"))if(document.querySelectorAll('line-item a[href*="/products/adrenal-glandular-adapt?variant=51594194321709"]').length>0){window.sessionStorage.setItem("[ARG-15] first item in cart is glandular adapt",!0);return}else window.sessionStorage.setItem("[ARG-15] first item in cart is glandular adapt",!1);fs.insertAdjacentHTML("beforebegin",` 2 <div class="proteus-progress proteus-progress--linear" 3 data-proteus-progress 4 data-config='{ 5 "layout": "linear", 6 "fillMode": "linear", 7 "thresholdType": "cart_original_total", 8 "tiers": [{ 9 "threshold": 300, 10 "messageUnmet": "Spend [remaining] more for a complimentary trial bottle of AGA \xA7", 11 "messageMet": "\u2713 Enjoy an Adrenal Glandular Adapt" 12 , "gwp": { 13 "title": "Adrenal Glandular Adapt", 14 "variantIds": [51594194321709], 15 "quantity": 1, 16 "lineItemProperty": {"_proteus_discount_1": "gwp_tier_1"}, 17 "description": "Adaptogenic and glandular support for adrenal resilience and cortisol regulation \xA7", 18 "imageUrl": "https://allergyresearchgroup.com/cdn/shop/files/71810_Thyroid.png?v=1731374181&width=1200", 19 "value": "$51.99", 20 "price": "Free" 21 } 22 }], 23 "markerStyle": "notch", 24 "celebrate": true, 25 "hideWhenEmpty": true, 26 "presentmentCurrency": true, 27 "activationAttr": "", 28 "collectionProductIds": [], 29 "unitSingular": "item", 30 "unitPlural": "items", 31 "gwpButtonLabel": "Claim Complimentary Product" 32 }' 33 style="--pp-fill: #1a1a1a; --pp-track: #e5e5e5; --pp-text: #1a1a1a; --pp-height: 8px; --pp-radius: 4px;" 34 ></div> 35 `),fs.remove()}),waitForElement("cart-drawer").then(cart_drawer=>{cart_drawer.shadowRoot.querySelectorAll("#arg15-legal").length==0&&cart_drawer.shadowRoot.querySelector("footer").insertAdjacentHTML("beforebegin",'<div id="arg15-legal" style="padding: 1rem; font-size: 12px; opacity: 1;">\xA7 Offer is limited to one bottle of Adrenal Glandular Adapt per practitioner, while supplies last. Each bottle contains 90 vegetarian capsules and has a wholesale price of $26.00. Product has an expiration date of October 31, 2027.</div>')}).catch())},1500)},500);function in_time_window(){const now=new Date,start=new Date("2026-09-01T06:00:00-05:00"),end=new Date("2026-09-07T23:59:59-05:00");return now>=start&&now<=end}(in_time_window()||window.location.href.indexOf("?shipping")>-1)&&(setTimeout(()=>{proteus.add_cartAttribute("proteus_checkout_option","shipping note active")},2500),observeSelector("cart-drawer form.buy-buttons",checkout=>{checkout.insertAdjacentHTML("afterend",` 36 <style> 37 .js-shipping-message{ 38 text-align: center; 39 position: relative; 40 font-size: .85rem; 41 border-radius: 10px; 42 margin: auto; 43 max-width: 300px; 44 } 45 .js-shipping-message:before{ 46 content: "i"; 47 position: absolute; 48 left: -1.5rem; 49 top: 0; 50 font-size: 12px; 51 line-height: 0; 52 border: 1px solid; 53 border-radius: 100%; 54 width: 1.25rem; 55 height: 1.25rem; 56 display: flex; 57 align-items: center; 58 justify-content: center; 59 } 60 </style> 61 <div style="margin: 0 2rem 0 3rem;"> 62 <div class="js-shipping-message">
63 Please be aware, orders placed Friday, September 4 through Monday, September 7 will ship out Tuesday, September 8. 64 </div> 65 </div> 66 `)})),window.activateARG14=function(){const getUnitsPerContainer=function(variantId){const variantLevel=parseFloat(window.ARG_VARIANT_METAFIELDS?.[String(variantId)]?.unitsPerContainer);if(!isNaN(variantLevel)&&variantLevel>0)return variantLevel;const singleSize=parseFloat(window.ARG_PRODUCT_METAFIELDS?.unitsPerContainer);return isNaN(singleSize)||singleSize<=0?null:singleSize};function updateFreqLabels(){const freqSelect=document.querySelector("#arg-frequency-select");if(!freqSelect)return;const variantId=document.querySelector(".arg-size-card.is-selected")?.dataset.variantId||document.querySelector(".arg-size-card")?.dataset.variantId,servingSize=parseFloat(window.ARG_PRODUCT_METAFIELDS?.servingSize),unitsPerContainer=getUnitsPerContainer(variantId);if(!servingSize||!unitsPerContainer)return;const servingsInBottle=unitsPerContainer/servingSize;function servingsPerDayLabel(months){const spd=servingsInBottle/(months*30);if(Number.isInteger(spd)&&spd>1)return`${spd} servings / day`;if(spd>=1.8)return`~${Math.round(spd)} servings / day`;if(Math.abs(spd-1)<.01)return"1 serving / day";if(spd>=.8)return"~1 serving / day";if(Math.abs(spd-.5)<.01)return"1 serving / every other day";if(spd>=.45)return"~1 serving / every other day";const days=1/spd;return Number.isInteger(days)?`1 serving / every ${days} days`:`1 serving / every ~${Math.round(days)} days`}Array.from(freqSelect.options).forEach(option=>{const monthMatch=option.textContent.match(/(\d+)\s*month/i);if(!monthMatch)return;const months=parseInt(monthMatch[1],10),baseLabel=`Every ${months} Month${months>1?"s":""}`;option.textContent=`${baseLabel} (${servingsPerDayLabel(months)})`});let bestOption=null,bestDiff=1/0;Array.from(freqSelect.options).forEach(option=>{const monthMatch=option.textContent.match(/(\d+)\s*month/i);if(!monthMatch)return;const months=parseInt(monthMatch[1],10),spd=servingsInBottle/(months*30),diff=Math.abs(spd-1);diff<bestDiff&&(bestDiff=diff,bestOption=option)}),bestOption&&(freqSelect.value=bestOption.value,freqSelect.dispatchEvent(new Event("change",{bubbles:!0})))}waitUntil(()=>document.querySelector("#arg-frequency-select")).then(()=>{updateFreqLabels();const freqSelect=document.querySelector("#arg-frequency-select");let _arg14Updating=!1;new MutationObserver(()=>{_arg14Updating||(_arg14Updating=!0,updateFreqLabels(),_arg14Updating=!1)}).observe(freqSelect,{childList:!0})}).catch(),observeSelector(".arg-size-card.is-selected",()=>{updateFreqLabels()})},window.activateARG16=function(){const getVariantIdFromUrl=()=>new URLSearchParams(window.location.search).get("variant")||"";waitUntil(()=>document.querySelector(".arg-size-card")).then(()=>{if(getVariantIdFromUrl())return;const cards=document.querySelectorAll(".arg-size-card");cards.length!==0&&cards[cards.length-1].click()}).catch()},window.activateARG17=function(){"use strict";if(window.__ARG17)return;window.__ARG17=!0;var DRAWER_ID="header-sidebar-menu",DESKTOP_MQ="(min-width: 1150px)",DT_INSET=20,DT_BASE=20,G_ICON_PAD=8,M_SIDE=16,M_BOTTOM=84,GAP=14,DT_ACSB_GAP_RIGHT=8,DT_ACSB_RIGHT=103,DT_ACSB_BOTTOM=40,DT_SHIELD_RIGHT=162,DT_SHIELD_BOTTOM=35,AMA_DT_BOTTOM=100,mqDesktop=window.matchMedia(DESKTOP_MQ),cache={},scheduled=!1,writeCount=0,hotTicks=0,pauseUntil=0,lastGw=84,lastGh=84,ducked=!1;function schedule(){if(scheduled)return;scheduled=!0;var fired=!1,raf=requestAnimationFrame(go),tmo=setTimeout(go,80);function go(){fired||(fired=!0,cancelAnimationFrame(raf),clearTimeout(tmo),scheduled=!1,run())}}function watchStyle(el){el.__ptObs||(el.__ptObs=!0,new MutationObserver(schedule).observe(el,{attributes:!0,attributeFilter:["style"]}))}function watchClassStyle(el){el.__ptObs||(el.__ptObs=!0,new MutationObserver(schedule).observe(el,{attributes:!0,attributeFilter:["class","style"]}))}function live(key,find){var el=cache[key];if(el&&el.isConnected)return el;if(el=find()||null,cache[key]=el,el&&key==="g"&&watchStyle(el),el&&key==="a"&&watchClassStyle(el),el&&key==="s"){var root=el.getRootNode();root&&!root.__ptObs&&(root.__ptObs=!0,new MutationObserver(schedule).observe(root,{childList:!0,subtree:!0}))}return el}function google(){return live("g",function(){return document.getElementById("google-merchantwidget-iframe-wrapper")})}function shield(){return live("s",function(){var h=document.querySelector("csm-cookie-consent");if(!h||!h.shadowRoot)return null;for(var t=h.shadowRoot.querySelector('[class*="reopen"]');t&&getComputedStyle(t).position!=="fixed";)t=t.parentElement;return t})}function acsb(){return live("a",function(){for(var hosts=document.querySelectorAll("access-widget-ui"),i=0;i<hosts.length;i++)if(hosts[i].shadowRoot){var b=hosts[i].shadowRoot.querySelector('button[class*="trigger-button"]');if(b)return patchAcsbShadow(hosts[i]),b}return null})}function patchAcsbShadow(host){if(!(!host.shadowRoot||host.shadowRoot.getElementById("arg17-acsb-fix"))){var st=document.createElement("style");st.id="arg17-acsb-fix",st.textContent=['.trigger-button,[class*="trigger-button"]{transition:transform .15s!important;}',".icon svg{visibility:inherit!important;}"].join(""),host.shadowRoot.appendChild(st)}}function drawer(){return document.getElementById(DRAWER_ID)}function menuOpen(){var d=drawer();return!!(d&&d.hasAttribute("open")&&d.offsetWidth>0)}var WIDGET_HOSTS='access-widget-ui, csm-cookie-consent, [id*="merchantwidget"]';function isWidgetNode(node){return!!(node&&node.closest&&node.closest(WIDGET_HOSTS))}function eventHitsWidget(event){var deep=event.composedPath&&event.composedPath()[0]||null;return isWidgetNode(deep)||isWidgetNode(event.target)}function protectDrawer(){var d=drawer();if(!(!d||d.__arg17Protected)){d.__arg17Protected=!0;var native=Node.prototype.contains;d.contains=function(node){return native.call(this,node)?!0:isWidgetNode(node)};var origTouch=d._allowOutsideClickTouch,origMouse=d._allowOutsideClickMouse;d._allowOutsideClickTouch=function(event){return eventHitsWidget(event)?!0:origTouch.call(this,event)},d._allowOutsideClickMouse=function(event){return eventHitsWidget(event)?!0:origMouse.call(this,event)}}}function setImp(el,prop,val){el.style.getPropertyValue(prop)!==val&&(writeCount++,el.style.setProperty(prop,val,"important"))}function clearProp(el,prop){el.style.getPropertyValue(prop)!==""&&(writeCount++,el.style.removeProperty(prop))}function show(el){clearProp(el,"visibility"),clearProp(el,"pointer-events")}function hide(el){setImp(el,"visibility","hidden"),setImp(el,"pointer-events","none")}var CSM_UNPOP_MAX=20,csmUnpopCount=0,csmUnpopped=!1;function shieldStacking(host,belowZ){if(csmPanelVisible()){if(clearProp(host,"z-index"),typeof host.showPopover=="function"&&!host.matches(":popover-open"))try{host.showPopover()}catch{}csmUnpopped=!1;return}if(setImp(host,"z-index",belowZ),!(csmUnpopCount>=CSM_UNPOP_MAX)&&typeof host.hidePopover=="function")try{host.matches(":popover-open")&&(host.hidePopover(),csmUnpopped=!0,csmUnpopCount++)}catch{csmUnpopCount=CSM_UNPOP_MAX}}function shieldIcon(s){if(!s)return null;var i=s.querySelector('[class*="reopen"]');return i&&i!==s?i:null}function acsbInterfaceOpen(){var a=cache.a;
66if(a&&a.isConnected&&/trigger-button--visible/.test(String(a.className)))return!1;var el=cache.ai;if(!(el&&el.isConnected)){el=null;for(var hosts=document.querySelectorAll("access-widget-ui"),i=0;i<hosts.length&&!el;i++){var sr=hosts[i].shadowRoot;if(sr)for(var all=sr.querySelectorAll("*"),j=0;j<all.length;j++){var r=all[j].getBoundingClientRect();if(r.width>250&&r.height>400){el=all[j];break}}}cache.ai=el,el&&watchClassStyle(el)}if(!el)return!1;var cs=getComputedStyle(el),rr=el.getBoundingClientRect();return cs.visibility!=="hidden"&&cs.display!=="none"&&rr.width>250&&rr.height>400}function csmScan(){var h=document.querySelector("csm-cookie-consent");if(!h||!h.shadowRoot)return null;var best=null;return h.shadowRoot.querySelectorAll("div").forEach(function(el){var cs=getComputedStyle(el),r=el.getBoundingClientRect(),vis=cs.visibility!=="hidden"&&cs.display!=="none"&&r.width>0,isBig=r.width>200&&r.height>150;el.__ptDlg&&(!vis||!isBig)&&(el.style.removeProperty("left"),el.__ptDlg=!1),vis&&isBig&&r.width<window.innerWidth*.9&&(!best||r.width*r.height>best.r.width*best.r.height)&&(best={el,r})}),best}function csmPanelVisible(){var h=document.querySelector("csm-cookie-consent");if(!h||!h.shadowRoot)return!1;var found=!1;return h.shadowRoot.querySelectorAll("div").forEach(function(el){var cs=getComputedStyle(el);if(!(cs.visibility==="hidden"||cs.display==="none")){var r=el.getBoundingClientRect(),panel=r.width>200&&r.height>150,bar=r.width>window.innerWidth*.6&&r.height>60;(panel||bar)&&(found=!0)}}),found}function steerCsmPanel(best){if(best){var vw=window.innerWidth,want=Math.max(4,Math.round(vw-best.r.width-20)),delta=Math.round(best.r.left-want);if(Math.abs(delta)>2){var base=parseFloat(best.el.style.getPropertyValue("left"));isNaN(base)&&(base=parseFloat(getComputedStyle(best.el).left)),isNaN(base)&&(base=0),setImp(best.el,"left",Math.round(base-delta)+"px"),best.el.__ptDlg=!0}}}function sync(){var g=google(),s=shield(),a=acsb(),desktop=mqDesktop.matches;if(protectDrawer(),!desktop&&!menuOpen()){ducked=!1;var panelUp=csmPanelVisible();if(g&&setImp(g,"display","none"),s){var icon=shieldIcon(s);icon?(setImp(icon,"visibility","hidden"),setImp(icon,"pointer-events","none"),clearProp(s,"visibility"),panelUp?clearProp(s,"pointer-events"):setImp(s,"pointer-events","none")):panelUp?show(s):hide(s)}a&&hide(a),steerCsmPanel(csmScan());return}if(ducked=acsbInterfaceOpen(),ducked){if(g&&setImp(g,"display","none"),s){var ic3=shieldIcon(s);ic3?(setImp(ic3,"visibility","hidden"),setImp(ic3,"pointer-events","none")):hide(s)}steerCsmPanel(csmScan());return}var cRight,inset,base;if(desktop)cRight=window.innerWidth,inset=DT_INSET,base=DT_BASE;else{var d=drawer(),pn=d.querySelector(".panel-list__wrapper")||d,r=pn.getBoundingClientRect();cRight=r.right,inset=M_SIDE,base=Math.round(Math.max(0,window.innerHeight-r.bottom))+M_BOTTOM}if(s){var icon2=shieldIcon(s);icon2&&(clearProp(icon2,"visibility"),clearProp(icon2,"pointer-events")),show(s)}a&&show(a),g&&setImp(g,"display","block");var gw=g&&g.offsetWidth||84,gh=g&&g.offsetHeight||84,sw=s&&s.offsetWidth||55,sh=s&&s.offsetHeight||55,aw=a&&a.offsetWidth||45,ah=a&&a.offsetHeight||45,expanded=gh>150;!expanded&&g&&(lastGw=gw,lastGh=gh);var ghNom=expanded?lastGh:gh,gwNom=expanded?lastGw:gw,gVis=Math.min(gwNom,ghNom),rowH=Math.max(sh,ah,gVis,1),gRightWanted=Math.round(window.innerWidth-cRight+inset),gRight=gRightWanted;if(window.innerWidth-gRight-gw<8&&(gRight=Math.max(4,window.innerWidth-gw-8)),g){var gBottom;if(!expanded)gBottom=Math.round(base+(rowH-gh)/2);else{var anchor=Math.round(base+(rowH-ghNom)/2);gBottom=Math.min(anchor,window.innerHeight-gh-8)}gBottom<4&&(gBottom=4),setImp(g,"top","auto"),setImp(g,"left","auto"),setImp(g,"right",gRight+"px"),setImp(g,"bottom",gBottom+"px")}var gNomLeft=window.innerWidth-gRight-gVis,aLeft=gNomLeft+G_ICON_PAD-GAP-aw-(desktop?DT_ACSB_GAP_RIGHT:0),sLeft=aLeft-GAP-sw,gZ=g&&parseInt(getComputedStyle(g).zIndex,10)||2147483647,stackBelowG=String(Math.max(0,gZ-1));if(a){if(desktop){var cw=document.documentElement.clientWidth;setImp(a,"top","auto"),setImp(a,"right","auto"),setImp(a,"left",Math.round(cw-DT_ACSB_RIGHT-aw)+"px"),setImp(a,"bottom",DT_ACSB_BOTTOM+"px")}else setImp(a,"top","auto"),setImp(a,"right","auto"),setImp(a,"left",Math.round(aLeft)+"px"),setImp(a,"bottom",Math.round(base+(rowH-ah)/2)+"px");setImp(a,"z-index",stackBelowG)}if(s){if(desktop){var cwS=document.documentElement.clientWidth;setImp(s,"top","auto"),setImp(s,"right","auto"),setImp(s,"left",Math.round(cwS-DT_SHIELD_RIGHT-sw)+"px"),setImp(s,"bottom",DT_SHIELD_BOTTOM+"px")}else setImp(s,"top","auto"),setImp(s,"right","auto"),setImp(s,"left",Math.round(sLeft)+"px"),setImp(s,"bottom",Math.round(base+(rowH-sh)/2)+"px");setImp(s,"z-index",stackBelowG),s.__arg17Placed=!0}var csmHost=document.querySelector("csm-cookie-consent");csmHost&&shieldStacking(csmHost,stackBelowG),steerCsmPanel(csmScan())}function shieldNeedsPlacement(){var el=shield();return!!(el&&!el.__arg17Placed)}function run(){if(!(Date.now()<pauseUntil&&!shieldNeedsPlacement())){var w0=writeCount;try{sync()}catch{}if(hotTicks=writeCount>w0?hotTicks+1:0,hotTicks>60){hotTicks=0,pauseUntil=Date.now()+3e3;return}var d=drawer();(!mqDesktop.matches&&d&&d.hasAttribute("open")||ducked)&&schedule()}}function liftAma(){if(!document.getElementById("arg17-ama-lift")){var st=document.createElement("style");st.id="arg17-ama-lift",st.textContent="@media "+DESKTOP_MQ+"{body #hubspot-messages-iframe-container{bottom:"+AMA_DT_BOTTOM+"px!important;}}",document.head.appendChild(st)}}
66function init(){liftAma();var d=drawer();d&&new MutationObserver(schedule).observe(d,{attributes:!0,attributeFilter:["open"]}),mqDesktop.addEventListener?mqDesktop.addEventListener("change",schedule):mqDesktop.addListener(schedule),window.addEventListener("resize",schedule),document.addEventListener("visibilitychange",schedule),setInterval(schedule,1200);var mo=new MutationObserver(function(){var ok=cache.g&&cache.g.isConnected&&cache.s&&cache.s.isConnected&&cache.a&&cache.a.isConnected;ok||schedule()});mo.observe(document.documentElement,{childList:!0,subtree:!0}),schedule()}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",init):init()},observeSelector('[src*="rebuy"], [class*="rebuy"], [id*="rebuy"]',rebuy_element=>{rebuy_element.remove()}); 67//# sourceMappingURL=/cdn/shop/t/53/assets/proteus-treatments.js.map?v=136447768707155491891790029381
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.