1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8471],{686:(e,t,n)=>{"use strict";n.d(t,{NE:()=>l,WS:()=>u,kq:()=>d,lb:()=>o});var a=n(9088),s=n(24940),r=n(64204),i=n(94508),o=function(e,t,n){var r=(0,a.Xs)({name:"Beauty Profile_".concat(t),position:s.ho.Main,type:s.yJ.Tab}),i=(0,a.Ai)({type:s.R6.Tab,name:n,position:s.ho.Main,isPromotion:!1});return e.concat(r).concat(i)},c=function(e){var t=(0,r.J4)(s.C0.ContentView,void 0,e);(0,i.u)({snowplow:t})},l=function(e,t,n){c(o(e,t,n))},d=function(e,t){var n=(0,r.J4)(s.C0.ContentSelect,t,e);(0,i.u)({snowplow:n})},u=function(e,t,n,a){d(o(e,t,n),a)}},1404:e=>{e.exports={NoResultsFound:"NoResultsFound_NoResultsFound___3t1_",image:"NoResultsFound_image__LMdQg",title:"NoResultsFound_title__44XAE",copy:"NoResultsFound_copy__FrFmG",content:"NoResultsFound_content__1dD8n",ctas:"NoResultsFound_ctas__pSS3a",retakeCta:"NoResultsFound_retakeCta__HGiV7",linkCta:"NoResultsFound_linkCta__XiHJr"}},7206:e=>{e.exports={"ShadeMatchResults--noProduct":"ShadeMatchResults_ShadeMatchResults--noProduct__VkHZG",NoResultsFound:"NoResultsFound",NoResultsFound__ctas:"NoResultsFound__ctas"}},14556:e=>{e.exports={ShadeMatchFinderLoading:"styles_ShadeMatchFinderLoading__UUtD5",ShadeMatchFinderLoading__close:"styles_ShadeMatchFinderLoading__close__5X82Y",ShadeMatchFinderLoading__content:"styles_ShadeMatchFinderLoading__content__qwG1_","ShadeMatchFinderLoading__content-wrapper":"styles_ShadeMatchFinderLoading__content-wrapper__cstYn","ShadeMatchFinderLoading__loader-icon":"styles_ShadeMatchFinderLoading__loader-icon__rRK1M","ShadeMatchFinderLoading__powder-image":"styles_ShadeMatchFinderLoading__powder-image__pPaH0","ShadeMatchFinderLoading__aff-liquid-image":"styles_ShadeMatchFinderLoading__aff-liquid-image__EcI70","ShadeMatchFinderLoading__aff-liquid-cap-image":"styles_ShadeMatchFinderLoading__aff-liquid-cap-image__NKYHM","ShadeMatchFinderLoading__aff-cap-image":"styles_ShadeMatchFinderLoading__aff-cap-image__YFFez","ShadeMatchFinderLoading__aff-bottle-image":"styles_ShadeMatchFinderLoading__aff-bottle-image__oG8JF","ShadeMatchFinderLoading__bsf-image":"styles_ShadeMatchFinderLoading__bsf-image__1AyaY","ShadeMatchFinderLoading__bsrc-closed-image":"styles_ShadeMatchFinderLoading__bsrc-closed-image__52lbf","ShadeMatchFinderLoading__affc-closed-image":"styles_ShadeMatchFinderLoading__affc-closed-image__fzILi","ShadeMatchFinderLoading__affc-open-image":"styles_ShadeMatchFinderLoading__affc-open-image__Ol2KK","ShadeMatchFinderLoading__bsrc-open-image":"styles_ShadeMatchFinderLoading__bsrc-open-image__9x4Pt"}},22945:e=>{e.exports={container:"styles_container__3x_dY",content:"styles_content__lwmQo",imageContainer:"styles_imageContainer__SKZ8l",userImage:"styles_userImage__B5Y43",closeIcon:"styles_closeIcon__KckjC",heading:"styles_heading__fg1W4",errorMessage:"styles_errorMessage__ZVSKo",stickyCta:"styles_stickyCta__boSAU",cta:"styles_cta__8bP90"}},32905:e=>{e.exports={container:"styles_container__NfNDD",camera:"styles_camera__Sy6ah",footer:"styles_footer__kQ1QY",overlay:"styles_overlay__7ksmZ",overlayImage:"styles_overlayImage__SrF9B",holitionContainer:"styles_holitionContainer__uA9RM",loader:"styles_loader__sYBfD",progressBar:"styles_progressBar__pYOB0",active:"styles_active__siN3y",progressBarTitle:"styles_progressBarTitle__9gxTK"}},40457:(e,t,n)=>{"use strict";n.d(t,{V:()=>u});var a=n(23513),s=n(77192),r=n(86716),i=n(32757),o=n(54287),c=n(90650),l=n(23345),d=function(){return(0,a._)(function(){return(0,r._)(this,function(e){switch(e.label){case 0:return[4,navigator.mediaDevices.enumerateDevices()];case 1:return[2,!!e.sent().find(function(e){var t=e.kind,n=e.label;return"videoinput"===t&&n})]}})})()},u=function(e,t){var n=(0,s._)((0,i.useState)(o._.NotDetermined),2),u=n[0],_=n[1],h=(0,s._)((0,i.useState)(!1),2),m=h[0],A=h[1],g=(0,i.useCallback)(function(){return(0,a._)(function(){var n;return(0,r._)(this,function(a){switch(a.label){case 0:if(!(!m&&!t))return[3,2];return[4,d()];case 1:if(a.sent())return[2,{permission:o._.Granted,requested:!1}];a.label=2;case 2:return _(o._.Requesting),[4,navigator.mediaDevices.getUserMedia(e).then(function(e){var t=e.active;
1return e.getTracks().forEach(function(e){return e.stop()}),t?o._.Granted:o._.Denied}).catch(function(e){return c.Ay.error(e),o._.Denied})];case 3:return _(n=a.sent()),[2,{permission:n,requested:!0}]}})})()},[m,e,t]);return(0,l.F)(function(){return(0,a._)(function(){return(0,r._)(this,function(e){switch(e.label){case 0:return[4,d()];case 1:return e.sent()&&!t&&_(o._.Granted),A(!0),[2]}})})()},[]),{requestCameraAccess:g,cameraPermission:u,isGranted:u===o._.Granted,isRequesting:u===o._.Requesting,isDenied:u===o._.Denied}}},49393:e=>{e.exports={"ShadeMatchFinderProgressBar__progressBar--with-header":"ShadeMatchFinderProgressBar_ShadeMatchFinderProgressBar__progressBar--with-header__HK8oe","ShadeMatchFinderProgressBar__progressBar--no-header":"ShadeMatchFinderProgressBar_ShadeMatchFinderProgressBar__progressBar--no-header__4Tcmb",ShadeMatchFinderProgressBar__title:"ShadeMatchFinderProgressBar_ShadeMatchFinderProgressBar__title__VEajl",ShadeMatchFinderProgressBar__back:"ShadeMatchFinderProgressBar_ShadeMatchFinderProgressBar__back__CSezH","ShadeMatchFinderProgressBar__back--hidden":"ShadeMatchFinderProgressBar_ShadeMatchFinderProgressBar__back--hidden__WkvMW",ShadeMatchFinderProgressBar__close:"ShadeMatchFinderProgressBar_ShadeMatchFinderProgressBar__close__8aWKL","ShadeMatchFinderProgressBar__meat-ball-list":"ShadeMatchFinderProgressBar_ShadeMatchFinderProgressBar__meat-ball-list__22zh2",MeatBall:"MeatBall",MeatBall__filling:"MeatBall__filling"}},55876:e=>{e.exports={ShadeMatchFinderLanding:"ShadeMatchFinderLanding_ShadeMatchFinderLanding__D3ly_",ShadeMatchFinderLanding__close:"ShadeMatchFinderLanding_ShadeMatchFinderLanding__close__TT_4r","ShadeMatchFinderLanding__landing-content":"ShadeMatchFinderLanding_ShadeMatchFinderLanding__landing-content__Cbilf",ShadeMatchFinderLanding__title:"ShadeMatchFinderLanding_ShadeMatchFinderLanding__title__Xyluv",ShadeMatchFinderLanding__description:"ShadeMatchFinderLanding_ShadeMatchFinderLanding__description__wgMDJ","ShadeMatchFinderLanding__description--bold":"ShadeMatchFinderLanding_ShadeMatchFinderLanding__description--bold__cJwe3","ShadeMatchFinderLanding__number-list":"ShadeMatchFinderLanding_ShadeMatchFinderLanding__number-list__odqum","ShadeMatchFinderLanding__list-item":"ShadeMatchFinderLanding_ShadeMatchFinderLanding__list-item__Ymtc8","ShadeMatchFinderLanding__list-item-number":"ShadeMatchFinderLanding_ShadeMatchFinderLanding__list-item-number__kAwUP","ShadeMatchFinderLanding__list-text-item":"ShadeMatchFinderLanding_ShadeMatchFinderLanding__list-text-item__GTBuP",ShadeMatchFinderLanding__image:"ShadeMatchFinderLanding_ShadeMatchFinderLanding__image__nk2eo","ShadeMatchFinderLanding__image--concealer":"ShadeMatchFinderLanding_ShadeMatchFinderLanding__image--concealer__7Nro_",ShadeMatchFinderLanding__guarantee:"ShadeMatchFinderLanding_ShadeMatchFinderLanding__guarantee__SVl0f","ShadeMatchFinderLanding__guarantee--bold":"ShadeMatchFinderLanding_ShadeMatchFinderLanding__guarantee--bold__fifUJ",ShadeMatchFinderLanding__returns:"ShadeMatchFinderLanding_ShadeMatchFinderLanding__returns__E3ncI",ShadeMatchFinderLanding__termsAndConditions:"ShadeMatchFinderLanding_ShadeMatchFinderLanding__termsAndConditions__6ViRK","ShadeMatchFinderLanding__button-wrapper":"ShadeMatchFinderLanding_ShadeMatchFinderLanding__button-wrapper__iD_c4",ShadeMatchFinderLanding__button:"ShadeMatchFinderLanding_ShadeMatchFinderLanding__button__fFt00"}},62618:(e,t,n)=>{"use strict";n.d(t,{SK:()=>o,C:()=>c,Fi:()=>r,t_:()=>i});var a=n(76721),s=n(56417),r=function(e){return{type:"[complexion]: PUT_COMPLEXION_PROFILE",method:s.f.Put,authenticationMode:a.tl.Required,url:function(e){return"/resources/".concat(e,"/complexion-profile")},body:e}},i=function(e){return{type:"[complexion]: PUT_MIME_COMPLEXION_PROFILE",method:s.f.Put,authenticationMode:a.tl.Required,url:function(e){return"/resources/".concat(e,"/complexion-profile-mime")},body:e}},o=function(){return{type:"[complexion]: FETCH_COMPLEXION_RECOMMENDATION_RESULTS",method:s.f.Get,authenticationMode:a.tl.Required,url:function(e){return"/resources/".concat(e,"/complexion-recommendation")}}},c=function(e){return{type:"[complexion]: FETCH_COMPLEXION_RECOMMENDATION_RESULTS_GUEST",method:s.f.Post,authenticationMode:a.tl.Optional,url:function(e){return"/resources/".concat(e,"/complexion-recommendation-guest")},body:e}}},66418:e=>{e.exports={container:"styles_container__1SBf7",content:"styles_content__vvDkZ",swatchImage:"styles_swatchImage__fqQIw",heading:"styles_heading__lcPwm",subtitle:"styles_subt
1itle__7VhMk",stickyCta:"styles_stickyCta__ySnzY",cta:"styles_cta__yif4R"}},68151:e=>{e.exports={MimeResults__loader:"MimeResults_MimeResults__loader__HW2bM","MimeResults__no-results":"MimeResults_MimeResults__no-results__1LS5c",MimeResults__title:"MimeResults_MimeResults__title__5QZMw","MimeResults__sub-copy":"MimeResults_MimeResults__sub-copy__hIJ8z","MimeResults__pilled-tabs":"MimeResults__pilled-tabs MimeResults_MimeResults__pilled-tabs__jJFQT",TabList__item:"TabList__item",TabButton__icon:"TabButton__icon","TabButton--is-active":"TabButton--is-active",TabButton__text:"TabButton__text",TabList:"TabList","MimeResults__product-card":"MimeResults_MimeResults__product-card__lxcjW",MimeResults__rating:"MimeResults_MimeResults__rating__GfdTs",bv_main_container:"MimeResults_bv_main_container__e5sjj",bv_incentivized_review_container:"MimeResults_bv_incentivized_review_container___aoeo","MimeResults__additional-products-title":"MimeResults_MimeResults__additional-products-title__sL2BP","MimeResults__header-wrapper":"MimeResults_MimeResults__header-wrapper__0HVby",MimeResults:"MimeResults_MimeResults__ticPi","Dialog__content--is-visible":"Dialog__content--is-visible",CharlotteSays:"CharlotteSays","ContentSection__content--hasCarousel":"ContentSection__content--hasCarousel",OnlineTryOnLink:"OnlineTryOnLink",OnlineTryOnLink__button:"OnlineTryOnLink__button","Dialog__children-wrapper":"Dialog__children-wrapper","MimeResults__compact-carousel-control":"MimeResults__compact-carousel-control",ProductListing:"ProductListing",CompactCarousel:"CompactCarousel","Rails--all-items-in-view":"Rails--all-items-in-view",Rails__items:"Rails__items",Rails__item:"Rails__item",ProductCardList__item:"ProductCardList__item",ProductCard:"ProductCard","MimeResults__save-results-footer":"MimeResults_MimeResults__save-results-footer__quGuS"}},74253:e=>{e.exports={drawer:"styles_drawer__XJ9CU",TextWidget__wrapper:"TextWidget__wrapper",widget__content:"widget__content","info-icon":"info-icon",subText:"subText",RadioBox__label:"RadioBox__label",RadioBox:"RadioBox","CheckedInput--checked":"CheckedInput--checked",CheckedInput__field:"CheckedInput__field",RadioBox__body:"RadioBox__body","RadioBox__image-wrapper":"RadioBox__image-wrapper",RadioBox__text:"RadioBox__text",RadioBox__title:"RadioBox__title",RadioBox__image:"RadioBox__image",step:"step",FormWrapper:"FormWrapper",FormWrapper__cta:"FormWrapper__cta",Button__content:"Button__content"}},76573:(e,t,n)=>{"use strict";n.d(t,{A:()=>nc});var a,s=n(23513),r=n(79e3),i=n(29794),o=n(99123),c=n(77192),l=n(72263),d=n(86716),u=n(41289),_=n(32757),h=n(78431),m=n(8498),A=n(4181),g=n(90930),p=n(92283),f=n(52838),S=n(1697),M=n(9088),x=n(19762),y=n(23345),v=n(36688),b=n(42462),R=[n(38077).F8],C=new b.L({baseUrlConfig:{public:"SHADE_MATCH_API",private:"SHADE_MATCH_API_PRIVATE",preview:"SHADE_MATCH_API_PREVIEW"},enhancers:R,name:"ShadeMatchHttp"}),F=n(76721),j=n(56417),N=n(61573),E=function(e){var t=e.category,n=e.colorPreference,a=e.photoId,s=e.undertone,r=e.coverage,o=e.productSku;return{type:"SHADE_MATCH_RECOMMENDATION",method:j.f.Get,authenticationMode:F.tl.Optional,url:function(){return(0,N.aA)("/api/recommendation",(0,i._)({category:t,colourPreference:n,photoId:a,undertone:s},r?{coverage:r}:{},o?{productSku:o}:{}))}}},w=function(e,t){var n=(0,_.useRef)(!0),a=(0,_.useRef)(void 0);return(0,_.useEffect)(function(){return n.current=!0,function(){n.current=!1,clearTimeout(a.current)}},[]),{imageUpload:(0,_.useCallback)(function(e){return(0,s._)(function(){var t,n,a;return(0,d._)(this,function(s){switch(s.label){case 0:return t=function(e){var t=e,n=void 0;if(e.startsWith("data:")){var a=e.split(",");if(2===a.length&&(t=a[1],!n)){var s=a[0].match(/data:([^;]+)/);s&&(n=s[1])}}n||(n="application/octet-stream");for(var r=atob(t),i=new Uint8Array(r.length),o=0;o<r.length;o++)i[o]=r.charCodeAt(o);return new Blob([i],{type:n})}(e),(n=new FormData).append("image",t),[4,C.send({type:"SHADE_MATCH_UPLOAD_IMAGE",method:j.f.Post,authenticationMode:F.tl.Optional,url:function(){return"/api/image/upload"},body:n,headers:{"Content-type":"multipart/form-data"}})];case 1:if(!(a=s.sent()).imageUrl)throw Error("useShadeMatchApi: No imageUrl returned from imageUpload");if(!a.photoId)throw Error("useShadeMatchApi: No photoId returned from imageUpload");return[2,{imageUrl:a.imageUrl,photoId:a.photoId}]}})})()},[]),loadRecommendations:(0,_.useCallback)(function(r,i){return(0,s._)(function(){var o,c,l,u,_;return(0,d._)(this,function(h){if(!r.photoId)throw Error("useShadeMatchApi: No photoId returned from imageUpload");if(!i.colorPreference)throw Error("useShadeMatchApi: No colorPreference provided for recommendation");if(!i.undertone)throw Error("useShadeMatchApi: No undertone provided for recommendation");return c=r.photoId,l=i.colorPreference.toLowerCase(),u=i.undertone.toLowerCase(),_=null==(o=i.coverage)?void 0:o.toLowerCase(),[2,new Promise(function(r,i){var o=function(){var h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return(0,s._)(function(){var s,m;return(0,d._)(this,function(d){switch(d.label){case 0:if(d.trys.push([0,2,,3]),h>=60)return[2,i(Error("useShadeMatchApi: Max polling attempts reached"))];if(!n.current)return[2,i(Error("useShadeMatchApi: Unmounted during recommendation polling"))];return[4,C.send(E({category:e,colorPreference:l,photoId:c,undertone:u,coverage:_,productSku:t}))];case 1:if("FAILED"===(s=d.sent()).analysisStatus)return[2,i(Error("useShadeMatchApi: Recommendation failed"))];if("COMPLETED"===s.analysisStatus)return[2,r(null!=(m=s.recommendedSkus)?m:[])];return a.current=setTimeout(function(){return o(h+1)},1e3),[3,3];case 2:return i(d.sent()),[3,3];case 3:return[2]}})})()};o()})]})})()},[e,t])}},L=n(95442),B=n(59795),k=n(13734),P=n(24940),T=n(64204),I=n(94508),D=function(e){return(0,M.Xs)({name:"".concat(e,"_finder"),type:P.yJ.ProServices,position:P.ho.Main})},U=function(e,t){return(0,M.Xs)({name:"".concat(e,"_finder_results").concat(t?"/".concat(t):""),type:P.yJ.ProServices,position:P.ho.Main})},O=function(e,t,n){var a="concealer"===e?B.g.ConcealerShadefinder:B.g.FoundationShadeFinder;(0,k.oe)([(0,T.Lj)(a,{page_number:1,store_code:t,name:"".concat(e," finder welcome screen"),entry_point:n})])},H=function(e,t,n){var a=(0,M.Ai)({type:P.R6.Button,name:n,text:n,isPromotion:!1,position:P.ho.Bottom});(0,I.u)({snowplow:(0,T.J4)(P.C0.LinkClick,{target:t,is_primary:!0},e.concat(a))})},V=function(e,t,n){return(0,M.nM)({message:e,code:t,type:n})},G=n(90650),W=n(78577),Q=n(67729),Y=n(65622),K=n(686),q=n(40964),J=n(82352);let X={src:"/_next/static/media/complexion-shades-magnifying-glass.8e5c45bc.png",height:411,width:888,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAECAMAAACEE47CAAAAOVBMVEVMaXFiMSLs1L44NDQyNTeHSi/St5sREQ7YvaVROC//8KW/jmqugGBzSDO8i2bVuZ3hyLLnyqyYUTGcXuasAAAAEXRSTlMAu8zpsIL2JGdlEfpv+uM3mc0d2OoAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAApSURBVAiZY2Bg4OfiZGFnYGAQYOPjZQYxmAS5hRgZGBgYODh4WDkZGAAOegDEA+iFBAAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:4};var z=n(28705),Z=n(58981),$=n(92345),ee=n(73808),et=n.n(ee),en=n(13818),ea=n(69330),es=n(62410),er=n(71894),ei=n(49393),eo=n.n(ei),ec=(0,M.Ai)({type:P.R6.Button,name:"Close",isPromotion:!1,position:P.ho.RightTop}),el=(0,M.Ai)({type:P.R6.Button,name:"Back",isPromotion:!1,position:P.ho.LeftTop});let ed=function(e){var t,n=e.onDismiss,a=e.showBackButton,s=e.showMeatBall,i=e.showHeader,o=void 0===i||i,c=e.className,d=e.titleClassName,_=e.numberOfSteps,h=e.activeIndexOffset,m=e.category,A=(0,$.Bd)().t,g=(0,Y.A)(),p=(0,ea.q)(),f=p.previous,S=p.current,M="ShadeMatchFinderProgressBar",x=(void 0===m?"foundation":m).toLowerCase();return(0,u.jsxs)("div",{className:M,children:[(0,u.jsxs)("div",{className:et()((t={},(0,r._)(t,eo()["".concat(M,"__progressBar--with-header")],o),(0,r._)(t,eo()["".concat(M,"__progressBar--no-header")],!o),t),c),children:[(0,u.jsx)(er.t,{className:et()(eo()["".concat(M,"__back")],(0,r._)({},eo()["".concat(M,"__back--hidden")],!a)),onClick:function(){(0,es.rN)((0,l._)(g).concat([el])),f()},iconName:"back-arrow",disabled:!a,children:A("common:page.cta.back")}),o&&(0,u.jsx)(Z.t,{weight:Z.t.Weight.default,level:Z.t.Level.h3,visualSize:Z.t.VisualSize.m,text:A("components:shade-match-finder.progress-bar.heading",{context:x}),className:et()(eo()["".concat(M,"__title")],d)}),(0,u.jsx)(er.t,{className:eo()["".concat(M,"__close")],onClick:function(){(0,q.NW)((0,l._)(g).concat([ec])),n()}
1,iconName:"close",children:A("common:page.cta.close")})]}),s&&_&&(0,u.jsx)("div",{children:(0,u.jsx)(en.A,{count:_,activeIndex:S+(void 0===h?-1:h),shouldFillPrevious:!0,className:eo()["".concat(M,"__meat-ball-list")]})})]})};var eu=n(66418),e_=n.n(eu),eh=(0,M.Ai)({name:"Shade Match Error",position:P.ho.Main,type:P.R6.Modal,isPromotion:!1}),em=(0,M.Ai)({name:"Start Again",position:P.ho.Bottom,type:P.R6.Button,isPromotion:!1});let eA=function(e){var t=e.onDismiss,n=e.onRestart,a=e.category,s=(0,$.Bd)().t,r=(0,Y.A)(),i=(0,l._)(r).concat([eh]);return(0,u.jsx)("div",{className:e_().container,children:(0,u.jsxs)(Q.A,{onIntersection:function(){(0,q.UD)(i.concat(V(s("components:shade-match-finder.error.title"),"generic_shade_match_error",J.q.SystemError)))},shouldOnlyTriggerOnce:!0,children:[(0,u.jsx)(x.U,{value:[eh],children:(0,u.jsx)(ed,{onDismiss:t,category:a})}),(0,u.jsxs)("div",{className:e_().content,children:[(0,u.jsx)(W.Ay,{className:e_().swatchImage,imageSrc:X,alt:""}),(0,u.jsx)(Z.t,{level:"h2",className:e_().heading,text:s("components:shade-match-finder.error.title"),visualSize:"l",weight:"medium"}),(0,u.jsx)("span",{className:e_().subtitle,children:s("components:shade-match-finder.error.subtitle")}),(0,u.jsx)("div",{className:e_().stickyCta,children:(0,u.jsx)(z.t,{className:e_().cta,onClick:function(){(0,K.kq)(i.concat(em),{target:"start again"}),n()},children:s("components:shade-match-finder.error.cta")})})]})]})})};var eg=n(54287),ep=n(40457),ef=n(39868);let eS=n.p+"static/media/lighting.d9f1fcfd.svg",eM=n.p+"static/media/makeup.39b9b29e.svg",ex=n.p+"static/media/sunglasses.3a0ffc5e.svg";var ey=n(44314),ev=n(76169),eb=n(89358),eR=n.n(eb),eC=n(65544),eF=n(81371),ej=n(45903),eN=(0,M.Ai)({name:"Shade Match Consent",position:P.ho.Main,type:P.R6.Modal,isPromotion:!1}),eE=(0,M.Ai)({name:"scan my face",type:P.R6.Button,isPromotion:!1}),ew=(0,M.Ai)({name:"scan my face",position:P.ho.Main,type:P.R6.SystemNotification,isPromotion:!1});let eL=function(e){var t=e.onDismiss,n=e.numberOfSteps,a=e.showBackButton,r=e.activeIndexOffset,i=e.category,o=(0,_.useRef)(null),h=(0,$.Bd)().t,m=(0,ea.q)().next,A=(0,ef.A)(),g=(0,ev.F5)(A,"termsAndConditions"),p=(0,ev.F5)(A,"privacyPolicy"),f=(0,ev.F5)(A,"biometricProcessingNotice"),S=(0,Y.A)(),y=(0,ep.V)({video:!0}),v=y.requestCameraAccess,b=y.isGranted,R=y.isDenied,C=(0,c._)((0,_.useState)(!0),2),F=C[0],j=C[1],N=!!(0,ej.eB)(A,eF.Z.ShadeMatchFinder).length,E=h("components:shade-match-finder.consent.title");return(0,u.jsxs)("div",{className:eR().container,children:[(0,u.jsx)(x.U,{value:[eN],children:(0,u.jsx)(ed,{onDismiss:t,showBackButton:void 0===a||a,showMeatBall:!0,numberOfSteps:n,activeIndexOffset:r,category:i})}),(0,u.jsxs)(Q.A,{onIntersection:function(){(0,q.UD)((0,l._)(S).concat([(0,M.Ai)({name:"first step - consent",type:P.R6.InfoScreen,isPromotion:!1})]))},target:o,shouldOnlyTriggerOnce:!0,children:[(0,u.jsxs)("div",{className:eR().content,ref:o,children:[(0,u.jsx)(Z.t,{weight:Z.t.Weight.bold,level:Z.t.Level.h1,visualSize:Z.t.VisualSize.m,text:E,className:eR().title,family:Z.t.Family.vanitas}),(0,u.jsx)("span",{className:eR().subtitle,children:h("components:shade-match-finder.consent.subtitle")}),(0,u.jsxs)("div",{className:eR().bestResults,children:[(0,u.jsx)("strong",{children:h("components:shade-match-finder.consent.best-results")}),(0,u.jsxs)("ul",{children:[(0,u.jsxs)("li",{children:[(0,u.jsx)(W.Ay,{imageSrc:eM,alt:""}),h("components:shade-match-finder.consent.makeup")]}),(0,u.jsxs)("li",{children:[(0,u.jsx)(W.Ay,{imageSrc:eS,alt:""}),h("components:shade-match-finder.consent.lighting")]}),(0,u.jsxs)("li",{children:[(0,u.jsx)(W.Ay,{imageSrc:ex,alt:""}),h("components:shade-match-finder.consent.glasses")]})]})]}),(0,u.jsx)("div",{className:eR().imageInfo,children:(0,u.jsx)($.x6,{i18nKey:"components:shade-match-finder.consent.image-info",components:{strong:(0,u.jsx)("strong",{})}})}),N&&(0,u.jsx)(eC.A,{className:eR().regionSelector,service:eF.Z.ShadeMatchFinder,onOptionChange:function(e){j(e)},title:h("components:shade-match-finder.consent.region.title"),errorMessage:h("components:shade-match-finder.consent.region.error-message"),placeholder:h("components:shade-match-finder.consent.region.placeholder"),onDropdownInteract:function(){var e,t;null==(t=o.current)||t.scrollTo({top:null==(e=o.current)?void 0:e.offsetHeight,behavior:"smooth"})}}),(0,u.jsx)("div",{className:eR().terms,children:(0,u.jsx)($.x6,{i18nKey:"components:shade-match-finder.consent.terms",components:{terms:(0,u.jsx)("a",{href:g}),policy:(0,u.jsx)("a",{href:p}),processing:(0,u.jsx)("a",{href:g}),processingUS:(0,u.jsx)("a",{href:f})},context:"us"===A?A:void 0})})]}),(0,u.jsxs)("div",{className:eR().ctaContainer,children:[(0,u.jsx)(ey.A,{className:eR().deniedAlert,alertType:"warning",accessibleAlertType:h("components:alert.type.warning"),copy:h("components:shade-match-finder.consent.camera-denied"),shouldShowContent:R}),(0,u.jsx)(z.t,{className:eR().cta,onClick:function(){return(0,s._)(function(){var e,t;return(0,d._)(this,function(n){switch(n.label){case 0:if((0,q.cx)("scan my face",(0,l._)(S).concat([eE])),b)return m(),[2];return[4,v()];case 1:return e=n.sent().permission,t=S.concat(ew),(0,q.F2)(P.C0.CameraPermissionAsked,t),e===eg._.Granted&&((0,q.F2)(P.C0.CameraPermissionGranted,t),m()),e===eg._.Denied&&(0,q.F2)(P.C0.CameraPermissionDenied,t),[2]}})})()},disabled:R||N&&F,children:h("components:shade-match-finder.consent.cta")})]})]})]})};var eB=n(64502),ek=n(55876),eP=n.n(ek),eT=(0,M.Ai)({name:"Landing Screen",type:P.R6.Modal,isPromotion:!1,position:P.ho.Main}),eI=(0,M.Ai)({type:P.R6.LegalCopy,name:"shade finder terms and conditions",isPromotion:!1,position:P.ho.Main});let eD=function(e){var t=e.category,n=e.isVisible,a=e.onDismiss,s=e.numberOfSteps,r=(0,$.Bd)().t,i="ShadeMatchFinderLanding",o=(0,ea.q)().next,c=(0,Y.A)(),d=(0,ef.A)(),h=(0,eB.A)("returns"),m=(0,eB.A)("termsAndConditions"),A=(0,l._)(c).concat([eT]);(0,_.useEffect)(function(){n&&O(t,d)},[t,n,d]);var g=function(){(0,q.UD)(A)},p=function(){(0,q.UD)(A.concat(eI))},f=function(){H(A,"skinToneQuestion",r("components:shade-match-finder.landing-screen.match-cta")),o()};return(0,u.jsx)(Q.A,{onIntersection:function(){return g()},shouldOnlyTriggerOnce:!0,threshold:1,children:(0,u.jsxs)("div",{className:eP()["".concat(i)],children:[(0,u.jsx)(x.U,{value:[eT],children:(0,u.jsx)(ed,{onDismiss:a,showBackButton:!1,showMeatBall:!1,numberOfSteps:s,category:t})}),(0,u.jsxs)("div",{className:eP()["".concat(i,"__landing-content")],children:[(0,u.jsx)(Z.t,{weight:Z.t.Weight.bold,level:Z.t.Level.h1,visualSize:Z.t.VisualSize.m,text:r("components:shade-match-finder.landing-screen.title"),className:eP()["".concat(i,"__title")],family:Z.t.Family.vanitas}),(0,u.jsx)("div",{className:eP()["".concat(i,"__description")],children:(0,u.jsx)($.x6,{i18nKey:"components:shade-match-finder.landing-screen.description",components:{b:(0,u.jsx)("span",{className:eP()["".concat(i,"__description--bold")]})}})}),(0,u.jsxs)("ul",{className:eP()["".concat(i,"__number-list")],children:[(0,u.jsxs)("li",{className:eP()["".concat(i,"__list-item")],children:[(0,u.jsx)("span",{className:eP()["".concat(i,"__list-item-number")],children:"1"}),(0,u.jsx)("span",{className:eP()["".concat(i,"__list-text-item")],children:r("components:shade-match-finder.landing-screen.step1")})]}),(0,u.jsxs)("li",{className:eP()["".concat(i,"__list-item")],children:[(0,u.jsx)("span",{className:eP()["".concat(i,"__list-item-number")],children:"2"}),(0,u.jsx)("span",{className:eP()["".concat(i,"__list-text-item")],children:r("components:shade-match-finder.landing-screen.step2")})]}),(0,u.jsxs)("li",{className:eP()["".concat(i,"__list-item")],children:[(0,u.jsx)("span",{className:eP()["".concat(i,"__list-item-number")],children:"3"}),(0,u.jsx)("span",{className:eP()["".concat(i,"__list-text-item")],children:r("components:shade-match-finder.landing-screen.step3")})]})]}),(0,u.jsx)("div",{className:et()(eP()["".concat(i,"__image")],eP()["".concat(i,"__image--").concat(t)])}),(0,u.jsx)("div",{className:eP()["".concat(i,"__guarantee")],children:(0,u.jsxs)($.x6,{i18nKey:"components:shade-match-finder.landing-screen.guarantee",children:["Shade match guarantee or your",(0,u.jsx)("span",{className:eP()["".concat(i,"__guarantee--bold")],children:"money back!*"})]})}),(0,u.jsx)("p",{className:eP()["".concat(i,"__returns")],children:(0,u.jsx)($.x6,{i18nKey:"components:shade-match-finder.landing-screen.returnsPolicy",components:{returns:(0,u.jsx)("a",{href:h})}})}),(0,u.jsx)(Q.A,{onIntersection:function(){return p()},threshold:.9,shouldOnlyTriggerOnce:!0,children:(0,u.jsx)("p",{className:eP()["".concat(i,"__termsAndConditions")],children:(0,u.jsx)($.x6,{i18nKey:"components:shade-match-finder.landing-screen.termsAndConditions",components:{terms:(0,u.jsx)("a",{href:m}),processing:(0,u.jsx)("a",{href:m})}})})})]}),(0,u.jsx)("div",{className:eP()["".concat(i,"__button-wrapper")],children:(0,u.jsx)(z.t,{className:eP()["".concat(i,"__button")],onClick:function(){return f()},children:r("components:shade-match-finder.landing-screen.match-cta")})})]})})},eU={src:"/_next/static/media/aff-cap.7cc5dcd1.png",height:122,width:84,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAICAMAAADtGH4KAAAAQlBMVEVMaXHc1NTQysrNwsT15OLtxbi4XEbVpJH1///TrqLg09HltqXXpo/RppC4j3rJmYXIjHevemWznJidZVSzh3PQpo8NR5hUAAAAD3RSTlMAi03HPIgMTA3T+9uZ29UnrooMAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAMElEQVQImTXItREAIAAAscfdYf9VOQpSBjC9OvBpHAe6jWLf7QyE1d7FGSx4oSTfBStEAUYptxW8AAAAAElFTkSuQmCC",blurWidth:6,blurHeight:8},eO={src:"/_next/static/media/aff-liquid-cap.3cdc283d.png",height:212,width:146,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAICAMAAADtGH4KAAAAUVBMVEVMaXHVzc/VztPVr5rQyMzoqH7RlWzwsYjKubndpoLnqoLCubnHvb/etp/xtIzas5nCubutelHBwdDZrI3mqIDd1tjf2Nr6vZbMtKv+w5zozsKIIXnoAAAAFnRSTlMAjUL2+2M1/gn2/YzZ+eFvrRkhSte4Ec66hgAAAAlwSFlzAAALEgAACxIB0t1+/AAAADhJREFUCJkFwQkCQDAMAMHtmcRVihT/f6gZqslVoYiN7eCUyd5CTyKjocuzfgHmnP0G3d0DQIz6AzpHAfO+wTVXAAAAAElFTkSuQmCC",blurWidth:6,blurHeight:8},eH={src:"/_next/static/media/aff-liquid.edab8743.png",height:380,width:296,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAICAMAAADtGH4KAAAAPFBMVEVMaXHTzNDUq4zQvr7ZzNrgtZPh1cLowqHjz8LetaHsy7jdt5ThuJ7Uy9HizcDcr4TkvJm7j3LQnXbt4NxTil0qAAAAD3RSTlMAkKxTCtsVZKAmRXq7VN0a9E/WAAAACXBIWXMAAAsSAAALEgHS3X78AAAAMElEQVQImRWJxxEAIAyAsHcTdf9dvfADaAWj68hATNebziPWg0pqQJVTgbyfs7tc/B+CASbzrARDAAAAAElFTkSuQmCC",blurWidth:6,blurHeight:8},eV={src:"/_next/static/media/aff-powder.ca066073.png",height:191,width:180,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAATlBMVEVMaXH73Mr407zluZDevqVMPy68jG3KglXjqoMUFBTwtZjgnmbhu6Dx1b3JkFjVjWLyxabxyq3218Xbo3rCjmXMoIP/4cf/0a//zJvxvJZUSF7jAAAAFnRSTlMA/P4irB70FD8G3Ybo4YF1uYP3p7jmgnqgoAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAD9JREFUCJkVikkOgCAQwMo6A6i4gv7/o2Z6adIUkK4YWmczS3X5OgLo92Q/dpDQ5ulXAbbXjWhXupdoAUoq8ANDWgHS2Ki3tQAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8},eG={src:"/_next/static/media/aff.fc2df510.png",height:190,width:136,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAICAMAAADtGH4KAAAANlBMVEVMaXHr6+7s2s7zxLD359jJwsLr5uPlw7DZqZHl1Mjv5eDIo6O9jHHFoYraoYrs497JwcD59vLdBmg6AAAAEXRSTlMALfxBRxCVIvqr4A79m6n6r0rdwxsAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAuSURBVAiZHcfJEQAgCASwBUHxRPtv1oFXJoA0AFDbAc7KFuvBHE/Cyllip+zVDxTYAMSG9RH6AAAAAElFTkSuQmCC",blurWidth:6,blurHeight:8},eW={src:"/_next/static/media/bsf.3c3da8ce.png",height:256,width:188,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAICAMAAADtGH4KAAAAOVBMVEVMaXGSZlSpjXuQgXivh3N2V0jVq5GzlH9iWE6jemLLpY2LdWm0kn3nx7C4qJ2xgmuYb12pinjKood9UI4DAAAAD3RSTlMA0841Tmd0Wg0p+JTquC9iM3/xAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAMElEQVQImR2KtxEAIAzE
1RLbJsP+wnPlCKvQAMWEb11xWnyBuFyCvBmj1YuWE/1PDAxnWAN+41PZBAAAAAElFTkSuQmCC",blurWidth:6,blurHeight:8},eQ={src:"/_next/static/media/affc-closed.60be7c90.png",height:417,width:264,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAICAMAAAAGL8UJAAAAElBMVEVMaXHGooTFo4aUbliSdWrJpYTXU8MfAAAABnRSTlMAUTDSfN1uG2CGAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGklEQVQImWNgQAGMjCCSiZUJzGEGi7EgKwAAAdwAFEi9K9UAAAAASUVORK5CYII=",blurWidth:5,blurHeight:8},eY={src:"/_next/static/media/affc-open.ddad53ef.png",height:401,width:290,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAICAMAAADtGH4KAAAAIVBMVEVMaXHRoY3t7ejewaDfvqDavqbauJ7dtZPRr5TAopHn4dnDHcsMAAAAC3RSTlMAAw4hQHe+0GCjYNzxphgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAsSURBVAiZHcrJCQAwEMNAea8c/RccnNcgEIBSIGp9egPEDZM16YMepzgG4gEJwABXlQMRtgAAAABJRU5ErkJggg==",blurWidth:6,blurHeight:8},eK={src:"/_next/static/media/bsrc-open.4f47619c.png",height:360,width:263,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAICAMAAADtGH4KAAAAKlBMVEVMaXGuim3Qs5yhinvdu6uyqKK5sai4wcuoh2rBnHuugFWsgl2whl/cuZ+20kuZAAAADnRSTlMAHIUzD0w7Npetid6y1N/fduYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAtSURBVAiZHYrJDQAwCMMMhd7df90q+BUrBjBEb0Dk0H7uAfi+Mju6WLO6rPwDC7UAbpwUELQAAAAASUVORK5CYII=",blurWidth:6,blurHeight:8},eq={src:"/_next/static/media/bsrc-closed.4535d59e.png",height:354,width:237,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAICAMAAAAGL8UJAAAAG1BMVEVMaXG1l3rVt6Tetpncu6DCn3u6nYC6oYjTsJPPKdRCAAAACXRSTlMAIjRfyMqse+QSmErJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIklEQVQImWNggAImEMHMwsDAwMgBYrOygwTYwHKMMEUMDAAEGQAoG6UpZAAAAABJRU5ErkJggg==",blurWidth:5,blurHeight:8};var eJ=n(25420),eX=n(14556),ez=n.n(eX),eZ=(0,M.Ai)({name:"Shade Match Loading",position:P.ho.Main,type:P.R6.Modal,isPromotion:!1}),e$="ShadeMatchFinderLoading";let e0=function(e){var t=e.category,n=e.imageData,a=e.surveyAnswers,r=e.loadRecommendations,i=e.onGenericError,o=e.onRecommendationsLoaded,c=(0,ea.q)().next,h=(0,$.Bd)().t,m=(0,Y.A)();(0,_.useEffect)(function(){var e=!1;return(0,s._)(function(){var t,s,l;return(0,d._)(this,function(d){switch(d.label){case 0:if(!n||!a)return[2];d.label=1;case 1:return d.trys.push([1,5,,6]),[4,r(n,a)];case 2:if(t=d.sent(),e)return[3,4];return[4,o(t)];case 3:s=d.sent(),!e&&s&&c(),d.label=4;case 4:return[3,6];case 5:return l=d.sent(),e||i({message:"Loading results",error:l}),[3,6];case 6:return[2]}})})(),function(){e=!0}},[n,r,o,i,c,a]);var A=(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(W.Ay,{className:ez()["".concat(e$,"__powder-image")],imageSrc:eV,alt:""}),(0,u.jsx)(W.Ay,{className:ez()["".concat(e$,"__aff-cap-image")],imageSrc:eU,alt:""}),(0,u.jsx)(W.Ay,{className:ez()["".concat(e$,"__aff-bottle-image")],imageSrc:eG,alt:""}),(0,u.jsx)(W.Ay,{className:ez()["".concat(e$,"__bsf-image")],imageSrc:eW,alt:""}),(0,u.jsx)(W.Ay,{className:ez()["".concat(e$,"__aff-liquid-image")],imageSrc:eH,alt:""}),(0,u.jsx)(W.Ay,{className:ez()["".concat(e$,"__aff-liquid-cap-image")],imageSrc:eO,alt:""})]}),g=(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(W.Ay,{className:ez()["".concat(e$,"__affc-closed-image")],imageSrc:eQ,alt:""}),(0,u.jsx)(W.Ay,{className:ez()["".concat(e$,"__bsrc-open-image")],imageSrc:eK,alt:""}),(0,u.jsx)(W.Ay,{className:ez()["".concat(e$,"__affc-open-image")],imageSrc:eY,alt:""}),(0,u.jsx)(W.Ay,{className:ez()["".concat(e$,"__bsrc-closed-image")],imageSrc:eq,alt:""})]});return(0,u.jsxs)("div",{className:ez()["".concat(e$)],children:["foundation"===t?A:g,(0,u.jsx)(Q.A,{onIntersection:function(){(0,q.UD)((0,l._)(m).concat([eZ]))},shouldOnlyTriggerOnce:!0,children:(0,u.jsxs)("div",{className:ez()["".concat(e$,"__content-wrapper")],children:[(0,u.jsx)(eJ.n,{iconName:"spinner",className:ez()["".concat(e$,"__loader-icon")]}),(0,u.jsx)("h1",{className:ez()["".concat(e$,"__content")],children:h("components:shade-match-finder.loading.copy",{context:t})})]})})]})};var e1=n(89157),e2=n(98182),e4=n(33454),e6=n(94238),e3=n(38591),e8=n(86425),e5=n(55964),e7=n(20412),e9=n(78532),te=n(1404),tt=n.n(te),tn="NoResultsFound",ta=function(e){var t=e.className,n=e.image,a=e.title,s=e.copy,r=e.onRetakeQuestionsClick,c=e.onLinkClick,l=e.linkCta,d=l.linkCopy,_=l.linkHref,h=(0,$.Bd)().t;return(0,u.jsxs)("div",{className:et()(tn,tt()[tn],t),children:[(0,u.jsxs)("div",{className:tt().content,children:[(0,u.jsx)(W.Ay,(0,o._)((0,i._)({}
1,n),{className:tt().image,loadingMethod:e7.PH.Eager})),(0,u.jsx)(Z.t,{className:tt().title,level:Z.t.Level.h2,text:a,visualSize:Z.t.VisualSize.l,family:Z.t.Family.vanitas,weight:Z.t.Weight.bold}),(0,u.jsx)("p",{className:tt().copy,children:s})]}),(0,u.jsxs)("div",{className:et()(tt().ctas,"".concat(tn,"__ctas")),children:[r&&(0,u.jsx)(z.t,{className:tt().retakeCta,variant:"primary",onClick:r,children:h("common:page.cta.start-again")}),(0,u.jsx)(e9.A,{onClick:c,className:tt().linkCta,buttonType:e5.G.PrimaryLight,href:_,children:d})]})]})},ts=n(6563),tr=n(83065),ti=n(27128),to=n(86555),tc=n(29615),tl=n(42021),td=n(56700),tu=n(60965),t_=n(95471),th=n(80419),tm=n(45204),tA=n(67949),tg=n(41248),tp=n(84807),tf=n(83714),tS=n(40071),tM=n(57800),tx=n(16471),ty=n(71616),tv=n(68151),tb=n.n(tv),tR="MimeResults",tC=[{b:(0,u.jsx)("b",{})}],tF="".concat(tR,"__compact-carousel-control"),tj="mime-complexion-results-footer",tN="mime complexion finder_Save to Profile Foooter",tE={hidePersonalisedMatchBadge:!0},tw=function(e,t){return(0,M.Xs)({name:"".concat(e).concat(t?"/".concat(t):""),type:P.yJ.Modal,position:P.ho.Centre})},tL=function(e,t,n,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"complexion_editor",r=e.products,i=e.carousel,o=t?void 0:"complementary",c=[tw(s,(0,t_.Dm)(a,!t,!0))];return(0,u.jsx)(x.U,{value:c,children:(0,u.jsxs)("div",{children:[(0,u.jsx)(Q.A,{onIntersection:n,shouldOnlyTriggerOnce:!0,threshold:1,children:(0,u.jsx)("div",{className:tb()["".concat(tR,"__product-card")],children:(0,u.jsx)(ts.A,{product:r[0],headingLevel:e6._4.H3,renderedBy:tr.t.PLP})})}),i&&i.length>0&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsxs)("div",{className:tb()["".concat(tR,"__header-wrapper")],children:[(0,u.jsx)(e4.D,{level:e6._4.H2,className:tb()["".concat(tR,"__additional-products-title")],children:(0,u.jsx)($.x6,{i18nKey:"components:mime-results.additional-products-title",context:o})}),(0,u.jsx)("div",{className:tF})]}),(0,u.jsx)(tS.N,{className:tb()["".concat(tR,"__charlotte-says")],children:(0,u.jsx)($.x6,{i18nKey:"components:mime-results.charlotte-says",context:o})}),(0,u.jsx)(tx.default,{products:i,displayType:ty.UI.COMPACT_CAROUSEL,type:tu.xO.ProductListing,portalControlsSelector:".".concat(tF),shouldIncludeFeatureContext:!0})]})]})})},tB=function(e,t,n){var a=e.searchedProduct,s=e.complementary,r=(0,t_.ni)(a.category),i=(0,t_.IR)([a].concat((0,l._)(s)));return Object.keys(i).map(function(e){var a=e===r,s=i[e];return{name:(0,t_.Dm)(e,!a,!0),TabButtonIcon:a?void 0:e3.j8,children:tL(s,a,t,e,n),tabPanelId:e}})},tk=function(e){var t=e.className,n=e.product,a=e.mimeResult,r=e.category,i=e.onRetakeQuestionsClick,o=e.onResultsNotFound,l=e.onVirtualConsultationsLinkClick,h=e.trackingFeatureName,m=void 0===h?"complexion_editor":h,A=(0,c._)((0,_.useState)(),2),g=A[0],p=A[1],f=(0,c._)((0,_.useState)(!0),2),S=f[0],M=f[1],v=(0,c._)((0,_.useState)(),2),b=v[0],R=v[1],C=(0,c._)((0,_.useState)(tA.wY.INITIAL),2),F=C[0],j=C[1],N=(0,c._)((0,_.useState)(),2),E=N[0],w=N[1],L=(0,c._)((0,_.useState)(),2),B=L[0],k=L[1],P=(0,_.useContext)(to.P).updateMatches,T=(0,$.Bd)().t,I=(0,eB.A)("virtualConsultations"),D=(0,c._)((0,tl.i)("mime_results_drawer_and_footer"),1)[0],U=(0,_.useCallback)(function(){j(tA.wY.HEADER)},[]),O=(0,_.useCallback)(function(e){return(0,s._)(function(){return(0,d._)(this,function(t){return k(e),[2]})})()},[]);(0,y.F)(function(){return(0,s._)(function(){var e,t,n,s,r,i,o,c,l;return(0,d._)(this,function(d){switch(d.label){case 0:if(s=null==a||null==(e=a.topResult)?void 0:e.sku,g||!s)return M(!1),[2];return[4,(0,td.n)(s,!0)];case 1:return(null==(r=null==(n=d.sent())||null==(t=n.results)?void 0:t[0])?void 0:r.searchedProduct)&&(p(i=r.searchedProduct.product),R(r),P({complexionResults:r}),o=i.sku,c=(0,e2.WT)(o),l=(0,e2.aQ)(o),(0,th.$t)(th.Zx.ComplexionProductResults,{sku:o,productName:null!=c?c:i.title,productShade:null!=l?l:i.subtitle},new Date(Date.now()+(0,tf.Tr)(30)),!0)),M(!1),[2]}})})()},[g,a.topResult]);var H=n&&(0,tm.Wp)(n,[ti.jG.Concealer,ti.jG.Foundation])||"foundation"===r||"concealer"===r?"complexion":n&&(0,tm.Wp)(n,[ti.jG.Cheek])?"blush":n&&(0,tm.Wp)(n,[ti.jG.Highlighter])?"highlighter":"default",V=n&&(0,tm.Wp)(n,[ti.jG.Foundation])||"foundation"===r?"foundation":n&&(0,tm.Wp)(n,[ti.jG.Concealer])||"concealer"===r?"concealer":n&&(0,tm.Wp)(n,[ti.jG.Cheek])?"blush":n&&(0,tm.Wp)(n,[ti.jG.Highlighter])?"highlighter":"default",G=(0,_.useMemo)(function(){var e;return(null==b||null==(e=b.complementary)?void 0:e.length)?tB(b,U,m):[]},[b,U,m]),W=G.length>0;(0,_.useEffect)(function(){G.length&&w(G[0].name)},[G]),(0,_.useEffect)(function(){g||null==o||o()},[g,o]);var Q=[tw(W&&"complexion_editor"===m?"".concat(m,"/").concat(null!=B?B:E):m)],Y=!!g&&(0,tm.Wp)(g,[t
1i.jG.Foundation,ti.jG.Concealer])&&D.enabled;return S?(0,u.jsx)(e8.A,{className:tb()["".concat(tR,"__loader")],display:!0}):g?(0,u.jsx)(tc.U,{all:tE,children:(0,u.jsx)(x.U,{value:Q,children:(0,u.jsxs)("div",{className:et()(tb()[tR],t),children:[(0,u.jsx)(e4.D,{level:e6._4.H1,className:tb()["".concat(tR,"__title")],children:T("components:mime-results.title",{context:H})}),(0,u.jsxs)("p",{className:tb()["".concat(tR,"__sub-copy")],children:[(0,u.jsx)($.x6,{i18nKey:"components:mime-results.sub-copy",components:tC,context:V}),"\xa0",b&&(0,u.jsx)($.x6,{i18nKey:"components:mime-results.sub-copy-complementary",components:tC})]}),!W&&(0,u.jsx)("div",{className:tb()["".concat(tR,"__product-card")],children:(0,u.jsx)(ts.A,{product:g,headingLevel:e6._4.H3,renderedBy:tr.t.PLP})}),W&&(0,u.jsx)(tM.A,{panels:G,groupName:"MIME-CATEGORIES",iconWithText:!0,className:tb()["".concat(tR,"__pilled-tabs")],tabNavTitleKey:"product:category",selectedTab:null!=B?B:E,onTabSelected:O}),Y&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(tg.A,{drawerState:F,onExpandClick:function(){return j(tA.wY.FULL)},onDismiss:function(){return j(tA.wY.HEADER)},onClose:function(){return j(tA.wY.CLOSED)},trackingContentName:"mime-complexion-results-drawer",drawerTrackingFeatureName:"mime complexion finder_Save to Profile Drawer",footerTrackingFeatureName:tN,contentViewID:tj}),F!==tA.wY.INITIAL&&(0,u.jsx)(tp.A,{contentViewID:tj,className:tb()["".concat(tR,"__save-results-footer")],trackingFeatureName:tN})]})]})})}):(0,u.jsx)(ta,{className:tb()["".concat(tR,"__no-results")],image:{imageSrc:X,alt:""},title:T("common:error.no-match-found"),copy:(0,u.jsx)($.x6,{i18nKey:"common:error.no-match-try-new-photo-or-consultation",components:tC}),linkCta:{linkCopy:T("common:page.cta.book-virtual-consultation"),linkHref:I},onRetakeQuestionsClick:i,onLinkClick:function(){null==l||l()}})},tP=n(83221),tT=n(97043),tI=n(61006),tD=n(39052),tU=n(7206),tO=n.n(tU),tH="ShadeMatchResults",tV=(0,M.Ai)({name:"Shade Match Results",position:P.ho.Main,type:P.R6.Modal,isPromotion:!1}),tG=(0,M.Ai)({type:P.R6.Button,name:"start again",isPromotion:!1,position:P.ho.Bottom}),tW=(0,M.Ai)({type:P.R6.Link,name:"Book a Virtual Consultation",isPromotion:!1,position:P.ho.Bottom}),tQ=function(e){var t=e.className,n=e.results,a=e.product,i=e.category,o=e.onDismiss,c=e.showRetakeQuestionsCTA,_=e.showLandingScreen,h=(0,ea.q)().goTo,m=(0,Y.A)(),A=(0,e1.d4)(tT.rr),g=+!!_,p=U(i),f=c?function(){(0,tI.u)({loggingId:P.C0.LinkClick,context:m.concat(tG)}),h(g)}:void 0;return(0,y.F)(function(){return(0,s._)(function(){var e,t,s,r,i,o,c,l,u,_,h;return(0,d._)(this,function(d){switch(d.label){case 0:if(!(r=null==n||null==(e=n.topResult)?void 0:e.sku)||!a)return[2];return[4,(0,td.n)(r,!0)];case 1:if(!(i=null==(s=d.sent())||null==(t=s.results)?void 0:t[0])||(c=(o=i.searchedProduct.product).sku,l=(0,e2.WT)(c),u=(0,e2.aQ)(c),_={sku:c,productName:null!=l?l:o.title,productShade:null!=u?u:o.subtitle},A!==tD.B7.REGISTERED))return[3,5];d.label=2;case 2:return d.trys.push([2,4,,5]),[4,(0,tP.F1)(_)];case 3:return d.sent(),[3,5];case 4:return h=d.sent(),G.Ay.error("Failed to save complexion results",{error:h}),[3,5];case 5:return[2]}})})()},[a,n,A]),(0,y.F)(function(){return(0,s._)(function(){return(0,d._)(this,function(e){return!n||n.noResults||(0,q.UD)((0,l._)(m).concat([p,(0,M.Ai)({name:"your complexion shade matches!",type:P.R6.Screen,isPromotion:!1,position:P.ho.Main})])),[2]})})()},[n]),(0,u.jsxs)("div",{className:et()(tH,t,(0,r._)({},tO()["".concat(tH,"--noProduct")],!a)),children:[(0,u.jsx)(x.U,{value:[tV],children:(0,u.jsx)(ed,{onDismiss:o,showBackButton:!1,showMeatBall:!1,showHeader:!a,category:i})}),n?(0,u.jsx)(tk,{product:a,mimeResult:n,category:i,trackingFeatureName:"".concat(i,"_finder_results"),onRetakeQuestionsClick:f,onResultsNotFound:function(){var e=(0,M.Ai)({name:"sorry darling, no matches found!",type:P.R6.Screen,isPromotion:!1}),t=(0,T.Kk)({message:"no match found"});(0,q.UD)([m,p,e,t].flat())},onVirtualConsultationsLinkClick:function(){(0,tI.u)({loggingId:P.C0.LinkClick,context:m.concat(tW)})}}):null]})},tY=n(75582),tK=n(22945),tq=n.n(tK),tJ="generic",tX={"Could not find a face in your photo, or you are too close to the camera.":"could-not-find-face","Too many faces in the photo. Please use a photo of just you please.":"too-many-faces","For the best accuracy, please remove your glasses.":"remove-glasses","For the best accuracy, please make sure we can see your entire face.":"see-entire-face","For the best accuracy, please try another photo that is not as blurry.":"not-as-blurry","Please use a photo with your face closer to the camera.":"face-closer","Please use a photo with your face further from the camera.":"face-further"},tz={MAX_UPLOAD_SIZE_EXCEEDED:tJ,UNSUPPORTED_FILE_TYPE:tJ,IMAGE_DIMENSIONS_TOO_SMALL:tJ,UNABLE_TO_COMPRESS_IMAGE:tJ,NO_FACES_DETECTED:"could-not-find-face",NO_FACE_DETECTED_OR_TOO_CLOSE:"could-not-find-face",MULTIPLE_FACES_DETECTED:"too-many-faces",GLASSES_DETECTED:"remove-glasses",FACE_NOT_COMPLETE_IN_FRAME:"see-entire-face",BLURRY_IMAGE:"not-as-blurry",FACE_TOO_SMALL:"face-closer",FACE_TOO_BIG:"face-further"},tZ=function(e){return"components:shade-match-finder.image-retry.errors.".concat(e)},t$=function(e,t){return e&&tz[e]?tZ(tz[e]):t&&tX[t]?tZ(tX[t]):tZ(tJ)},t0=(0,M.Ai)({name:"Shade Match Image Retry",position:P.ho.Main,type:P.R6.Modal,isPromotion:!1});let t1=function(e){var t=e.base64Image,n=e.errorType,a=e.errorMessage,s=e.onDismiss,r=e.onRetryScan,i=e.category,o=(0,$.Bd)().t,c=(0,Y.A)(),d=(0,M.Ai)({name:"sorry darling, image error!",type:P.R6.Screen,isPromotion:!1});return(0,u.jsxs)("div",{className:tq().container,children:[(0,u.jsx)(x.U,{value:[t0],children:(0,u.jsx)(ed,{onDismiss:s,category:i})}),(0,u.jsx)(Q.A,{onIntersection:function(){(0,q.UD)((0,l._)(c).concat([d,V(a||o(t$(n,a)),n,J.q.UserError)]))},shouldOnlyTriggerOnce:!0,children:(0,u.jsxs)("div",{className:tq().content,children:[(0,u.jsxs)("div",{className:tq().imageContainer,children:[(0,u.jsx)(W.Ay,{className:tq().userImage,imageSrc:t,alt:""}
1),(0,u.jsx)(eJ.n,{iconName:"close",className:tq().closeIcon,iconSize:"48px"})]}),(0,u.jsx)(Z.t,{level:"h2",className:tq().heading,text:o("components:shade-match-finder.image-retry.title"),visualSize:"l",weight:"medium"}),(0,u.jsx)("span",{className:tq().errorMessage,children:o(t$(n,a))}),(0,u.jsx)("span",{className:tq().subtitle,children:o("components:shade-match-finder.image-retry.please-retake")}),(0,u.jsx)("div",{className:tq().stickyCta,children:(0,u.jsx)(z.t,{className:tq().cta,onClick:r,children:o("components:shade-match-finder.image-retry.cta")})})]})})]})};var t2=n(79920);let t4=n.p+"static/media/scan-overlay.3611bd81.svg";var t6=n(28957),t3=n(32905),t8=n.n(t3),t5="HolitionSdk",t7=(0,M.Ai)({name:"Shade Match Scan",position:P.ho.Main,type:P.R6.Modal,isPromotion:!1});let t9=function(e){var t=e.onDismiss,n=e.onImageTaken,a=e.onGenericError,i=e.category,o=(0,$.Bd)().t,l=(0,_.useRef)(null),h=(0,c._)((0,_.useState)(!1),2),m=h[0],A=h[1],g=(0,c._)((0,_.useState)(),2),p=g[0],f=g[1],S=(0,Y.A)(),y=(0,v.A)(),b=(0,t2.O)(l),R=b.face3d,C=b.isFace3dInitialised,F=b.face3dSetupError;return(0,_.useEffect)(function(){F&&a({message:"Scan: initialise Face3D input",error:F})},[F,a]),(0,_.useEffect)(function(){var e=!1;return C&&(0,s._)(function(){var t,s,r,i;return(0,d._)(this,function(o){switch(o.label){case 0:if(!R)return[3,4];t=y?.46:.1,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,R.startFaceScan({features:{skinTone:!0},options:{imageQuality:{timeout:120,callback:function(t){var n=t.feedback,a=t.completed;e||f(a?"completed":n)},faceScale:{lowerBound:t}},debug:!1,iterations:15,returnImage:!0}})];case 2:return(null==(s=o.sent())?void 0:s.image)&&!e&&(A(!0),n(s.image.data,null==(r=s.skinTone)?void 0:r.classPrediction)),[3,4];case 3:return i=o.sent(),e||a({message:"Scan: start face scan and capture image",error:i}),[3,4];case 4:return[2]}})})(),function(){e=!0,null==R||R.stopFaceScan()}},[C,R,y,n,a]),(0,u.jsxs)("div",{className:et()(t8().container,(0,r._)({},t8().active,C)),children:[(0,u.jsx)(x.U,{value:[t7],children:(0,u.jsx)(ed,{onDismiss:t,showBackButton:!0,showMeatBall:!1,className:t8().progressBar,titleClassName:t8().progressBarTitle,category:i})}),(0,u.jsx)(Q.A,{target:l,onIntersection:function(){(0,q.UD)([S,(0,M.Ai)({name:"".concat(i," shade match scanner"),position:P.ho.Main,type:P.R6.FaceScanner,isPromotion:!1})].flat())},shouldOnlyTriggerOnce:!0,threshold:1,children:(0,u.jsxs)("div",{className:t8().camera,children:[(0,u.jsx)("div",{id:t5,"data-testid":t5,className:t8().holitionContainer,ref:l}),C&&!y&&(0,u.jsx)("div",{className:t8().overlay,children:(0,u.jsx)("img",{src:t4,className:t8().overlayImage})}),(!C||m)&&(0,u.jsx)(t6.t,{className:t8().loader,"data-testid":"loader"}),p?(0,u.jsx)("div",{className:t8().footer,children:o("components:shade-match-finder.face-scan.".concat(p))}):null]})})]})};var ne={status:"scan"},nt=(0,M.Ai)({name:"Retake Image",type:P.R6.Button,isPromotion:!1});let nn=function(e){var t=e.imageUpload,n=e.onDismiss,a=e.onImageUploadSuccess,r=e.onGenericError,i=e.nextStepIsReady,o=e.category,h=(0,c._)((0,_.useState)(ne),2),m=h[0],A=h[1],g=(0,c._)((0,_.useState)(!1),2),p=g[0],f=g[1],S=(0,ea.q)().next,x=(0,Y.A)(),y=(0,_.useCallback)(function(e,n){return(0,s._)(function(){var s,i,c,l,u,_,h,m,g,p;return(0,d._)(this,function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),[4,t(e)];case 1:if(!(s=d.sent()).imageUrl)throw Error("ShadeMatchScanStep: No imageUrl returned from imageUpload");return a(s,n),f(!0),(0,es.Xj)(x.concat((0,M.Ai)({name:"".concat(o," shade match scanner"),position:P.ho.Main,type:P.R6.FaceScanner,isPromotion:!1}))),[3,3];case 2:return(null==(i=d.sent())||null==(l=i.properties)||null==(c=l.httpStatus)?void 0:c.code)===tY.k.BAD_REQUEST?A({status:"retry",base64ImageTaken:e,errorMessage:null==i||null==(h=i.properties)||null==(_=h.response)||null==(u=_.data)?void 0:u.message,errorType:null==i||null==(p=i.properties)||null==(g=p.response)||null==(m=g.data)?void 0:m.errorType}):r({message:"Scan: image upload",error:i}),[3,3];case 3:return[2]}})})()},[t,a,x,o,r]);return((0,_.useEffect)(function(){i&&p&&S()},[i,p,S]),"retry"===m.status)?(0,u.jsx)(t1,{base64Image:m.base64ImageTaken,onDismiss:n,onRetryScan:function(){A(ne),(0,q.cx)("Retry",(0,l._)(x).concat([nt]))},errorMessage:m.errorMessage,errorType:m.errorType,category:o}):(0,u.jsx)(t9,{onDismiss:n,onImageTaken:y,onGenericError:r,category:o})};var na=n(74253),ns=n.n(na);f.r.skinTone,f.r.undertone,f.r.colorPreference,f.r.coverage;var nr={fair:"fair",light:"fair",light_medium:"medium",medium:"medium",medium_tan:"tan",tan_deep:"tan",deep:"deep"},ni=((a=ni||{}).match="match",a.error="error",a),no=(0,G.tZ)("ShadeMatchFinder");let nc=function(e){var t=e.category,n=e.isVisible,a=e.product,b=e.onClose,R=e.onResultsLoaded,C=e.showLandingScreen,F=void 0===C||C,j=(0,c._)((0,_.useState)({}),2),N=j[0],E=j[1],B=(0,c._)((0,_.useState)("match"),2),k=B[0],T=B[1],I=(0,c._)((0,_.useState)(),2),U=I[0],O=I[1],H=(0,c._)((0,_.useState)(),2),V=H[0],G=H[1],W=(0,c._)((0,_.useState)(),2),Q=W[0],Y=W[1],K=(0,c._)((0,_.useState)([]),2),q=K[0],J=K[1],X=(0,v.A)(),z=w(t,null==a?void 0:a.sku),Z=z.imageUpload,$=z.loadRecommendations,ee=(0,_.useCallback)(function(e){return(0,s._)(function(){var n,a;return(0,d._)(this,function(s){switch(s.label){case 0:if(a=(n=null==e?void 0:e[0])?{topResult:{category:t,sku:n},noResults:!1}:{noResults:!0},!(R&&!a.noResults))return[3,2];return[4,R(a)];case 1:return s.sent(),[2,!1];case 2:return Y(a),[2,!0]}})})()},[t,R]),et=(0,_.useCallback)(function(e){var t=e.message,n=e.error;no.error(t,n),T("error")},[]),en=a?4:5,ea=F?en:en-1,es=F?-1:0,er={onDismiss:function(){T("match"),b()},onGenericError:et,numberOfSteps:en},ei=function(e){E(function(t){return(0,i._)({},t,e)})},eo=(0,_.useCallback)(function(e){return(0,s._)(function(){var t;return(0,d._)(this,function(n){switch(n.label){case 0:return[4,(0,L.QD)(e)];case 1:return(t=n.sent()).length?J((0,g.V)(t)):et({message:"Fetching content collection",error:{message:"Collection data not found",collectionHref:e,collectionData:t}}),[2]}})})()},[et]);(0,y.F)(function(){return(0,s._)(function(){var e,n;return(0,d._)(this,function(s){return V&&(void 0===nr[V]&&et({message:"Scan First: map image skin tone from scan",error:{message:"unrecognised skin tone",imageSkintone:V}}),e=V&&nr[V],E((n={},(0,r._)(n,f.r.skinTone,e),(0,r._)(n,f.r.undertone,""),(0,r._)(n,f.r.colorPreference,""),(0,r._)(n,f.r.coverage,""),n)),eo("shade-finder-collection-".concat(t.toLowerCase()).concat(a?"-pdp-":"-").concat(e))),[2]})})()},[V,t,a,eo,et]);var ec=(0,u.jsx)(ed,(0,o._)((0,i._)({},er),{showBackButton:!0,showMeatBall:!0,activeIndexOffset:es,category:t})),el=q.map(function(e){var n=e.href;return(0,u.jsx)(A.A,{contentViewId:n,form:p.zP.SHADE_MATCH_FINDER,totalNumSteps:er.numberOfSteps,onDismiss:er.onDismiss,onCompletion:ei,contentContextDetails:{namePrefix:"".concat(t," finder questions"),position:P.ho.Main},disableFlowNavigation:!0,overrideFlowNavigation:ec,overrideLast:ea},n)}),eu=(0,_.useCallback)(function(e,t){G(t),O(e)},[]),e_=(0,l._)(F?[(0,u.jsx)(eD,(0,o._)((0,i._)({},er),{category:t,isVisible:n}))]:[]).concat([(0,u.jsx)(eL,(0,o._)((0,i._)({},er),{showBackButton:F,activeIndexOffset:es,category:t})),(0,u.jsx)(nn,(0,o._)((0,i._)({},er),{imageUpload:Z,onImageUploadSuccess:eu,nextStepIsReady:!!q.length,category:t}))],(0,l._)(el),[(0,u.jsx)(e0,(0,o._)((0,i._)({},er),{imageData:U,surveyAnswers:N,loadRecommendations:$,onRecommendationsLoaded:ee,category:t})),(0,u.jsx)(tQ,(0,o._)((0,i._)({},er),{product:a,category:t,results:Q,showRetakeQuestionsCTA:!0,showLandingScreen:F}))]),eh=(0,_.useMemo)(function(){var e;return[D(t),(e=X?P.ho.Right:P.ho.Main,(0,M.ab)({name:"shade_match_f
1inder_modal",position:e,type:P.V_.ShadeMatchDrawer}))]},[X,t]);return(0,u.jsx)(x.U,{value:eh,children:(0,u.jsx)(S.t,{answerStyle:"shade-finder",children:(0,u.jsx)(h.A,{className:ns().drawer,isVisible:n,onClose:er.onDismiss,title:"ShadeMatchFinderDrawer",shouldShowCloseButton:!1,children:"error"===k?(0,u.jsx)(eA,(0,o._)((0,i._)({},er),{onRestart:function(){return T("match")},category:t})):(0,u.jsx)(m.q,{items:e_,initialIndex:0})})})})}},83221:(e,t,n)=>{"use strict";n.d(t,{F1:()=>F,M0:()=>R,Ou:()=>j,Zh:()=>C,sW:()=>E});var a=n(23513),s=n(29794),r=n(77192),i=n(86716),o=n(41289),c=n(49847),l=n(44564),d=n(11463),u=n(32757),_=n(80098),h=n(23345),m=n(21152),A=n(62618),g=n(72084),p=n(80419),f=n(59551),S=n(33373),M=n(54026),x=n(71261),y=n(59703),v=n(90650),b=n(98269),R=u.createContext({recommendationResults:null,setComplexionRecommendationResults:function(){return null},hasRecommendationResultsError:!1,setHasRecommendationResultsError:function(){return null},setIsPersonalised:function(){return null},isPersonalised:!1,hasComplexionProfile:!1}),C=function(e){return(0,a._)(function(){return(0,i._)(this,function(t){return l.A.set(y.jO,JSON.stringify(e),{expires:(0,y.iC)(y.Tt)}),[2]})})()},F=function(e){return(0,a._)(function(){return(0,i._)(this,function(t){switch(t.label){case 0:return[4,m.Ay.send((0,A.Fi)(e))];case 1:return t.sent(),[2]}})})()},j=function(e,t,n,s){return(0,a._)(function(){var a;return(0,i._)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,6,,7]),!("mimeRequestId"in e))return[3,2];return[4,m.Ay.send((0,A.t_)(e)).catch(function(){return Promise.reject("Failed to save profile via MIME")})];case 1:r.sent(),r.label=2;case 2:if(!("sku"in e))return[3,4];return[4,m.Ay.send((0,A.Fi)(e)).catch(function(){return Promise.reject("Failed to save profile ".concat(s))})];case 3:r.sent(),r.label=4;case 4:return[4,m.Ay.send((0,A.SK)()).catch(function(){return Promise.reject("Failed to get recommendation results for registered")})];case 5:return t(r.sent()),[2,!0];case 6:return a=r.sent(),v.Ay.error(a),n(!0),[3,7];case 7:return[2,!1]}})})()},N=function(e){var t=e.children,n=e.canRenderImmediately,s=(0,r._)((0,u.useState)(null),2),g=s[0],C=s[1],F=(0,r._)((0,u.useState)(!1),2),N=F[0],E=F[1],w=(0,r._)((0,u.useState)(!1),2),L=w[0],B=w[1],k=(0,r._)((0,u.useState)(!1),2),P=k[0],T=k[1],I=(0,r._)((0,u.useState)(!1),2),D=I[0],U=I[1],O=(0,d.useRouter)();return((0,u.useEffect)(function(){U("true"===(0,p.vc)(p.Zx.PersonalisedExperience))},[]),(0,h.F)(function(){return(0,a._)(function(){var e,t,n,s,r,o,d,u,h;return(0,i._)(this,function(g){switch(g.label){case 0:if(t=(e=(0,M.Co)())[_.w0.resultId],n=e[b.P.shouldSaveComplexionProfile],s=(0,x.zN)((0,S.Zn)()),t&&B(!0),!(!t&&s))return[3,4];if(!n)return[3,2];return[4,(0,a._)(function(){var e,t,n;return(0,i._)(this,function(a){switch(a.label){case 0:if(e=p.Zx.ComplexionProductResults,!(t=(0,p.jJ)(e)))return[3,4];a.label=1;case 1:return a.trys.push([1,3,,4]),[4,j({productName:t.productName,productShade:t.productShade,sku:t.sku},C,E)];case 2:if(a.sent())return(0,p.zx)(p.Zx.ComplexionProductResults),[2,!0];return[3,4];case 3:return n=a.sent(),v.Ay.error("Unable to save complexion response to BE for local storage key ".concat(e),{error:n}),[3,4];case 4:return[2,!1]}})})()];case 1:return g.sent()&&(T(!0),r=c.stringify(O.query),o=(0,M.IM)(b.P.shouldSaveComplexionProfile,r,O.pathname),O.replace(o,void 0,{shallow:!0})),[3,4];case 2:return[4,m.Ay.send((0,A.SK)()).then(function(e){C(e),T(!0)}).catch(function(e){E(!0),v.Ay.error("Unable to fetch complexion recommendation results for registered",{e:e})})];case 3:g.sent(),g.label=4;case 4:if(!(!t&&!s))return[3,11];return[4,(0,a._)(function(){var e;return(0,i._)(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,(0,f.$l)(l.A.get(y.jO))];case 1:return e=t.sent(),[3,3];case 2:return t.sent(),[3,3];case 3:return[2,e]}})})()];case 5:if(!(d=g.sent()))return[3,10];g.label=6;case 6:return g.trys.push([6,8,,9]),[4,m.Ay.send((0,A.C)(d))];case 7:return u=g.sent(),T(!0),C(u),[3,9];case 8:return h=g.sent(),E(!0),v.Ay.error("Unable to fetch complexion recommendation results for guest",{e:h}),[3,9];case 9:return[3,11];case 10:B(!0),g.label=11;case 11:return[2]}})})()},[O]),void 0!==n&&n||L||g||N)?(0,o.jsx)(R.Provider,{value:{recommendationResults:g,setComplexionRecommendationResults:C,hasRecommendationResultsError:N,setHasRecommendationResultsError:E,isPersonalised:D,setIsPersonalised:function(e){(0,p.lR)(p.Zx.PersonalisedExperience,e.toString()),U(e)},hasComplexionProfile:P},children:t}):null};function E(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).canRenderImmediately,n=function(n){return(0,o.jsx)(N,{canRenderImmediately:t,children:(0,o.jsx)(e,(0,s._)({},n))})};return n.getInitialProps=function(t){return(0,a._)(function(){return(0,i._)(this,function(n){return[2,(0,g.A)(e,t)]})})()},n}},89358:e=>{e.exports={container:"styles_container__sJLef",content:"styles_content__ND9Yd",ctaContainer:"styles_ctaContainer__srwAM",deniedAlert:"styles_deniedAlert__VxBjZ",cta:"styles_cta__5fkNh",title:"styles_title___eA2C",subtitle:"styles_subt
1itle__c8weP",imageInfo:"styles_imageInfo__scSBn",bestResults:"styles_bestResults__IYF7H",regionSelector:"styles_regionSelector__FZHpb",terms:"styles_terms__aMyvY"}},98269:(e,t,n)=>{"use strict";n.d(t,{P:()=>i,Q:()=>r});var a,s,r=((a={}).viaComplexionBlock="viaComplexionBlock",a.productName="productName",a.productShade="productShade",a.sku="sku",a.hasFailedToSaveProfileViaComplexionBlock="hasFailedToSaveProfileViaComplexionBlock",a.viaComplexionEditPLP="viaComplexionEditPLP",a),i=((s={}).shouldSaveComplexionProfile="shouldSaveComplexionProfile",s)}}]);
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.