PageSourceSearch

https://www.glassesusa.com/modern/4179.97171a51ea5159d0d74d.js

js glassesusa.com collected 2026-10-02 02:32:54 UTC 57,129 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"RLS-1013"},e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];if(null!=s)for(var a in s)s.hasOwnProperty(a)&&(e[a]=s[a])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:glassesusa-app":!0});var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5261bcfc-ca9b-474f-b441-5c6b46748e0a",e._sentryDebugIdIdentifier="sentry-dbid-5261bcfc-ca9b-474f-b441-5c6b46748e0a")}catch(e){}}(),(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[4179],{1722(e,t,s){s.d(t,{J:()=>n});var a=s(13812),r=s(8287);const n=(e,{currentPage:t,label:s="",vtoMode:n})=>{(0,a.Zm)(e,{currentPage:t,label:s,isQuizResultsPDP:(0,r.Gc)(window.location.search),vtoMode:n})}},8022(e,t,s){s.d(t,{nA:()=>r,wl:()=>a,Yu:()=>n});const a=e=>({autoOpen:!1,showCloseButton:!1,userConsent:"agree",skinSmoothStrength:70,enableEyewearAutoPD:!1,hideButtonsOnResultPage:!1,width:451,height:542,...e});const r=(e={})=>{if(window.YMKLoading)return;let{width:t=451,height:s=542,enableEyewearAutoPD:r=!1,hideButtonsOnResultPage:n=!1}=e;if(window.YMK)return window.YMK.changeSize({height:s,width:t}),void window.YMK?.setUISettings?.({hideButtonsOnResultPage:n});((e={})=>{window.ymkAsyncInit=()=>{window.YMK.init(a(e))},window.YMKLoading=!0})({enableEyewearAutoPD:r,height:s,width:t,hideButtonsOnResultPage:n}),(()=>{let e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src="https://plugins-media.makeupar.com/c39749/sdk.js?apiKey=UoW8u8CArN1piX5CVUp32A",e.onload=()=>{window.YMKLoading=!1},document.head.append(e)})()},n=e=>{if(window.YMK)if(e){let t=((e,t="image")=>{let s=e.split(","),a=atob(s[1]),r=a.length,n=new Uint8Array(r);for(;r;)n[r-=1]=a.charCodeAt(r);return new File([n],t,{type:s[0].match(/:(.*?);/)?.[1]})})(e);window.YMK.open(!1,t)}else window.YMK.open(!0)}},10601(e,t,s){s.d(t,{R:()=>d});var a=s(65813),r=(s(97312),s(93213)),n=s(52550),o=s(8287);const i="wrapHeader_a-D7UY",l="buttonBack_b-D7UY",c="title_c-D7UY",d=({onClick:e,searchParams:t})=>{let s=(0,o.Gc)(t);return(0,a.jsxs)("div",{className:i,children:[(0,a.jsx)("button",{className:l,onClick:e,type:"button",children:(0,a.jsx)(r.I,{size:"responsive",icon:n,height:15})}),(0,a.jsx)("p",{className:c,children:s?"Your Quiz Results":"Back to frame"})]})}},15278(e,t,s){s.d(t,{w:()=>l,S:()=>i});var a=s(97312),r=s.n(a);const n={color:{src:"/catalog_filter_color/1/25.jpg",id:"25",label:"Tortoise"},isEligibleForRx:!0,glassesTypeIds:[225,227,226],description:"The Amelia E. Nettle is an elegant frame that leaves a lasting impression. Crafted from high grade acetate, it features subtle rim curves, stylish silver rivets and refined arms with a rich hue.",finalPrice:88,videos:{women:{thumbnail:"/media/catalog/product/gender/thumbnails/5_35-000407.gif",isDefault:!0,genderId:5,url:"https://player.vimeo.com/video/482248410",preview:""}},media:{side:{src:"/catalog_product/1/000407_s_5.jpg",position:3},angle:{src:"/catalog_product/1/000407_u_4.jpg",position:1},front:{src:"/catalog_product/1/000407_f_3.jpg",position:2}},type:"eyeglasses",templateId:1,isKids:!1,customProductBadge:[],price:88,total:0,defaultTintSku:"",id:21492,lensFeatures:[],sku:"35-000407",stock:{qty:2925,status:"in_stock"},brand:{image:"/brand/1/Amelia_E._0_image.png",id:218,label:"Amelia E.",popular:0,url:"/amelia-e",imageHeight:20,categoryId:1},lensTypeIds:[6,10],isDsco:!1,genders:["Women"],shortDescription:"The Amelia E. Nettle is an elegant frame that leaves a lasting impression. Crafted from high grade acetate, it features subtle rim curves, stylish silver rivets and refined arms with a rich hue.",url:"tortoise-medium/amelia-e-nettle/35-000407.html",wizardId:"1",meta:{description:"The Amelia E. Nettle is an elegant frame that leaves a lasting impression. Crafted from high grade acetate, it features subtle rim curves, stylish silver rivets and refined arms with a rich hue.",title:"Amelia E. Nettle Tortoise Prescription 
1Eyeglasses",keyword:"Glasses, Eyeglasses, Eyewear, Eyeglass, Eye glasses, Eye glass, Prescription glasses, Glasses frame, Eye wear, Bifocals, Eyeglass frame, Eyeglasses frames, Prescription eyeglasses, Buy glasses, Sunglasses\r\n"},name:"Amelia E. Nettle Tortoise",isEligibleForPolycarbonate:!0,frame:{types:["Full Frame"],isNosePads:!0,mirror:"/mirror_frame/1/21492.png",lensHeight:39,bridgeWidth:15,isSpringHinges:!1,templeLength:140,lensWidth:53,size:{shortLabel:"M",label:"Medium",id:67},materials:["Plastic"],shapes:["Rectangle","Cat Eye"],width:134,sgMirror:"/mirror_frame/1/21492_sg.png",id:15956},supplierSku:"FLH0438/14 Nettle 004 Dark Tortoise",manufacturerValue:"I-Glasses",contactLensMaterialContent:"",contactLensTypeText:"",contactLensWaterPercentage:"",contactLensPackageDetails:"",isSubscriptionAvailable:!1,badges:[],appliedCoupon:"",inventory:{},withoutBrandCase:!1};var o,i;(o=i||(i={})).CHECK_CAMERA_ACCESS="CHECK_CAMERA_ACCESS",o.NO_CAMERA_ACCESS="NO_CAMERA_ACCESS",o.CAMERA_ACCESS="CAMERA_ACCESS",o.CHECK_POLICY="CHECK_POLICY";const l=r().createContext({step:"CHECK_CAMERA_ACCESS",setStep:()=>{},hasAccess:null,setHasAccess:()=>{},isGlassesOnFace:!1,setIsGlassesOnFace:()=>{},reopenImage:!0,setReopenImage:()=>{},showPolicy:!1,setShowPolicy:()=>{},currentSku:"",setCurrentSku:()=>{},currentProduct:n,setCurrentProduct:()=>{},products:[],setProducts:()=>{},windowProduct:null,setWindowProduct:()=>{},currentDYProduct:null,setCurrentDYProduct:()=>{},isDYTryOn:!1,setDyAnalyticsData:()=>{},dyAnalyticsData:{analyticNaming:"",strategyName:""}})},16766(e,t,s){s.d(t,{Qv:()=>n,VO:()=>a,zN:()=>r});const a=e=>e.tryOnWizard.colors,r=e=>e.tryOnWizard.dyProduct,n=e=>e.tryOnWizard.tryOnType},20778(e,t,s){s.d(t,{HU:()=>m,Xj:()=>u,iT:()=>c,qJ:()=>d});var a=s(65813),r=s(97312),n=s(69508),o=s(48109),i=s(83717);let l={...Object.keys(i.A).reduce((e,t)=>{let s=i.A[t];return{...e,[t]:()=>"isEnabled"in s?s.isEnabled():s.getValue()}},{}),uhc:i.m};const c=e=>!!l[e]&&l[e](),d=(e,t=!0)=>((0,r.useEffect)(()=>{l[e]&&(0,n.iJ)({event:o.aX,isInteraction:t,label:{label:String(l[e]()),expName:e}})},[]),!!l[e]&&l[e]());function u({children:e=null,fallback:t=null,flag:s,cookies:r}){return l[s]?(0,a.jsx)(a.Fragment,{children:l[s](r)?e:t}):(0,a.jsx)(a.Fragment,{children:t})}function m({children:e=null,fallback:t=null,flag:s,cookies:i,isInteraction:c=!0}){return(0,r.useEffect)(()=>{(0,n.iJ)({event:o.aX,label:{label:String(l[s]()),expName:s},isInteraction:c})},[]),l[s]?(0,a.jsx)(a.Fragment,{children:l[s](i)?e:t}):(0,a.jsx)(a.Fragment,{children:t})}},24502(e,t,s){s.d(t,{S:()=>m});var a=s(65813),r=(s(97312),s(93213)),n=s(70113),o=s(8287),i=s(90938);const l="similarButton_aLm-YM",c="quizButton_bLm-YM",d="quizButtonText_cLm-YM",u="arrow_dLm-YM",m=({onClick:e,currentPage:t,searchParams:s})=>(0,o.Gc)(s)?(0,a.jsxs)("button",{type:"button",className:c,onClick:()=>{e(),(0,i.g)(t,"Live Try On","Quiz - Result Page - See More Strip - Open")},children:[(0,a.jsx)("span",{className:d,children:"Try on the rest of your results"}),(0,a.jsx)(r.I,{icon:n,className:u,strokeWidth:1.2,height:8,width:10.67})]}):(0,a.jsx)("button",{type:"button",className:l,onClick:()=>{e(),(0,i.g)(t,"Live Try On","Similar Frames - Open")},children:"View Similar Frames"})},37917(e,t,s){s.d(t,{qH:()=>Sa});var a={};s.r(a),s.d(a,{default:()=>j});var r={};s.r(r),s.d(r,{default:()=>_e});var n={};s.r(n),s.d(n,{default:()=>xs});var o,i,l=s(65813),c=s(97312),d=s.n(c),u=s(93431),m=s(14175),p=s(93213),h=s(87091),g=s(72223),y=s(97500),f=s.n(y),x=s(42337),v=s(8287),w=s(8022),P=s(44592),C=s(45378),_=s(16926);function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},b.apply(null,arguments)}const j=function(e){return c.createElement("svg",b({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 105 63"},e),o||(o=c.createElement("g",{filter:"url(#svg3936974176__a)"},c.createElement("path",{stroke:"url(#svg3936974176__b)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:4,d:"m18 9 9.7 9.7C43.8 34.8 68.3 37.3 87 26.2M18 9l15.4.8M18 9l.8 15.4"}))),i||(i=c.createElement("defs",null,c.createElement("linearGradient",{id:"svg3936974176__b",x1:18,x2:87,y1:9,
1y2:9,gradientUnits:"userSpaceOnUse"},c.createElement("stop",{stopColor:"#fff"}),c.createElement("stop",{offset:1,stopColor:"#fff",stopOpacity:.3})),c.createElement("filter",{id:"svg3936974176__a",width:105,height:63,x:0,y:0,colorInterpolationFilters:"sRGB",filterUnits:"userSpaceOnUse"},c.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),c.createElement("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feMorphology",{in:"SourceAlpha",operator:"dilate",radius:1,result:"effect1_dropShadow_5021_2137"}),c.createElement("feOffset",{dy:6}),c.createElement("feGaussianBlur",{stdDeviation:6}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0"}),c.createElement("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_5021_2137"}),c.createElement("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dy:12}),c.createElement("feGaussianBlur",{stdDeviation:8}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.09 0"}),c.createElement("feBlend",{in2:"effect1_dropShadow_5021_2137",result:"effect2_dropShadow_5021_2137"}),c.createElement("feColorMatrix",{in:"SourceAlpha",result:"hardAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}),c.createElement("feOffset",{dy:1}),c.createElement("feGaussianBlur",{stdDeviation:2.5}),c.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0"}),c.createElement("feBlend",{in2:"effect2_dropShadow_5021_2137",result:"effect3_dropShadow_5021_2137"}),c.createElement("feBlend",{in:"SourceGraphic",in2:"effect3_dropShadow_5021_2137",result:"shape"})))))};var S=s(22341);const E="back_aumBmp",N="icon_bumBmp",k=({onClick:e})=>(0,l.jsxs)("button",{type:"button",className:E,onClick:e,children:[(0,l.jsx)(p.I,{icon:S,className:N,role:"presentation"}),"Back"]});var A=s(15278),I=s(36706),T=s(52524),O=s(38666),D=s(16766);const M=({children:e})=>{let[t,s]=(0,c.useState)("true"===String(I.xM.get("PERFECT_TRY_ON_POLICY_AGREEMENT"))?A.S.CHECK_CAMERA_ACCESS:A.S.CHECK_POLICY),[a,r]=(0,c.useState)({analyticNaming:"",strategyName:""}),[n,o]=(0,c.useState)(null),[i,d]=(0,c.useState)(!1),[u,m]=(0,c.useState)(!0),[p,h]=(0,c.useState)(!1),[g,y]=(0,c.useState)(""),{products:f,setProducts:v,currentProduct:w,setCurrentProduct:P,windowProduct:C,setWindowProduct:b,currentDYProduct:j,setCurrentDYProduct:S,isDYTryOn:E}=(()=>{let{product:e,categoryProducts:t,currentPage:s,productsInStock:a,tryOnDYProduct:r,tryOnDYProductType:n}=(0,x.useSelector)(e=>({product:(0,T.CA)(e),categoryProducts:(0,D.VO)(e),currentPage:(0,_.M5)(e),productsInStock:(0,O.Oj)(e),tryOnDYProduct:(0,D.zN)(e),tryOnDYProductType:(0,D.Qv)(e)}),x.shallowEqual),[o]=(0,c.useState)("DY"===n),[i,l]=(0,c.useState)(()=>o?[]:"category"===s?t:"wishlist"===s?[]:a),[d,u]=(0,c.useState)(null),[m,p]=(0,c.useState)(()=>o?null:"category"===s?t[0]:e),[h,g]=(0,c.useState)(()=>o?r:null);return{products:i,setProducts:l,currentProduct:m,setCurrentProduct:p,windowProduct:d,setWindowProduct:u,currentDYProduct:h,setCurrentDYProduct:g,isDYTryOn:o}})();return(0,l.jsx)(A.w.Provider,{value:{step:t,setStep:s,hasAccess:n,setHasAccess:o,isGlassesOnFace:i,setIsGlassesOnFace:d,reopenImage:u,setReopenImage:m,showPol
1icy:p,setShowPolicy:h,currentSku:g,setCurrentSku:y,products:f,setProducts:v,currentProduct:w,setCurrentProduct:P,windowProduct:C,setWindowProduct:b,currentDYProduct:j,setCurrentDYProduct:S,isDYTryOn:E,setDyAnalyticsData:r,dyAnalyticsData:a},children:e})};var R=s(90938);const L=(()=>{let e=[];return{add:(t,s)=>{let a=window.YMK?.addEventListener(t,s);return e.push({type:t,id:a}),a},removeAll:()=>{e.forEach(e=>{window.YMK?.removeEventListener(e.id)})},remove:t=>{t.forEach(t=>{let s=e.findIndex(e=>e.type===t),a=e[s];a&&(window.YMK?.removeEventListener(a.id),e.splice(s,1))})},removeById:t=>{let s=e.findIndex(e=>e.id===t),a=e[s];s>=0&&(window.YMK?.removeEventListener(a.id),e.splice(s,1))}}})();let F={},B=[{name:"poorLighting",message:"PoorLighting"},{name:"removeGlasses",message:"RemoveGlasses"},{name:"faceAngle",message:"FaceAngle"},{name:"faceTooClose",message:"FaceTooClose"},{name:"faceTooFar",message:"FaceTooFar"}],Y=[{name:"enterVideoRecord",message:"Video - EnterVideoRecord"},{name:"recordingLive",message:"Video - RecordingLive"},{name:"recordingDone",message:"Video - RecordingDone"},{name:"cameraOpened",message:"Camera - Opened",oncePerSession:!0},{name:"cameraFailed",message:"Camera - Failed"},{name:"cameraClosed",message:"Camera - Closed",oncePerSession:!0},{name:"zoom",message:"Camera - Zoom"}],z=()=>B.map(({name:e})=>L.add(e,()=>{F[e]=F[e]?Number(F[e])+1:1})),U=e=>Y.map(({name:t,message:s,oncePerSession:a})=>{let r=L.add(t,()=>{(0,R.g)(e,"Try On - Iframe",s),a&&L.removeById(r)});return r}),K=()=>{let e=[];return B.forEach(t=>{let s=F[t.name];s&&e.push(`${t.message} - ${s}`)}),`ErrorMessage - ${e.join(", ")}`};const W=e=>{(0,c.useEffect)(()=>{let t=[],s=U(e);t=t.concat(s);let a=z();return(t=t.concat(a)).push(L.add("errorMessage",t=>{(0,R.g)(e,"Try On - Iframe",`ErrorMessage - ${t}`)})),t.push(L.add("eyewearAutoPDResult",()=>{(0,R.g)(e,"Try On - Iframe","PD Result Done"),(0,R.g)(e,"Try On - Iframe",K())})),()=>{t.forEach(e=>L.removeById(e))}},[e,!!window.YMK])},G="wrap_aTm0zl",V="uploadBlock_bTm0zl",$="title_cTm0zl",H="blockTitle_dTm0zl",q="buttonBlock_eTm0zl",X="button_fTm0zl",Q="imageBlock_gTm0zl",J="sectionWrap_hTm0zl",Z="image_iTm0zl",ee="pulse_jTm0zl",te=()=>(0,l.jsxs)("div",{"aria-label":"loading",className:G,children:[(0,l.jsxs)("div",{className:f()(V,ee),children:[(0,l.jsx)("p",{className:$}),(0,l.jsx)("p",{className:H}),(0,l.jsxs)("div",{className:q,children:[(0,l.jsx)("div",{className:X}),(0,l.jsx)("div",{className:X})]})]}),(0,l.jsxs)("div",{className:f()(Q,ee),children:[(0,l.jsx)("p",{className:H}),(0,l.jsxs)("div",{className:J,children:[(0,l.jsx)("div",{className:Z}),(0,l.jsx)("div",{className:Z}),(0,l.jsx)("div",{className:Z}),(0,l.jsx)("div",{className:Z}),(0,l.jsx)("div",{className:Z}),(0,l.jsx)("div",{className:Z})]})]})]});var se=s(1410),ae=s(55683);const re="wrap_a721wP",ne="message_b721wP",oe="icon_c721wP",ie=()=>(0,l.jsx)("div",{className:re,children:(0,l.jsxs)("div",{className:ne,children:[(0,l.jsx)("div",{className:oe,children:(0,l.jsx)(p.I,{icon:ae})}),(0,l.jsx)("span",{children:"Sorry, this color is not available for Live Try-On. Please try a different one."})]})}),le="hidden_a0vDiw",ce="perfectContainer_b0vDiw",de="loader_c0vDiw";let ue;const me=()=>{let{step:e,currentSku:t,setCurrentSku:s,setIsGlassesOnFace:a}=(0,c.useContext)(A.w),[r,n]=(0,c.useState)(!1),o=()=>{ue=setTimeout(()=>{s("")},1e3)};return(0,c.useEffect)(()=>(window.YMK?.addEventListener("skuApplied",()=>{o(),n(!1),a(!0)}),window.YMK?.addEventListener("errorMessage",e=>{"Invalid product"===e&&(o(),n(!0),a(!1))}),()=>clearTimeout(ue)),[window.YMK]),(0,l.jsxs)("div",{className:f()(ce,{[le]:e!==A.S.CAMERA_ACCESS}),children:[r&&(0,l.jsx)("div",{className:de,children:(0,l.jsx)(ie,{})}),""!==t&&(0,l.jsx)("div",{className:de,"aria-label":"roundLoader",children:(0,l.jsx)(se.F,{color:"#ffffff"})}),(0,l.jsx)("div",{id:"YMK-module"})]})};var pe=s(96319),he=s(1722);var ge=s(63242),ye=s(23415);const fe=({dyProduct:e})=>(0,l.jsx)(ye.F,{size:"medium",renderAs:"a",href:e.url,isFull:!0,children:"See Frame"});var xe=s(24502),ve=s(16345);const we=e=>({category:ve.r.CATEGORY_LIVE_TRY_ON,product:ve.r.PDP_LIVE_TRY_ON,quizPDP:"PDP - Live Try On - Quiz - Result Page"}[e]||ve.r.PDP_LIVE_TRY_ON);var Pe;function Ce(){return Ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},Ce.apply(null,arguments)}const _e=function(e){return c.createElement("svg",Ce({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 14 9"}
1,e),Pe||(Pe=c.createElement("path",{d:"M13.763 1.075a.5.5 0 0 0-.486-.022L10 2.69V1.5A1.5 1.5 0 0 0 8.5 0h-7A1.5 1.5 0 0 0 0 1.5v6A1.5 1.5 0 0 0 1.5 9h7A1.5 1.5 0 0 0 10 7.5V6.309l3.277 1.641A.5.5 0 0 0 14 7.5v-6a.5.5 0 0 0-.237-.425M5 6.5a2 2 0 1 1 0-4 2 2 0 0 1 0 4",fill:"#89959C"})))},be="hint_aeQXFG",je="icon_beQXFG",Se=({currentPD:e})=>{let[t,s]=(0,c.useState)(!1),{step:a,hasAccess:n}=(0,c.useContext)(A.w);return(0,c.useEffect)(()=>{if(!e||!n)return;let t=L.add("skuApplied",()=>{s(!0),L.removeById(t)})},[e,a]),(0,c.useEffect)(()=>{let e=L.add("recordComplete",()=>{s(!1),L.removeById(e)})},[]),(0,l.jsx)(l.Fragment,{children:t&&(0,l.jsxs)("div",{className:be,children:[(0,l.jsx)(p.I,{icon:r,role:"presentation",className:je}),(0,l.jsx)("span",{children:"Record your face to get the best sense of how the frames will fit you"})]})})},Ee="dyTryOnContainer_aRDVop",Ne="dyProductBlock_bRDVop",ke="dyProductBottomBlock_cRDVop",Ae="dyDescription_dRDVop",Ie="dyMyPickWrapper_eRDVop",Te="dyProductName_fRDVop",Oe="dyHintWrapper_gRDVop",De="productColor_hRDVop",Me="dyProductImage_iRDVop",Re=({currentDYProduct:e,perfectPD:t,onClick:s,searchParams:a,currentPage:r})=>{let{name:n,product_id:o,sku:i,size:d,color:u}=e,m=(e=>e.replaceAll(/[A-Z]/g,e=>` / ${e}`).slice(3))(u),{dyAnalyticsData:p}=(0,c.useContext)(A.w);return(0,l.jsxs)("div",{className:Ee,children:[(0,l.jsxs)("div",{className:Ne,children:[(0,l.jsx)("img",{src:e.photoV2,alt:n,className:Me}),(0,l.jsxs)("div",{className:ke,children:[(0,l.jsxs)("div",{className:Ae,children:[(0,l.jsx)("span",{title:n,className:Te,children:n}),(0,l.jsx)("span",{className:De,children:m})]}),(0,l.jsx)("div",{className:Ie,children:(0,l.jsx)(ge.bX,{productId:o,productSku:i,productSize:d,source:we(r),extendedProduct:e,iconSize:"medium",dyAnalyticsData:p})})]})]}),(0,l.jsx)("div",{className:Oe,children:(0,l.jsx)(Se,{currentPD:t})}),(0,l.jsx)(fe,{dyProduct:e}),(0,l.jsx)(xe.S,{currentPage:r,onClick:s,searchParams:a})]})};var Le=s(58022),Fe=s(84853),Be=s(28360),Ye=s(11893),ze=s(52550);const Ue="colorsBlock_ayxTFX",Ke="wrapper_byxTFX",We="colors_cyxTFX",Ge="openWrapper_dyxTFX",Ve="collapseButtonPlaceholder_fyxTFX",$e="collapseButton_gyxTFX",He="icon_hyxTFX",qe="active_iyxTFX",Xe="arrows_jyxTFX",Qe="arrowButton_kyxTFX",Je="iconFullArrow_lyxTFX",Ze="fullArrowLeft_myxTFX",et="disabledArrow_nyxTFX",tt="pageNumber_oyxTFX",st="hiddenButton_pyxTFX",at=({children:e,currentPD:t})=>{let[s,a]=(0,c.useState)(!0),[r,n]=(0,c.useState)(1),o=Math.ceil(e.length/15);return s?(0,l.jsxs)("div",{className:f()(Ue),children:[(0,l.jsxs)("div",{className:f()(Ke,We),children:[e.slice(0,7),(0,l.jsx)("button",{className:f()($e,{[st]:e.length<=7}),onClick:()=>a(!1),type:"button","aria-label":"Open colors",children:(0,l.jsx)(p.I,{icon:Ye,className:He,size:"small"})})]}),(0,l.jsx)(Se,{currentPD:t})]}):(0,l.jsx)("div",{className:f()(Ue),children:(0,l.jsxs)("div",{className:f()(Ke,{[Ge]:!s}),children:[(0,l.jsxs)("div",{className:We,children:[(0,l.jsx)("button",{onClick:()=>a(!0),className:f()($e,{[qe]:!s}),type:"button","aria-label":"Close colors",children:(0,l.jsx)(p.I,{icon:Ye,size:"small"})}),e.slice(15*(r-1),15*r).map((e,t)=>7===t?(0,l.jsxs)(c.Fragment,{children:[(0,l.jsx)("div",{className:Ve}),e]},e.key):e)]}),(0,l.jsxs)("div",{className:Xe,children:[(0,l.jsx)("button",{type:"button",disabled:r<=1,onClick:()=>n(r-1),className:f()(Qe,Ze,{[et]:r<=1}),"aria-label":"Prev page",children:(0,l.jsx)(p.I,{icon:ze,className:Je,size:"small"})}),(0,l.jsx)("span",{className:tt,children:`${r} / ${o}`}),(0,l.jsx)("button",{disabled:r===o,type:"button",onClick:()=>n(r+1),className:f()(Qe,{[et]:r===o}),"aria-label":"Next page",children:(0,l.jsx)(p.I,{icon:ze,className:Je,size:"small"})})]})]})})},rt="wrapper_ajlNew",nt=(0,x.connect)(e=>({currentPage:(0,_.M5)(e)}))(({sku:e,currentPage:t,currentPD:s})=>{let{searchStr:a}=(0,h.z)(),r=(0,v.Gc)(a),[n,o]=(0,c.useState)(e),{setCurrentSku:i,setCurrentProduct:d,products:u,windowProduct:m,setWindowProduct:p,currentProduct:g,setIsGlassesOnFace:y}=(0,c.useContext)(A.w),{result:f,skuList:x}=(0,c.useMemo)(()=>(e=>{let t=[],s=[];
1return e.forEach(e=>{t.every(t=>e.color.id!==t.color.id)&&(t.push(e),s.push(e.sku))}),{result:t,skuList:s}})(u),[u]);(0,c.useEffect)(()=>{x.length>0&&window.YMK?.cacheSkuImages(x)},[x]),(0,c.useEffect)(()=>{o(e)},[e]);let w=e=>{(0,R.g)(t,"Live Try On",`Change Color - ${e.sku}`),(0,Fe.q)(e,{currentPage:t,variationListLength:f.length,isQuizResultsPage:r})};return 0===u.length?(0,l.jsx)("div",{className:rt,children:(0,l.jsx)(Be.c,{circleSettings:{value:g.sku,image:`/ms/media${g.color?.src}`,id:g.color?.id},active:!0,changeSimple:()=>{w(g)},version:"normal",size:"medium"},g.sku)}):(0,l.jsx)(at,{currentPD:s,children:f.map(e=>(0,l.jsx)(Be.c,{circleSettings:{value:e.sku,image:`/ms/media${e.color.src}`,id:e.color.id},active:e.sku===n,changeSimple:()=>(e=>{i(e.sku),o(e.sku),d(e),m&&p({...m,currentSimpleId:e.id}),y(!1),window.YMK.applyMakeupBySku(e.sku),w(e)})(e),version:"normal",size:"medium"},e.sku))})});var ot=s(43167);const it="myPickWrapper_aOuOnn",lt="productName_bOuOnn",ct="productColor_cOuOnn",dt="productImage_dOuOnn",ut=({currentPage:e,searchParams:t,currentProduct:s,perfectPD:a,onClick:r,handleCloseModal:n})=>{let o=(0,v.Gc)(t),{id:i,sku:c,name:d,color:u,type:m,media:p}=s;return(0,l.jsxs)(l.Fragment,{children:["wishlist"!==e&&(0,l.jsx)("div",{className:it,children:(0,l.jsx)(ge.bX,{productId:i,productSku:c,productSize:d,source:we(o?"quizPDP":e),extendedProduct:s,iconSize:"medium"})}),(0,l.jsx)(Le.y,{className:dt,alt:d,src:p?.front?.src.toString().startsWith("/ms")?p?.front?.src:`/ms/media/${p?.front?.src}`}),(0,l.jsx)("span",{title:d,className:lt,children:d}),(0,l.jsx)("span",{className:ct,children:u?.label||""}),(0,l.jsx)(nt,{currentPD:a,sku:c}),(0,l.jsx)(ot.c,{isSunglasses:"sunglasses"===m,handleCloseModal:n}),(0,l.jsx)(xe.S,{currentPage:e,onClick:r,searchParams:t})]})},mt=(0,x.connect)(e=>({currentPage:(0,_.M5)(e)}))(({currentPage:e,handleCloseModal:t,onClick:s,searchParams:a,sendProductAnalytics:r,label:n,setLabel:o,isShow:i})=>{let[d,u]=(0,c.useState)(""),{setCurrentSku:m,currentProduct:p,currentDYProduct:h,isDYTryOn:g,hasAccess:y}=(0,c.useContext)(A.w),f=g?h?.sku:p?.sku,x=y?pe.g.VTO:pe.g.IMG,{resetGate:v,markEngineReady:w}=(e=>{let{isGlassesOnFace:t}=(0,c.useContext)(A.w),[s,a]=(0,c.useState)(!1),[r,n]=(0,c.useState)(!1);return(0,c.useEffect)(()=>{!r&&s&&t&&(n(!0),e())},[r,s,t,e]),{resetGate:()=>{a(!1),n(!1)},markEngineReady:()=>a(!0)}})(()=>{r&&p&&((0,he.J)(p,{currentPage:e,label:n,vtoMode:x}),n&&o(""))});return(0,c.useEffect)(()=>{let e;if(!window.YMK)return()=>{};if(v(),window.YMK){u(String(62));let e=window.YMK.addEventListener("loaded",()=>{m(f||""),window.YMK.setEyewearPD(62),w(),window.YMK.removeEventListener(e)})}window.YMK&&!d&&(e=L.add("eyewearAutoPDResult",()=>{w()}));let t=L.add("recordComplete",()=>{window.YMK.applyMakeupBySku(f),L.removeById(t)}),s=L.add("loaded",()=>{window.YMK.applyMakeupBySku(f)});return()=>{L.removeById(t),L.removeById(s),e&&L.removeById(e)}},[!!window.YMK,f,m]),!g&&!p||g&&!h||!i?null:g?(0,l.jsx)(Re,{perfectPD:d,currentDYProduct:h,onClick:s,searchParams:a,currentPage:e}):(0,l.jsx)(ut,{currentPage:e,searchParams:a,currentProduct:p,perfectPD:d,onClick:s,handleCloseModal:t})});var pt=s(92750),ht=s(10601),gt=s(48466);const yt="slider_aXNhpL",ft="wrapFrames_bXNhpL",xt=({onClick:e,sku:t,setLabel:s,currentPage:a,searchParams:r})=>(0,l.jsxs)("div",{className:yt,children:[(0,l.jsx)(ht.R,{onClick:e,searchParams:r}),(0,l.jsx)("div",{className:ft,children:(0,l.jsx)(gt.I,{searchParams:r,sku:t,currentPage:a,setLabel:s,onClick:e,type:"native"})})]}),vt="controlContainer_aVfix7";let wt=({setIsInitialStep:e,handleCloseModal:t,searchParams:s,sendProductAnalytics:a,label:r,setLabel:n,isShow:o})=>(0,l.jsx)(mt,{onClick:()=>e(!1),handleCloseModal:t,searchParams:s,sendProductAnalytics:a,label:r,setLabel:n,isShow:o});const Pt=(0,x.connect)(e=>({currentPage:(0,_.M5)(e),searchParams:(0,pt.eY)(e)}))(({currentPage:e,handleCloseModal:t,sendProductAnalytics:s=!0,searchParams:a})=>{let[r,n]=(0,c.useState)(!0),[o,i]=(0,c.useState)(""),{currentProduct:d,currentDYProduct:u,isDYTryOn:m}=(0,c.useContext)(A.w);return(0,l.jsxs)("div",{className:vt,children:[(0,l.jsx)(wt,{setIsInitialStep:n,handleCloseModal:t,searchParams:a,sendProductAnalytics:s,label:o,setLabel:i,isShow:r}),r?null:(0,l.jsx)(xt,{sku:m?u.sku||"":d.sku||"",currentPage:e,onClick:()=>n(!0),setLabel:i,searchParams:a})]})});var Ct=s(96285);const _t="IS_FIRST_CAMERA_ACCESS";let bt=async()=>{try{return(await navigator.mediaDevices.getUserMedia({video:!0}
1)).getTracks().forEach(e=>{e.stop()}),!0}catch{return!1}};var jt,St;(jt=St||(St={})).READY="READY",jt.ERROR="ERROR",jt.INIT="INIT",jt.FACEBOOK="FACEBOOK",jt.TEST_IMAGE_PERFECT="TEST_IMAGE_PERFECT";const Et=d().createContext({userImage:null,setUserImage:()=>{},stepPhoto:"INIT",setStepPhoto:()=>{},facebookAlbum:[],setFacebookAlbum:()=>{}});var Nt,kt;(Nt=kt||(kt={})).USER_IMAGE="PERFECT_TRY_ON_USER_IMAGE",Nt.MODEL_NUMBER="PERFECT_TRY_ON_MODEL_NUMBER";let At=e=>({save:async t=>{I.eA.set(e,t)},get:()=>I.eA.get(e),remove:async()=>{I.eA.remove(e)}});const It=At("PERFECT_TRY_ON_USER_IMAGE"),Tt=At("PERFECT_TRY_ON_MODEL_NUMBER"),Ot=({children:e})=>{let t=It.get(),[s,a]=(0,c.useState)(t),[r,n]=(0,c.useState)([]),[o,i]=(0,c.useState)(t?St.READY:St.INIT),{reopenImage:d}=(0,c.useContext)(A.w);return(0,c.useEffect)(()=>{t&&d&&(0,w.Yu)(s)},[]),(0,c.useEffect)(()=>{let e=s?St.ERROR:St.INIT,t=[];return t.push(L.add("photoLoaded",()=>{i(s?St.READY:St.INIT)})),t.push(L.add("noFaceDetected",()=>{i(e)})),t.push(L.add("invalidFileType",()=>{i(e)})),t.push(L.add("unsupportedResolution",()=>{i(e)})),t.push(L.add("errorMessage",t=>{"Invalid photo"===t&&i(e)})),()=>{t.forEach(e=>L.removeById(e))}},[s,!!window.YMK]),(0,l.jsx)(Et.Provider,{value:{userImage:s,setUserImage:a,stepPhoto:o,setStepPhoto:i,facebookAlbum:r,setFacebookAlbum:n},children:e})},Dt=({closePopup:e,currentPage:t,setShowArrowOverlay:s})=>{let{setStep:a,hasAccess:r,setHasAccess:n,reopenImage:o,setReopenImage:i,setShowPolicy:d}=(0,c.useContext)(A.w),[u,m]=(0,c.useState)(!1);(0,c.useEffect)(()=>{if(window.YMK)m(!0);else{let e=window.ymkAsyncInit;window.ymkAsyncInit=()=>{e?.(),m(!0)}}(async()=>{n(await(async e=>{if("permissions"in navigator){let t={state:"prompt"};try{t=await navigator.permissions.query({name:"camera"})}catch{return await bt()}if(e&&e("prompt"===t.state),"denied"===t.state)return!1}return await bt()})(s)),I.xM.get(_t)||((0,R.g)(t,"Live Try On","Use Webcam"),I.xM.set(_t,!0))})()},[n]);return(0,c.useEffect)(()=>{u&&null!==r&&(r?(a(A.S.CAMERA_ACCESS),(0,w.Yu)()):(async()=>{let e=It.get(),t=Tt.get();o&&(t?(0,w.Yu)(await(0,Ct.e)(t)):e&&(0,w.Yu)(e)),a(e||t?A.S.CAMERA_ACCESS:A.S.NO_CAMERA_ACCESS)})(),i(!1),L.add("disagreeUIShowed",()=>{e(!1)}),L.add("consentUIShowed",()=>{d(!0)}),L.add("consentUpdated",t=>{"agree"===t?d(!1):e(!1)}))},[r,u,a,i]),(0,l.jsx)(te,{})},Mt="textWrap_a4ydFL",Rt="text_b4ydFL",Lt="blue_c4ydFL",Ft=()=>(0,l.jsxs)("div",{className:Mt,children:[(0,l.jsxs)("p",{className:Rt,children:["GlassesUSA’s VTO Tool is owned and operated by Perfect Corp. (“Perfect”), a third-party. By using the VTO Tool, you ",(0,l.jsx)("b",{children:"expressly agree"})," to the"," ",(0,l.jsx)("a",{href:"/terms-and-conditions",target:"_blank",children:(0,l.jsx)("b",{children:"Terms and Conditions"})})," ","and"," ",(0,l.jsx)("a",{href:"/privacy-policy",target:"_blank",children:(0,l.jsx)("b",{children:"Privacy Policy"})})," ","governing GlassesUSA.com, including the Arbitration Agreement and Class Action Waiver contained in GlassesUSA’s Terms and Conditions, which can be viewed by clicking the ",(0,l.jsx)("b",{className:Lt,children:"blue"})," hyperlinks above."]}),(0,l.jsxs)("p",{className:Rt,children:["In addition, you also ",(0,l.jsx)("b",{children:"expressly agree"})," to Perfect’s"," ",(0,l.jsx)("a",{href:"https://www.perfectcorp.com/business/terms",rel:"noreferrer",target:"_blank",children:(0,l.jsx)("b",{children:"Terms of Service"})})," ","and"," ",(0,l.jsx)("a",{href:"https://www.perfectcorp.com/business/privacy",rel:"noreferrer",target:"_blank",children:(0,l.jsx)("b",{children:"Privacy Policy"})}),", including the Arbitration clause and Class Action Waiver contained in Perfect’s Terms of Service, which can be viewed by clicking the blue hyperlinks above."]}),(0,l.jsxs)("p",{className:Rt,children:["By ",(0,l.jsx)("b",{children:"clicking"})," the ",(0,l.jsx)("b",{className:Lt,children:"“I AGREE & CONSENT”"})," button below, you agree to the Terms and Conditions/Terms of Service and Privacy Policy of GlassesUSA and Perfect linked above and consent to GlassesUSA’s and Perfect’s collection, capture, processing, possession, and disclosure of any facial image data, which may potentially be considered of a biometric nature, even though not used for identification purposes (“VTO Input Data”), for purposes of providing the virtual try-on experience, customized information, and improving our properties and services, including our eyewear prediction and recommendation model. Any VTO Input Data collected through your use of the VTO Tool will be permanently destroyed within one year after the date such Data is collected."]}),(0,l.jsx)("p",{className:Rt,children:"GlassesUSA and/or Perfect may store your photographs uploaded through use of the VTO Tool for your convenience or your future use of the VTO Tool if you created a GlassesUSA account or used associated email messages to transmit your photographs electronically. GlassesUSA and/or Perfect will permanently destroy all such ph
1otographs within one year after the date such photographs are initially stored. You may also delete your uploaded photographs from your account at any time. GlassesUSA and Perfect do not collect any VTO Input Data or other data that may be considered of a biometric nature under applicable laws from your uploaded photographs, and does not use your uploaded photographs for identification purposes."}),(0,l.jsx)("p",{className:Rt,children:(0,l.jsx)("b",{children:"If you do not agree and consent to these terms and conditions, close this window and do not use the VTO Tool."})})]}),Bt="wrap_aKj8v9",Yt="title_bKj8v9",zt="wrapShadow_cKj8v9",Ut="buttonWrap_dKj8v9",Kt="button_eKj8v9",Wt=({currentPage:e})=>{let{setStep:t}=(0,c.useContext)(A.w);return(0,c.useEffect)(()=>{(0,R.g)(e,"TryOn Consent Popup","Showed")},[e]),(0,l.jsxs)("div",{className:Bt,children:[(0,l.jsxs)("h1",{id:"try-on-consent-title",className:Yt,children:["Consent and agreement for use of ",(0,l.jsx)("br",{})," virtual try-on tool"]}),(0,l.jsx)(Ft,{}),(0,l.jsx)("div",{className:zt,children:(0,l.jsx)("div",{className:Ut,children:(0,l.jsx)("button",{type:"button",className:Kt,onClick:()=>{t(A.S.CHECK_CAMERA_ACCESS),I.xM.set("PERFECT_TRY_ON_POLICY_AGREEMENT","true"),(0,R.g)(e,"TryOn Consent Popup","Accept")},children:"I Agree & Consent"})})})]})};var Gt=s(35169),Vt=s(86319),$t=s(84809),Ht=s(56166);const qt="modelsBlock_ad9zbT",Xt="blockTitle_bd9zbT",Qt="wrap_cd9zbT",Jt="wrapItems_dd9zbT",Zt="wrapComponent_ed9zbT",es="button_fd9zbT",ts="item_gd9zbT",ss=(0,x.connect)(e=>({currentPage:(0,_.M5)(e)}))(({currentPage:e})=>{let{setStep:t,currentProduct:s,isDYTryOn:a,currentDYProduct:r}=(0,c.useContext)(A.w),{data:n}=(0,Ht.z)(a?r?.gender.includes("Girls")||r?.gender.includes("Boys"):s?.isKids);if(!n)return null;let{data:o}=n,i=async(s,a,r)=>{await Tt.save(s),(0,w.Yu)(await(0,Ct.e)(s)),t(A.S.CAMERA_ACCESS),(0,R.g)(e,"Live Try On",`Use Model Image - ${2===a?"Men":"Women"} - ${r}`)};return(0,l.jsxs)("div",{className:qt,children:[(0,l.jsx)(Gt.h,{className:Xt,level:3,lineHeight:"20px",fontWeight:"bold",fontSize:"16px",children:"Or see how it looks on our models."}),(0,l.jsx)("div",{className:Qt,children:(0,l.jsx)("div",{className:Jt,children:o.map((e,t)=>{let{id:s,gender:a,url:r,url_high_quality:n}=e;return e.is_user_photo?null:(0,l.jsx)("div",{className:Zt,children:(0,l.jsx)("button",{value:s,type:"button",onClick:()=>{i(n||r,a,t+1)},"aria-label":"Choose the photo to try on",className:es,children:(0,l.jsx)(Le.y,{className:ts,src:r})})},s)})})})]})}),as="wrap_aRR4ms",rs="error_bRR4ms",ns="errorBold_cRR4ms",os="image_dRR4ms",is="iconButton_eRR4ms",ls="iconAttention_fRR4ms",cs="wrapButton_gRR4ms",ds="uploadNew_hRR4ms",us=()=>{let{userImage:e,setUserImage:t,setStepPhoto:s}=(0,c.useContext)(Et);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:as,children:[(0,l.jsx)("div",{className:os,style:{backgroundImage:`linear-gradient(0deg, rgba(255, 254, 254, 0.3), rgba(255, 254, 254, 0.3)), url(${e})`},children:(0,l.jsx)("p",{className:is,children:(0,l.jsx)(p.I,{size:"responsive",icon:$t,className:ls})})}),(0,l.jsxs)("div",{role:"alert","aria-atomic":"true",children:[(0,l.jsx)("p",{className:f()(rs,ns),children:"We couldn't detect your face."}),(0,l.jsx)("p",{className:rs,children:"Try uploading or taking a new picture."})]}),(0,l.jsx)("div",{className:cs,children:(0,l.jsx)("button",{type:"button",className:ds,onClick:()=>{s(St.INIT),t(null)},children:"Upload New image"})})]}),(0,l.jsx)(ss,{})]})};const ms=(e,t=1024)=>new Promise(s=>{let a=new Image;a.src=e,a.onload=function(){let{width:e,height:r}=((e,t,s=1024)=>{let a=e,r=t;return a>r&&a>s?(r*=s/a,a=s):r>s&&(a*=s/r,r=s),{height:Math.round(r),width:Math.round(a)}})(a.width,a.height,t),n=document.createElement("canvas");n.width=e,n.height=r;let o=n.getContext("2d");o?.drawImage(this,0,0,e,r),s(n.toDataURL())}});var ps,hs,gs,ys;function fs(){return fs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var a in s)({}).hasOwnProperty.call(s,a)&&(e[a]=s[a])}return e},fs.apply(null,arguments)}const xs=function(e){return c.createElement("svg",fs({fill:"none",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 49 48"},e),ps||(ps=c.createElement("rect",{x:.5,width:48,height:48,rx:8,fill:"#DBE1E5"})),hs||(hs=c.createElement("circle",{cx:19.5044,cy:15,r:2.14286,fill:"#F7F8F9"}
1)),gs||(gs=c.createElement("path",{d:"M14.696 21.465a.429.429 0 0 1 .75 0l7.44 13.47a.428.428 0 0 1-.375.636H7.632a.43.43 0 0 1-.375-.636z",fill:"#F7F8F9"})),ys||(ys=c.createElement("path",{d:"M27.933 15.11a1 1 0 0 1 1.706 0l11.578 18.94a1 1 0 0 1-.853 1.521H17.208a1 1 0 0 1-.854-1.521z",fill:"#F7F8F9"})))},vs="wrap_aqBlxn",ws="emptyWrap_bqBlxn",Ps="icon_cqBlxn",Cs="emptyTitle_dqBlxn",_s="emptyText_eqBlxn",bs="title_fqBlxn",js="albumsWrap_gqBlxn",Ss="photo_hqBlxn",Es="text_iqBlxn",Ns=()=>{let[e,t]=(0,c.useState)([]),{facebookAlbum:s,setStepPhoto:a,setUserImage:r}=(0,c.useContext)(Et),o=e.length>0;return 0===s.length?(0,l.jsxs)("div",{className:vs,children:[(0,l.jsx)(k,{onClick:()=>a(St.INIT)}),(0,l.jsxs)("div",{className:ws,children:[(0,l.jsx)(p.I,{icon:n,role:"presentation",className:Ps}),(0,l.jsx)("p",{className:Cs,children:"Your Facebook gallery is empty."}),(0,l.jsx)("p",{className:_s,children:"No worries, you can go back, upload a photo from your device and try on our glasses."})]})]}):(0,l.jsxs)("div",{className:vs,children:[(0,l.jsx)(k,{onClick:()=>{o?t([]):a(St.INIT)}}),(0,l.jsxs)("p",{className:bs,children:["Import from facebook - Choose ",o?(0,l.jsx)("span",{children:"image"}):(0,l.jsx)("span",{children:"album"})]}),o?(0,l.jsx)("div",{className:js,children:e.map(e=>(0,l.jsx)("div",{role:"presentation",style:{backgroundImage:`url(${e.source})`},className:Ss,onClick:()=>(async e=>{let t=await(0,Ct.e)(e);t&&(t=await ms(t)),r(t),(0,w.Yu)(t),a(St.TEST_IMAGE_PERFECT)})(e.source)},e.id))}):(0,l.jsx)("div",{className:js,children:s.map(e=>(0,l.jsx)("div",{role:"presentation",style:{backgroundImage:`url(${e.cover_photo.source})`},className:Ss,onClick:()=>t(e.photos.data||[]),children:(0,l.jsx)("p",{className:Es,children:e.name})},e.id))})]})};var ks=s(41897);const As="wrap_adfs4D",Is="image_bdfs4D",Ts="iconButton_cdfs4D",Os="iconClose_ddfs4D",Ds="wrapButton_edfs4D",Ms="useImage_fdfs4D",Rs="uploadNew_gdfs4D",Ls="disableUseImage_hdfs4D",Fs="disableUpload_idfs4D",Bs="wrapButtonModal_jdfs4D",Ys="borderWrap_kdfs4D",zs="modalWrap_ldfs4D",Us="modalText_mdfs4D",Ks="loaderContainer_ndfs4D",Ws="dot_odfs4D",Gs="loader5_pdfs4D",Vs="dot2_qdfs4D",$s="dot3_rdfs4D",Hs=({userImage:e,onClick:t})=>e?(0,l.jsx)("div",{className:Is,style:{backgroundImage:`url(${e})`},children:(0,l.jsx)("button",{type:"button",className:Ts,onClick:t,children:(0,l.jsx)("span",{className:Os,children:(0,l.jsx)(p.I,{size:"small",icon:ks})})})}):null,qs=()=>(0,l.jsxs)("div",{className:f()(Is,Ks,Gs),children:[(0,l.jsx)("div",{className:Ws}),(0,l.jsx)("div",{className:f()(Ws,Vs)}),(0,l.jsx)("div",{className:f()(Ws,$s)}),(0,l.jsx)("span",{className:Ts})]}),Xs=(0,x.connect)(e=>({currentPage:(0,_.M5)(e)}))(({currentPage:e})=>{let[t,s]=(0,c.useState)(!1),{userImage:a,setUserImage:r,stepPhoto:n,setStepPhoto:o}=(0,c.useContext)(Et),{setStep:i}=(0,c.useContext)(A.w),d=n===St.TEST_IMAGE_PERFECT,p=t=>{(0,R.g)(e,"Live Try On",t)};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:As,children:[d?(0,l.jsx)(qs,{}):(0,l.jsx)(Hs,{userImage:a,onClick:()=>{s(!0),p("Saved Image - Delete Image")}}),(0,l.jsxs)("div",{className:f()(Ds,Ys),children:[(0,l.jsx)("button",{type:"button",className:f()(Ms,{[Ls]:d}),onClick:()=>{a&&It.save(a),i(A.S.CAMERA_ACCESS),Tt.get()&&((0,w.Yu)(a),Tt.remove()),p("Saved Image - Use Image")},disabled:d,children:"Use Image"}),(0,l.jsx)("button",{type:"button",className:f()(Rs,{[Fs]:d}),onClick:()=>{o(St.INIT),p("Saved Image - Upload New")},disabled:d,children:"Upload new"})]})]}),(0,l.jsx)(ss,{}),(0,l.jsx)(u.a,{isOpen:t,zIndex:m.f.tooltip,overlay:"dark",withoutCloses:!0,children:(0,l.jsxs)("div",{className:zs,children:[(0,l.jsx)("p",{className:Us,children:"Are you sure you want to delete this image?"}),(0,l.jsxs)("div",{className:f()(Ds,Bs),children:[(0,l.jsx)("button",{type:"button",className:Ms,onClick:()=>{s(!1),r(null),It.remove(),o(St.INIT),p("Delete Image - Confirm")},children:"Delete"}),(0,l.jsx)("button",{type:"button",className:Rs,onClick:()=>{s(!1),p("Delete Image - Cancel")},children:"Cancel"})]})]})})]})}),Qs="input_aBao1U",Js="buttonUpload_bBao1U",Zs="icon_cBao1U",ea="iconPlus_dBao1U",ta="buttonText_eBao1U";let sa=(e,t)=>{let s=(e=>{e.preventDefault();let{files:t}=e.currentTarget,s=t?.[0];if(!s)return null;switch(s.type){case"image/jpeg":case"image/jpg":case"image/gif":case"image/png":return s;default:return null}})(e);if(s){let e=new FileReader;
1e.addEventListener("load",t),e.readAsDataURL(s)}};const aa=(0,x.connect)(e=>({currentPage:(0,_.M5)(e)}))(({currentPage:e})=>{let{setStepPhoto:t,setUserImage:s,setFacebookAlbum:a}=(0,c.useContext)(Et),r=(0,c.useRef)(null),n=async e=>{if(e.currentTarget){let r=e.currentTarget.result;r&&(r=await ms(r)),a([]),s(r),(0,w.Yu)(r),t(St.TEST_IMAGE_PERFECT)}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("button",{onClick:()=>{let{current:t}=r;t&&t.click(),(0,R.g)(e,"Live Try On","Upload")},type:"button",children:(0,l.jsxs)("div",{className:Js,children:[(0,l.jsx)("div",{className:Zs,children:(0,l.jsx)(p.I,{icon:Ye,className:ea,"aria-hidden":"true"})}),(0,l.jsx)("span",{className:ta,children:"Upload image"})]})}),(0,l.jsx)("input",{ref:r,type:"file",onChange:e=>sa(e,n),onClick:e=>e.stopPropagation(),accept:"image/*",className:Qs})]})}),ra="blockTitle_a7rw6a",na="uploadBlock_b7rw6a",oa="buttonBlock_c7rw6a",ia=()=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:na,children:[(0,l.jsx)(Gt.h,{level:3,fontSize:"16px",lineHeight:"19px",fontWeight:"bold",className:ra,children:"Upload your image."}),(0,l.jsx)("div",{className:oa,children:(0,l.jsx)(aa,{})})]}),(0,l.jsx)(ss,{})]}),la="wrap_aMXbPA",ca="title_bMXbPA";let da=(0,x.connect)(null,{initFacebook:Vt.j_})(({initFacebook:e})=>{let{stepPhoto:t}=(0,c.useContext)(Et),{isInitialLoading:s}=(0,Ht.z)();return(0,c.useEffect)(()=>{e()},[e]),s?(0,l.jsx)(te,{}):(0,l.jsxs)("div",{className:la,children:[(0,l.jsx)(Gt.h,{level:2,fontSize:"18px",fontWeight:"bold",className:ca,children:"Try online"}),(()=>{switch(t){case St.READY:return(0,l.jsx)(Xs,{});case St.ERROR:return(0,l.jsx)(us,{});case St.FACEBOOK:return(0,l.jsx)(Ns,{});case St.TEST_IMAGE_PERFECT:return(0,l.jsx)(Xs,{});default:return(0,l.jsx)(ia,{})}})()]})});const ua=()=>(0,l.jsx)(Ot,{children:(0,l.jsx)(da,{})});var ma=s(83717);const pa="arrowContainer_aDI9WO",ha="transparentOverlay_bDI9WO",ga="arrow_cDI9WO",ya="cameraAccessHint_dDI9WO",fa="hidden_eDI9WO",xa="modal_fDI9WO",va="hiddenModal_gDI9WO",wa="step_hDI9WO",Pa="stepPolicy_iDI9WO",Ca="glassesBlock_jDI9WO",_a="modalPolicy_kDI9WO";let ba=(e,t)=>e?null:(0,l.jsx)(k,{onClick:()=>{t(A.S.NO_CAMERA_ACCESS),Tt.remove();let e=document.querySelector("#YMK-module");e&&e.setAttribute("style","display: none")}});let ja=(0,x.connect)(e=>({currentPage:(0,_.M5)(e),isProductLoaded:(0,C.s)(e),activeProductId:(0,P.CA)(e)?.id}))(({visible:e,handleCloseButton:t,transitProduct:s,currentPage:r,sendProductAnalytics:n,currentSku:o,isProductLoaded:i,activeProductId:d,dyProduct:y,dyAnalytics:x})=>{let{step:P,setStep:C,hasAccess:_,setCurrentProduct:b,products:j,setCurrentSku:S,currentProduct:E,currentDYProduct:N,setCurrentDYProduct:k,isDYTryOn:I,setDyAnalyticsData:T}=(0,c.useContext)(A.w),O=(({currentProductVTO:e,handleCloseButton:t,isProductLoaded:s,activeProductId:a})=>{let r=(0,c.useRef)(e),{searchStr:n}=(0,h.z)(),o=(0,g.Z)(),i=(0,v.Gc)(n);return(0,c.useEffect)(()=>{i&&s&&a!==r.current?.id&&t()},[e?.id,a,s,r.current?.id,t]),i?()=>{r.current?.id===e?.id?t():o({href:`${e?.url}${n}`})}:t})({currentProductVTO:E,handleCloseButton:t,isProductLoaded:i,activeProductId:d}),D=ma.A.dHPCarouselUI.isEnabled(),[M,F]=(0,c.useState)(!0),[B,Y]=(0,c.useState)(!0),[z,U]=(0,c.useState)(null);(0,c.useEffect)(()=>{(async()=>{try{let e=await navigator.permissions.query({name:"camera"});U("granted"===e.state)}catch{U(!1)}})()},[P]);let K=B&&P===A.S.CHECK_CAMERA_ACCESS&&!1===z;W(r),(0,c.useEffect)(()=>{I&&y?k(y):s&&b(s),D&&x&&T(x)},[]),(0,c.useEffect)(()=>{if(I)o&&N&&(S(N.sku||""),k(N));else{let e=j?.find(e=>e.sku===o);o&&e&&(S(o),b(e))}},[o,j,b,S,N,k,I]),(0,c.useEffect)(()=>((0,w.nA)(),()=>{window.YMK?.closeEngine(),L.removeAll()}),[]),(0,c.useEffect)(()=>{window.YMK?.addEventListener("loading",e=>{10===e&&(F(!1),window.YMK.removeEventListener("loading"))})},[window.YMK]);let G=P===A.S.CHECK_POLICY;return(0,l.jsxs)(l.Fragment,{children:[K&&(0,l.jsx)(u.a,{isOpen:K,zIndex:m.f.overlay,overlayClassName:ha,withoutCloses:!0,blank:!0,options:{verticalOffset:"30%"},ariaLabelledby:"camera-access-hint-title",children:(0,l.jsxs)("div",{className:pa,children:[(0,l.jsx)(p.I,{icon:a,className:ga,height:100,width:110}),(0,l.jsx)("p",{className:ya,id:"camera-access-hint-title",children:'Select "Allow" to use our Live Try-On tool!'})]})}),(0,l.jsx)(u.a,{isOpen:e,zIndex:m.f.tooltip,overlay:"dark",withoutCloses:!1,...G?{ariaLabelledby:"try-on-consent-title"}:{"aria-label":"Live Try-On"},onRequestClose:()=>{O(),G?(0,R.g)(r,"TryOn Consent Popup","Closed"):(0,R.g)(r,"Live Try On","Close")},children:(0,l.jsxs)("div",{className:f()(xa,{[_a]:G,[va]:K}),children:[(0,l.jsxs)("div",{className:f()(wa,{[Pa]:G}),children:[(0,l.jsx)(me,{}),(()=>{switch(P){case A.S.CHECK_POLICY:return(0,l.jsx)(Wt,{currentPage:r});case A.S.NO_CAMERA_ACCESS:return(0,l.jsx)(ua,{});case A.S.CHECK_CAMERA_ACCESS:return(0,l.jsx)(Dt,{closePopup:O,currentPage:r,setShowArrowOverlay:Y});case A.S.CAMERA_ACCESS:return(0,l.jsx)(l.Fragment,{children:M?(0,l.jsx)(te,{}):ba(_,C)});default:return(0,l.jsx)(Dt,{closePopup:O,currentPage:r,setShowArrowOverlay:Y})}})()]}),(0,l.jsx)("div",{className:f()(Ca,{[fa]:G}),children:(0,l.jsx)(Pt,{sendProductAnalytics:n,handleCloseModal:O})})]})})]})});const Sa=e=>(0,l.jsx)(M,{children:(0,l.jsx)(ja,{...e})})},43167(e,t,s){s.d(t,{c:()=>k}
1);var a=s(65813),r=s(97312),n=s(23415),o=s(87091),i=s(97500),l=s.n(i),c=s(42337),d=s(8287),u=s(97275),m=s(91161),p=s(52549),h=s(44953),g=s(62276),y=s(16926),f=s(89166),x=s(72223),v=s(12636),w=s(36706),P=s(9034),C=s(37883),_=s(2846);var b=s(90938);const j=({currentProduct:e,handleCloseModal:t,setVisibleWizard:s,currentPage:a,resetActiveProductInStore:r,tryOnProduct:n,handleBuyNow:i,setProductInStore:l,windowProduct:c,setWindowProductInStore:d,prepareDataForAddToCartAction:u,setIsLoading:m,isQuizPdpResultPage:p})=>{let{searchStr:h,pathname:g}=(0,o.z)(),y=(0,x.Z)(),{hasBuyNowButton:j,buyNowButtonText:S}=(e=>{let t="sunglasses"===e.type&&!e.isEligibleForRx&&e.stock.qty>0;return{hasBuyNowButton:t,buyNowButtonText:t?"Buy Now":"See Frame"}})(n||e);return{handleQuizOpenWizard:()=>{let a=`${g}${h}`,r=`${(n||e).url}${h}`;a!==r&&y({href:r}),m(!0),t(),s(!0)},handleClickCtaButton:()=>{m(!0),"See Frame"===S&&w.eA.set(P.M,!0),p||(0,b.g)(a,"Live Try On",j?"Buy Now":"See Frame"),(0,f._)([e],{category:w.eA.get(v.eY)}),(async()=>{let e=w.eA.get(C.tw),t=w.eA.get(C.$q);e&&t&&(w.eA.remove(C.tw),w.eA.remove(C.$q),await(0,_.hh)({engagements:[{type:"CLICK",decisionId:t},{type:"SLOT_CLICK",slotId:e}]}))})(),(()=>{let t=n||e;(j||"product"===a)&&(c&&d(c),t&&l(t))})(),j?i():(()=>{let t=n||e;"category"===a&&r(),y({href:`${"wishlist"===a?"/":""}${t.url}`})})(),"product"===a&&t()},handleAddToCart:()=>{m(!0),p||(0,b.g)(a,"Live Try On","Add To Cart"),l(n||e),u({label:"Try On"}),"product"===a&&t()},buyNowButtonText:S}};var S=s(15278);const E="chooseButton_avUKh5",N="singleButton_bvUKh5",k=(0,c.connect)(e=>({currentPage:(0,y.M5)(e)}),{prepareDataForAddToCartAction:p.l_,handleBuyNow:m.kl,setProductInStore:u.yE,resetActiveProductInStore:u.FA,setWindowProductInStore:g.s_,setVisibleWizard:h.yH})(({prepareDataForAddToCartAction:e,handleBuyNow:t,currentPage:s,setProductInStore:i,isSunglasses:c,handleCloseModal:u,resetActiveProductInStore:m,setWindowProductInStore:p,tryOnProduct:h,setVisibleWizard:g})=>{let{currentProduct:y,windowProduct:f}=(0,r.useContext)(S.w),{searchStr:x}=(0,o.z)(),v=(0,d.Gc)(x),[w,P]=(0,r.useState)(!1),{handleClickCtaButton:C,handleAddToCart:_,buyNowButtonText:b}=j({currentProduct:y,handleCloseModal:u,setVisibleWizard:g,currentPage:s,resetActiveProductInStore:m,tryOnProduct:h,handleBuyNow:t,setProductInStore:i,windowProduct:f,setWindowProductInStore:p,prepareDataForAddToCartAction:e,setIsLoading:P,isQuizPdpResultPage:v});return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:l()({[N]:!c}),children:[c&&(0,a.jsx)("div",{className:E,children:(0,a.jsx)(n.F,{isLoading:w,size:"medium",onClick:_,children:"Add to Cart"})}),(0,a.jsx)("div",{className:E,children:(0,a.jsx)(n.F,{size:"medium",variant:c?"ghost":"painted",onClick:C,isLoading:w,children:b})})]})})})},48466(e,t,s){s.d(t,{I:()=>T});var a=s(65813),r=s(97312),n=s(69904),o=s(65724),i=s(80029),l=s(8287),c=s(63873),d=s(37883);const u=(e,t)=>t?"PDP - Live Try On - Quiz - Result Page - See More Strip":("category"===e?"Category":"PDP")+" - Live Try On - Recommendation - Similar Frames",m=({productResponse:e,data:t,sku:s,isQuizResultsPage:a})=>{let r=(e=>e.map(e=>({sku:e.sku,productData:{price:e.price,final_price:e.finalPrice,categories:e.categoryId.map(e=>String(e)),product_id:String(e.id),photoV2:e.media.front.src,name:e.name,brand:e.brand}})))(e.items||[]);return a?r.filter(e=>e.sku!==s):t};var p=s(36706),h=s(15278),g=s(78658),y=s(89809),f=s(55915),x=s(28166);var v=s(99471),w=s(12636);const P="productItem_aiLWEA",C="productImage_biLWEA",_="productName_ciLWEA",b="productPrice_diLWEA",j="price_eiLWEA",S="finalPrice_fiLWEA",E=({item:e,onProductView:t,isLastElement:s,onClick:n})=>{let{setCurrentSku:o,setCurrentDYProduct:i,currentDYProduct:l,setIsGlassesOnFace:c}=(0,r.useContext)(h.w),{price:u,final_price:m,categories:g,photoV2:y,name:f}=e.productData,{inView:x,ref:E}=(0,v.Wx)({triggerOnce:!0});(0,r.useEffect)(()=>{x&&t(e.productData,s,e.sku)},[x]);let N=g.includes(w.JI)&&!Number.isNaN(Number(m));return(0,a.jsxs)("button",{onClick:async()=>{p.eA.set(d.tw,e?.slotId),c(!1),window.YMK.applyMakeupBySku(e.sku),l?.sku!==e.sku&&(i({...e.productData,sku:e.sku}),o(e.sku)),n()},type:"button",className:P,children:[(0,a.jsx)("img",{className:C,src:y,alt:f}),(0,a.jsx)("p",{className:_,children:f}),(0,a.jsx)("p",{className:b,ref:E,children:N?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:j,children:["$",u]}),(0,a.jsxs)("span",{className:S,children:["$",m]}
1)]}):(0,a.jsxs)("span",{children:["$",u]})})]},e.sku)};var N=s(21924),k=s(26222),A=s(58764);const I=e=>{let{type:t,onClick:s,item:n,onProductView:o,isLastElement:i,isQuizResultsPage:l}=e,{setCurrentSku:c,setCurrentProduct:u,setProducts:m,setWindowProduct:g,setIsGlassesOnFace:y}=(0,r.useContext)(h.w),{price:f,final_price:x,categories:E,product_id:I,photoV2:T,name:O}=n.productData,{inView:D,ref:M}=(0,v.Wx)({triggerOnce:!0});(0,r.useEffect)(()=>{D&&o(n.productData,i,n.sku)},[D]);let R=E.includes(w.JI)&&!Number.isNaN(Number(x)),L=async()=>{let e=await(0,k.y)(Number(I),""),s=e.products.find(t=>t.id===e.currentSimpleId);return"library"===t||(g(e),m(e.products),s&&u(s)),{newProduct:s,products:e.products}};return(0,a.jsxs)("button",{onClick:async()=>{if("library"===t){let e=await L();e.newProduct&&s((0,A.SU)(e.newProduct),(0,A.Nz)(e.products))}else"native"===t&&(l||p.eA.set(d.tw,n?.slotId),c(n.sku),((e,t)=>{t(!1),window.YMK.applyMakeupBySku(e)})(n.sku,y),await L(),s(),e.setLabel(" - Similar Frames"))},type:"button",className:P,children:[l?(0,a.jsx)(N.y,{device:"desktop",className:C,src:`/ms/media/${T}`}):(0,a.jsx)("img",{className:C,src:T,alt:O}),(0,a.jsx)("p",{className:_,children:O}),(0,a.jsx)("p",{className:b,ref:M,children:R?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:j,children:["$",f]}),(0,a.jsxs)("span",{className:S,children:["$",x]})]}):(0,a.jsxs)("span",{children:["$",f]})})]},n.sku)},T=e=>{let{sku:t,currentPage:s,onClick:v,type:w,searchParams:P}=e,{isDYTryOn:C}=(0,r.useContext)(h.w),{data:_,custom:b,decisionId:j}=(0,g.t)({selectorName:"wishlist"===s?d.cc.selector:d.u6.selector,type:"wishlist"===s?d.cc.type:d.u6.type,contextData:[t]}),{isQuizResultsPage:S,sendAnalytics:N,handleClickNative:k,handleClickLibrary:A}=(({type:e,onClick:t,currentPage:s,searchParams:a,custom:n})=>{let o=(0,r.useMemo)(()=>(0,l.Gc)(a),[a]),i=(0,r.useCallback)(e=>{(0,f.p)(e,{category:u(s,o),isQuizPDP:o,strategy:{strategyID:n.analytics?.strategyName||"",strategySource:x.W.DY}})},[s,o,n]),c=(0,r.useCallback)(a=>{"native"===e&&t(),(0,y.b)([{...a.productData,sku:a.sku}],{category:u(s,o),list:u(s,o)})},[e,t,s,o]),d=(0,r.useCallback)((a,r,n)=>{"native"!==e&&t(r,n),(0,y.b)([{...a.productData,sku:a.sku}],{category:u(s,o),list:u(s,o)})},[e,t,s,o]);return{isQuizResultsPage:o,sendAnalytics:i,handleClickNative:c,handleClickLibrary:d}})({type:w,onClick:v,currentPage:s,searchParams:P,custom:b}),{productResponse:T}=(0,i.S)({search:(0,l.Ic)(P),isLoggedIn:!1,navigate:()=>Promise.resolve(),maxFrames:o.DH,shuffleFrames:!0,isVTO:!0}),O=m({isQuizResultsPage:S,productResponse:T,sku:t,data:_});return(0,r.useEffect)(()=>{j&&p.eA.set(d.$q,j)},[j]),(0,a.jsx)(c.RJ,{children:({productViewList:t,isLastElement:s,onProductView:r})=>(0,a.jsx)(n.F,{sendAnalytics:N,setProducts:r,productsList:t,isLastProduct:s,waitTime:3e4,children:(0,a.jsx)(a.Fragment,{children:O.map((t,s)=>C?(0,a.jsx)(E,{item:t,isLastElement:O.length===s+1,onProductView:r,onClick:v},t.sku):"native"===w?(0,a.jsx)(I,{onClick:()=>k(t),item:t,isLastElement:O.length===s+1,onProductView:r,type:w,setLabel:e.setLabel,isQuizResultsPage:S},t.sku):(0,a.jsx)(I,{onClick:(e,s)=>A(t,e,s),item:t,isLastElement:O.length===s+1,onProductView:r,type:w,isQuizResultsPage:S},t.sku))})})})}},56166(e,t,s){s.d(t,{z:()=>o});var a=s(62527),r=s(42464),n=s(61022);function o(e=!1){let t={"collection-id":1,gender:e?"kids":""};return(0,a.useQuery)({queryKey:["TRYON_GET_IMAGES",e],queryFn:()=>n.eL.get(r.H.TRYON_GET_IMAGES,{params:t}),refetchOnWindowFocus:!1,refetchOnMount:!1})}},58764(e,t,s){s.d(t,{HR:()=>u,Nz:()=>d,SU:()=>c});var a=s(84853),r=s(8287),n=s(52224),o=s(90938),i=s(1722);let l=e=>e.media.front?.src?(0,n.So)((e=>e.media?.front?.src.toString().startsWith("/ms")?e.media?.front?.src:`/ms/media/${e.media?.front?.src}`)(e)):null;const c=e=>({color:e.color,sku:e.sku,id:e.id,stock:{qty:e.stock.qty},category:e.category,price:e.price,frame:{size:{label:e.frame.size.label,shortLabel:e.frame.size.shortLabel,id:e.frame.size.id}},brand:e.brand,src:l(e)??"",type:e.type,name:e.name,isKids:e.isKids,url:e.url,description:e.description,manufacturerValue:e.manufacturerValue,isEligibleForRx:e.isEligibleForRx,genders:e.genders,isProductLoaded:"fulfilled"===e.status}),d=e=>e.map(e=>c(e)),u=(e,t,s=!0)=>{let n=(0,r.Gc)(t);return{changeColor:(t,s=0)=>{(0,o.g)(e,"Live Try On",`Change Color - ${t.sku}`),(0,a.q)(t,{currentPage:e,variationListLength:s,isQuizResultsPage:n})},viewSimilarFrames:()=>{(0,o.g)(e,"Live Try On","Similar Frames - Open")},useWebcam:()=>{(0,o.g)(e,"Live Try On","Use Webcam")},showConsentPopup:()=>{(0,o.g)(e,"TryOn Consent Popup","Showed")},acceptConsentPopup:()=>{(0,o.g)(e,"TryOn Consent Popup","Accept")},selectModel:(t,s)=>{(0,o.g)(e,"Live Try On",`Use Model Image - ${2===s?"Men":"Women"} - ${t}`)},saveUserImage:()=>{(0,o.g)(e,"Live Try On","Saved Image - Use Image")},deleteUserImageConfirm:()=>{(0,o.g)(e,"Live Try On","Delete Image - Confirm")},deleteUserImage:()=>{(0,o.g)(e,"Live Try On","Saved Image - Delete Image")},uploadUserImage:()=>{(0,o.g)(e,"Live Try On","Saved Image - Upload New")},deleteUserImageCancel:()=>{(0,o.g)(e,"Live Try On","Delete Image - Cancel")},importFromFB:()=>{(0,o.g)(e,"Live Try On","Import From Facebook")},importUserImage:()=>{(0,o.g)(e,"Live Try On","Upload")},eecTryOnProduct:(t,a)=>{s&&(0,i.J)(t,{currentPage:e,label:a})}}}},75155(e,t,s){s.d(t,{e:()=>m});var a=s(65813),r=s(97312),n=s.n(r),o=s(87091),i=s(51821),l=s(78142);var c=s(96782);const d=(e,t)=>"function"==typeof e?t?e(t):"":e;let u=(e,t)=>
1{if(e?.robots?.length){if(Array.isArray(e.robots))return e.robots.map(e=>(0,a.jsx)("meta",{name:e.name,content:e.value},e.name));if("string"==typeof e.robots&&"newBlogPlost"!==t){let t=JSON.parse(e.robots);return Object.keys(t).map(e=>(0,a.jsx)("meta",{name:e,content:t[e]},e))}return(0,a.jsx)("meta",{name:"robots",content:e.robots},"robots")}return null};const m=n().memo(({page:e="default",replacedValue:t,children:s})=>{let{pathname:r}=(0,o.z)(),{title:n,meta:m,links:p}=(({title:e=l.p3,description:t=l.h1,keywords:s=l.zA,meta:a=[],links:r=[]},n,o="")=>{let i=n.replace(/\/+(?=$|\?)/,"")||"/",c=[{rel:"alternate",media:"only screen and (max-width: 640px)",href:`https://m.glassesusa.com${i}`},{rel:"canonical",href:o||`https://www.glassesusa.com${i}`}];return{title:e,meta:((e,t)=>{let s=[...e,...t].reduce((e,{content:t,...s})=>(e["property"in s?s.property:s.name]={content:t,isProperty:"property"in s},e),{});return Object.keys(s).map(e=>s[e].isProperty?{property:e,content:s[e].content}:{name:e,content:s[e].content})})([{property:"og:url",content:`https://www.glassesusa.com${i}`},{property:"og:title",content:e},{property:"og:description",content:t},{property:"og:type",content:"website"},{property:"og:image",content:l.FH},{property:"og:site_name",content:"GlassesUSA.com"},{name:"description",content:t},{name:"keywords",content:s}],a),links:[...c,...r]}})(l.bL[e],r,t?.canonical);return c.J.getInstance().updateTitle(d(n,t)),(0,a.jsxs)(i.Helmet,{children:[(0,a.jsx)("title",{children:d(n,t)}),m.map(({name:e,property:s,content:r=""})=>e?(0,a.jsx)("meta",{name:e,content:d(r,t)},e):(0,a.jsx)("meta",{property:s,content:d(r,t)},s)),"blog"!==e&&t&&u(t,e)||(0,a.jsx)("meta",{name:"robots",content:"index,follow"},"robots"),p.map(({rel:e,media:t,href:s})=>t?(0,a.jsx)("link",{rel:e,media:t,href:s},s):(0,a.jsx)("link",{rel:e,href:s},s)),s]})});m.displayName="MetaData"},78658(e,t,s){s.d(t,{t:()=>o});var a=s(62527),r=s(37883),n=s(33178);const o=e=>{let[t]=e.contextData||[],{data:s,error:o,isLoading:i}=(0,a.useQuery)({queryKey:[e.type,t],queryFn:()=>(0,n.o)(e),refetchInterval:!1,refetchIntervalInBackground:!1,refetchOnWindowFocus:!1,staleTime:3e5,enabled:!!t,retry:r.fM});return{...(l=s,{data:l?.data||[],custom:l?.custom||{value:""},decisionId:l?.choice?.decisionId||""}),error:o,isLoading:i};var l}},90312(e,t,s){s.d(t,{HU:()=>a.HU,Xj:()=>a.Xj,iT:()=>a.iT,qJ:()=>a.qJ});var a=s(20778)},90620(e,t,s){s.d(t,{L:()=>n,Z:()=>r});var a=s(77497);function r(e,t="elastic"){return window.dispatchEvent(new CustomEvent("dynamicYield:EPopupOpen",{detail:e})),{type:a.xT.TRYON_SET_POPUP_VISIBILITY,payload:{flag:e,tryOnType:t}}}function n(e){return{type:a.xT.SET_TRY_ON_COLORS,payload:e}}},90938(e,t,s){s.d(t,{g:()=>o});var a=s(69508),r=s(60909),n=s(13157);const o=(e,t,s)=>{"category"===e&&(0,a.zB)(r.hN,{action:t,label:s}),"product"===e&&(0,a.zB)(n.fB,{action:t,label:s})}}}]);
2//# sourceMappingURL=4179.97171a51ea5159d0d74d.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.