PageSourceSearch

https://nutrafol.com/gatsby-assets/33ca638d-4c4baa83b7e122776aff.js

js nutrafol.com collected 2026-09-24 10:04:02 UTC 9,359 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunknutrafol=self.webpackChunknutrafol||[]).push([[8736],{9616:function(e,t,a){var l,n,i,o,r,s,d,c,u,p,m=a(75276),x=a(73310),f=a(96540),g=a(59639),h=a(53274),y=a(19625),b=a(95704),_=a(23663),k=a(11808),w=a(62987),v=a(82986),A=a(90294),Y=a(57837),j=a(5302),B=a(65786),z=a(2230),T=a(92281),P=a(17437);const C=(0,x.default)(g.Box,{target:"e3skv4d7"})({name:"t0jsq3",styles:"#Modal{max-width:989px;background:#fff;}#CloseWrapper{display:none;}"}),q=(0,x.default)(g.Box,{target:"e3skv4d6"})("h2{@media (max-width: 767px){font-size:24px!important;line-height:29px!important;}@media (min-width: 768px) and (max-width: 1023px){font-size:24px!important;line-height:29px!important;&.short{margin-left:auto;margin-right:auto;}}}p.subtitle--xxlarge{font-size:18px;line-height:1.2;",y.P.medium(l||(l=(0,m.A)(["\n      font-size: 20px;\n      line-height: 1.3;\n    "])))," ",y.P.large(n||(n=(0,m.A)(["\n      font-size: 24px;\n    "]))),";}"),E=(0,x.default)(g.Flex,{target:"e3skv4d5"})(y.P.medium(i||(i=(0,m.A)(["\n    background: ",";\n    border-radius: 8px;\n  "])),b.default.wild.color.master.base.secondary),";"),S=(0,x.default)(g.Box,{target:"e3skv4d4"})("opacity:1;&.disabled img{opacity:0.5;}.mobile-image{border-radius:8px;}h2{font-family:",b.default.wild.font.grilli.book,";color:",b.default.wild.color.master.base.black,";font-size:28px;line-height:1.2;@media (max-width: 767px){&.special{font-size:24px;}}span{font-family:",b.default.wild.font.grilli.italic,";}",y.P.medium(o||(o=(0,m.A)(["\n      line-height: 1.3;\n      font-size: 20px;\n    "])))," ",y.P.large(r||(r=(0,m.A)(["\n      line-height: 1.2;\n      font-size: 48px;\n    "])))," ",y.P.xLarge(s||(s=(0,m.A)(["\n      font-size: 48px;\n    "])))," sup{font-size:40%;top:-1em;@media (min-width: 1024px){font-size:30%;top:-1.25em;}}}"),N=(0,x.default)(g.Box,{target:"e3skv4d3"})(""),O=(0,x.default)(g.Box,{target:"e3skv4d2"})(""),I=(0,x.default)(g.Box,{target:"e3skv4d1"})("background:",b.default.wild.color.master.primary.alt,";border-radius:8px;p{font-family:",b.default.wild.font.dinamo.bold,";color:",b.default.wild.color.master.primary.default,";line-height:1.4;font-size:14px;",y.P.large(d||(d=(0,m.A)(["\n      font-size: 16px; \n    "]))),";}button:not(.textLink){width:100%;@media (min-width: 768px) and (max-width: 1023px){font-size:12px!important;}}"),W=(0,x.default)(g.Flex,{target:"e3skv4d0"})("text-align:center;",y.P.medium(c||(c=(0,m.A)([" \n     text-align: left;\n    "])))," p{",y.P.medium(u||(u=(0,m.A)([" \n        font-size: 10px !important;\n         line-height: 13px !important;\n      "])))," ",y.P.large(p||(p=(0,m.A)(["\n      font-size: 12px !important;\n      line-height: 16px !important;\n      &.item-2 {\n        max-width: 100px;\n      }\n    "]))),";}"),F="Add to Cart";t.A=e=>{var t,a,l,n;let i=e.data,o=e.uid,r=e.add_to_minicart,s=void 0!==r&&r,d=e.maxWidth,c=void 0===d?[null,null,543,1020]:d,u=e.mb,p=void 0===u?[16,null,16,40]:u,m=e.add_to_cart_redirect,x=void 0!==m&&m;const y=i.title,b=i.subtitle,L=i.body1,H=i.pb_atcarea,D=i.pt_atcarea,M=i.atc_banner,Q=i.source,G=void 0===Q?"scalp_routine_lp":Q,K=i.purchase_source,Z=i.code;
1"hair-health-routine-memorial-day-offer"===o&&(x=!0);const $=(0,f.useContext)(T.A),J=L.find(e=>"main_images"===e.slice_type||"mainimages"===e.slice_type),R=L.find(e=>"atcoptions"===e.slice_type),U=L.find(e=>"icons"===e.slice_type),V=R.items.filter(e=>e.active_top),X=R.items.filter(e=>!e.active_top&&!e.sku.includes("HBALANCEKIT")),ee=null!=J&&null!==(t=J.primary)&&void 0!==t&&t.title1?J.primary.title1.html:null,te=null!=J&&null!==(a=J.primary)&&void 0!==a&&a.sup?"<sup class='font-grilliBook'>"+J.primary.sup+"</sup>":"",ae=null!=V[0].sale_price,le=(0,f.useState)(!1),ne=le[0],ie=le[1],oe=(0,f.useState)(!1),re=oe[0],se=oe[1],de=(0,f.useState)(!1),ce=de[0],ue=de[1],pe=(0,f.useState)(F),me=pe[0],xe=pe[1],fe=(0,f.useState)(V.reduce((e,t)=>e+(ae?t.sale_price:t.new_price),0)),ge=fe[0],he=fe[1],ye=(0,f.useState)(V.map(e=>{let t=ae?e.sale_price:e.new_price;return{sku:e.sku,price:t,qty:1}})),be=ye[0],_e=ye[1],ke=(0,f.useState)(V.map(e=>e.sku)),we=ke[0],ve=ke[1],Ae=we.map(e=>B.LH[e]),Ye=(e,t)=>{const a=V.find(t=>t.sku===e),l=a.core_category,n=a.name_magento,i=a.new_price,o=a.sale_price,r=a.product_category,s=a.product_gender_new,d=a.purchase_type;(0,k.segmentEvent)("Product Quantity Selected",{core_category:l,name:n,price:o||i,product_category:r,product_gender:s,purchase_type:d,quantity:t,sku:e,variant:"Single Purchase"}),_e(a=>a.map(a=>a.sku===e?Object.assign({},a,{sku:e,qty:t}):a))};(0,f.useEffect)(()=>{ce&&($.isLoadingAjaxCart?(se(!0),xe("&nbsp;")):(se(!1),xe("Added To Cart"),setTimeout(()=>{ue(!1),xe(F)},2e3)))},[$.isLoadingAjaxCart]),(0,f.useEffect)(()=>{he(be.reduce((e,t)=>e+t.price*t.qty,0)),ve(be.filter(e=>e.qty>0).map(e=>e.sku))},[be]);const je=J.items.find(e=>"mobile"===e.key);return(0,P.Y)(C,{pb:(0,j.Hs)(H),pt:(0,j.Hs)(D),className:"atc-area-top wild-container","data-element":"Wrapper","data-component":"AtcAreaTop","data-source-file":"atcareatop.js"},(y.text||(null==b?void 0:b.text))&&(0,P.Y)(q,{maxWidth:c,mx:"auto",mb:p},y.text&&(0,P.Y)(h.TextElement,{element:"h2",text:(0,j.v8)(y.html),className:"title--large title text-master-base-black gotham text-center mb-4 "+(y.text.length<60?"short":"")}),(null==b?void 0:b.text)&&(0,P.Y)(h.TextElement,{element:"p",text:b.text,className:(y.text?"body--xlarge":"subtitle--xxlarge")+" subtitle text-master-base-black gotham text-center"})),(0,P.Y)(E,{flexDirection:["column",null,"row"],alignItems:[null,null,"center"],justifyContent:"space-between",py:[null,null,40,40,64],pl:[null,null,40,64,80],pr:[null,null,21,64,80],"data-element":"Body","data-component":"AtcAreaTop","data-source-file":"atcareatop.js"},(0,P.Y)(S,{width:[1,1,.5],flex:1,mr:[null,null,36],mb:[16,null,0],className:0===we.length?"disabled":"","data-element":"ProductImage","data-component":"AtcAreaTop","data-source-file":"atcareatop.js"},je&&(0,P.Y)(Y.A,{data:J.items.find(e=>"mobile"===e.key).image,className:"hide-md-up mt-4 mobile-image"}),ee?(0,P.Y)(g.Box,{mt:[16,null,0],mb:[8,null,40],mx:"auto",maxWidth:[350,null,300,480,646]},(0,P.Y)(h.TextElement,{element:"h2",text:(0,j.v8)(ee+te),className:"special text-center"})):null,(0,P.Y)(g.Box,{maxWidth:ee?387:538,mx:"auto","data-element":"Box","data-component":"AtcAreaTop","data-source-file":"atcareatop.js"},(0,P.Y)(Y.A,{data:we.length&&null!==(l=J.items.find(e=>e.key===Ae.join(",")))&&void 0!==l&&l.image?null===(n=J.items.find(e=>e.key===Ae.join(",")))||void 0===n?void 0:n.image:J.items[0].image,className:"show-md-up","data-element":"Cmsimage","data-component":"AtcAreaTop","data-source-file":"atcareatop.js"}))),(0,P.Y)(N,{width:[1,1,334,400,489],"data-element":"ProductOptions","data-source-file":"atcareatop.js"},V.map((e,t)=>(0,P.Y)(z.A,{key:"scalp-atc-prod-option-"+t,data:e,index:t,updateOptionQty:Ye})),null!=M&&M.url?(0,P.Y)(O,{pt:[0,0,0,32]},(0,P.Y)("img",{src:null==M?void 0:M.url,alt:null==M?void 0:M.alt,role:null!=M&&M.alt?null:"presentation"})):null,(0,P.Y)(I,{px:16,py:[16,null,8,16],mt:[14,null,16,48],"data-element":"Total","data-source-file":"atcareatop.js"},(0,P.Y)(g.Flex,{justifyContent:"space-between","data-element":"Flex","data-source-file":"atcareatop.js"},(0,P.Y)(g.Box,{mr:18,"data-element":"Box","data-source-file":"atcareatop.js"},(0,P.Y)(h.TextElement,{element:"p",text:"Due","data-element":"TextElement","data-source-file":"atcareatop.js"})),(0,P.Y)(g.Box,{"data-element":"Box","data-source-file":"atcareatop.js"},(0,P.Y)(h.TextElement,{element:"p",text:"$"+ge.toFixed(2).replace(".00",""),"data-element":"TextElement","data-source-file":"atcareatop.js"}))),(0,P.Y)(g.Box,{mt:[16,null,8,16],"data-element":"Box","data-source-file":"atcareatop.js"},(0,P.Y)(_.v,{primary:!0,label:me,loading:re?"loading":null,className:0===ge||ce?"disabled":"",disabled:0===ge,onClick:()=>
1{ue(!0),be.forEach(e=>{if(e.qty>0){const t=V.find(t=>t.sku===e.sku),a=(t.billing_interval,t.shipping_interval,t.core_category,t.name_magento),l=t.new_price,n=t.sale_price,i=(t.product_category,t.product_gender_new);t.purchase_type,t.sku,t.subscription_type;w.F.onProductAdded({purchase_source:K,options:[e],coupon:Z||"",name:a,price:n||l,product_gender:i,quiz_reco:!1,type:"button",variant:"Single Purchase"})}});const e=be.filter(e=>e.qty>0).map(e=>e.qty>1?e.sku+"|"+e.qty:e.sku),t=e.map(()=>K),a=Z?"&code="+Z:"",l="https://nutrafol.com/dpa/add/tocart?skus="+e+"&purchase_source="+t.join(",")+a;s?$.addItems(l):x?window.location=l:ie(!0)},"data-element":"ButtonWild","data-source-file":"atcareatop.js"}))),(0,P.Y)(W,{alignItems:"center",mt:[64,null,16,48],justifyContent:"space-around","data-element":"Icons","data-source-file":"atcareatop.js"},U.items.map((e,t)=>(0,P.Y)(g.Flex,{key:"scalp-atc-icon-"+t,px:"8",flexDirection:["column","column","row","row"],alignItems:"center",width:[80,80,1/3,1/3]},(0,P.Y)(g.Box,{width:50},(0,P.Y)(Y.A,{data:e.image})),(0,P.Y)(g.Box,{maxWidth:0===t?100:"auto"},(0,P.Y)(h.TextElement,{element:"p",text:e.text.text,className:"body--regular text-master-base-black item-"+t}))))))),ne&&(0,P.Y)(v.G,{propsObject:{baseOptions:V,upsellOptions:X,skus:be.filter(e=>e.qty>0).map(e=>e.qty>1?e.sku+"|"+e.qty:e.sku),purchase_source:K,source:G,code:Z},modalSize:"large",component:A.A,hideModal:()=>ie(!1),customZIndex:10001,closeOnOverlayClick:!1,closeOnEscape:!1}))}}}]);

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.