<!doctype html>
<html lang="en">
<head >
    <meta charset="utf-8"/><script type="text/javascript">(window.NREUM||(NREUM={})).init={privacy:{cookies_enabled:true},ajax:{deny_list:["bam.nr-data.net"]},feature_flags:["soft_nav"],distributed_tracing:{enabled:true}};(window.NREUM||(NREUM={})).loader_config={agentID:"1588986661",accountID:"4523669",trustKey:"4223720",xpid:"UAMFUlBVARABUVdQBQQHVlAE",licenseKey:"NRJS-349a75c2ea128bf6874",applicationID:"1562250045",browserID:"1588986661"};;/*! For license information please see nr-loader-spa-1.316.0.min.js.LICENSE.txt */
(()=>{var e,t,r={384:(e,t,r)=>{"use strict";r.d(t,{NT:()=>a,Zm:()=>c,bQ:()=>u,dV:()=>d,pV:()=>l});var n=r(6154),i=r(1863),s=r(944),o=r(1910);const a={beacon:"bam.nr-data.net",errorBeacon:"bam.nr-data.net"};function c(){return n.gm.NREUM||(n.gm.NREUM={}),void 0===n.gm.newrelic&&(n.gm.newrelic=n.gm.NREUM),n.gm.NREUM}function d(){let e=c();return e.o||(e.o={ST:n.gm.setTimeout,SI:n.gm.setImmediate||n.gm.setInterval,CT:n.gm.clearTimeout,XHR:n.gm.XMLHttpRequest,REQ:n.gm.Request,EV:n.gm.Event,PR:n.gm.Promise,MO:n.gm.MutationObserver,FETCH:n.gm.fetch,WS:n.gm.WebSocket},(0,o.i)(...Object.values(e.o))),e}function u(e,t){let r=c();r.initializedAgents??={},t.initializedAt={ms:(0,i.t)(),date:new Date},r.initializedAgents[e]=t,2===Object.keys(r.initializedAgents).length&&(0,s.R)(69)}function l(){return function(){let e=c();const t=e.info||{};e.info={beacon:a.beacon,errorBeacon:a.errorBeacon,...t}}(),function(){let e=c();const t=e.init||{};e.init={...t}}(),d(),function(){let e=c();const t=e.loader_config||{};e.loader_config={...t}}(),c()}},733:(e,t,r)=>{"use strict";function n(e,t){return function(e){let t=2166136261;for(let r=0;r<e.length;r++)t^=e.charCodeAt(r),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,"0")}("".concat(String(e),":").concat(String(t)))}r.d(t,{Y:()=>n})},782:(e,t,r)=>{"use strict";r.d(t,{T:()=>n});const n=r(860).K7.pageViewTiming},860:(e,t,r)=>{"use strict";r.d(t,{$J:()=>u,K7:()=>c,P3:()=>d,XX:()=>i,Yy:()=>a,df:()=>s,qY:()=>n,v4:()=>o});const n="events",i="jserrors",s="browser/blobs",o="rum",a="browser/logs",c={ajax:"ajax",genericEvents:"generic_events",jserrors:i,logging:"logging",metrics:"metrics",pageAction:"page_action",pageViewEvent:"page_view_event",pageViewTiming:"page_view_timing",sessionReplay:"session_replay",sessionTrace:"session_trace",softNav:"soft_navigations"},d={[c.pageViewEvent]:1,[c.pageViewTiming]:2,[c.metrics]:3,[c.jserrors]:4,[c.softNav]:5,[c.ajax]:6,[c.sessionTrace]:7,[c.sessionReplay]:8,[c.logging]:9,[c.genericEvents]:10},u={[c.pageViewEvent]:o,[c.pageViewTiming]:n,[c.ajax]:n,[c.softNav]:n,[c.metrics]:i,[c.jserrors]:i,[c.sessionTrace]:s,[c.sessionReplay]:s,[c.logging]:a,[c.genericEvents]:"ins"}},944:(e,t,r)=>{"use strict";r.d(t,{R:()=>i});var n=r(3241);function i(e,t){"function"==typeof console.debug&&(console.debug("New Relic Warning: https://github.com/newrelic/newrelic-browser-agent/blob/main/docs/warning-codes.md#".concat(e),t),(0,n.W)({drained:null,type:"data",name:"warn",feature:"warn",data:{code:e,secondary:t}}))}},993:(e,t,r)=>{"use strict";r.d(t,{A$:()=>s,ET:()=>o,TZ:()=>a,p_:()=>i});var n=r(860);const i={ERROR:"ERROR",WARN:"WARN",INFO:"INFO",DEBUG:"DEBUG",TRACE:"TRACE"},s={OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4,TRACE:5},o="log",a=n.K7.logging},1687:(e,t,r)=>{"use strict";r.d(t,{Ak:()=>a,Ze:()=>d,x3:()=>c});var n=r(3241),i=r(3606),s=r(860),o=r(2646);function a(e,t){if(!e)return;const r={staged:!1,priority:s.P3[t]||0};e.runtime.drainRegistry.get(t)||e.runtime.drainRegistry.set(t,r)}function c(e,t){if(!e)return;const r=e.runtime.drainRegistry;r&&(r.get(t)&&r.delete(t),l(e,t,!1),r.size&&u(e))}function d(e,t="feature",r=!1){if(e){if(!e.runtime.drainRegistry.get(t)||r)return l(e,t);e.runtime.drainRegistry.get(t).staged=!0,u(e)}}function u(e){if(!e)return;const t=Array.from(e.runtime.drainRegistry);t.every(([e,t])=>t.staged)&&(t.sort((e,t)=>e[1].priority-t[1].priority),t.forEach(([t])=>{e.runtime.drainRegistry.delete(t),l(e,t)}))}function l(e,t,r=!0){if(!e)return;const s=e.ee,a=i.i.handlers;if(s&&!s.aborted&&s.backlog&&a){if((0,n.W)({type:"lifecycle",name:"drain",feature:t}),r){const e=s.backlog[t],r=a[t];if(r){for(let t=0;e&&t<e.length;++t)f(e[t],r);Object.entries(r).forEach(([e,t])=>{Object.values(t||{}).forEach(t=>{t[0]?.on&&t[0].context()instanceof o.y&&!t[0].listeners(e).includes(t[1])&&t[0].on(e,t[1])})})}}s.isolatedBacklog||delete a[t],s.backlog[t]=null,s.emit("drain-"+t,[])}}function f(e,t){var r=e[1];Object.values(t[r]||{}).forEach(t=>{var r=e[0];if(t[0]===r){var n=t[1],i=e[3],s=e[2];n.apply(i,s)}})}},1738:(e,t,r)=>{"use strict";r.d(t,{U:()=>f,Y:()=>l});var n=r(3241),i=r(9908),s=r(1863),o=r(944),a=r(3969),c=r(8362),d=r(860),u=r(4261);function l(e,t,r,s){const l=s||r;!l||l[e]&&l[e]!==c.d.prototype[e]||(l[e]=function(){(0,i.p)(a.xV,["API/"+e+"/called"],void 0,d.K7.metrics,r.ee),(0,n.W)({drained:!!r.runtime?.activatedFeatures,type:"data",name:"api",feature:u.Pl+e,data:{}});try{return t.apply(this,arguments)}catch(e){(0,o.R)(23,e)}})}function f(e,t,r,n,o){const a=e.info;null===r?delete a.jsAttributes[t]:a.jsAttributes[t]=r,(o||null===r)&&(0,i.p)(u.Pl+n,[(0,s.t)(),t,r],void 0,"session",e.ee)}},1741:(e,t,r)=>{"use strict";r.d(t,{W:()=>s});var n=r(944),i=r(4261);class s{#e(e,...t){if(this[e]!==s.prototype[e])return this[e](...t);(0,n.R)(35,e)}addPageAction(e,t){return this.#e(i.hG,e,t)}register(e){return this.#e(i.eY,e)}recordCustomEvent(e,t){return this.#e(i.fF,e,t)}setPageViewName(e,t){return this.#e(i.Fw,e,t)}setCustomAttribute(e,t,r){return this.#e(i.cD,e,t,r)}noticeError(e,t){return this.#e(i.o5,e,t)}setUserId(e,t=!1){return this.#e(i.Dl,e,t)}setApplicationVersion(e){return this.#e(i.nb,e)}setErrorHandler(e){return this.#e(i.bt,e)}addRelease(e,t){return this.#e(i.k6,e,t)}log(e,t){return this.#e(i.$9,e,t)}start(){return this.#e(i.d3)}finished(e){return this.#e(i.BL,e)}recordReplay(){return this.#e(i.CH)}pauseReplay(){return this.#e(i.Tb)}addToTrace(e){return this.#e(i.U2,e)}setCurrentRouteName(e){return this.#e(i.PA,e)}interaction(e){return this.#e(i.dT,e)}wrapLogger(e,t,r){return this.#e(i.Wb,e,t,r)}measure(e,t){return this.#e(i.V1,e,t)}consent(e){return this.#e(i.Pv,e)}}},1863:(e,t,r)=>{"use strict";function n(){return Math.floor(performance.now())}r.d(t,{t:()=>n})},1910:(e,t,r)=>{"use strict";r.d(t,{i:()=>s});var n=r(944);const i=new Map;function s(...e){return e.every(e=>{if(i.has(e))return i.get(e);const t="function"==typeof e?e.toString():"",r=t.includes("[native code]"),s=t.includes("nrWrapper");return r||s||(0,n.R)(64,e?.name||t),i.set(e,r),r})}},2555:(e,t,r)=>{"use strict";r.d(t,{D:()=>a,f:()=>o});var n=r(384),i=r(8122);const s={beacon:n.NT.beacon,errorBeacon:n.NT.errorBeacon,licenseKey:void 0,applicationID:void 0,sa:void 0,queueTime:void 0,applicationTime:void 0,ttGuid:void 0,user:void 0,account:void 0,product:void 0,extra:void 0,jsAttributes:{},userAttributes:void 0,atts:void 0,transactionName:void 0,tNamePlain:void 0};function o(e){try{return!!e.licenseKey&&!!e.errorBeacon&&!!e.applicationID}catch(e){return!1}}const a=e=>(0,i.a)(e,s)},2614:(e,t,r)=>{"use strict";r.d(t,{BB:()=>s,Wt:()=>n,g:()=>c,iL:()=>a,tS:()=>o,wk:()=>i});const n="NRBA_SESSION::",i=144e5,s=18e5,o={STARTED:"session-started",PAUSE:"session-pause",RESET:"session-reset",RESUME:"session-resume",UPDATE:"session-update"},a={SAME_TAB:"same-tab",CROSS_TAB:"cross-tab"},c={OFF:0,FULL:1,ERROR:2}},2646:(e,t,r)=>{"use strict";r.d(t,{y:()=>n});class n{constructor(e){this.contextId=e}}},2843:(e,t,r)=>{"use strict";r.d(t,{G:()=>s,u:()=>i});var n=r(3878);function i(e,t=!1,r,i){(0,n.DD)("visibilitychange",function(){if(t)return void("hidden"===document.visibilityState&&e());e(document.visibilityState)},r,i)}function s(e,t,r){(0,n.sp)("pagehide",e,t,r)}},3241:(e,t,r)=>{"use strict";r.d(t,{W:()=>s});var n=r(6154);const i="newrelic";function s(e={}){try{n.gm.dispatchEvent(new CustomEvent(i,{detail:e}))}catch(e){}}},3304:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(7836);const i=()=>{const e=new WeakSet;return(t,r)=>{if("object"==typeof r&&null!==r){if(e.has(r))return;e.add(r)}return r}};function s(e){try{return JSON.stringify(e,i())??""}catch(e){try{n.ee.emit("internal-error",[e])}catch(e){}return""}}},3333:(e,t,r)=>{"use strict";r.d(t,{$v:()=>u,TZ:()=>n,Xh:()=>c,Zp:()=>i,kd:()=>d,mq:()=>a,nf:()=>o,qN:()=>s});const n=r(860).K7.genericEvents,i=["auxclick","click","copy","keydown","paste","scrollend"],s=["focus","blur"],o=4,a=1e3,c=2e3,d=["PageAction","UserAction","BrowserPerformance"],u={RESOURCES:"experimental.resources",REGISTER:"register"}},3434:(e,t,r)=>{"use strict";r.d(t,{Jt:()=>o,YM:()=>u});var n=r(7836),i=r(5607),s=r(5732);const o="nr@original:".concat(i.W),a=50;var c=Object.prototype.hasOwnProperty,d=!1;function u(e,t,r){return e||(e=n.ee),i.inPlace=function(e,t,r,n,s,o){r||(r="");const a="-"===r.charAt(0);for(let c=0;c<t.length;c++){const d=t[c],u=e[d];f(u)||(e[d]=i(u,a?d+r:r,n,d,s,o))}},i.flag=o,i;function i(t,n,i,d,h,p){return f(t)?t:(n||(n=""),nrWrapper[o]=t,function(e,t,r){if(Object.defineProperty&&Object.keys)try{return Object.keys(e).forEach(function(r){Object.defineProperty(t,r,{get:function(){return e[r]},set:function(t){return e[r]=t,t}})}),t}catch(e){l([e],r)}for(var n in e)c.call(e,n)&&(t[n]=e[n])}(t,nrWrapper,e),nrWrapper);function nrWrapper(){var o,c,f,g;let m,v;try{c=this,o=[...arguments],v=p?(0,s.$5)(r):[void 0],f="function"==typeof i?i(o,c):i||{}}catch(t){l([t,"",[o,c,d],f],e)}u(n+"start",[o,c,d,v],f,h);const y=performance.now();let b;try{return g=t.apply(c,o),b=performance.now(),g}catch(e){throw b=performance.now(),u(n+"err",[o,c,e,v],f,h),m=e,m}finally{const e=b-y,t={start:y,end:b,duration:e,isLongTask:e>=a,methodName:d,thrownError:m};t.isLongTask&&u("long-task",[t,c,v],f,h),u(n+"end",[o,c,g,v],f,h)}}}function u(r,n,i,s){if(!d||t){var o=d;d=!0;try{e.emit(r,n,i,t,s)}catch(t){l([t,r,n,i],e)}d=o}}}function l(e,t){t||(t=n.ee);try{t.emit("internal-error",e)}catch(e){}}function f(e){return!(e&&"function"==typeof e&&e.apply&&!e[o])}},3606:(e,t,r)=>{"use strict";r.d(t,{i:()=>s});var n=r(9908);s.on=o;var i=s.handlers={};function s(e,t,r,s){o(s||n.d,i,e,t,r)}function o(e,t,r,i,s){s||(s="feature"),e||(e=n.d);var o=t[s]=t[s]||{};(o[r]=o[r]||[]).push([e,i])}},3738:(e,t,r)=>{"use strict";r.d(t,{He:()=>i,Kp:()=>a,Lc:()=>d,Rz:()=>u,TZ:()=>n,bD:()=>s,d3:()=>o,jx:()=>l,sl:()=>f,uP:()=>c});const n=r(860).K7.sessionTrace,i="bstResource",s="resource",o="-start",a="-end",c="fn"+o,d="fn"+a,u="pushState",l=1e3,f=3e4},3785:(e,t,r)=>{"use strict";r.d(t,{R:()=>c,b:()=>d});var n=r(9908),i=r(1863),s=r(860),o=r(3969),a=r(993);function c(e,t,r={},c=a.p_.INFO,d=!0,u,l=(0,i.t)()){(0,n.p)(o.xV,["API/logging/".concat(c.toLowerCase(),"/called")],void 0,s.K7.metrics,e),(0,n.p)(a.ET,[l,t,r,c,d,u],void 0,s.K7.logging,e)}function d(e){return"string"==typeof e&&Object.values(a.p_).some(t=>t===e.toUpperCase().trim())}},3878:(e,t,r)=>{"use strict";function n(e,t){return{capture:e,passive:!1,signal:t}}function i(e,t,r=!1,i){window.addEventListener(e,t,n(r,i))}function s(e,t,r=!1,i){document.addEventListener(e,t,n(r,i))}r.d(t,{DD:()=>s,jT:()=>n,sp:()=>i})},3962:(e,t,r)=>{"use strict";r.d(t,{AM:()=>o,O2:()=>l,OV:()=>s,Qu:()=>f,TZ:()=>c,ih:()=>h,pP:()=>a,t1:()=>u,tC:()=>i,wD:()=>d});var n=r(860);const i=["click","keydown","submit"],s="popstate",o="api",a="initialPageLoad",c=n.K7.softNav,d=5e3,u=500,l={INITIAL_PAGE_LOAD:"",ROUTE_CHANGE:1,UNSPECIFIED:2},f={INTERACTION:1,AJAX:2,CUSTOM_END:3,CUSTOM_TRACER:4},h={IP:"in progress",PF:"pending finish",FIN:"finished",CAN:"cancelled"}},3969:(e,t,r)=>{"use strict";r.d(t,{TZ:()=>n,XG:()=>a,rs:()=>i,xV:()=>o,z_:()=>s});const n=r(860).K7.metrics,i="sm",s="cm",o="storeSupportabilityMetrics",a="storeEventMetrics"},4234:(e,t,r)=>{"use strict";r.d(t,{W:()=>i});var n=r(1687);class i{constructor(e,t){this.agentRef=e,this.ee=e?.ee,this.featureName=t,this.blocked=!1}deregisterDrain(){(0,n.x3)(this.agentRef,this.featureName)}}},4261:(e,t,r)=>{"use strict";r.d(t,{$9:()=>u,BL:()=>c,CH:()=>p,Dl:()=>R,Fw:()=>w,PA:()=>v,Pl:()=>n,Pv:()=>x,Tb:()=>f,U2:()=>o,V1:()=>A,Wb:()=>T,bt:()=>b,cD:()=>y,d3:()=>E,dT:()=>d,eY:()=>g,fF:()=>h,hG:()=>s,hw:()=>i,k6:()=>a,nb:()=>m,o5:()=>l});const n="api-",i=n+"ixn-",s="addPageAction",o="addToTrace",a="addRelease",c="finished",d="interaction",u="log",l="noticeError",f="pauseReplay",h="recordCustomEvent",p="recordReplay",g="register",m="setApplicationVersion",v="setCurrentRouteName",y="setCustomAttribute",b="setErrorHandler",w="setPageViewName",R="setUserId",E="start",T="wrapLogger",A="measure",x="consent"},5270:(e,t,r)=>{"use strict";r.d(t,{Aw:()=>o,SR:()=>s,rF:()=>a});var n=r(384),i=r(7767);function s(e){return!!(0,n.dV)().o.MO&&(0,i.V)(e)&&!0===e?.session_trace.enabled}function o(e){return!0===e?.session_replay.preload&&s(e)}function a(e,t){try{if("string"==typeof t?.type){if("password"===t.type.toLowerCase())return"*".repeat(e?.length||0);if(void 0!==t?.dataset?.nrUnmask||t?.classList?.contains("nr-unmask"))return e}}catch(e){}return"string"==typeof e?e.replace(/[\S]/g,"*"):"*".repeat(e?.length||0)}},5289:(e,t,r)=>{"use strict";r.d(t,{GG:()=>o,Qr:()=>c,sB:()=>a});var n=r(3878),i=r(6389);function s(){return"undefined"==typeof document||"complete"===document.readyState}function o(e,t){if(s())return e();const r=(0,i.J)(e),o=setInterval(()=>{s()&&(clearInterval(o),r())},500);(0,n.sp)("load",r,t)}function a(e){if(s())return e();(0,n.DD)("DOMContentLoaded",e)}function c(e){if(s())return e();(0,n.sp)("popstate",e)}},5607:(e,t,r)=>{"use strict";r.d(t,{W:()=>n});const n=(0,r(9566).bz)()},5732:(e,t,r)=>{"use strict";r.d(t,{$5:()=>u,B5:()=>d,Ms:()=>s,Ux:()=>a,YA:()=>c,fQ:()=>i,yx:()=>o});var n=r(7508);const i={MFE:"MFE",BA:"BA"};function s(e,t){if(!e||!t?.init.api.register.enabled)return[];const r=t.runtime.registeredEntities;return r?.filter(t=>String(t.metadata.target.id)===String(e)).map(e=>e.metadata.target)||[]}function o(e,t){if(!e||!t?.init.api.register.enabled)return[];const r=t.runtime.registeredEntities;return r?.filter(t=>t.metadata.timings?.asset?.endsWith(e)).map(e=>e.metadata.target)||[]}function a(e,t){if(!l(t))return{};const r=t.agentRef.runtime.appMetadata.agents[0].entityGuid;return e?e.attributes:{"entity.guid":r,appId:t.agentRef.info.applicationID}}function c(e,t){return d(e,t)?{"child.id":e.id,"child.type":e.type,...a(void 0,t)}:{}}function d(e,t){return!!e&&!!l(t)&&t.agentRef.init.api.register.duplicate_data_to_container}function u(e){if(!e?.init.api.register.enabled)return[void 0];const t=[];try{var r=(0,n.AZ)((0,n.QL)());let i=r.length-1;for(;r[i];)t.push(...o(r[i--],e))}catch(e){}return t.length||t.push(void 0),t}function l(e){return 2===e?.harvestEndpointVersion}},6154:(e,t,r)=>{"use strict";r.d(t,{OF:()=>d,RI:()=>i,WN:()=>f,bv:()=>s,gm:()=>o,lR:()=>l,m:()=>c,mw:()=>a,sb:()=>u,zk:()=>h});var n=r(1863);const i="undefined"!=typeof window&&!!window.document,s="undefined"!=typeof WorkerGlobalScope&&("undefined"!=typeof self&&self instanceof WorkerGlobalScope&&self.navigator instanceof WorkerNavigator||"undefined"!=typeof globalThis&&globalThis instanceof WorkerGlobalScope&&globalThis.navigator instanceof WorkerNavigator),o=i?window:"undefined"!=typeof WorkerGlobalScope&&("undefined"!=typeof self&&self instanceof WorkerGlobalScope&&self||"undefined"!=typeof globalThis&&globalThis instanceof WorkerGlobalScope&&globalThis),a=Boolean("hidden"===o?.document?.visibilityState),c=""+o?.location,d=/iPad|iPhone|iPod/.test(o.navigator?.userAgent),u=d&&"undefined"==typeof SharedWorker,l=(()=>{const e=o.navigator?.userAgent?.match(/Firefox[/\s](\d+\.\d+)/);return Array.isArray(e)&&e.length>=2?+e[1]:0})(),f=Date.now()-(0,n.t)(),h=()=>{const e=o?.performance?.getEntriesByType?.("navigation")?.[0];if(e&&e.responseStart>0&&e.responseStart<o.performance.now())return e}},6344:(e,t,r)=>{"use strict";r.d(t,{BB:()=>u,Qb:()=>l,TZ:()=>i,Ug:()=>o,Vh:()=>s,_s:()=>a,bc:()=>d,yP:()=>c});var n=r(2614);const i=r(860).K7.sessionReplay,s="errorDuringReplay",o=.12,a={DomContentLoaded:0,Load:1,FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Custom:5},c={[n.g.ERROR]:15e3,[n.g.FULL]:3e5,[n.g.OFF]:0},d={RESET:{message:"Session was reset",sm:"Reset"},IMPORT:{message:"Recorder failed to import",sm:"Import"},TOO_MANY:{message:"429: Too Many Requests",sm:"Too-Many"},TOO_BIG:{message:"Payload was too large",sm:"Too-Big"},CROSS_TAB:{message:"Session Entity was set to OFF on another tab",sm:"Cross-Tab"},ENTITLEMENTS:{message:"Session Replay is not allowed and will not be started",sm:"Entitlement"}},u=5e3,l={API:"api",RESUME:"resume",SWITCH_TO_FULL:"switchToFull",INITIALIZE:"initialize",PRELOAD:"preload"}},6389:(e,t,r)=>{"use strict";function n(e,t=500,r={}){const n=r?.leading||!1;let i;return(...r)=>{n&&void 0===i&&(e.apply(this,r),i=setTimeout(()=>{i=clearTimeout(i)},t)),n||(clearTimeout(i),i=setTimeout(()=>{e.apply(this,r)},t))}}function i(e){let t=!1;return(...r)=>{t||(t=!0,e.apply(this,r))}}r.d(t,{J:()=>i,s:()=>n})},6630:(e,t,r)=>{"use strict";r.d(t,{T:()=>n});const n=r(860).K7.pageViewEvent},6774:(e,t,r)=>{"use strict";r.d(t,{T:()=>n});const n=r(860).K7.jserrors},7295:(e,t,r)=>{"use strict";r.d(t,{Xv:()=>o,gX:()=>i,iW:()=>s});var n=[];function i(e){if(!e||s(e))return!1;if(0===n.length)return!0;if("*"===n[0].hostname)return!1;for(var t=0;t<n.length;t++){var r=n[t];if(r.hostname.test(e.hostname)&&r.pathname.test(e.pathname))return!1}return!0}function s(e){return void 0===e.hostname}function o(e){if(n=[],e&&e.length)for(var t=0;t<e.length;t++){let r=e[t];if(!r)continue;if("*"===r)return void(n=[{hostname:"*"}]);0===r.indexOf("http://")?r=r.substring(7):0===r.indexOf("https://")&&(r=r.substring(8));const i=r.indexOf("/");let s,o;i>0?(s=r.substring(0,i),o=r.substring(i)):(s=r,o="*");let[c]=s.split(":");n.push({hostname:a(c),pathname:a(o,!0)})}}function a(e,t=!1){const r=e.replace(/[.+?^${}()|[\]\\]/g,e=>"\\"+e).replace(/\*/g,".*?");return new RegExp((t?"^":"")+r+"$")}},7485:(e,t,r)=>{"use strict";r.d(t,{D:()=>i});var n=r(6154);function i(e){if(0===(e||"").indexOf("data:"))return{protocol:"data"};try{const t=new URL(e,location.href),r={port:t.port,hostname:t.hostname,pathname:t.pathname,search:t.search,protocol:t.protocol.slice(0,t.protocol.indexOf(":")),sameOrigin:t.protocol===n.gm?.location?.protocol&&t.host===n.gm?.location?.host};return r.port&&""!==r.port||("http:"===t.protocol&&(r.port="80"),"https:"===t.protocol&&(r.port="443")),r.pathname&&""!==r.pathname?r.pathname.startsWith("/")||(r.pathname="/".concat(r.pathname)):r.pathname="/",r}catch(e){return{}}}},7508:(e,t,r)=>{"use strict";r.d(t,{AZ:()=>g,Qr:()=>b,QL:()=>m});var n=r(6154),i=r(1863),s=r(9119),o=r(7866);class a{dom=new c;performance=new c;constructor(e){this.url=e}get script(){const e=Math.max(this.dom.start,this.performance.end);return{start:e,end:Math.max(this.dom.end,this.performance.end,e)}}}class c{start=0;end=0;value=void 0}let d;try{d=g(m())[0]}catch(e){d=g(e)[0]}const u=e=>"script"===e.initiatorType||["link","fetch"].includes(e.initiatorType)&&e.name.endsWith(".js"),l=new Map;let f=[];function h(e){return l.get(e)}function p(e){const t=h(e);if(t)return t;const r=new a(e);if(l.set(e,r),l.size>1e3){const e=l.keys().next().value;l.delete(e)}return r}if(n.gm.MutationObserver&&n.gm.document){new MutationObserver(e=>{e.forEach(e=>{e.addedNodes.forEach(e=>{if("SCRIPT"===e.nodeName&&e.src){const t=p((0,s.L)(e.src));t.dom.start=(0,i.t)(),t.dom.value=e;const r=()=>{t.dom.end=(0,i.t)()};["load","error"].forEach(t=>e.addEventListener(t,r,{once:!0}))}})})}).observe(n.gm.document,{childList:!0,subtree:!0})}if(n.gm.PerformanceObserver?.supportedEntryTypes.includes("resource")){new PerformanceObserver(e=>{e.getEntries().filter(u).forEach(e=>{const t=p((0,s.L)(e.name));t.performance.start=Math.floor(e.startTime),t.performance.end=Math.floor(e.responseEnd),t.performance.value=e;const r=[];f.forEach(({test:t,addedAt:n},s)=>{(t(e)||(0,i.t)()-n>1e4)&&r.push(s)}),f=f.filter((e,t)=>!r.includes(t))})}).observe({type:"resource",buffered:!0})}function g(e){if(!e||"string"!=typeof e)return[];const t=new Set,r=e.split("\n");for(const e of r){const r=e.match(o.cn)||e.match(o.hB)||e.match(o.fL);if(r&&r[2])t.add((0,s.L)(r[2]));else{const r=e.match(/\(([^)]+\.js):\d+:\d+\)/)||e.match(/^\s+at\s+([^\s(]+\.js):\d+:\d+/);r&&r[1]&&t.add((0,s.L)(r[1]))}}return[...t]}function m(){let e;try{const t=Error.stackTraceLimit;Error.stackTraceLimit=50,e=(new Error).stack,Error.stackTraceLimit=t}catch(t){e=(new Error).stack}return e}function v(e,t){return(0,s.L)(e.name)===t}function y(e,t){e.fetchStart=Math.floor(t.startTime),e.fetchEnd=Math.floor(t.responseEnd),e.asset=t.name,e.type=t.initiatorType}function b(){const e={registeredAt:(0,i.t)(),reportedAt:void 0,fetchStart:0,fetchEnd:0,scriptStart:0,scriptEnd:0,asset:void 0,type:"unknown"},t=m();if(!t)return e;const r=n.gm.performance?.getEntriesByType("navigation")?.[0]?.name||"";try{const o=g(t),a=(o.length>1?o.filter(e=>d!==e):o)[0];if(!a)return e;if(r.includes(a))return e.asset=(0,s.L)(r),e.type="inline",e;e.correlation=h(a);const c=e.correlation?.performance.value||performance.getEntriesByType("resource").find(e=>v(e,a));c?y(e,c):function(e){if(!e||!n.gm.document)return!1;try{const t=n.gm.document.querySelectorAll('link[rel="preload"][as="script"]');for(const r of t)if((0,s.L)(r.href)===e)return!0}catch(e){}return!1}(a)&&(e.asset=a,e.type="preload",f.push({addedAt:(0,i.t)(),test:t=>!!v(t,a)&&(y(e,t),!0)})),Object.defineProperty(e,"scriptStart",{get:()=>e.correlation?.script.start||e.fetchEnd}),Object.defineProperty(e,"scriptEnd",{get:()=>e.correlation?.script.end||e.registeredAt})}catch(e){}return e}},7699:(e,t,r)=>{"use strict";r.d(t,{It:()=>s,KC:()=>a,No:()=>i,qh:()=>o});var n=r(860);const i=16e3,s=1e6,o="SESSION_ERROR",a={[n.K7.logging]:!0,[n.K7.genericEvents]:!0,[n.K7.jserrors]:!0,[n.K7.ajax]:!0}},7767:(e,t,r)=>{"use strict";r.d(t,{V:()=>i});var n=r(6154);const i=e=>n.RI&&!0===e?.privacy.cookies_enabled},7836:(e,t,r)=>{"use strict";r.d(t,{P:()=>a,ee:()=>c});var n=r(384),i=r(8990),s=r(2646),o=r(5607);const a="nr@context:".concat(o.W),c=function e(t,r){var n={},o={},u={},l=!1;try{l=16===r.length&&d.initializedAgents?.[r]?.runtime.isolatedBacklog}catch(e){}var f={on:p,addEventListener:p,removeEventListener:function(e,t){var r=n[e];if(!r)return;for(var i=0;i<r.length;i++)r[i]===t&&r.splice(i,1)},emit:function(e,r,n,i,s){!1!==s&&(s=!0);if(c.aborted&&!i)return;t&&s&&t.emit(e,r,n);var a=h(n);g(e).forEach(e=>{e.apply(a,r)});var d=v()[o[e]];d&&d.push([f,e,r,a]);return a},get:m,listeners:g,context:h,buffer:function(e,t){const r=v();if(t=t||"feature",f.aborted)return;Object.entries(e||{}).forEach(([e,n])=>{o[n]=t,t in r||(r[t]=[])})},abort:function(){f._aborted=!0,Object.keys(f.backlog).forEach(e=>{delete f.backlog[e]})},isBuffering:function(e){return!!v()[o[e]]},debugId:r,backlog:l?{}:t&&"object"==typeof t.backlog?t.backlog:{},isolatedBacklog:l};return Object.defineProperty(f,"aborted",{get:()=>{let e=f._aborted||!1;return e||(t&&(e=t.aborted),e)}}),f;function h(e){return e&&e instanceof s.y?e:e?(0,i.I)(e,a,()=>new s.y(a)):new s.y(a)}function p(e,t){n[e]=g(e).concat(t)}function g(e){return n[e]||[]}function m(t){return u[t]=u[t]||e(f,t)}function v(){return f.backlog}}(void 0,"globalEE"),d=(0,n.Zm)();d.ee||(d.ee=c)},7866:(e,t,r)=>{"use strict";r.d(t,{Nc:()=>s,cn:()=>a,fL:()=>i,h3:()=>n,hB:()=>o});const n=/function (.+?)\s*\(/,i=/^\s*at .+ \(eval at \S+ \((?:(?:file|http|https):[^)]+)?\)(?:, [^:]*:\d+:\d+)?\)$/i,s=/^\s*at Function code \(Function code:\d+:\d+\)\s*/i,o=/^\s*at (?:((?:\[object object\])?(?:[^(]*\([^)]*\))*[^()]*(?: \[as \S+\])?) )?\(?((?:file|http|https|chrome-extension):.*?)?:(\d+)(?::(\d+))?\)?\s*$/i,a=/^\s*(?:([^@]*)(?:\(.*?\))?@)?((?:file|http|https|chrome|safari-extension).*?):(\d+)(?::(\d+))?\s*$/i},8122:(e,t,r)=>{"use strict";r.d(t,{a:()=>i});var n=r(944);function i(e,t){try{if(!e||"object"!=typeof e)return(0,n.R)(3);if(!t||"object"!=typeof t)return(0,n.R)(4);const r=Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t)),s=0===Object.keys(r).length?e:r;for(let o in s)if(void 0!==e[o])try{if(null===e[o]){r[o]=null;continue}Array.isArray(e[o])&&Array.isArray(t[o])?r[o]=Array.from(new Set([...e[o],...t[o]])):e[o]instanceof Map||e[o]instanceof Set||e[o]instanceof Date||e[o]instanceof RegExp?r[o]=e[o]:"object"==typeof e[o]&&"object"==typeof t[o]?r[o]=i(e[o],t[o]):r[o]=e[o]}catch(e){r[o]||(0,n.R)(1,e)}return r}catch(e){(0,n.R)(2,e)}}},8139:(e,t,r)=>{"use strict";r.d(t,{u:()=>f});var n=r(7836),i=r(3434),s=r(8990),o=r(6154);const a={},c=o.gm.XMLHttpRequest,d="addEventListener",u="removeEventListener",l="nr@wrapped:".concat(n.P);function f(e){var t=function(e){return(e||n.ee).get("events")}(e);if(a[t.debugId]++)return t;a[t.debugId]=1;var r=(0,i.YM)(t,!0);function f(e){r.inPlace(e,[d,u],"-",p)}function p(e,t){return e[1]}return"getPrototypeOf"in Object&&(o.RI&&h(document,f),c&&h(c.prototype,f),h(o.gm,f)),t.on(d+"-start",function(e,t){var n=e[1];if(null!==n&&("function"==typeof n||"object"==typeof n)&&"newrelic"!==e[0]){var i=(0,s.I)(n,l,function(){var e={object:function(){if("function"!=typeof n.handleEvent)return;return n.handleEvent.apply(n,arguments)},function:n}[typeof n];return e?r(e,"fn-",null,e.name||"anonymous"):n});this.wrapped=e[1]=i}}),t.on(u+"-start",function(e){e[1]=this.wrapped||e[1]}),t}function h(e,t,...r){let n=e;for(;"object"==typeof n&&!Object.prototype.hasOwnProperty.call(n,d);)n=Object.getPrototypeOf(n);n&&t(n,...r)}},8362:(e,t,r)=>{"use strict";r.d(t,{d:()=>s});var n=r(9566),i=r(1741);class s extends i.W{agentIdentifier=(0,n.LA)(16)}},8374:(e,t,r)=>{r.nc=(()=>{try{return document?.currentScript?.nonce}catch(e){}return""})()},8990:(e,t,r)=>{"use strict";r.d(t,{I:()=>i});var n=Object.prototype.hasOwnProperty;function i(e,t,r){if(n.call(e,t))return e[t];var i=r();if(Object.defineProperty&&Object.keys)try{return Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!1}),i}catch(e){}return e[t]=i,i}},9119:(e,t,r)=>{"use strict";r.d(t,{L:()=>s});var n=/([^?#]*)[^#]*(#[^?]*|$).*/,i=/([^?#]*)().*/;function s(e,t){return e?e.replace(t?n:i,"$1$2"):e}},9300:(e,t,r)=>{"use strict";r.d(t,{T:()=>n,f:()=>i});const n=r(860).K7.ajax,i="ajaxRequest.id"},9324:(e,t,r)=>{"use strict";r.d(t,{AJ:()=>o,F3:()=>i,Xs:()=>s,Yq:()=>a,xv:()=>n});const n="1.316.0",i="PROD",s="CDN",o="@newrelic/rrweb",a="1.1.0"},9566:(e,t,r)=>{"use strict";r.d(t,{LA:()=>a,ZF:()=>c,bz:()=>o,el:()=>d});var n=r(6154);const i="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx";function s(e,t){return e?15&e[t]:16*Math.random()|0}function o(){const e=n.gm?.crypto||n.gm?.msCrypto;let t,r=0;return e&&e.getRandomValues&&(t=e.getRandomValues(new Uint8Array(30))),i.split("").map(e=>"x"===e?s(t,r++).toString(16):"y"===e?(3&s()|8).toString(16):e).join("")}function a(e){const t=n.gm?.crypto||n.gm?.msCrypto;let r,i=0;t&&t.getRandomValues&&(r=t.getRandomValues(new Uint8Array(e)));const o=[];for(var a=0;a<e;a++)o.push(s(r,i++).toString(16));return o.join("")}function c(){return a(16)}function d(){return a(32)}},9908:(e,t,r)=>{"use strict";r.d(t,{d:()=>n,p:()=>i});var n=r(7836).ee.get("handle");function i(e,t,r,i,s){s?(s.buffer([e],i),s.emit(e,t,r)):(n.buffer([e],i),n.emit(e,t,r))}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var s=n[e]={exports:{}};return r[e](s,s.exports,i),s.exports}i.m=r,i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce((t,r)=>(i.f[r](e,t),t),[])),i.u=e=>({212:"nr-spa-compressor",249:"nr-spa-recorder",478:"nr-spa"}[e]+"-1.316.0.min.js"),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="NRBA-1.316.0.PROD:",i.l=(r,n,s,o)=>{if(e[r])e[r].push(n);else{var a,c;if(void 0!==s)for(var d=document.getElementsByTagName("script"),u=0;u<d.length;u++){var l=d[u];if(l.getAttribute("src")==r||l.getAttribute("data-webpack")==t+s){a=l;break}}if(!a){c=!0;var f={478:"sha512-/91tZUpAINW5VzLS+EdJpEe0gul6FJd2zTpGwLIhi/mqcTiQPUlhoJmX5zb4EPTwdGqun46DoGQPtDShDBw4bA==",249:"sha512-XqLQgD24Jrw2HFtuRDeuxMcY5WnEXG04tpC98UJOJlIfGqQst/lKUE+G++zwulwEzcM00bl5V0e1kKGq2Nxc1g==",212:"sha512-rOHSN/tvMjFe33yfRKMs44m3dZKgs9foEl0T2tdErrZKsAF8Oe5+OLJKgySrw3WwY4MgvuS4yWEr88MMv5LZaw=="};(a=document.createElement("script")).charset="utf-8",i.nc&&a.setAttribute("nonce",i.nc),a.setAttribute("data-webpack",t+s),a.src=r,0!==a.src.indexOf(window.location.origin+"/")&&(a.crossOrigin="anonymous"),f[o]&&(a.integrity=f[o])}e[r]=[n];var h=(t,n)=>{a.onerror=a.onload=null,clearTimeout(p);var i=e[r];if(delete e[r],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach(e=>e(n)),t)return t(n)},p=setTimeout(h.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=h.bind(null,a.onerror),a.onload=h.bind(null,a.onload),c&&document.head.appendChild(a)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.p="https://js-agent.newrelic.com/",(()=>{var e={38:0,788:0};i.f.j=(t,r)=>{var n=i.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var s=new Promise((r,i)=>n=e[t]=[r,i]);r.push(n[2]=s);var o=i.p+i.u(t),a=new Error;i.l(o,r=>{if(i.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var s=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed: ("+s+": "+o+")",a.name="ChunkLoadError",a.type=s,a.request=o,n[1](a)}},"chunk-"+t,t)}};var t=(t,r)=>{var n,s,[o,a,c]=r,d=0;if(o.some(t=>0!==e[t])){for(n in a)i.o(a,n)&&(i.m[n]=a[n]);if(c)c(i)}for(t&&t(r);d<o.length;d++)s=o[d],i.o(e,s)&&e[s]&&e[s][0](),e[s]=0},r=self["webpackChunk:NRBA-1.316.0.PROD"]=self["webpackChunk:NRBA-1.316.0.PROD"]||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),(()=>{"use strict";i(8374);var e=i(8362),t=i(860);const r=Object.values(t.K7);var n=i(384),s=i(1741);var o=i(2555),a=i(3333);const c=e=>{if(!e||"string"!=typeof e)return!1;try{document.createDocumentFragment().querySelector(e)}catch{return!1}return!0};var d=i(2614),u=i(944),l=i(8122);const f="[data-nr-mask]",h=e=>(0,l.a)(e,(()=>{const e={feature_flags:[],experimental:{register:!1,resources:!1},mask_selector:"*",block_selector:"[data-nr-block]",mask_input_options:{color:!1,date:!1,"datetime-local":!1,email:!1,month:!1,number:!1,range:!1,search:!1,tel:!1,text:!1,time:!1,url:!1,week:!1,textarea:!1,select:!1,password:!0}};return{ajax:{deny_list:void 0,block_internal:!0,enabled:!0,autoStart:!0},api:{register:{get enabled(){return e.feature_flags.includes(a.$v.REGISTER)||e.experimental.register},set enabled(t){e.experimental.register=t},duplicate_data_to_container:!1}},browser_consent_mode:{enabled:!1},distributed_tracing:{enabled:void 0,exclude_newrelic_header:void 0,cors_use_newrelic_header:void 0,cors_use_tracecontext_headers:void 0,allowed_origins:void 0},get feature_flags(){return e.feature_flags},set feature_flags(t){e.feature_flags=t},generic_events:{enabled:!0,autoStart:!0},harvest:{interval:30},jserrors:{enabled:!0,autoStart:!0},logging:{enabled:!0,autoStart:!0},metrics:{enabled:!0,autoStart:!0},obfuscate:void 0,page_action:{enabled:!0},page_view_event:{enabled:!0,autoStart:!0},page_view_timing:{enabled:!0,autoStart:!0},performance:{capture_marks:!1,capture_measures:!1,capture_detail:!0,resources:{get enabled(){return e.feature_flags.includes(a.$v.RESOURCES)||e.experimental.resources},set enabled(t){e.experimental.resources=t},asset_types:[],first_party_domains:[],ignore_newrelic:!0}},privacy:{cookies_enabled:!0},proxy:{assets:void 0,beacon:void 0},session:{expiresMs:d.wk,inactiveMs:d.BB},session_replay:{autoStart:!0,enabled:!1,preload:!1,sampling_rate:10,error_sampling_rate:100,collect_fonts:!1,inline_images:!1,fix_stylesheets:!0,mask_all_inputs:!0,get mask_text_selector(){return e.mask_selector},set mask_text_selector(t){c(t)?e.mask_selector="".concat(t,",").concat(f):""===t||null===t?e.mask_selector=f:(0,u.R)(5,t)},get block_class(){return"nr-block"},get ignore_class(){return"nr-ignore"},get mask_text_class(){return"nr-mask"},get block_selector(){return e.block_selector},set block_selector(t){c(t)?e.block_selector+=",".concat(t):""!==t&&(0,u.R)(6,t)},get mask_input_options(){return e.mask_input_options},set mask_input_options(t){t&&"object"==typeof t?e.mask_input_options={...t,password:!0}:(0,u.R)(7,t)}},session_trace:{enabled:!0,autoStart:!0},soft_navigations:{enabled:!0,autoStart:!0},ssl:void 0,user_actions:{enabled:!0,elementAttributes:["id","className","tagName","type"]}}})());var p=i(6154),g=i(9324);let m=0;const v={buildEnv:g.F3,distMethod:g.Xs,version:g.xv,originTime:p.WN},y={consented:!1},b={activatedFeatures:void 0,appMetadata:{},configured:!1,get consented(){return this.session?.state?.consent||y.consented},set consented(e){y.consented=e},customTransaction:void 0,denyList:[],disabled:!1,drainRegistry:new Map,harvester:void 0,isolatedBacklog:!1,isRecording:!1,loaderType:void 0,maxBytes:3e4,obfuscator:void 0,onerror:void 0,ptid:void 0,releaseIds:{},session:void 0,timeKeeper:void 0,registeredEntities:[],jsAttributesMetadata:{bytes:0},get harvestCount(){return++m}};var w=i(7836),R=i(3241);const E={accountID:void 0,trustKey:void 0,agentID:void 0,licenseKey:void 0,applicationID:void 0,xpid:void 0};function T(e,t={},r,a){let{init:c,info:d,loader_config:u,runtime:f={},exposed:g=!0}=t;if(!d){const e=(0,n.pV)();c=e.init,d=e.info,u=e.loader_config}var m;e.init=h(c||{}),e.loader_config=(m=u||{},(0,l.a)(m,E)),d.jsAttributes??={},p.bv&&(d.jsAttributes.isWorker=!0),e.info=(0,o.D)(d);const y=e.init;e.runtime??=(e=>{const t=(0,l.a)(e,b),r=Object.keys(v).reduce((e,t)=>(e[t]={value:v[t],writable:!1,configurable:!0,enumerable:!0},e),{});return Object.defineProperties(t,r)})(f),y.proxy.assets&&(e=>{const t=e.startsWith("http");e+="/",i.p=t?e:"https://"+e})(y.proxy.assets),e.runtime.configured||(Object.defineProperty(e,"beacons",{get:()=>[e.info.beacon,e.info.errorBeacon,e.init.proxy.assets,e.init.proxy.beacon].filter(Boolean)}),Object.defineProperty(e.runtime,"denyList",{get:()=>[...e.init.ajax.deny_list||[],...e.init.ajax.block_internal?e.beacons:[]]}),e.runtime.ptid=e.agentIdentifier,function(e){const t=(0,n.pV)();Object.getOwnPropertyNames(s.W.prototype).forEach(r=>{const n=s.W.prototype[r];if("function"!=typeof n||"constructor"===n)return;let i=t[r];e[r]&&!1!==e.exposed&&"micro-agent"!==e.runtime?.loaderType&&(t[r]=(...t)=>{const n=e[r](...t);return i?i(...t):n})})}(e),e.runtime.loaderType=r,e.ee=w.ee.get(e.agentIdentifier),e.exposed=g,(0,R.W)({drained:!!e.runtime.activatedFeatures,type:"lifecycle",name:"initialize",feature:void 0,data:e.config}),e.runtime.configured=!0)}var A=i(9908),x=i(1863),S=i(4261),_=i(1738);var O=i(1687),P=i(4234),k=i(5289),N=i(5270),j=i(7767),C=i(6389),D=i(7699);const L=new WeakSet;class I extends P.W{constructor(e,t){super(e,t),this.abortHandler=void 0,this.featAggregate=void 0,this.loadedSuccessfully=void 0,this.onAggregateImported=new Promise(e=>{this.loadedSuccessfully=e}),this.deferred=Promise.resolve(),!1===e.init[this.featureName].autoStart?this.deferred=new Promise((t,r)=>{this.ee.on("manual-start-all",(0,C.J)(()=>{(0,O.Ak)(e,this.featureName),t()}))}):(0,O.Ak)(e,t)}importAggregator(e,t,r={}){if(this.featAggregate)return;const n=async()=>{if(await this.deferred,this.#t(e),!(0,o.f)(e.info))return(0,u.R)(43),e.ee.abort(),void this.loadedSuccessfully(!1);let n;try{if((0,j.V)(e.init)){const{setupAgentSession:t}=await i.e(478).then(i.bind(i,8766));n=t(e)}}catch(e){(0,u.R)(20,e),this.ee.emit("internal-error",[e]),(0,A.p)(D.qh,[e],void 0,this.featureName,this.ee)}try{if(!this.#r(this.featureName,n,e.init))return(0,O.Ze)(this.agentRef,this.featureName),void this.loadedSuccessfully(!1);const{Aggregate:i}=await t();this.featAggregate=new i(e,r),e.runtime.harvester.initializedAggregates.push(this.featAggregate),this.loadedSuccessfully(!0)}catch(e){(0,u.R)(34,e),this.abortHandler?.(),(0,O.Ze)(this.agentRef,this.featureName,!0),this.loadedSuccessfully(!1),this.ee&&this.ee.abort()}};p.RI?(0,k.GG)(()=>n(),!0):n()}#r(e,r,n){if(this.blocked)return!1;switch(e){case t.K7.sessionReplay:return(0,N.SR)(n)&&!!r;case t.K7.sessionTrace:return!!r;default:return!0}}#t(e){if(!L.has(e)&&(L.add(e),!(0,o.f)(e.info))){const t=(0,n.pV)();let r={...t.info?.jsAttributes};try{r={...r,...e.info?.jsAttributes}}catch(e){}T(e,{...t,info:{...t.info,jsAttributes:r},runtime:e.runtime},e.runtime.loaderType)}}}var M=i(6630);class B extends I{static featureName=M.T;constructor(e){var t;super(e,M.T),this.setupInspectionEvents(),t=e,(0,_.Y)(S.Fw,function(e,r){"string"==typeof e&&("/"!==e.charAt(0)&&(e="/"+e),t.runtime.customTransaction=(r||"http://custom.transaction")+e,(0,A.p)(S.Pl+S.Fw,[(0,x.t)()],void 0,void 0,t.ee))},t),this.importAggregator(e,()=>i.e(478).then(i.bind(i,5839)))}setupInspectionEvents(){const e=(e,t)=>{e&&(0,R.W)({timeStamp:e.timeStamp,loaded:"complete"===e.target.readyState,type:"window",name:t,data:e.target.location+""})};(0,k.sB)(t=>{e(t,"DOMContentLoaded")}),(0,k.GG)(t=>{e(t,"load")}),(0,k.Qr)(t=>{e(t,"navigate")}),this.ee.on(d.tS.UPDATE,(e,t)=>{(0,R.W)({type:"lifecycle",name:"session",data:t})})}}class H extends e.d{constructor(e){var t;(super(),p.gm)?(this.features={},(0,n.bQ)(this.agentIdentifier,this),this.desiredFeatures=new Set(e.features||[]),this.desiredFeatures.add(B),T(this,e,e.loaderType||"agent"),t=this,(0,_.Y)(S.cD,function(e,r,n=!1){if("string"==typeof e){if(["string","number","boolean"].includes(typeof r)||null===r)return(0,_.U)(t,e,r,S.cD,n);(0,u.R)(40,typeof r)}else(0,u.R)(39,typeof e)},t),function(e){(0,_.Y)(S.Dl,function(t,r=!1){if("string"!=typeof t&&null!==t)return void(0,u.R)(41,typeof t);const n=e.info.jsAttributes["enduser.id"];r&&null!=n&&n!==t?(0,A.p)(S.Pl+"setUserIdAndResetSession",[t],void 0,"session",e.ee):(0,_.U)(e,"enduser.id",t,S.Dl,!0)},e)}(this),function(e){(0,_.Y)(S.nb,function(t){if("string"==typeof t||null===t)return(0,_.U)(e,"application.version",t,S.nb,!1);(0,u.R)(42,typeof t)},e)}(this),function(e){(0,_.Y)(S.d3,function(){e.ee.emit("manual-start-all")},e)}(this),function(e){(0,_.Y)(S.Pv,function(t=!0){if("boolean"==typeof t){if((0,A.p)(S.Pl+S.Pv,[t],void 0,"session",e.ee),e.runtime.consented=t,t){const t=e.features.page_view_event;t.onAggregateImported.then(e=>{const r=t.featAggregate;e&&!r.sentRum&&r.sendRum()})}}else(0,u.R)(65,typeof t)},e)}(this),this.run()):(0,u.R)(21)}get config(){return{info:this.info,init:this.init,loader_config:this.loader_config,runtime:this.runtime}}get api(){return this}run(){try{const e=function(e){const t={};return r.forEach(r=>{t[r]=!!e[r]?.enabled}),t}(this.init),n=[...this.desiredFeatures];n.sort((e,r)=>t.P3[e.featureName]-t.P3[r.featureName]),n.forEach(r=>{if(!e[r.featureName]&&r.featureName!==t.K7.pageViewEvent)return;const n=function(e){switch(e){case t.K7.ajax:return[t.K7.jserrors];case t.K7.sessionTrace:return[t.K7.ajax,t.K7.pageViewEvent];case t.K7.sessionReplay:return[t.K7.sessionTrace];case t.K7.pageViewTiming:return[t.K7.pageViewEvent];default:return[]}}(r.featureName).filter(e=>!(e in this.features));n.length>0&&(0,u.R)(36,{targetFeature:r.featureName,missingDependencies:n}),this.features[r.featureName]=new r(this)})}catch(e){(0,u.R)(22,e);for(const e in this.features)this.features[e].abortHandler?.();const t=(0,n.Zm)();delete t.initializedAgents[this.agentIdentifier]?.features,delete this.sharedAggregator;return t.ee.get(this.agentIdentifier).abort(),!1}}}var K=i(2843),W=i(782);class F extends I{static featureName=W.T;constructor(e){super(e,W.T),p.RI&&((0,K.u)(()=>(0,A.p)("docHidden",[(0,x.t)()],void 0,W.T,this.ee),!0),(0,K.G)(()=>(0,A.p)("winPagehide",[(0,x.t)()],void 0,W.T,this.ee)),this.importAggregator(e,()=>i.e(478).then(i.bind(i,9917))))}}var U=i(3969);class V extends I{static featureName=U.TZ;constructor(e){super(e,U.TZ),this.importAggregator(e,()=>i.e(478).then(i.bind(i,6555)))}}var z=i(6774),G=i(3878),Y=i(3304);class Z{constructor(e,t,r,n,i){this.name="UncaughtError",this.message="string"==typeof e?e:(0,Y.A)(e),this.sourceURL=t,this.line=r,this.column=n,this.__newrelic=i}}function q(e){return J(e)?e:new Z(void 0!==e?.message?e.message:e,e?.filename||e?.sourceURL,e?.lineno||e?.line,e?.colno||e?.col,e?.__newrelic,e?.cause)}function X(e){const t="Unhandled Promise Rejection: ";if(!e?.reason)return;if(J(e.reason)){try{e.reason.message.startsWith(t)||(e.reason.message=t+e.reason.message)}catch(e){}return q(e.reason)}const r=q(e.reason);return(r.message||"").startsWith(t)||(r.message=t+r.message),r}function Q(e){if(e.error instanceof SyntaxError&&!/:\d+$/.test(e.error.stack?.trim())){const t=new Z(e.message,e.filename,e.lineno,e.colno,e.error.__newrelic,e.cause);return t.name=SyntaxError.name,t}return J(e.error)?e.error:q(e)}function J(e){return e instanceof Error&&!!e.stack}function ee(e,r,n,i,s=(0,x.t)()){"string"==typeof e&&(e=new Error(e)),(0,A.p)("err",[e,s,!1,r,n.runtime.isRecording,void 0,i],void 0,t.K7.jserrors,n.ee),(0,A.p)("uaErr",[],void 0,t.K7.genericEvents,n.ee)}var te=i(5732),re=i(993),ne=i(3785);function ie(e,{customAttributes:t={},level:r=re.p_.INFO}={},n,i,s=(0,x.t)()){(0,ne.R)(n.ee,e,t,r,!1,i,s)}function se(e,r,n,i,s=(0,x.t)()){(0,A.p)(S.Pl+S.hG,[s,e,r,i],void 0,t.K7.genericEvents,n.ee)}function oe(e,r,n,i,s=(0,x.t)()){const{start:o,end:a,customAttributes:c}=r||{},d={customAttributes:c||{}};if("object"!=typeof d.customAttributes||"string"!=typeof e||0===e.length)return void(0,u.R)(57);const l=(e,t)=>null==e?t:"number"==typeof e?e:e instanceof PerformanceMark?e.startTime:Number.NaN;if(d.start=l(o,0),d.end=l(a,s),Number.isNaN(d.start)||Number.isNaN(d.end))(0,u.R)(57);else{if(d.duration=d.end-d.start,!(d.duration<0))return(0,A.p)(S.Pl+S.V1,[d,e,i],void 0,t.K7.genericEvents,n.ee),d;(0,u.R)(58)}}function ae(e,r={},n,i,s=(0,x.t)()){(0,A.p)(S.Pl+S.fF,[s,e,r,i],void 0,t.K7.genericEvents,n.ee)}var ce=i(7508),de=i(9566);const ue=["name","id","type"],le=new Map([[se,"addPageAction"],[ie,"log"],[oe,"measure"],[ee,"noticeError"],[ae,"recordCustomEvent"]]),fe={experimental:(0,C.J)(()=>(0,u.R)(54,"newrelic.register")),disabled:(0,C.J)(()=>(0,u.R)(55)),invalidTarget:(0,C.J)(e=>(0,u.R)(48,e)),deregistered:(0,C.J)(()=>(0,u.R)(68))};function he(e){(0,_.Y)(S.eY,function(t){return pe(e,t)},e)}function pe(e,r){fe.experimental(),r||={},r.instance=(0,de.LA)(8),r.type=te.fQ.MFE,r.licenseKey||=e.info.licenseKey,r.blocked=!1,("object"!=typeof r.tags||null===r.tags||Array.isArray(r.tags))&&(r.tags={}),r.parent??={get id(){return e.runtime.appMetadata.agents[0].entityGuid},type:te.fQ.BA};const n=(0,ce.Qr)(),i={};Object.prototype.hasOwnProperty.call(r,"attributes")||Object.defineProperty(r,"attributes",{get:()=>({...i,"source.id":r.id,"source.name":r.name,"source.type":r.type,"parent.type":r.parent?.type||te.fQ.BA,"parent.id":r.parent?.id})}),Object.entries(r.tags).forEach(([e,t])=>{ue.includes(e)||(i["source.".concat(e)]=t)});let s=()=>{};const o=e.runtime.registeredEntities,a=e=>{r.blocked=!0,s=e};function c(e){return"string"==typeof e&&!!e.trim()&&e.trim().length<501}e.init.api.register.enabled||a(fe.disabled),c(r.id)&&c(r.name)||a(()=>fe.invalidTarget(r));const d={addPageAction:(t,n={})=>p(se,[t,{...i,...n},e],r),deregister:()=>{f(),a(fe.deregistered)},log:(t,n={})=>p(ie,[t,{...n,customAttributes:{...i,...n.customAttributes||{}}},e],r),measure:(t,n={})=>p(oe,[t,{...n,customAttributes:{...i,...n.customAttributes||{}}},e],r),noticeError:(t,n={})=>p(ee,[t,{...i,...n},e],r),recordCustomEvent:(t,n={})=>p(ae,[t,{...i,...n},e],r),setApplicationVersion:e=>h("application.version",e),setCustomAttribute:(e,t)=>h(e,t),setUserId:e=>h("enduser.id",e),metadata:{get customAttributes(){return i},target:r,timings:n}},l=()=>(r.blocked&&s(),r.blocked);function f(){if(n.reportedAt)return;n.reportedAt=(0,x.t)();const e=n.fetchEnd-n.fetchStart,t=n.scriptEnd-n.scriptStart;d.recordCustomEvent("MicroFrontEndTiming",{assetUrl:n.asset,assetType:n.type,timeAlive:n.reportedAt-n.registeredAt,timeToBeRequested:n.fetchStart,timeToExecute:t,timeToFetch:e,timeToLoad:e+t,timeToRegister:n.registeredAt})}l()||(o.push(d),(0,K.G)(f));const h=(e,t)=>{l()||(i[e]=t)},p=(r,n,i)=>{if(l()&&r!==pe)return;const s=(0,x.t)(),o=le.get(r)||"unknown";(0,A.p)(U.xV,["API/register/".concat(o,"/called")],void 0,t.K7.metrics,e.ee);try{return r(...n,i,s)}catch(e){(0,u.R)(50,e)}};return d}class ge extends I{static featureName=z.T;constructor(e){var t;super(e,z.T),t=e,(0,_.Y)(S.o5,(e,r)=>ee(e,r,t),t),function(e){(0,_.Y)(S.bt,function(t){e.runtime.onerror=t},e)}(e),function(e){let t=0;(0,_.Y)(S.k6,function(e,r){++t>10||(this.runtime.releaseIds[e.slice(-200)]=(""+r).slice(-200))},e)}(e),he(e);try{this.removeOnAbort=new AbortController}catch(e){}this.ee.on("internal-error",(t,r)=>{this.abortHandler&&(0,A.p)("ierr",[q(t),(0,x.t)(),!0,{},e.runtime.isRecording,r],void 0,this.featureName,this.ee)}),p.gm.addEventListener("unhandledrejection",t=>{this.abortHandler&&(0,A.p)("err",[X(t),(0,x.t)(),!1,{unhandledPromiseRejection:1},e.runtime.isRecording],void 0,this.featureName,this.ee)},(0,G.jT)(!1,this.removeOnAbort?.signal)),p.gm.addEventListener("error",t=>{this.abortHandler&&(0,A.p)("err",[Q(t),(0,x.t)(),!1,{},e.runtime.isRecording],void 0,this.featureName,this.ee)},(0,G.jT)(!1,this.removeOnAbort?.signal)),this.abortHandler=this.#n,this.importAggregator(e,()=>i.e(478).then(i.bind(i,9377)))}#n(){this.removeOnAbort?.abort(),this.abortHandler=void 0}}var me=i(8990);let ve=1;function ye(e){const t=typeof e;return!e||"object"!==t&&"function"!==t?-1:e===p.gm?0:(0,me.I)(e,"nr@id",function(){return ve++})}function be(e){if("string"==typeof e&&e.length)return e.length;if("object"==typeof e){if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer&&e.byteLength)return e.byteLength;if("undefined"!=typeof Blob&&e instanceof Blob&&e.size)return e.size;if(!("undefined"!=typeof FormData&&e instanceof FormData))try{return(0,Y.A)(e).length}catch(e){return}}}var we=i(8139),Re=i(3434);const Ee={},Te=["open","send"];function Ae(e,t){var r=e||w.ee;const n=function(e){return(e||w.ee).get("xhr")}(r);if(void 0===p.gm.XMLHttpRequest)return n;if(Ee[n.debugId]++)return n;Ee[n.debugId]=1,(0,we.u)(r);var i=(0,Re.YM)(n),s=p.gm.XMLHttpRequest,o=p.gm.MutationObserver,a=p.gm.Promise,c=p.gm.setInterval,d="readystatechange",l=["onload","onerror","onabort","onloadstart","onloadend","onprogress","ontimeout"],f=[],h=p.gm.XMLHttpRequest=function(e){const r=new s(e),o=n.context(r);o.targets=(0,te.$5)(t);try{n.emit("new-xhr",[r],o),r.addEventListener(d,(a=o,function(){var e=this;e.readyState>3&&!a.resolved&&(a.resolved=!0,n.emit("xhr-resolved",[],e)),i.inPlace(e,l,"fn-",R)}),(0,G.jT)(!1))}catch(e){(0,u.R)(15,e);try{n.emit("internal-error",[e])}catch(e){}}var a;return r};function g(e,t){i.inPlace(t,["onreadystatechange"],"fn-",R)}if(function(e,t){for(var r in e)t[r]=e[r]}(s,h),h.prototype=s.prototype,i.inPlace(h.prototype,Te,"-xhr-",R),n.on("send-xhr-start",function(e,t){g(e,t),function(e){f.push(e),o&&(m?m.then(b):c?c(b):(v=-v,y.data=v))}(t)}),n.on("open-xhr-start",g),o){var m=a&&a.resolve();if(!c&&!a){var v=1,y=document.createTextNode(v);new o(b).observe(y,{characterData:!0})}}else r.on("fn-end",function(e){e[0]&&e[0].type===d||b()});function b(){for(var e=0;e<f.length;e++)g(0,f[e]);f.length&&(f=[])}function R(e,t){return t}return n}var xe="fetch-",Se=xe+"body-",_e=["arrayBuffer","blob","json","text","formData"],Oe=p.gm.Request,Pe=p.gm.Response,ke="prototype";const Ne={};function je(e,t){const r=function(e){return(e||w.ee).get("fetch")}(e);if(!(Oe&&Pe&&p.gm.fetch))return r;if(Ne[r.debugId]++)return r;function n(e,n,i){var s=e[n];"function"==typeof s&&(e[n]=function(){var e=[...arguments];const n={},o=(0,te.$5)(t);var a;r.emit(i+"before-start",[e],n),n[w.P]&&n[w.P].dt&&(a=n[w.P].dt);var c=s.apply(this,e);return r.emit(i+"start",[e,a],c),c.then(function(e){return r.emit(i+"end",[null,e,o],c),e},function(e){throw r.emit(i+"end",[e,void 0,o],c),e})})}return Ne[r.debugId]=1,_e.forEach(e=>{n(Oe[ke],e,Se),n(Pe[ke],e,Se)}),n(p.gm,"fetch",xe),r.on(xe+"end",function(e,t,n){var i=this;if(i.targets=n||[void 0],t){var s=t.headers.get("content-length");null!==s&&(i.rxSize=s),r.emit(xe+"done",[null,t],i)}else r.emit(xe+"done",[e],i)}),r}var Ce=i(7485);class De{constructor(e){this.agentRef=e}generateTracePayload(e){const t=this.agentRef.loader_config;if(!this.shouldGenerateTrace(e)||!t)return null;var r=(t.accountID||"").toString()||null,n=(t.agentID||"").toString()||null,i=(t.trustKey||"").toString()||null;if(!r||!n)return null;var s=(0,de.ZF)(),o=(0,de.el)(),a=Date.now(),c={spanId:s,traceId:o,timestamp:a};return(e.sameOrigin||this.isAllowedOrigin(e)&&this.useTraceContextHeadersForCors())&&(c.traceContextParentHeader=this.generateTraceContextParentHeader(s,o),c.traceContextStateHeader=this.generateTraceContextStateHeader(s,a,r,n,i)),(e.sameOrigin&&!this.excludeNewrelicHeader()||!e.sameOrigin&&this.isAllowedOrigin(e)&&this.useNewrelicHeaderForCors())&&(c.newrelicHeader=this.generateTraceHeader(s,o,a,r,n,i)),c}generateTraceContextParentHeader(e,t){return"00-"+t+"-"+e+"-01"}generateTraceContextStateHeader(e,t,r,n,i){return i+"@nr=0-1-"+r+"-"+n+"-"+e+"----"+t}generateTraceHeader(e,t,r,n,i,s){if(!("function"==typeof p.gm?.btoa))return null;var o={v:[0,1],d:{ty:"Browser",ac:n,ap:i,id:e,tr:t,ti:r}};return s&&n!==s&&(o.d.tk=s),btoa((0,Y.A)(o))}shouldGenerateTrace(e){return this.agentRef.init?.distributed_tracing?.enabled&&this.isAllowedOrigin(e)}isAllowedOrigin(e){var t=!1;const r=this.agentRef.init?.distributed_tracing;if(e.sameOrigin)t=!0;else if(r?.allowed_origins instanceof Array)for(var n=0;n<r.allowed_origins.length;n++){var i=(0,Ce.D)(r.allowed_origins[n]);if(e.hostname===i.hostname&&e.protocol===i.protocol&&e.port===i.port){t=!0;break}}return t}excludeNewrelicHeader(){var e=this.agentRef.init?.distributed_tracing;return!!e&&!!e.exclude_newrelic_header}useNewrelicHeaderForCors(){var e=this.agentRef.init?.distributed_tracing;return!!e&&!1!==e.cors_use_newrelic_header}useTraceContextHeadersForCors(){var e=this.agentRef.init?.distributed_tracing;return!!e&&!!e.cors_use_tracecontext_headers}}var Le=i(9300),Ie=i(7295);function Me(e){return"string"==typeof e?e:e instanceof(0,n.dV)().o.REQ?e.url:p.gm?.URL&&e instanceof URL?e.href:void 0}var Be=["load","error","abort","timeout"],He=Be.length,Ke=(0,n.dV)().o.REQ,We=(0,n.dV)().o.XHR;const Fe="X-NewRelic-App-Data";class Ue extends I{static featureName=Le.T;constructor(e){super(e,Le.T),this.dt=new De(e),this.handler=(e,t,r,n)=>(0,A.p)(e,t,r,n,this.ee);try{const e={xmlhttprequest:"xhr",fetch:"fetch",beacon:"beacon"};p.gm?.performance?.getEntriesByType("resource").forEach(r=>{if(r.initiatorType in e&&0!==r.responseStatus){const n={status:r.responseStatus},i={rxSize:r.transferSize,duration:Math.floor(r.duration),cbTime:0};Ve(n,r.name),this.handler("xhr",[n,i,r.startTime,r.responseEnd,e[r.initiatorType]],void 0,t.K7.ajax)}})}catch(e){}je(this.ee,e),Ae(this.ee,e),function(e,r,n,i){function s(e){var t=this;t.totalCbs=0,t.called=0,t.cbTime=0,t.end=R,t.ended=!1,t.xhrGuids={},t.lastSize=null,t.loadCaptureCalled=!1,t.params=this.params||{},t.metrics=this.metrics||{},t.latestLongtaskEnd=0,e.addEventListener("load",function(r){T(t,e)},(0,G.jT)(!1)),p.lR||e.addEventListener("progress",function(e){t.lastSize=e.loaded},(0,G.jT)(!1))}function o(e){this.params={method:e[0]},Ve(this,e[1]),this.metrics={}}function a(t,r){e.loader_config.xpid&&this.sameOrigin&&r.setRequestHeader("X-NewRelic-ID",e.loader_config.xpid);var n=i.generateTracePayload(this.parsedOrigin);if(n){var s=!1;n.newrelicHeader&&(r.setRequestHeader("newrelic",n.newrelicHeader),s=!0),n.traceContextParentHeader&&(r.setRequestHeader("traceparent",n.traceContextParentHeader),n.traceContextStateHeader&&r.setRequestHeader("tracestate",n.traceContextStateHeader),s=!0),s&&(this.dt=n)}}function c(e,t){var n=this.metrics,i=e[0],s=this;if(n&&i){var o=be(i);o&&(n.txSize=o)}this.startTime=(0,x.t)(),this.body=i,this.listener=function(e){try{"abort"!==e.type||s.loadCaptureCalled||(s.params.aborted=!0),("load"!==e.type||s.called===s.totalCbs&&(s.onloadCalled||"function"!=typeof t.onload)&&"function"==typeof s.end)&&s.end(t)}catch(e){try{r.emit("internal-error",[e])}catch(e){}}};for(var a=0;a<He;a++)t.addEventListener(Be[a],this.listener,(0,G.jT)(!1))}function d(e,t,r){this.cbTime+=e,t?this.onloadCalled=!0:this.called+=1,this.called!==this.totalCbs||!this.onloadCalled&&"function"==typeof r.onload||"function"!=typeof this.end||this.end(r)}function u(e,t){var r=""+ye(e)+!!t;this.xhrGuids&&!this.xhrGuids[r]&&(this.xhrGuids[r]=!0,this.totalCbs+=1)}function l(e,t){var r=""+ye(e)+!!t;this.xhrGuids&&this.xhrGuids[r]&&(delete this.xhrGuids[r],this.totalCbs-=1)}function f(){this.endTime=(0,x.t)()}function h(e,t){t instanceof We&&"load"===e[0]&&r.emit("xhr-load-added",[e[1],e[2]],t)}function g(e,t){t instanceof We&&"load"===e[0]&&r.emit("xhr-load-removed",[e[1],e[2]],t)}function m(e,t,r){t instanceof We&&("onload"===r&&(this.onload=!0),("load"===(e[0]&&e[0].type)||this.onload)&&(this.xhrCbStart=(0,x.t)()))}function v(e,t){this.xhrCbStart&&r.emit("xhr-cb-time",[(0,x.t)()-this.xhrCbStart,this.onload,t],t)}function y(e){var t,r=e[1]||{};if("string"==typeof e[0]?0===(t=e[0]).length&&p.RI&&(t=""+p.gm.location.href):e[0]&&e[0].url?t=e[0].url:p.gm?.URL&&e[0]&&e[0]instanceof URL?t=e[0].href:"function"==typeof e[0].toString&&(t=e[0].toString()),"string"==typeof t&&0!==t.length){t&&(this.parsedOrigin=(0,Ce.D)(t),this.sameOrigin=this.parsedOrigin.sameOrigin);var n=i.generateTracePayload(this.parsedOrigin);if(n&&(n.newrelicHeader||n.traceContextParentHeader))if(e[0]&&e[0].headers)a(e[0].headers,n)&&(this.dt=n);else{var s={};for(var o in r)s[o]=r[o];s.headers=new Headers(r.headers||{}),a(s.headers,n)&&(this.dt=n),e.length>1?e[1]=s:e.push(s)}}function a(e,t){var r=!1;return t.newrelicHeader&&(e.set("newrelic",t.newrelicHeader),r=!0),t.traceContextParentHeader&&(e.set("traceparent",t.traceContextParentHeader),t.traceContextStateHeader&&e.set("tracestate",t.traceContextStateHeader),r=!0),r}}function b(e,t){this.params={},this.metrics={},this.startTime=(0,x.t)(),this.dt=t;let[r,n={}]=e;Ve(this,Me(r));const i=(""+(r&&r instanceof Ke&&r.method||n.method||"GET")).toUpperCase();this.params.method=i,this.body=n.body,this.txSize=be(n.body)||0}function w(e,t){if(this.endTime=(0,x.t)(),this.params||(this.params={}),(0,Ie.iW)(this.params))return;let r;this.params.status=t?t.status:0,"string"==typeof this.rxSize&&this.rxSize.length>0&&(r=+this.rxSize);const n={txSize:this.txSize,rxSize:r,duration:(0,x.t)()-this.startTime},i=[this.params,n,this.startTime,this.endTime,"fetch"];this.targets.forEach(e=>E(i,this,e))}function R(e){const t=this.params,r=this.metrics;if(this.ended)return;this.ended=!0;for(let t=0;t<He;t++)e.removeEventListener(Be[t],this.listener,!1);if(t.aborted)return;if((0,Ie.iW)(t))return;r.duration=(0,x.t)()-this.startTime,this.loadCaptureCalled||4!==e.readyState?null==t.status&&(t.status=0):T(this,e),r.cbTime=this.cbTime;const n=[t,r,this.startTime,this.endTime,"xhr"];this.targets.forEach(e=>E(n,this,e))}function E(e,r,i){n("xhr",[...e,i],r,t.K7.ajax)}function T(e,n){e.params.status=n.status;var i=function(e,t){var r=e.responseType;return"json"===r&&null!==t?t:"arraybuffer"===r||"blob"===r||"json"===r?be(e.response):"text"===r||""===r||void 0===r?be(e.responseText):void 0}(n,e.lastSize);if(i&&(e.metrics.rxSize=i),e.sameOrigin&&n.getAllResponseHeaders().indexOf(Fe)>=0){var s=n.getResponseHeader(Fe);s&&((0,A.p)(U.rs,["Ajax/CrossApplicationTracing/Header/Seen"],void 0,t.K7.metrics,r),e.params.cat=s.split(", ").pop())}e.loadCaptureCalled=!0}r.on("new-xhr",s),r.on("open-xhr-start",o),r.on("open-xhr-end",a),r.on("send-xhr-start",c),r.on("xhr-cb-time",d),r.on("xhr-load-added",u),r.on("xhr-load-removed",l),r.on("xhr-resolved",f),r.on("addEventListener-end",h),r.on("removeEventListener-end",g),r.on("fn-end",v),r.on("fetch-before-start",y),r.on("fetch-start",b),r.on("fn-start",m),r.on("fetch-done",w)}(e,this.ee,this.handler,this.dt),this.importAggregator(e,()=>i.e(478).then(i.bind(i,3845)))}}function Ve(e,t){var r=(0,Ce.D)(t),n=e.params||e;n.hostname=r.hostname,n.port=r.port,n.protocol=r.protocol,n.host=r.hostname+":"+r.port,n.pathname=r.pathname,e.parsedOrigin=r,e.sameOrigin=r.sameOrigin}const ze={},Ge=["pushState","replaceState"];function Ye(e){const t=function(e){return(e||w.ee).get("history")}(e);return!p.RI||ze[t.debugId]++||(ze[t.debugId]=1,(0,Re.YM)(t).inPlace(window.history,Ge,"-")),t}var Ze=i(3738);function qe(e){(0,_.Y)(S.BL,function(r=Date.now()){const n=r-p.WN;n<0&&(0,u.R)(62,r),(0,A.p)(U.XG,[S.BL,{time:n}],void 0,t.K7.metrics,e.ee),e.addToTrace({name:S.BL,start:r,origin:"nr"}),(0,A.p)(S.Pl+S.hG,[n,S.BL],void 0,t.K7.genericEvents,e.ee)},e)}const{He:Xe,bD:$e,d3:Qe,Kp:Je,TZ:et,Lc:tt,uP:rt,Rz:nt}=Ze;class it extends I{static featureName=et;constructor(e){var r;super(e,et),r=e,(0,_.Y)(S.U2,function(e){if(!(e&&"object"==typeof e&&e.name&&e.start))return;const n={n:e.name,s:e.start-p.WN,e:(e.end||e.start)-p.WN,o:e.origin||"",t:"api"};n.s<0||n.e<0||n.e<n.s?(0,u.R)(61,{start:n.s,end:n.e}):(0,A.p)("bstApi",[n],void 0,t.K7.sessionTrace,r.ee)},r),qe(e);if(!(0,j.V)(e.init))return void this.deregisterDrain();const n=this.ee;let s;Ye(n),this.eventsEE=(0,we.u)(n),this.eventsEE.on(rt,function(e,t){this.bstStart=(0,x.t)()}),this.eventsEE.on(tt,function(e,r){(0,A.p)("bst",[e[0],r,this.bstStart,(0,x.t)()],void 0,t.K7.sessionTrace,n)}),n.on(nt+Qe,function(e){this.time=(0,x.t)(),this.startPath=location.pathname+location.hash}),n.on(nt+Je,function(e){(0,A.p)("bstHist",[location.pathname+location.hash,this.startPath,this.time],void 0,t.K7.sessionTrace,n)});try{s=new PerformanceObserver(e=>{const r=e.getEntries();(0,A.p)(Xe,[r],void 0,t.K7.sessionTrace,n)}),s.observe({type:$e,buffered:!0})}catch(e){}this.importAggregator(e,()=>i.e(478).then(i.bind(i,6974)),{resourceObserver:s})}}var st=i(733),ot=i(6344);class at extends I{static featureName=ot.TZ;#i;recorder;constructor(e){var r;let n;super(e,ot.TZ),r=e,(0,_.Y)(S.CH,function(){(0,A.p)(S.CH,[],void 0,t.K7.sessionReplay,r.ee)},r),function(e){(0,_.Y)(S.Tb,function(){(0,A.p)(S.Tb,[],void 0,t.K7.sessionReplay,e.ee)},e)}(e);const s="".concat(d.Wt).concat((0,st.Y)(e.info.licenseKey,e.info.applicationID));try{n=JSON.parse(localStorage.getItem(s))}catch(e){}(0,N.SR)(e.init)&&this.ee.on(S.CH,()=>this.#s()),this.#o(n)&&this.importRecorder().then(e=>{e.startRecording(ot.Qb.PRELOAD,n?.sessionReplayMode)}),this.importAggregator(this.agentRef,()=>i.e(478).then(i.bind(i,6167)),this),this.ee.on("err",e=>{this.blocked||this.agentRef.runtime.isRecording&&(this.errorNoticed=!0,(0,A.p)(ot.Vh,[e],void 0,this.featureName,this.ee))})}#o(e){return e&&(e.sessionReplayMode===d.g.FULL||e.sessionReplayMode===d.g.ERROR)||(0,N.Aw)(this.agentRef.init)}importRecorder(){return this.recorder?Promise.resolve(this.recorder):(this.#i??=Promise.all([i.e(478),i.e(249)]).then(i.bind(i,4866)).then(({Recorder:e})=>(this.recorder=new e(this),this.recorder)).catch(e=>{throw this.ee.emit("internal-error",[e]),this.blocked=!0,e}),this.#i)}#s(){this.blocked||(this.featAggregate?this.featAggregate.mode!==d.g.FULL&&this.featAggregate.initializeRecording(d.g.FULL,!0,ot.Qb.API):this.importRecorder().then(()=>{this.recorder.startRecording(ot.Qb.API,d.g.FULL)}))}}var ct=i(3962);class dt extends I{static featureName=ct.TZ;constructor(e){if(super(e,ct.TZ),function(e){const r=e.ee.get("tracer");function n(){}(0,_.Y)(S.dT,function(e){return(new n).get("object"==typeof e?e:{})},e);const i=n.prototype={createTracer:function(n,i){var s={},o=this,a="function"==typeof i;return(0,A.p)(U.xV,["API/createTracer/called"],void 0,t.K7.metrics,e.ee),function(){if(r.emit((a?"":"no-")+"fn-start",[(0,x.t)(),o,a],s),a)try{return i.apply(this,arguments)}catch(e){const t="string"==typeof e?new Error(e):e;throw r.emit("fn-err",[arguments,this,t],s),t}finally{r.emit("fn-end",[(0,x.t)()],s)}}}};["actionText","setName","setAttribute","save","ignore","onEnd","getContext","end","get"].forEach(r=>{_.Y.apply(this,[r,function(){return(0,A.p)(S.hw+r,[performance.now(),...arguments],this,t.K7.softNav,e.ee),this},e,i])}),(0,_.Y)(S.PA,function(){(0,A.p)(S.hw+"routeName",[performance.now(),...arguments],void 0,t.K7.softNav,e.ee)},e)}(e),!p.RI||!(0,n.dV)().o.MO)return;const r=Ye(this.ee);try{this.removeOnAbort=new AbortController}catch(e){}ct.tC.forEach(e=>{(0,G.sp)(e,e=>{c(e)},!0,this.removeOnAbort?.signal)});const s=()=>(0,A.p)("newURL",[(0,x.t)(),""+window.location],void 0,this.featureName,this.ee);r.on("pushState-end",s),r.on("replaceState-end",s),(0,G.sp)(ct.OV,e=>{c(e),(0,A.p)("newURL",[e.timeStamp,""+window.location],void 0,this.featureName,this.ee)},!0,this.removeOnAbort?.signal);let o=!1;const a=new((0,n.dV)().o.MO)((e,t)=>{o||(o=!0,requestAnimationFrame(()=>{(0,A.p)("newDom",[(0,x.t)()],void 0,this.featureName,this.ee),o=!1}))}),c=(0,C.s)(e=>{"loading"!==document.readyState&&((0,A.p)("newUIEvent",[e],void 0,this.featureName,this.ee),a.observe(document.body,{attributes:!0,childList:!0,subtree:!0,characterData:!0}))},100,{leading:!0});this.abortHandler=function(){this.removeOnAbort?.abort(),a.disconnect(),this.abortHandler=void 0},this.importAggregator(e,()=>i.e(478).then(i.bind(i,4393)),{domObserver:a})}}var ut=i(9119);const lt={},ft=new Set;function ht(e){return"string"==typeof e?{type:"string",size:(new TextEncoder).encode(e).length}:e instanceof ArrayBuffer?{type:"ArrayBuffer",size:e.byteLength}:e instanceof Blob?{type:"Blob",size:e.size}:e instanceof DataView?{type:"DataView",size:e.byteLength}:ArrayBuffer.isView(e)?{type:"TypedArray",size:e.byteLength}:{type:"unknown",size:0}}class pt{constructor(e,t){this.timestamp=(0,x.t)(),this.currentUrl=(0,ut.L)(window.location.href),this.socketId=(0,de.LA)(8),this.requestedUrl=(0,ut.L)(e),this.requestedProtocols=Array.isArray(t)?t.join(","):t||"",this.openedAt=void 0,this.protocol=void 0,this.extensions=void 0,this.binaryType=void 0,this.messageOrigin=void 0,this.messageCount=0,this.messageBytes=0,this.messageBytesMin=0,this.messageBytesMax=0,this.messageTypes=void 0,this.sendCount=0,this.sendBytes=0,this.sendBytesMin=0,this.sendBytesMax=0,this.sendTypes=void 0,this.closedAt=void 0,this.closeCode=void 0,this.closeReason="unknown",this.closeWasClean=void 0,this.connectedDuration=0,this.hasErrors=void 0}}class gt extends I{static featureName=a.TZ;constructor(e){super(e,a.TZ);const r=e.init.feature_flags.includes("websockets"),s=!e.init.feature_flags.includes("no_spv"),o=[e.init.page_action.enabled,e.init.performance.capture_marks,e.init.performance.capture_measures,e.init.performance.resources.enabled,e.init.user_actions.enabled,r,s];var c;let d;if(c=e,(0,_.Y)(S.hG,(e,t)=>se(e,t,c),c),function(e){(0,_.Y)(S.fF,(t,r)=>ae(t,r,e),e)}(e),qe(e),he(e),function(e){(0,_.Y)(S.V1,(t,r)=>oe(t,r,e),e)}(e),this.removeOnAbort=new AbortController,this.abortHandler=()=>{this.removeOnAbort.abort(),this.abortHandler=void 0},r){const u=function(e){if(!(0,n.dV)().o.WS)return e;const t=e.get("websockets");if(lt[t.debugId]++)return t;lt[t.debugId]=1,(0,K.G)(()=>{const e=(0,x.t)();ft.forEach(r=>{r.nrData.closedAt=e,r.nrData.closeCode=1001,r.nrData.closeReason="Page navigating away",r.nrData.closeWasClean=!1,r.nrData.openedAt&&(r.nrData.connectedDuration=e-r.nrData.openedAt),t.emit("ws",[r.nrData],r)})});class r extends WebSocket{static name="WebSocket";static toString(){return"function WebSocket() { [native code] }"}toString(){return"[object WebSocket]"}get[Symbol.toStringTag](){return r.name}#a(e){(e.__newrelic??={}).socketId=this.nrData.socketId,this.nrData.hasErrors??=!0}constructor(...e){super(...e),this.nrData=new pt(e[0],e[1]),this.addEventListener("open",()=>{this.nrData.openedAt=(0,x.t)(),["protocol","extensions","binaryType"].forEach(e=>{this.nrData[e]=this[e]}),ft.add(this)}),this.addEventListener("message",e=>{const{type:t,size:r}=ht(e.data);this.nrData.messageOrigin??=(0,ut.L)(e.origin),this.nrData.messageCount++,this.nrData.messageBytes+=r,this.nrData.messageBytesMin=Math.min(this.nrData.messageBytesMin||1/0,r),this.nrData.messageBytesMax=Math.max(this.nrData.messageBytesMax,r),(this.nrData.messageTypes??"").includes(t)||(this.nrData.messageTypes=this.nrData.messageTypes?"".concat(this.nrData.messageTypes,",").concat(t):t)}),this.addEventListener("close",e=>{this.nrData.closedAt=(0,x.t)(),this.nrData.closeCode=e.code,e.reason&&(this.nrData.closeReason=e.reason),this.nrData.closeWasClean=e.wasClean,this.nrData.connectedDuration=this.nrData.closedAt-this.nrData.openedAt,ft.delete(this),t.emit("ws",[this.nrData],this)})}addEventListener(e,t,...r){const n=this,i="function"==typeof t?function(...e){try{return t.apply(this,e)}catch(e){throw n.#a(e),e}}:t?.handleEvent?{handleEvent:function(...e){try{return t.handleEvent.apply(t,e)}catch(e){throw n.#a(e),e}}}:t;return super.addEventListener(e,i,...r)}send(e){if(this.readyState===WebSocket.OPEN){const{type:t,size:r}=ht(e);this.nrData.sendCount++,this.nrData.sendBytes+=r,this.nrData.sendBytesMin=Math.min(this.nrData.sendBytesMin||1/0,r),this.nrData.sendBytesMax=Math.max(this.nrData.sendBytesMax,r),(this.nrData.sendTypes??"").includes(t)||(this.nrData.sendTypes=this.nrData.sendTypes?"".concat(this.nrData.sendTypes,",").concat(t):t)}try{return super.send(e)}catch(e){throw this.#a(e),e}}close(...e){try{super.close(...e)}catch(e){throw this.#a(e),e}}}return p.gm.WebSocket=r,t}(this.ee);u.on("ws",e=>{(0,A.p)("ws-complete",[e],void 0,this.featureName,this.ee)})}if(s&&p.gm.addEventListener("securitypolicyviolation",e=>{(0,A.p)("spv",[e],void 0,t.K7.genericEvents,this.ee)},(0,G.jT)(!1,this.removeOnAbort.signal)),p.RI){if(je(this.ee,e),Ae(this.ee,e),d=Ye(this.ee),e.init.user_actions.enabled){function l(t){const r=(0,Ce.D)(t);return e.beacons.includes(r.hostname+":"+r.port)}function f(){d.emit("navChange")}a.Zp.forEach(e=>(0,G.sp)(e,e=>(0,A.p)("ua",[e],void 0,this.featureName,this.ee),!0)),a.qN.forEach(e=>{const t=(0,C.s)(e=>{(0,A.p)("ua",[e],void 0,this.featureName,this.ee)},500,{leading:!0});(0,G.sp)(e,t)}),p.gm.addEventListener("error",()=>{(0,A.p)("uaErr",[],void 0,t.K7.genericEvents,this.ee)},(0,G.jT)(!1,this.removeOnAbort.signal)),this.ee.on("open-xhr-start",(e,r)=>{l(e[1])||r.addEventListener("readystatechange",()=>{2===r.readyState&&(0,A.p)("uaXhr",[],void 0,t.K7.genericEvents,this.ee)},(0,G.jT)(void 0,this.removeOnAbort.signal))}),this.ee.on("fetch-start",e=>{e.length>=1&&!l(Me(e[0]))&&(0,A.p)("uaXhr",[],void 0,t.K7.genericEvents,this.ee)}),d.on("pushState-end",f),d.on("replaceState-end",f),window.addEventListener("hashchange",f,(0,G.jT)(!0,this.removeOnAbort.signal)),window.addEventListener("popstate",f,(0,G.jT)(!0,this.removeOnAbort.signal))}if(e.init.performance.resources.enabled&&p.gm.PerformanceObserver?.supportedEntryTypes.includes("resource")){new PerformanceObserver(e=>{e.getEntries().forEach(e=>{(0,A.p)("browserPerformance.resource",[e],void 0,this.featureName,this.ee)})}).observe({type:"resource",buffered:!0})}}o.some(e=>e)?this.importAggregator(e,()=>i.e(478).then(i.bind(i,8019))):this.deregisterDrain()}}var mt=i(2646);const vt=new Map;function yt(e,t,r,n,i=!0,s){if("object"!=typeof t||!t||"string"!=typeof r||!r||"function"!=typeof t[r])return(0,u.R)(29);const o=function(e){return(e||w.ee).get("logger")}(e),a=(0,Re.YM)(o,void 0,s),c=new mt.y(w.P);c.level=n.level,c.customAttributes=n.customAttributes,c.autoCaptured=i;const d=t[r]?.[Re.Jt]||t[r];return vt.set(d,c),a.inPlace(t,[r],"wrap-logger-",()=>vt.get(d),void 0,!0),o}var bt=i(1910);class wt extends I{static featureName=re.TZ;constructor(e){var t;super(e,re.TZ),t=e,(0,_.Y)(S.$9,(e,r)=>ie(e,r,t),t),function(e){(0,_.Y)(S.Wb,(t,r,{customAttributes:n={},level:i=re.p_.INFO}={})=>{yt(e.ee,t,r,{customAttributes:n,level:i},!1,e)},e)}(e),he(e);const r=this.ee;["log","error","warn","info","debug","trace"].forEach(t=>{(0,bt.i)(p.gm.console[t]),yt(r,p.gm.console,t,{level:"log"===t?"info":t},void 0,e)}),this.ee.on("wrap-logger-end",function([e],t,n,i=[]){const{level:s,customAttributes:o,autoCaptured:a}=this;i.forEach(t=>{(0,ne.R)(r,e,o,s,a,t)})}),this.importAggregator(e,()=>i.e(478).then(i.bind(i,5288)))}}new H({features:[Ue,B,F,it,at,V,ge,gt,wt,dt],loaderType:"spa"})})()})();</script>
<meta name="title" content="AC Lens | Welcome to Discount Contacts  at Discount Contacts"/>
<meta name="description" content="Welcome AC Lens customers! Discover the same great service and wide selection of contact lenses at Discount Contacts. Enjoy seamless shopping, exclusive deals, and top-notch customer support as you transition to your new home for all your contact lens needs."/>
<meta name="keywords" content="ac lens, discount contact lenses, cheap contact lenses, contact lens deals, buy contacts online, affordable contact lenses, contact lens discounts, prescription contacts, online contact lens store, contact lens brands, daily contacts, monthly contacts, toric lenses, colored contact lenses, contact lens offers"/>
<meta name="robots" content="INDEX,FOLLOW"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AC Lens | Welcome to Discount Contacts  at Discount Contacts</title>
<link  rel="stylesheet" type="text/css"  media="all" href="https://www.discountcontacts.com/static/version1780656299/frontend/NVI/DiscountContacts/en_US/css/styles.css" />
<script  type="text/javascript"  defer="defer" src="https://www.discountcontacts.com/static/version1780656299/frontend/NVI/DiscountContacts/en_US/Hyva_MagentoDataServices/js/storefront-event-collector.js"></script>
<script  type="text/javascript"  defer="defer" src="https://www.discountcontacts.com/static/version1780656299/frontend/NVI/DiscountContacts/en_US/Hyva_MagentoDataServices/js/storefront-events-sdk.js"></script>
<script  type="text/javascript"  defer="defer" src="https://www.discountcontacts.com/static/version1780656299/frontend/NVI/DiscountContacts/en_US/Hyva_MagentoLiveSearch/js/sdk.js"></script>
<link  rel="icon" type="image/x-icon" href="https://www.discountcontacts.com/media/favicon/stores/1/favicon-stg.png" />
<link  rel="shortcut icon" type="image/x-icon" href="https://www.discountcontacts.com/media/favicon/stores/1/favicon-stg.png" />
<script>
  !function(n,o){o.forEach(function(o){n[o]||((n.__alloyNS=n.__alloyNS||
  []).push(o),n[o]=function(){var u=arguments;return new Promise(
  function(i,l){n[o].q.push([i,l,u])})},n[o].q=[])})}
  (window,["alloy"]);
</script>
<script src="https://cdn1.adoberesources.net/alloy/2.14.0/alloy.min.js" async></script>


<meta name="p:domain_verify" content="S5Nd6kLPmik2GzerK4T4z0pPsX5PMh38"/>

            <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
</script>
<script  type="text/javascript"  data-routing="commerce=rum" defer="defer" src="https://rum.hlx.page/.rum/@adobe/helix-rum-js@^2/dist/rum-standalone.js"></script>
    <!-- Google Tag Manager -->
        <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
            new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
        j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
        'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
        })(window,document,'script','dataLayer','GTM-WVS9RP');</script>
            <!-- End Google Tag Manager -->
<script>
    var BASE_URL = 'https://www.discountcontacts.com/';
    var THEME_PATH = 'https://www.discountcontacts.com/static/version1780656299/frontend/NVI/DiscountContacts/en_US';
    var COOKIE_CONFIG = {
        "expires": null,
        "path": "\u002F",
        "domain": ".www.discountcontacts.com",
        "secure": true,
        "lifetime": "3600",
        "cookie_restriction_enabled": false    };
    var CURRENT_STORE_CODE = 'c_7167';
    var CURRENT_WEBSITE_ID = '1';

    window.hyva = window.hyva || {}

    window.cookie_consent_groups = window.cookie_consent_groups || {}
    window.cookie_consent_groups['necessary'] = true;

    window.cookie_consent_config = window.cookie_consent_config || {};
    window.cookie_consent_config['necessary'] = [].concat(
        window.cookie_consent_config['necessary'] || [],
        [
            'user_allowed_save_cookie',
            'form_key',
            'mage-messages',
            'private_content_version',
            'mage-cache-sessid',
            'last_visited_store',
            'section_data_ids'
        ]
    );
</script>
<script>
    'use strict';
    (function( hyva, undefined ) {

        function lifetimeToExpires(options, defaults) {

            const lifetime = options.lifetime || defaults.lifetime;

            if (lifetime) {
                const date = new Date;
                date.setTime(date.getTime() + lifetime * 1000);
                return date;
            }

            return null;
        }

        function generateRandomString() {

            const allowedCharacters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',
                length = 16;

            let formKey = '',
                charactersLength = allowedCharacters.length;

            for (let i = 0; i < length; i++) {
                formKey += allowedCharacters[Math.round(Math.random() * (charactersLength - 1))]
            }

            return formKey;
        }

        const sessionCookieMarker = {noLifetime: true}

        const cookieTempStorage = {};

        const internalCookie = {
            get(name) {
                const v = document.cookie.match('(^|;) ?' + name + '=([^;]*)(;|$)');
                return v ? v[2] : null;
            },
            set(name, value, days, skipSetDomain) {
                let expires,
                    path,
                    domain,
                    secure,
                    samesite;

                const defaultCookieConfig = {
                    expires: null,
                    path: '/',
                    domain: null,
                    secure: false,
                    lifetime: null,
                    samesite: 'lax'
                };

                const cookieConfig = window.COOKIE_CONFIG || {};

                expires = days && days !== sessionCookieMarker
                    ? lifetimeToExpires({lifetime: 24 * 60 * 60 * days, expires: null}, defaultCookieConfig)
                    : lifetimeToExpires(window.COOKIE_CONFIG, defaultCookieConfig) || defaultCookieConfig.expires;

                path = cookieConfig.path || defaultCookieConfig.path;
                domain = !skipSetDomain && (cookieConfig.domain || defaultCookieConfig.domain);
                secure = cookieConfig.secure || defaultCookieConfig.secure;
                samesite = cookieConfig.samesite || defaultCookieConfig.samesite;

                document.cookie = name + "=" + encodeURIComponent(value) +
                    (expires && days !== sessionCookieMarker ? '; expires=' + expires.toGMTString() : '') +
                    (path ? '; path=' + path : '') +
                    (domain ? '; domain=' + domain : '') +
                    (secure ? '; secure' : '') +
                    (samesite ? '; samesite=' + samesite : 'lax');
            },
            isWebsiteAllowedToSaveCookie() {
                const allowedCookies = this.get('user_allowed_save_cookie');
                if (allowedCookies) {
                    const allowedWebsites = JSON.parse(unescape(allowedCookies));

                    return allowedWebsites[CURRENT_WEBSITE_ID] === 1;
                }
                return false;
            },
            getGroupByCookieName(name) {
                const cookieConsentConfig = window.cookie_consent_config || {};
                let group = null;
                for (let prop in cookieConsentConfig) {
                    if (!cookieConsentConfig.hasOwnProperty(prop)) continue;
                    if (cookieConsentConfig[prop].includes(name)) {
                        group = prop;
                        break;
                    }
                }
                return group;
            },
            isCookieAllowed(name) {
                const cookieGroup = this.getGroupByCookieName(name);
                return cookieGroup
                    ? window.cookie_consent_groups[cookieGroup]
                    : this.isWebsiteAllowedToSaveCookie();
            },
            saveTempStorageCookies() {
                for (const [name, data] of Object.entries(cookieTempStorage)) {
                    if (this.isCookieAllowed(name)) {
                        this.set(name, data['value'], data['days'], data['skipSetDomain']);
                        delete cookieTempStorage[name];
                    }
                }
            }
        };

        hyva.getCookie = (name) => {
            const cookieConfig = window.COOKIE_CONFIG || {};

            if (cookieConfig.cookie_restriction_enabled && ! internalCookie.isCookieAllowed(name)) {
                return cookieTempStorage[name] ? cookieTempStorage[name]['value'] : null;
            }

            return internalCookie.get(name);
        }

        hyva.setCookie = (name, value, days, skipSetDomain) => {
            const cookieConfig = window.COOKIE_CONFIG || {};

            if (cookieConfig.cookie_restriction_enabled && ! internalCookie.isCookieAllowed(name)) {
                cookieTempStorage[name] = {value, days, skipSetDomain};
                return;
            }
            return internalCookie.set(name, value, days, skipSetDomain);
        }


        hyva.setSessionCookie = (name, value, skipSetDomain) => {
            return hyva.setCookie(name, value, sessionCookieMarker, skipSetDomain)
        }

        hyva.getBrowserStorage = () => {
            const browserStorage = window.localStorage || window.sessionStorage;
            if (!browserStorage) {
                console.warn('Browser Storage is unavailable');
                return false;
            }
            try {
                browserStorage.setItem('storage_test', '1');
                browserStorage.removeItem('storage_test');
            } catch (error) {
                console.warn('Browser Storage is not accessible', error);
                return false;
            }
            return browserStorage;
        }

        hyva.postForm = (postParams) => {
            const form = document.createElement("form");

            let data = postParams.data;

            if (! postParams.skipUenc && ! data.uenc) {
                data.uenc = btoa(window.location.href);
            }
            form.method = "POST";
            form.action = postParams.action;

            Object.keys(postParams.data).map(key => {
                const field = document.createElement("input");
                field.type = 'hidden'
                field.value = postParams.data[key];
                field.name = key;
                form.appendChild(field);
            });

            const form_key = document.createElement("input");
            form_key.type = 'hidden';
            form_key.value = hyva.getFormKey();
            form_key.name="form_key";
            form.appendChild(form_key);

            document.body.appendChild(form);

            form.submit();
        }

        hyva.getFormKey = function () {
            let formKey = hyva.getCookie('form_key');

            if (!formKey) {
                formKey = generateRandomString();
                hyva.setCookie('form_key', formKey);
            }

            return formKey;
        }

        hyva.formatPrice = (value, showSign, options = {}) => {
            const groupSeparator = options.groupSeparator;
            const decimalSeparator = options.decimalSeparator
            delete options.groupSeparator;
            delete options.decimalSeparator;
            const formatter = new Intl.NumberFormat(
                'en\u002DUS',
                Object.assign({
                    style: 'currency',
                    currency: 'USD',
                    signDisplay: showSign ? 'always' : 'auto'
                }, options)
            );
            return (typeof Intl.NumberFormat.prototype.formatToParts === 'function') ?
                formatter.formatToParts(value).map(({type, value}) => {
                    switch (type) {
                        case 'currency':
                            return '\u0024' || value;
                        case 'minusSign':
                            return '- ';
                        case 'plusSign':
                            return '+ ';
                        case 'group':
                            return groupSeparator !== undefined ? groupSeparator : value;
                        case 'decimal':
                            return decimalSeparator !== undefined ? decimalSeparator : value;
                        default :
                            return value;
                    }
                }).reduce((string, part) => string + part) :
                formatter.format(value);
        }

        const formatStr = function (str, nStart) {
            const args = Array.from(arguments).slice(2);

            return str.replace(/(%+)([0-9]+)/g, (m, p, n) => {
                const idx = parseInt(n) - nStart;

                if (args[idx] === null || args[idx] === void 0) {
                    return m;
                }
                return p.length % 2
                    ? p.slice(0, -1).replace('%%', '%') + args[idx]
                    : p.replace('%%', '%') + n;
            })
        }

        hyva.str = function (string) {
            const args = Array.from(arguments);
            args.splice(1, 0, 1);

            return formatStr.apply(undefined, args);
        }

        hyva.strf = function () {
            const args = Array.from(arguments);
            args.splice(1, 0, 0);

            return formatStr.apply(undefined, args);
        }

        /**
         * Take a html string as `content` parameter and
         * extract an element from the DOM to replace in
         * the current page under the same selector,
         * defined by `targetSelector`
         */
        hyva.replaceDomElement = (targetSelector, content) => {
            // Parse the content and extract the DOM node using the `targetSelector`
            const parser = new DOMParser();
            const doc = parser.parseFromString(content, 'text/html');
            const contentNode = doc.querySelector(targetSelector);

            // Bail if content or target can't be found
            if (!contentNode || !document.querySelector(targetSelector)) {
                return;
            }

                        hyva.activateScripts(contentNode);
            
            // Replace the old DOM node with the new content
            document.querySelector(targetSelector).replaceWith(contentNode);

            // Reload customerSectionData and display cookie-messages if present
            window.dispatchEvent(new CustomEvent("reload-customer-section-data"));
            hyva.initMessages();
        }

        hyva.removeScripts = (contentNode) => {
            const scripts = contentNode.getElementsByTagName('script');
            for (let i = 0; i < scripts.length; i++) {
                scripts[i].parentNode.removeChild(scripts[i]);
            }
            const templates = contentNode.getElementsByTagName('template');
            for (let i = 0; i < templates.length; i++) {
                const container = document.createElement('div');
                container.innerHTML = templates[i].innerHTML;
                hyva.removeScripts(container);
                templates[i].innerHTML = container.innerHTML;
            }
        }

        hyva.activateScripts = (contentNode) => {
            // Create new array from HTMLCollection to avoid mutation of collection while manipulating the DOM.
            const scripts = Array.from(contentNode.getElementsByTagName('script'));

            // Iterate over all script tags to duplicate+inject each into the head
            for (const original of scripts) {
                const script = document.createElement('script');
                original.type && (script.type = original.type);
                script.innerHTML = original.innerHTML;

                // Remove the original (non-executing) script from the contentNode
                original.parentNode.removeChild(original)

                // Add script to head
                document.head.appendChild(script);
            }

            return contentNode;
        }

        const replace = {['+']: '-', ['/']: '_', ['=']: ','};
        hyva.getUenc = () => btoa(window.location.href).replace(/[+/=]/g, match => replace[match]);

        let currentTrap;

        const focusableElements = (rootElement) => {
            const selector = 'button, [href], input, select, textarea, details, [tabindex]:not([tabindex="-1"]';
            return Array.from(rootElement.querySelectorAll(selector))
                .filter(el => {
                    return el.style.display !== 'none'
                        && !el.disabled
                        && el.tabIndex !== -1
                        && (el.offsetWidth || el.offsetHeight || el.getClientRects().length)
                })
        }

        const focusTrap = (e) => {
            const isTabPressed = e.key === 'Tab' || e.keyCode === 9;
            if (!isTabPressed) return;

            const focusable = focusableElements(currentTrap)
            const firstFocusableElement = focusable[0]
            const lastFocusableElement = focusable[focusable.length - 1]

            e.shiftKey
                ? document.activeElement === firstFocusableElement && (lastFocusableElement.focus(), e.preventDefault())
                : document.activeElement === lastFocusableElement && (firstFocusableElement.focus(), e.preventDefault())
        };

        hyva.releaseFocus = (rootElement) => {
            if (currentTrap && (!rootElement || rootElement === currentTrap)) {
                currentTrap.removeEventListener('keydown', focusTrap)
                currentTrap = null
            }
        }
        hyva.trapFocus = (rootElement) => {
            if (!rootElement) return;
            hyva.releaseFocus()
            currentTrap = rootElement
            rootElement.addEventListener('keydown', focusTrap)
            const firstElement = focusableElements(rootElement)[0]
            firstElement && firstElement.focus()
        }

        hyva.safeParseNumber = (rawValue) => {
            const number = rawValue ? parseFloat(rawValue) : null;

            return Array.isArray(number) || isNaN(number) ? rawValue : number;
        }

        const toCamelCase = s => s.split('_').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
        hyva.createBooleanObject = (name, value = false, additionalMethods = {}) => {

            const camelCase = toCamelCase(name);
            const key = '__hyva_bool_' + name

            return new Proxy(Object.assign(
                additionalMethods,
                {
                    [key]: !!value,
                    [name]() {return !!this[key]},
                    ['!' + name]() {return !this[key]}, // @deprecated This does not work with non-CSP Alpine
                    ['not' + camelCase]() {return !this[key]},
                    ['toggle' + camelCase]() {this[key] = !this[key]},
                    [`set${camelCase}True`]() {this[key] = true},
                    [`set${camelCase}False`]() {this[key] = false},
                }
            ), {
                set(target, prop, value) {
                    return prop === name
                        ? (target[key] = !!value)
                        : Reflect.set(...arguments);
                }
            })
        }

                hyva.alpineInitialized = (fn) => window.addEventListener('alpine:initialized', fn, {once: true})
        window.addEventListener('alpine:init', () => Alpine.data('{}', () => ({})), {once: true});
                window.addEventListener('user-allowed-save-cookie', () => internalCookie.saveTempStorageCookies())

    }( window.hyva = window.hyva || {} ));
</script>
<script>
    if (!window.IntersectionObserver) {
        window.IntersectionObserver = function (callback) {
            this.observe = el => el && callback(this.takeRecords());
            this.takeRecords = () => [{isIntersecting: true, intersectionRatio: 1}];
            this.disconnect = () => {};
            this.unobserve = () => {};
        }
    }
</script>
<script type="text/plain" src="https://www.discountcontacts.com/static/version1780656299/frontend/NVI/DiscountContacts/en_US/NVI_DataServices/js/storefront-event-collector.js" class="optanon-category-2" defer="defer"></script>
<script src="https://www.discountcontacts.com/static/version1780656299/frontend/NVI/DiscountContacts/en_US/NVI_DataServices/js/storefront-events-sdk.js" defer="defer"></script>

<script>
    window.addEventListener('load', function () {
        window.magentoStorefrontEvents = magentoStorefrontEvents;
        magentoStorefrontEvents.context.setStorefrontInstance(
            {"storeUrl":"https:\/\/www.discountcontacts.com\/","websiteId":1,"websiteCode":"dcl","storeId":1,"storeCode":"dcl_store","storeViewId":1,"storeViewCode":"c_7167","websiteName":"Discount Contacts","storeName":"Discount Contacts","storeViewName":"DCL English","baseCurrencyCode":"USD","storeViewCurrencyCode":"USD","catalogExtensionVersion":"103.4.23","environmentId":"04c4dae5-34e6-4b95-9d8f-8ae382fed4c8","environment":"Production","storefrontTemplate":"Hyva"}        );
        magentoStorefrontEvents.context.setMagentoExtension({
            magentoExtensionVersion: "8.0.1",
        });
        magentoStorefrontEvents.context.setDataServicesExtension({
            version: "8.0.1",
        });
        magentoStorefrontEvents.context.setPage({
            pageType: "Default"
        });
        magentoStorefrontEvents.context.setContext("pageExtended", {
            action: "page-view"
        });

        let shopperId = "guest";
        magentoStorefrontEvents.context.setShopper({ shopperId: shopperId });

        
        magentoStorefrontEvents.publish.pageView();
    });

    function getCustomerIdFromDataServices() {
        let customerId = hyva.getCookie("dataservices_customer_id");
        return customerId ? decodeURI(customerId).replace(/[^\w\s]/gi, "") : null;
    }

    function getCustomerGroupFromDataServices() {
        try {
            const decodedString = decodeURIComponent(hyva.getCookie("dataservices_customer_group"));
            return decodedString ? JSON.parse(decodedString) : null;
        } catch (error) {
            console.error("Failed to parse customer group data:", error);
            return null;
        }
    }
</script>
</head>
<body id="html-body" class="cms-welcome-aclens page-layout-1column cms-page-view page-layout-cms-full-width">
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WVS9RP" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<input name="form_key" type="hidden" value="cqMLa92DlW4AVy85" />
    <noscript>
        <section class="message global noscript border-b-2 border-blue-500 bg-blue-50 shadow-none m-0 px-0 rounded-none font-normal">
            <div class="container text-center">
                <p>
                    <strong>JavaScript seems to be disabled in your browser.</strong>
                    <span>
                        For the best experience on our site, be sure to turn on Javascript in your browser.                    </span>
                </p>
            </div>
        </section>
    </noscript>


<script>
    document.body.addEventListener('touchstart', () => {}, {passive: true})
</script>

<script>
    'use strict';
    (function(hyva) {
                const formValidationRules = {
            required(value, options, field, context) {
                const el = field.element.type === 'hidden' ? createTextInputFrom(field.element) : field.element,
                    msg = 'This\u0020is\u0020a\u0020required\u0020field.';

                if (el.type === 'radio' || el.type === 'checkbox') {
                    return (value === undefined || value.length === 0) ? msg : true;
                }

                el.setAttribute('required', '');
                el.checkValidity();

                return el.validity.valueMissing ? msg : true;
            },
            maxlength(value, options, field, context) {
                const n = Number(options)
                if (value.length > n) {
                    return n === 1
                        ? hyva.strf('Please\u0020enter\u0020no\u0020more\u0020than\u00201\u0020character.')
                        : hyva.strf('Please\u0020enter\u0020no\u0020more\u0020than\u0020\u00250\u0020characters.', options)
                }
                return true;
            },
            minlength(value, options, field, context) {
                const n = Number(options)
                if (value.length > 0 && value.length < n) {
                    return n === 1
                        ? hyva.strf('Please\u0020enter\u0020at\u0020least\u00201\u0020character.')
                        : hyva.strf('Please\u0020enter\u0020at\u0020least\u0020\u00250\u0020characters.', options)
                }
                return true;
            },
            max(value, options, field, context) {
                field.element.setAttribute('max', options);
                field.element.checkValidity();
                if (field.element.validity.rangeOverflow) {
                    return hyva.strf('Please\u0020enter\u0020a\u0020value\u0020less\u0020than\u0020or\u0020equal\u0020to\u0020\u0022\u00250\u0022.', options);
                }
                return true;
            },
            min(value, options, field, context) {
                field.element.setAttribute('min', options);
                field.element.checkValidity();
                if (field.element.validity.rangeUnderflow) {
                    return hyva.strf('Please\u0020enter\u0020a\u0020value\u0020greater\u0020than\u0020or\u0020equal\u0020to\u0020\u0022\u00250\u0022.', options);
                }
                return true;
            },
            step(value, options, field, context) {
                field.element.setAttribute('step', options);
                field.element.checkValidity();
                if (field.element.validity.stepMismatch) {
                    const val = Number(value);
                    const step = Number(options);
                    const msg = 'Please\u0020enter\u0020a\u0020valid\u0020value.\u0020The\u0020two\u0020nearest\u0020valid\u0020values\u0020are\u0020\u0022\u00250\u0022\u0020and\u0020\u0022\u00251\u0022.';
                    return hyva.strf(msg, Math.floor(val / step) * step, Math.ceil(val / step) * step);
                }
                return true;
            },
            pattern(value, options, field, context) {
                field.element.setAttribute('pattern', options);
                field.element.checkValidity();
                if (field.element.validity.patternMismatch) {
                    return field.element.title
                        ? hyva.strf('Please\u0020match\u0020the\u0020requested\u0020format\u003A\u0020\u00250.', field.element.title)
                        : 'Please\u0020match\u0020the\u0020requested\u0020format.'
                }
                return true;
            },
            email(value, options, field, context) {
                const isValid = [
                    v => v && v.trim().length > 0,                      // not empty
                    v => !(/\s/.test(v)),                               // no spaces
                    v => !(/\.{2,}/.test(v)),                           // no consecutive dots
                    v => !/^[.]/.test(v.split('@')[0]),                 // local part doesn't start with dot
                    v => !/[.]$/.test(v.split('@')[0]),                 // local part doesn't end with dot
                    v => /^[a-zA-Z0-9._%+-]+@/.test(v),                 // local part allows aliasing (with +)
                    v => /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9-]+\.[a-zA-Z]{2,}$/.test(v)  // full email validation
                ].every(test => test(value));
                return isValid
                    ? true
                    : 'Please\u0020enter\u0020a\u0020valid\u0020email\u0020address.';
            },
            password(value, options, field, context) {
                const rule = /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/;
                if (value.length > 0 && !rule.test(value)) {
                    return 'Please\u0020provide\u0020at\u0020least\u0020one\u0020upper\u0020case,\u0020one\u0020lower\u0020case,\u0020one\u0020digit\u0020and\u0020one\u0020special\u0020character\u0020\u0028\u0023\u003F\u0021\u0040\u0024\u0025\u005E\u0026\u002A\u002D\u0029';
                }
                return true;
            },
            equalTo(value, options, field, context) {
                const dependencyField = context.fields[options].element;
                if (value !== dependencyField.value) {
                    const dependencyFieldName =
                        dependencyField.label ||
                        dependencyField.title ||
                        (dependencyField.labels && dependencyField.labels[0] && dependencyField.labels[0].innerText) ||
                        dependencyField.name;
                    return hyva.strf('This\u0020field\u0020value\u0020must\u0020be\u0020the\u0020same\u0020as\u0020\u0022\u00250\u0022.', dependencyFieldName);
                }
                return true;
            },
            name(value, options, field, context) {
                if (value.length < 2) {
                    return 'Please\u0020enter\u0020at\u0020least\u00202\u0020characters.';
                }
                if (!/^(?! )[ \p{L}'-]+(?<! )$/u.test(value)) {
                    const { label } = field.element.dataset;
                    if (label) {
                        return `Invalid\u0020characters\u0020detected\u0020in\u0020${label}.`
                    }
                    return 'Invalid\u0020characters\u0020detected.';
                }
                return true;
            },
            birthDate(value, options, field, context){
                const regex = /^(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])-\d{4}$/;
                const isValid = regex.test(value);
                return isValid
                    ? true
                    : 'Please\u0020enter\u0020a\u0020valid\u0020date\u0020in\u0020MM\u002DDD\u002DYYYY\u0020format.';
            },
            maxDateToday(value, options, field, context){
                const today = new Date();
                today.setHours(0, 0, 0, 0); // Normalize today's date to midnight

                const inputDate = new Date(value);
                inputDate.setHours(0, 0, 0, 0); // Normalize input date to midnight

                const isValid = inputDate <= today;

                return isValid
                    ? true
                    : 'Date\u0020cannot\u0020be\u0020a\u0020future\u0020date.';
            },
            postCode(value, options, field, context) {
                const zipcode = value.trim().replace(/ /g, '');
                if (!/(^\d{5}$)|(^\d{5}-\d{4}$)/.test(zipcode)) {
                    return 'Please\u0020enter\u0020a\u0020valid\u0020zipcode.';
                }
                return true;
            },
            phone(value, options, field, context) {
                const phoneNumber = value.trim().replace(/-/g, '');
                if (!/^\d{10}$/.test(phoneNumber)) {
                    return 'Please\u0020enter\u0020a\u0020valid\u0020phone\u0020number.';
                }
                return true;
            }
        };

                function raceSome(promises, pred) {
            return new Promise((resolve, reject) => {

                if (promises.length === 0) {
                    return resolve();
                }

                let settled = false, nDone = 0;

                const resolveIf = v => {
                    if (!settled && (pred(v) || ++nDone === promises.length)) {
                        settled = true;
                        resolve(v);
                    }
                    return v;
                }

                promises.map(promise => {
                    promise.then(resolveIf).catch(reason => {
                        settled = true;
                        reject(reason)
                    });
                    return promise;
                });
            });
        }

        const INPUT_ATTRIBUTE_RULES = {min: 'min', max: 'max', required: 'required', minlength: 'minlength', maxlength: 'maxlength', step: 'step', pattern: 'pattern'}
        const INPUT_TYPE_RULES = {email: 'email'}

        function getRules(element) {
            let rules = {};
            Object.keys(INPUT_ATTRIBUTE_RULES).forEach(attrName => {
                if (element.hasAttribute(attrName)) {
                    rules[INPUT_ATTRIBUTE_RULES[attrName]] = element.getAttribute(attrName);
                }
            })
            if (INPUT_TYPE_RULES[element.type]) {
                rules[INPUT_TYPE_RULES[element.type]] = true;
            }

            if (element.dataset.validate) {
                try {
                    Object.assign(rules, JSON.parse(element.dataset.validate));
                } catch (error) {
                    console.error('Validator error. Cannot parse data-validate attribute of element:\n', element);
                }
            }

            return rules;
        }

        function isInvalidRuleResult(ruleState) {
            return typeof ruleState === 'string' || !ruleState || (ruleState.type && ruleState.content);
        }

        async function runValidateFn(rule, options, value, field) {
            return formValidationRules[rule](value, options, field, this);
        }

        function generateId() {
            let id;
            do {
                id = `${this.idPrefix}-${++this.idSeq}`;
            } while (document.getElementById(id));
            return id;
        }

        function isVisible(element) {
            const el = element.type !== 'hidden' ? element : (element.parentElement || {});
            return !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length)
        }

        function elementWillValidate(element) {
            return (element.willValidate || element.type === 'hidden')
                && element.tagName !== 'BUTTON'
                && element.disabled === false
                && !(element.tagName === 'INPUT' && element.type === 'submit')
                && (element.hasAttribute('data-validate-hidden') || isVisible(element))
        }

        function createMessageContainer(el, fieldWrapperClassName) {
            if (! el.parentElement) {
                return;
            }
            const refocus = document.activeElement === el;
            const wrapper = document.createElement('div');
            wrapper.classList.add.apply(wrapper.classList, fieldWrapperClassName.split(' '));
            el.parentElement.insertBefore(wrapper, el);
            wrapper.appendChild(el);
            refocus && document.activeElement !== el && el.focus();
            return wrapper;
        }

        function containerNotFound(selector, el) {
            const msg = `Cannot find message container element ${selector} of ${el.name}`;
            console.error(msg, el);
            throw msg;
        }

        function createTextInputFrom(el) {
            const text = document.createElement('INPUT');
            text.type = 'text';
            text.value = el.value;
            return text;
        }

        function classNamesToSelector(classNames) {
            return classNames.split(' ')
                .filter(className => className.length > 0)
                .map(className => `.${className}`)
                .join('')
        }

        function hasMessagesWrapper(field, messagesWrapperClassName) {
            return this.getMessageContainer(field).querySelector(classNamesToSelector(messagesWrapperClassName));
        }

        function getMessagesWrapper(field, messagesWrapperClassName) {
            if (hasMessagesWrapper.call(this, field, messagesWrapperClassName)) {
                return this.getMessageContainer(field).querySelector(classNamesToSelector(messagesWrapperClassName));
            }

            const msgWrapper = document.createElement('ul');
            const msgId = generateId.call(this);
            msgWrapper.id = msgId;
            field.element.setAttribute('aria-errormessage', msgId);
            field.element.setAttribute('aria-describedby', msgId);
            msgWrapper.classList.add.apply(msgWrapper.classList, messagesWrapperClassName.split(' '));
            if (field.validateOnChange) {
                msgWrapper.setAttribute('aria-live', 'polite');
            }
            this.getMessageContainer(field).appendChild(msgWrapper);

            return msgWrapper;
        }

        function getCheckedValues(field) {
            const name = field.element.name.replace(/([\\"])/g, '\\$1');
            const elements = field.element.form.querySelectorAll('input[name="' + name + '"]:checked');
            return Array.from(elements).map(el => el.value);
        }

        function escapeHtml(s) {
            const div = document.createElement('div')
            div.innerText = s;
            return div.innerHTML;
        }

        
        function formValidation(form, options = {}) {
            const formElement = form || this.$el;

            if (formElement.dataset && formElement.dataset.options) {
                try {
                    options = Object.assign(options, JSON.parse(formElement.dataset.options || '{}'));
                } catch (e) {
                    throw new Error('Cannot read the form options from the data-options attribute: not valid JSON');
                }
            }

            // Disable browser default validation
            if (formElement.tagName === 'FORM') {
                formElement.setAttribute('novalidate', '');
            } else {
                console.error('formValidation can be initialized only on FORM element', formElement);
                return;
            }

            options = Object.assign({
                fieldWrapperClassName: 'field field-reserved',
                messagesWrapperClassName: 'messages',
                validClassName: 'field-success',
                invalidClassName: 'field-error',
                pageMessagesWrapperSelector: null,
                scrollToFirstError: true,
            }, options || {});

            return {
                state: {
                    valid: false,
                },
                fields: {},
                idSeq: 0,
                idPrefix: formElement.id || 'vld-msg',
                setupFields(elements) {
                    this.fields = {};
                    Array.from(elements).forEach(element => {
                        if (elementWillValidate(element)) {
                            this.setupField(element);
                        }
                    });
                },
                resetFields() {
                    formElement.reset();
                    this.setupFields(formElement.elements);

                    Object.values(this.fields).forEach(field => {
                        const container = this.getMessageContainer(field);
                        container.classList.remove(options.validClassName);
                        container.classList.remove(options.invalidClassName);
                        this.removeMessages(field, options.messagesWrapperClassName);
                        field.element.removeAttribute('aria-errormessage');
                        field.element.removeAttribute('aria-describedby');
                        field.element.removeAttribute('aria-invalid');
                    });
                },
                setupField(element) {
                    if (! element) return;
                    const onChange = !!element.dataset.onChange;
                    if (elementWillValidate(element)) {
                        const rules = getRules(element);
                        if (Object.keys(rules).length > 0) {
                            if (this.fields[element.name]) {
                                Object.assign(this.fields[element.name].rules, rules);
                            } else {
                                this.fields[element.name] = {
                                    element,
                                    rules: rules,
                                    validateOnChange: onChange,
                                    state: {
                                        valid: null,
                                        rules: {}
                                    }
                                }
                            }
                        }
                    } else {
                        console.error('Element will not validate', element);
                    }
                },
                onSubmit(event) {
                    if (event.target.tagName === 'FORM') {
                        event.preventDefault();

                        this.validate()
                            .then(() => event.target.submit())
                            .catch(invalidElements => {});
                    }
                },
                onChange(event) {
                    event.target.dataset.onChange = 'true';
                    if (!Object.keys(this.fields).length) {
                        this.setupFields(formElement.elements);
                    }
                    if (!Object.keys(this.fields).includes(event.target.name)) {
                        this.setupField(event.target);
                    }
                    const field = this.fields[event.target.name];

                    this.validateField(field);
                    field && field.element.removeAttribute('data-on-change')
                },
                validateSafe() {
                    return new Promise(resolve => this.validate().then(() => resolve(true)).catch(() => {}))
                },
                validate() {
                    if (!Object.keys(this.fields).length || !Object.keys(this.fields).length !== formElement.elements.length) {
                        this.setupFields(formElement.elements);
                    }
                    return new Promise(async (resolve, reject) => {
                        if (formElement.elements) {
                                                        await raceSome(this.validateFields(), result => result !== true)
                            const invalidFields = Object.values(this.fields).filter(field => !field.state.valid);
                            this.state.valid = invalidFields.length === 0;
                            if (this.state.valid) {
                                resolve();
                            } else {
                                if (options.scrollToFirstError && invalidFields.length > 0) {
                                    invalidFields[0].element.focus()
                                    invalidFields[0].element.select && invalidFields[0].element.select();
                                }
                                reject(invalidFields.map(field => field.element));
                            }
                        }
                    });
                },
                                validateFields() {
                    const fields = Object.values(this.fields);

                                        fields.forEach(field => {
                        this.getMessageContainer(field).classList.remove(options.validClassName, options.invalidClassName)
                    });
                                        return fields.map(field => this.validateField(field))
                },
                                validateField(field) {
                                        if (! field || ! elementWillValidate(field.element)) {
                        return new Promise(resolve => resolve(true))
                    }

                    let value;
                    if (field.element.type === 'checkbox') {
                        value = getCheckedValues(field);
                    } else if (field.element.type === 'radio') {
                        value = getCheckedValues(field)[0] || undefined;
                    } else if (field.element.tagName === 'SELECT' && field.element.multiple) {
                        value = Array.from(field.element.selectedOptions).map(opt => opt.value);
                    } else {
                        value = field.element.value;
                    }

                    const rules = field.rules || {};

                                        field.state.valid = true;
                    this.showFieldState(field);

                    
                                        const fieldValidations = Object.keys(rules).filter(rule => formValidationRules[rule]).map(async rule => {
                        return runValidateFn.call(this, rule, rules[rule], value, field).then(result => {
                            field.state.rules[rule] = result;
                            return result;
                        })
                    });

                    return new Promise(resolve => {
                                                Promise.all(fieldValidations).then(results => {
                                                                                    field.state.valid = !elementWillValidate(field.element) || rules.length === 0 || !results.some(isInvalidRuleResult)
                            this.showFieldState(field);
                            resolve(field.state.valid);
                        })
                    });
                },
                                getMessagesByField(field) {
                    const messages = [];
                    let invalidRules = Object.keys(field.state.rules).filter(rule => isInvalidRuleResult(field.state.rules[rule]));

                    if (invalidRules.includes('required')) {
                        invalidRules = ['required'];
                    }
                    field.rules && Object.keys(field.rules).forEach((rule) => {
                        if (invalidRules.includes(rule)) {
                            const customMessage = field.element.getAttribute('data-msg-' + rule);
                            const message = customMessage ? customMessage : field.state.rules[rule];
                            const ruleOptions = JSON.parse(JSON.stringify(field.rules[rule]));

                            if (typeof message === 'undefined' || message === null || (typeof message !== 'string' && ! message.type)) {
                                messages.push(hyva.strf('Validation rule "%0" failed.', rule));
                            } else if (Array.isArray(ruleOptions)) {
                                ruleOptions.unshift(message.type ? message.content : message);
                                const content = hyva.strf.apply(null, ruleOptions);
                                messages.push(message.type ? {type: message.type, content} : content);
                            } else {
                                const content = hyva.strf(message.type ? message.content : message, ruleOptions)
                                messages.push(message.type ? {type: message.type, content} : content);
                            }
                        }
                    });
                    return messages;
                },
                /** @deprecated */
                getFieldWrapper(field) {
                                        return this.getMessageContainer(field)
                },
                getMessageContainer(field) {
                    let container;
                    const pageSelector = field.element.getAttribute('data-validation-container') || options.pageMessagesContainerSelector;
                    if (pageSelector) {
                        container = document.querySelector(pageSelector)
                            || containerNotFound(pageSelector, field.element)
                    } else {
                        const containerSelector = classNamesToSelector(options.fieldWrapperClassName);
                        container = field.element.closest(containerSelector)
                            || createMessageContainer(field.element, options.fieldWrapperClassName)
                            || containerNotFound(containerSelector, field.element);
                    }

                    return container;
                },
                showFieldState(field) {
                    const container = this.getMessageContainer(field),
                        hasErrorMessages = hasMessagesWrapper.call(this, field, options.messagesWrapperClassName),
                        messages = this.getMessagesByField(field).map(m => {
                            return m.type !== 'html' ? escapeHtml(m.type ? m.content : m) : m.content;
                        });
                    container.classList.toggle(options.validClassName, field.state.valid && ! hasErrorMessages);
                    container.classList.toggle(options.invalidClassName, !field.state.valid || hasErrorMessages);
                    this.createHtmlErrorMessage(field, messages);

                    if (field.state.valid) {
                        field.element.removeAttribute('aria-invalid');
                    } else {
                        field.element.setAttribute('aria-invalid', 'true');
                        if (! document.activeElement) {
                            field.element.focus();
                        }
                    }
                },
                removeMessages(field, messagesClass) {
                    if (! hasMessagesWrapper.call(this, field, messagesClass || options.messagesWrapperClassName)) {
                        return;
                    }

                    const msgWrapper = getMessagesWrapper.call(this, field, messagesClass || options.messagesWrapperClassName);
                    const messages = msgWrapper.querySelectorAll(`[data-msg-field='${field.element.name}']`);
                    Array.from(messages).forEach(msg => msg.remove());
                    if (msgWrapper && msgWrapper.childElementCount === 0) {
                        field.element.removeAttribute('aria-errormessage');
                        field.element.removeAttribute('aria-describedby');
                        msgWrapper.remove();
                    }
                },
                createErrorMessage(field, messages) {
                    const htmlMessages = (Array.isArray(messages) ? messages : [messages]).map(escapeHtml)
                    this.createHtmlErrorMessage(field, htmlMessages);
                },
                createHtmlErrorMessage(field, messages) {
                    this.removeMessages(field, options.messagesWrapperClassName);
                    field.element.removeAttribute('aria-errormessage');
                    field.element.removeAttribute('aria-describedby');

                    if (!field.state.valid) {
                        const msgWrapper = this.addHtmlMessages(field, options.messagesWrapperClassName, messages);
                        field.element.setAttribute('aria-errormessage', msgWrapper.id);
                        field.element.setAttribute('aria-describedby', msgWrapper.id);
                    }
                },
                /** @deprecated */
                createMessage(field, message) {
                                        return this.addMessages(field, options.messagesWrapperClassName, message);
                },
                addMessages(field, messagesClass, messages) {
                    const htmlMessages = (Array.isArray(messages) ? messages : [messages]).map(escapeHtml)
                    return this.addHtmlMessages(field, messagesClass, htmlMessages);
                },
                addHtmlMessages(field, messagesClass, htmlMessages) {
                    const msgWrapper = getMessagesWrapper.call(this, field, messagesClass);

                    (Array.isArray(htmlMessages) ? htmlMessages : [htmlMessages]).forEach((htmlMessage) => {
                        const li = document.createElement('li');
                        const span = document.createElement('span');
                        span.innerHTML = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
                            <path d="M8 0C3.58 0 0 3.58 0 8C0 12.42 3.58 16 8 16C12.42 16 16 12.42 16 8C16 3.58 12.42 0 8 0ZM8.84 13.68C8.604 13.892 8.324 13.996 8.008 13.996C7.684 13.996 7.404 13.892 7.164 13.684C6.924 13.476 6.804 13.184 6.804 12.808C6.804 12.48 6.92 12.2 7.148 11.972C7.376 11.744 7.66 11.628 7.992 11.628C8.324 11.628 8.608 11.744 8.844 11.972C9.08 12.2 9.196 12.48 9.196 12.808C9.196 13.18 9.076 13.472 8.84 13.68ZM9.14 4.892L8.8 8.8C8.764 9.264 8.684 9.62 8.564 9.872C8.444 10.12 8.24 10.244 7.96 10.244C7.676 10.244 7.476 10.124 7.364 9.884C7.252 9.644 7.172 9.276 7.128 8.788L6.876 4.992C6.828 4.252 6.804 3.72 6.804 3.4C6.804 2.96 6.92 2.62 7.148 2.372C7.376 2.128 7.68 2.004 8.056 2.004C8.512 2.004 8.816 2.16 8.968 2.476C9.12 2.792 9.196 3.244 9.196 3.836C9.196 4.18 9.18 4.532 9.14 4.892Z" fill="#CE001F"/>
                            </svg>
                            `;
                        li.innerHTML = htmlMessage;
                        li.prepend(span);
                        li.setAttribute('data-msg-field', field.element.name);
                        msgWrapper.appendChild(li);
                    });

                    return msgWrapper;
                },
                setField(name, value) {
                    this.fields[name].element.value = value;
                    this.fields[name].element.dispatchEvent((new Event('input')));
                    this.validateField(this.fields[name]);
                }
            }
        }

        hyva.formValidation = formValidation;
        hyva.formValidation.rules = formValidationRules;
        hyva.formValidation.setInputAttributeRuleName = (attrName, ruleName) => INPUT_ATTRIBUTE_RULES[attrName] = ruleName || attrName;
        hyva.formValidation.setInputTypeRuleName = (typeName, ruleName) => INPUT_TYPE_RULES[typeName] = ruleName || typeName;
        hyva.formValidation.addRule = (name, validator) => formValidationRules[name] = validator;
    }(window.hyva = window.hyva || {}));

    window.addEventListener('alpine:init', () => {
        Alpine.data('hyva.formValidation', hyva.formValidation);
        Alpine.data('hyva.formValidation($el)', hyva.formValidation);
    }, {once: true});
</script>
<div class="page-wrapper"><header class="page-header"><a class="action skip sr-only focus:not-sr-only focus:absolute focus:z-40 focus:bg-white
   contentarea"
   href="#contentarea">
    <span>
        Skip to Content    </span>
</a>
<style>#html-body [data-pb-style=Q6JRMM9]{justify-content:flex-start;display:flex;flex-direction:column;background-color:#1a68a8;background-position:left top;background-size:cover;background-repeat:no-repeat;background-attachment:scroll;margin:0;padding:8px 16px}#html-body [data-pb-style=VGVUU43]{text-align:center;margin:0;padding:0}</style><div class="preheader_content" data-content-type="row" data-appearance="full-bleed" data-enable-parallax="0" data-parallax-speed="0.5" data-background-images="{}" data-background-type="image" data-video-loop="true" data-video-play-only-visible="true" data-video-lazy-load="true" data-video-fallback-src="" data-element="main" data-pb-style="Q6JRMM9"><div class="preheader_content_text" data-content-type="text" data-appearance="default" data-element="main" data-pb-style="VGVUU43"><p style="text-align: center;"><span style="font-size: 18px; color: #ffffff;"><strong>Save 30% on your first order! Use code DCLNC30</strong></span></p></div></div><script>
    function initHeader () {
        function toggleBodyClass() {
            if (window.scrollY === 0) {
                document.body.classList.remove('header-scrolled');
            } else {
                document.body.classList.add('header-scrolled');
            }
        }
        return {
            searchOpen: false,
            cart: {},
            isCartOpen: false,
            getData(data) {
                if (data.cart) { this.cart = data.cart }
            },
            isCartEmpty() {
                return !this.cart.summary_count
            },
            toggleCart(event) {
                if (event.detail && event.detail.isOpen !== undefined) {
                    this.isCartOpen = event.detail.isOpen
                    if (!this.isCartOpen && this.$refs && this.$refs.cartButton) {
                        this.$refs.cartButton.focus()
                    }
                } else {
                                        this.isCartOpen = true
                }
            }
        }
    }
    function initCompareHeader() {
        return {
            compareProducts: null,
            itemCount: 0,
            receiveCompareData(data) {
                if (data['compare-products']) {
                    this.compareProducts = data['compare-products'];
                    this.itemCount = this.compareProducts.count;
                }
            }
        }
    }
</script>
<div id="header"
     class="relative w-full bg-white z-30"
     x-data="nVIDiscountContactsHtmlHeader"
     @private-content-loaded.window="nVIDiscountContactsHtmlHeaderPrivateContentLoadedWindow470"
>
    <div class="header-content-container container grid w-full gap-2 xl:gap-x-6 pt-3 items-center grid-cols-[1.7rem_1fr_4rem] grid-rows-[repeat(2,_auto)] lg:py-0 lg:grid-cols-[13.7rem_1fr_12.5rem_5rem] lg:grid-rows-1 print:block">

        <!--Mobile Navigation-->
        

    <script>
        'use strict';

        const initMenuMobile_6a27e7f37c33d = () => ({
            open: false,
            openMenu(event) {
                this.open = true
                this.$nextTick(() => hyva.trapFocus(this.$refs['menu-dialog']))
                // Prevent from body scrolling while mobile menu opened
                document.body.classList.add('fixed', 'w-full')
            },
            closeMenu(event) {
                event.stopPropagation()
                document.body.classList.remove('fixed', 'w-full')
                this.open = false
                this.$nextTick(() => this.$refs['open-menu-button'].focus() || hyva.releaseFocus())
            },
            toggleSubmenu(index) {
                this[index] = !this[index]

                if (this[index]) {
                    const focusableElements = 'button:not([disabled]), a[href]:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])'
                    this.$nextTick(() => {
                        this.$refs['submenu-' + index]?.querySelector(focusableElements)?.focus()
                    })
                }
            },
        })
    </script>
    <nav
        class=" snowdog-topmenu-mobile navigation lg:hidden z-20 print:hidden"
        x-data="initMenuMobile_6a27e7f37c33d()"
        @keydown.escape="open && closeMenu"
        @click.outside="open && closeMenu"
        aria-label="Main&#x20;menu"
        role="navigation">
        <button x-ref="open-menu-button"
            @click="openMenu"
            type="button"
            aria-label="Open&#x20;menu"
            :aria-expanded="open"
            aria-haspopup="menu"
            class="align-middle">
            <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path d="M4 6H20M4 12H20M4 18H20" stroke="#1E293B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
            </svg>
        </button>
        <div class="backdrop"
            x-show="open"
            x-transition:enter="ease-in-out duration-500"
            x-transition:enter-start="opacity-0"
            x-transition:enter-end="opacity-100"
            x-transition:leave="ease-in-out duration-500"
            x-transition:leave-start="opacity-100"
            x-transition:leave-end="opacity-0"
            @click="closeMenu"
            x-cloak
        ></div>
        <div
            class="fixed z-30 top-0 left-0 w-full max-w-[24rem] h-full bg-container-lighter border-container overflow-y-auto overflow-x-hidden transform transition ease-in-out duration-500 sm:duration-700"
            :class="{
                '-translate-x-full' : !open,
                'translate-x-0 shadow-2xl' : open,
            }"
            x-cloak
            x-ref="menu-dialog"
            role="dialog"
            aria-modal="true"
            aria-label="Main&#x20;menu"
            :aria-hidden="open ? 'false' : 'true'"
        >
            <div x-show="open" class="flex flex-col-reverse">
                                <ul class="mb-1 divide-y divide-container">
                                                                    <li x-data="{'node62': false }"
                            class="mobile-brands-menu"">
                                                            <div class="submenu-title-wrapper flex justify-between p-4">
                                    <div class="submenu-title-container text-2xl font-bold">
                                        Brands                                    </div>
                                                                            <div class="view-all-link-container text-lg font-bold">
                                                        <a
            href="https://www.discountcontacts.com/all-contacts"
            class="__inner-link menu-link menu-link"
                    >
            <span class="category-menu-item-title flex gap-2 items-center font-bold">
                Shop All                                     <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <g clip-path="url(#clip0_300_678)">
                            <path d="M8.3332 5L7.1582 6.175L10.9749 10L7.1582 13.825L8.3332 15L13.3332 10L8.3332 5Z" fill="currentColor"/>
                        </g>
                        <defs>
                            <clipPath id="clip0_300_678">
                            <rect width="20" height="20" fill="white"/>
                            </clipPath>
                        </defs>
                    </svg>
                            </span>
        </a>
            
                                        </div>
                                                                    </div>
                                <div class="mobile-submenu-container">
                                        
    <ul  class="__inner-list submenu-list __inner-list--level1" data-menu="menu-62">
                    
            <li  class="__inner-item __inner-item--level1" data-type="category">
                            <a
            href="https://www.discountcontacts.com/all-contacts/acuvue"
            class="__inner-link"
             data-menu="menu-68"        >
            <div class="flex items-center justify-center bg-container-darker rounded-full w-24 h-24 mx-auto p-2 hover:bg-white">
                <img
                    src="https://www.discountcontacts.com/media/snowdog/menu/node/a/c/acuview_1.png"
                    alt="Acuvue"
                    class=""
                    title="Acuvue"
                    loading="lazy"
                    width="114"
                    height="20"
                />
            </div>
        </a>
    
                            </li>
                    
            <li  class="__inner-item __inner-item--level1" data-type="category">
                            <a
            href="https://www.discountcontacts.com/all-contacts/biofinity"
            class="__inner-link"
             data-menu="menu-71"        >
            <div class="flex items-center justify-center bg-container-darker rounded-full w-24 h-24 mx-auto p-2 hover:bg-white">
                <img
                    src="https://www.discountcontacts.com/media/snowdog/menu/node/b/i/biofinity_1.png"
                    alt="Biofinity"
                    class=""
                    title="Biofinity"
                    loading="lazy"
                    width="106"
                    height="32"
                />
            </div>
        </a>
    
                            </li>
                    
            <li  class="__inner-item __inner-item--level1" data-type="category">
                            <a
            href="https://www.discountcontacts.com/all-contacts/dailies"
            class="__inner-link"
             data-menu="menu-74"        >
            <div class="flex items-center justify-center bg-container-darker rounded-full w-24 h-24 mx-auto p-2 hover:bg-white">
                <img
                    src="https://www.discountcontacts.com/media/snowdog/menu/node/d/a/dailies_1.png"
                    alt="Dailies"
                    class=""
                    title="Dailies"
                    loading="lazy"
                    width="104"
                    height="20"
                />
            </div>
        </a>
    
                            </li>
                    
            <li  class="__inner-item __inner-item--level1" data-type="category">
                            <a
            href="https://www.discountcontacts.com/all-contacts/air-optix"
            class="__inner-link"
             data-menu="menu-77"        >
            <div class="flex items-center justify-center bg-container-darker rounded-full w-24 h-24 mx-auto p-2 hover:bg-white">
                <img
                    src="https://www.discountcontacts.com/media/snowdog/menu/node/a/i/air-optix_1.png"
                    alt="Air&#x20;Optix"
                    class=""
                    title="Air&#x20;Optix"
                    loading="lazy"
                    width="128"
                    height="28"
                />
            </div>
        </a>
    
                            </li>
                    
            <li  class="__inner-item __inner-item--level1" data-type="category">
                            <a
            href="https://www.discountcontacts.com/all-contacts/precision"
            class="__inner-link"
             data-menu="menu-80"        >
            <div class="flex items-center justify-center bg-container-darker rounded-full w-24 h-24 mx-auto p-2 hover:bg-white">
                <img
                    src="https://www.discountcontacts.com/media/snowdog/menu/node/p/r/precision_1.png"
                    alt="Precision"
                    class=""
                    title="Precision"
                    loading="lazy"
                    width="110"
                    height="32"
                />
            </div>
        </a>
    
                            </li>
                    
            <li  class="__inner-item __inner-item--level1" data-type="category">
                            <a
            href="https://www.discountcontacts.com/all-contacts/ultra"
            class="__inner-link"
             data-menu="menu-83"        >
            <div class="flex items-center justify-center bg-container-darker rounded-full w-24 h-24 mx-auto p-2 hover:bg-white">
                <img
                    src="https://www.discountcontacts.com/media/snowdog/menu/node/u/l/ultra_1.png"
                    alt="Ultra"
                    class=""
                    title="Ultra"
                    loading="lazy"
                    width="94"
                    height="20"
                />
            </div>
        </a>
    
                            </li>
                    
            <li  class="__inner-item __inner-item--level1" data-type="category">
                            <a
            href="https://www.discountcontacts.com/all-contacts/biotrue"
            class="__inner-link"
             data-menu="menu-86"        >
            <div class="flex items-center justify-center bg-container-darker rounded-full w-24 h-24 mx-auto p-2 hover:bg-white">
                <img
                    src="https://www.discountcontacts.com/media/snowdog/menu/node/b/i/biotrue_1.png"
                    alt="Biotrue"
                    class=""
                    title="Biotrue"
                    loading="lazy"
                    width="82"
                    height="24"
                />
            </div>
        </a>
    
                            </li>
                    
            <li  class="__inner-item __inner-item--level1" data-type="category">
                            <a
            href="https://www.discountcontacts.com/all-contacts/clariti"
            class="__inner-link"
             data-menu="menu-89"        >
            <div class="flex items-center justify-center bg-container-darker rounded-full w-24 h-24 mx-auto p-2 hover:bg-white">
                <img
                    src="https://www.discountcontacts.com/media/snowdog/menu/node/c/l/clariti_1.png"
                    alt="Clariti"
                    class=""
                    title="Clariti"
                    loading="lazy"
                    width="88"
                    height="24"
                />
            </div>
        </a>
    
                            </li>
                    
            <li  class="__inner-item __inner-item--level1" data-type="category">
                            <a
            href="https://www.discountcontacts.com/all-contacts/myday"
            class="__inner-link"
             data-menu="menu-92"        >
            <div class="flex items-center justify-center bg-container-darker rounded-full w-24 h-24 mx-auto p-2 hover:bg-white">
                <img
                    src="https://www.discountcontacts.com/media/snowdog/menu/node/m/y/myday_1.png"
                    alt="MyDay"
                    class=""
                    title="MyDay"
                    loading="lazy"
                    width="84"
                    height="30"
                />
            </div>
        </a>
    
                            </li>
                    
            <li  class="__inner-item __inner-item--level1" data-type="category">
                            <a
            href="https://www.discountcontacts.com/all-contacts/proclear"
            class="__inner-link"
             data-menu="menu-95"        >
            <div class="flex items-center justify-center bg-container-darker rounded-full w-24 h-24 mx-auto p-2 hover:bg-white">
                <img
                    src="https://www.discountcontacts.com/media/snowdog/menu/node/p/r/proclear_1.png"
                    alt="Proclear"
                    class=""
                    title="Proclear"
                    loading="lazy"
                    width="102"
                    height="24"
                />
            </div>
        </a>
    
                            </li>
                    
            <li  class="__inner-item __inner-item--level1" data-type="category">
                            <a
            href="https://www.discountcontacts.com/all-contacts/avaira"
            class="__inner-link"
             data-menu="menu-98"        >
            <div class="flex items-center justify-center bg-container-darker rounded-full w-24 h-24 mx-auto p-2 hover:bg-white">
                <img
                    src="https://www.discountcontacts.com/media/snowdog/menu/node/a/v/avaira_1.png"
                    alt="Avaira"
                    class=""
                    title="Avaira"
                    loading="lazy"
                    width="78"
                    height="20"
                />
            </div>
        </a>
    
                            </li>
                    
            <li  class="__inner-item __inner-item--level1" data-type="category">
                            <a
            href="https://www.discountcontacts.com/all-contacts/total30"
            class="__inner-link"
             data-menu="menu-101"        >
            <div class="flex items-center justify-center bg-container-darker rounded-full w-24 h-24 mx-auto p-2 hover:bg-white">
                <img
                    src="https://www.discountcontacts.com/media/snowdog/menu/node/t/o/total30_1.png"
                    alt="Total30"
                    class=""
                    title="Total30"
                    loading="lazy"
                    width="90"
                    height="32"
                />
            </div>
        </a>
    
                            </li>
            </ul>
                                </div>
                                                    </li>
                                                                    <li x-data="{'node65': false }"
                            class="mobile-lenstype-menu"">
                                                            <div class="submenu-title-wrapper flex justify-between p-4">
                                    <div class="submenu-title-container text-2xl font-bold">
                                        Lens Types                                    </div>
                                                                            <div class="view-all-link-container text-lg font-bold">
                                                        <a
            href="https://www.discountcontacts.com/lens-type"
            class="__inner-link menu-link menu-link"
                    >
            <span class="category-menu-item-title flex gap-2 items-center font-bold">
                Shop All                                     <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <g clip-path="url(#clip0_300_678)">
                            <path d="M8.3332 5L7.1582 6.175L10.9749 10L7.1582 13.825L8.3332 15L13.3332 10L8.3332 5Z" fill="currentColor"/>
                        </g>
                        <defs>
                            <clipPath id="clip0_300_678">
                            <rect width="20" height="20" fill="white"/>
                            </clipPath>
                        </defs>
                    </svg>
                            </span>
        </a>
            
                                        </div>
                                                                    </div>
                                <div class="mobile-submenu-container">
                                        
    <ul  class="__inner-list submenu-list __inner-list--level1" data-menu="menu-65">
                    
            <li  class="__inner-item __inner-item--level1" data-type="category">
                            <a
            href="https://www.discountcontacts.com/lens-type/daily-disposables"
            class="__inner-link menu-link menu-link"
             data-menu="menu-104"        >
            <span class="category-menu-item-title flex gap-2 items-center font-bold">
                Daily Disposables                            </span>
        </a>
                    <div class="category-menu-item-subtitle font-bold">
                1&#x20;Day        </div>
            
                            </li>
                    
            <li  class="__inner-item __inner-item--level1" data-type="category">
                            <a
            href="https://www.discountcontacts.com/lens-type/weekly-disposables"
            class="__inner-link menu-link menu-link"
             data-menu="menu-107"        >
            <span class="category-menu-item-title flex gap-2 items-center font-bold">
                Weekly Disposables                            </span>
        </a>
                    <div class="category-menu-item-subtitle font-bold">
                1-2&#x20;Weeks        </div>
            
                            </li>
                    
            <li  class="__inner-item __inner-item--level1" data-type="category">
                            <a
            href="https://www.discountcontacts.com/lens-type/monthly-disposables"
            class="__inner-link menu-link menu-link"
             data-menu="menu-110"        >
            <span class="category-menu-item-title flex gap-2 items-center font-bold">
                Monthly Disposables                            </span>
        </a>
                    <div class="category-menu-item-subtitle font-bold">
                1-3&#x20;Months        </div>
            
                            </li>
                    
            <li  class="__inner-item __inner-item--level1" data-type="category">
                            <a
            href="https://www.discountcontacts.com/lens-type/colored-lenses"
            class="__inner-link menu-link menu-link"
             data-menu="menu-113"        >
            <span class="category-menu-item-title flex gap-2 items-center font-bold">
                Colored Lenses                            </span>
        </a>
                    <div class="category-menu-item-subtitle font-bold">
                Fashion&#x2F;Cosmetic        </div>
            
                            </li>
                    
            <li  class="__inner-item __inner-item--level1" data-type="category">
                            <a
            href="https://www.discountcontacts.com/lens-type/toric-astigmatism"
            class="__inner-link menu-link menu-link"
             data-menu="menu-116"        >
            <span class="category-menu-item-title flex gap-2 items-center font-bold">
                Toric Astigmatism                            </span>
        </a>
                    <div class="category-menu-item-subtitle font-bold">
                Corneal&#x20;Curvature        </div>
            
                            </li>
            </ul>
                                </div>
                                                    </li>
                                    </ul>

                <div class="flex justify-between items-center px-5 py-8 border-b">
                                        
<div class="customer-account-button-container">
    
<script>
"use strict";

function initComponent() {
  return {
    cart: false,
    customer: false,
    receiveCustomerData(data) {
      if (data.cart) {
        this.cart = data.cart;
      }
      if (data.customer) {
        this.customer = data.customer;
      }
    }
  }
}
</script>

<div x-data="initComponent()"
     @private-content-loaded.window="receiveCustomerData($event.detail.data)"
>
  <template x-if="customer.firstname">
    <div class="welcome-message text-3xl font-bold">Welcome, <span x-text="customer.firstname"></span></div>
  </template>

  <template x-if="!customer.firstname">
    <div class="welcome-message">
        <button type="button" @click.prevent.stop="$dispatch('toggle-authentication');" class="btn btn-primary">
            Sign In or Create Account        </button>
    </div>
  </template>
</div></div>
                                        <button
                        @click="closeMenu"
                        class="flex justify-center items-center"
                        aria-label="Close&#x20;menu"
                        type="button">
                        <svg width="25" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
                            <g clip-path="url(#clip0_53_8952)">
                                <path d="M19 6.91L17.59 5.5L12 11.09L6.41 5.5L5 6.91L10.59 12.5L5 18.09L6.41 19.5L12 13.91L17.59 19.5L19 18.09L13.41 12.5L19 6.91Z" fill="#323232"/>
                            </g>
                            <defs>
                                <clipPath id="clip0_53_8952">
                                    <rect width="24" height="24" fill="white" transform="translate(0 0.5)"/>
                                </clipPath>
                            </defs>
                        </svg>
                    </button>
                </div>
            </div>
        </div>
    </nav>

        <!--Logo-->
        <div class="logo-container">
    <a href="https://www.discountcontacts.com/"
        aria-label="Discount&#x20;Contacts"
        class="print:block">
        <img
            src="https://www.discountcontacts.com/media/logo/stores/1/discount-contacts-logo.svg"
            alt="Store&#x20;logo"
            class="mr-auto w-[13.75rem] lg:w-full lg:m-auto lg:max-w-fit"
            width="300"            height="200"        />
            </a>
</div>

        <!--Desktop Navigation-->
        
    <script>
        'use strict';

        const initTopmenuDesktop_6a27e7ee4f871 = () => ({
            openSubmenuId: null,
            toggleSubmenu(menuNode) {
                if (menuNode === this.openSubmenuId) {
                    this.openSubmenuId = null
                    hyva.releaseFocus()
                } else {
                    this.openSubmenuId = menuNode
                    this.$nextTick(() => {
                        hyva.trapFocus(this.$refs['submenu-' + menuNode])
                    })
                }
            },
            moveFocusOut() {
                this.openSubmenuId = null;
                document.querySelector('.top-level-menu-container').focus();
            },
            onSubmenuEscape(event) {
                event.stopPropagation()
                this.$refs['sr-button-' + this.openSubmenuId]?.focus()
                this.openSubmenuId = null
            }
        })
    </script>

    <div x-data="nVIDiscountContactsHyvaTopmenuDesktopMenu"
        class="
                        navigation hidden lg:block print:hidden">
        <nav
            class="snowdog-topmenu-desktop lg:block"
            aria-label="Main&#x20;menu">
            <ul class="relative flex h-20">
                                                        <li class="top-level-menu-container flex items-center justify-between
                        desktop-brand-menu                        &#x20;desktop-brand-menu"
                        :class="nVIDiscountContactsHyvaTopmenuDesktopMenuClass542" data-hyvacsp1="1" data-hyvacsp2="2" data-hyvacsp3="2"
                        @keydown.escape="onSubmenuEscape"
                    >
                        <div class="top-level-menu-item group h-full flex print:hidden">
                                                            <button type="button" @click="nVIDiscountContactsHyvaTopmenuDesktopMenuClick543" data-hyvacsp4="2" class="px-3">Brands</button>
                                                    </div>
                                                    <div class="relative">
                                <button
                                    type="button"
                                    class="flex items-center ml-2 transition-transform duration-300"
                                    :class="nVIDiscountContactsHyvaTopmenuDesktopMenuClass544" data-hyvacsp5="2"
                                    x-ref="sr-button-2"
                                    :aria-expanded="nVIDiscountContactsHyvaTopmenuDesktopMenuAriaExpanded545" data-hyvacsp6="2"
                                    @click="nVIDiscountContactsHyvaTopmenuDesktopMenuClick546" data-hyvacsp7="2"
                                >
                                    <span class="sr-only">
                                        Toggle submenu for Brands                                    </span>
                                </button>
                            </div>
                                                <div x-data="nVIDiscountContactsHyvaTopmenuDesktopMenuSubMenu">
                <div
            x-ref="submenu-2"
            class="desktop-main-menu-submenu absolute left-0 top-full w-full overflow-hidden z-30 shadow-md bg-white flex"
            x-show="nVIDiscountContactsHyvaTopmenuDesktopMenuSubMenuShow547" data-hyvacsp1="2"
            x-cloak>
            <div class="w-full">
                <ul
                    class="desktop-main-menu-node-list grid items-center submenu-node-2"
                    title="Submenu for Brands">
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-category ">
                            <div class="group">
                                
    <a href="https://www.discountcontacts.com/all-contacts/acuvue"
        class="flex mx-auto w-20 h-20 xl:w-24 xl:h-24 items-center justify-center bg-brandLightGray transition-opacity group-hover:opacity-80 rounded-full"
    >
        <img
            src="https://www.discountcontacts.com/media/snowdog/menu/node/a/c/acuview.png"
            alt="Acuvue"
            loading="lazy"
            class="mx-auto max-w-[4.125rem]"
            width="114"
            height="20"
        />
    </a>
                            </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-category ">
                            <div class="group">
                                
    <a href="https://www.discountcontacts.com/all-contacts/biofinity"
        class="flex mx-auto w-20 h-20 xl:w-24 xl:h-24 items-center justify-center bg-brandLightGray transition-opacity group-hover:opacity-80 rounded-full"
    >
        <img
            src="https://www.discountcontacts.com/media/snowdog/menu/node/b/i/biofinity.png"
            alt="Biofinity"
            loading="lazy"
            class="mx-auto max-w-[4.125rem]"
            width="106"
            height="32"
        />
    </a>
                            </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-category ">
                            <div class="group">
                                
    <a href="https://www.discountcontacts.com/all-contacts/dailies"
        class="flex mx-auto w-20 h-20 xl:w-24 xl:h-24 items-center justify-center bg-brandLightGray transition-opacity group-hover:opacity-80 rounded-full"
    >
        <img
            src="https://www.discountcontacts.com/media/snowdog/menu/node/d/a/dailies.png"
            alt="Dailies"
            loading="lazy"
            class="mx-auto max-w-[4.125rem]"
            width="104"
            height="20"
        />
    </a>
                            </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-category ">
                            <div class="group">
                                
    <a href="https://www.discountcontacts.com/all-contacts/air-optix"
        class="flex mx-auto w-20 h-20 xl:w-24 xl:h-24 items-center justify-center bg-brandLightGray transition-opacity group-hover:opacity-80 rounded-full"
    >
        <img
            src="https://www.discountcontacts.com/media/snowdog/menu/node/a/i/air-optix.png"
            alt="Air&#x20;Optix"
            loading="lazy"
            class="mx-auto max-w-[4.125rem]"
            width="128"
            height="28"
        />
    </a>
                            </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-category ">
                            <div class="group">
                                
    <a href="https://www.discountcontacts.com/all-contacts/precision"
        class="flex mx-auto w-20 h-20 xl:w-24 xl:h-24 items-center justify-center bg-brandLightGray transition-opacity group-hover:opacity-80 rounded-full"
    >
        <img
            src="https://www.discountcontacts.com/media/snowdog/menu/node/p/r/precision.png"
            alt="Precision"
            loading="lazy"
            class="mx-auto max-w-[4.125rem]"
            width="110"
            height="32"
        />
    </a>
                            </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-category ">
                            <div class="group">
                                
    <a href="https://www.discountcontacts.com/all-contacts/ultra"
        class="flex mx-auto w-20 h-20 xl:w-24 xl:h-24 items-center justify-center bg-brandLightGray transition-opacity group-hover:opacity-80 rounded-full"
    >
        <img
            src="https://www.discountcontacts.com/media/snowdog/menu/node/u/l/ultra.png"
            alt="Ultra"
            loading="lazy"
            class="mx-auto max-w-[4.125rem]"
            width="94"
            height="20"
        />
    </a>
                            </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-category ">
                            <div class="group">
                                
    <a href="https://www.discountcontacts.com/all-contacts/biotrue"
        class="flex mx-auto w-20 h-20 xl:w-24 xl:h-24 items-center justify-center bg-brandLightGray transition-opacity group-hover:opacity-80 rounded-full"
    >
        <img
            src="https://www.discountcontacts.com/media/snowdog/menu/node/b/i/biotrue.png"
            alt="Biotrue"
            loading="lazy"
            class="mx-auto max-w-[4.125rem]"
            width="82"
            height="24"
        />
    </a>
                            </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-category ">
                            <div class="group">
                                
    <a href="https://www.discountcontacts.com/all-contacts/clariti"
        class="flex mx-auto w-20 h-20 xl:w-24 xl:h-24 items-center justify-center bg-brandLightGray transition-opacity group-hover:opacity-80 rounded-full"
    >
        <img
            src="https://www.discountcontacts.com/media/snowdog/menu/node/c/l/clariti.png"
            alt="Clariti"
            loading="lazy"
            class="mx-auto max-w-[4.125rem]"
            width="88"
            height="24"
        />
    </a>
                            </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-category ">
                            <div class="group">
                                
    <a href="https://www.discountcontacts.com/all-contacts/myday"
        class="flex mx-auto w-20 h-20 xl:w-24 xl:h-24 items-center justify-center bg-brandLightGray transition-opacity group-hover:opacity-80 rounded-full"
    >
        <img
            src="https://www.discountcontacts.com/media/snowdog/menu/node/m/y/myday.png"
            alt="MyDay"
            loading="lazy"
            class="mx-auto max-w-[4.125rem]"
            width="84"
            height="30"
        />
    </a>
                            </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-category ">
                            <div class="group">
                                
    <a href="https://www.discountcontacts.com/all-contacts/proclear"
        class="flex mx-auto w-20 h-20 xl:w-24 xl:h-24 items-center justify-center bg-brandLightGray transition-opacity group-hover:opacity-80 rounded-full"
    >
        <img
            src="https://www.discountcontacts.com/media/snowdog/menu/node/p/r/proclear.png"
            alt="Proclear"
            loading="lazy"
            class="mx-auto max-w-[4.125rem]"
            width="102"
            height="24"
        />
    </a>
                            </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-category ">
                            <div class="group">
                                
    <a href="https://www.discountcontacts.com/all-contacts/avaira"
        class="flex mx-auto w-20 h-20 xl:w-24 xl:h-24 items-center justify-center bg-brandLightGray transition-opacity group-hover:opacity-80 rounded-full"
    >
        <img
            src="https://www.discountcontacts.com/media/snowdog/menu/node/a/v/avaira.png"
            alt="Avaira"
            loading="lazy"
            class="mx-auto max-w-[4.125rem]"
            width="78"
            height="20"
        />
    </a>
                            </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-category ">
                            <div class="group">
                                
    <a href="https://www.discountcontacts.com/all-contacts/total30"
        class="flex mx-auto w-20 h-20 xl:w-24 xl:h-24 items-center justify-center bg-brandLightGray transition-opacity group-hover:opacity-80 rounded-full"
    >
        <img
            src="https://www.discountcontacts.com/media/snowdog/menu/node/t/o/total30.png"
            alt="Total30"
            loading="lazy"
            class="mx-auto max-w-[4.125rem]"
            width="90"
            height="32"
        />
    </a>
                            </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-custom_url ">
                            <div class="group">
                                
        <a href="/all-contacts"
        class="snowdog-menu-link menu-link !font-bold text-lg view-all-link"
                    data-menu="menu-134"
                        data-menu="menu-134"    >
        <span class="flex items-center py-3">
            Shop All            <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                <g clip-path="url(#clip0_300_678)">
                    <path d="M8.3332 5L7.1582 6.175L10.9749 10L7.1582 13.825L8.3332 15L13.3332 10L8.3332 5Z" fill="#323232"/>
                </g>
                <defs>
                    <clipPath id="clip0_300_678">
                        <rect width="20" height="20" fill="white"/>
                    </clipPath>
                </defs>
            </svg>
        </span>
    </a>
                            </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-cms_block ">
                            <div class="group">
                                <style>#html-body [data-pb-style=BQYT6I2]{justify-content:flex-start;display:flex;flex-direction:column;background-position:right bottom;background-size:cover;background-repeat:no-repeat;background-attachment:scroll;min-height:30rem}#html-body [data-pb-style=C84C1FP]{display:inline-block}#html-body [data-pb-style=CLYQY0I]{text-align:center}</style><div class="desktop-menu-static-block-aside background-image-6a27e7ee55e3a" data-content-type="row" data-appearance="full-width" data-enable-parallax="0" data-parallax-speed="0.5" data-background-images='{\"desktop_image\":\"https://www.discountcontacts.com/media/wysiwyg/aebecd63dbab9935eb9f7095a3422d39.jpeg\"}' data-background-type="image" data-video-loop="true" data-video-play-only-visible="true" data-video-lazy-load="true" data-video-fallback-src="" data-element="main" data-pb-style="BQYT6I2"><div class="row-full-width-inner" data-element="inner"><h2 class="desktop-menu-aside-heading" data-content-type="heading" data-appearance="default" data-element="main">Stock up on ACUVUE contact lenses</h2><div data-content-type="buttons" data-appearance="inline" data-same-width="false" data-element="main" class="desktop-menu-static-block-button-container"><div class="desktop-menu-static-block-button" data-content-type="button-item" data-appearance="default" data-element="main" data-pb-style="C84C1FP"><a class="pagebuilder-button-secondary" href="/all-contacts/acuvue" target="" data-link-type="default" data-element="link" data-pb-style="CLYQY0I"><span data-element="link_text">Shop Now</span></a></div></div></div></div><style type="text/css">.background-image-6a27e7ee55e3a {background-image: url(https://www.discountcontacts.com/media/wysiwyg/aebecd63dbab9935eb9f7095a3422d39.jpeg);}</style>                            </div>
                                                    </li>
                                    </ul>
                                <button @focus="nVIDiscountContactsHyvaTopmenuDesktopMenuSubMenuFocus548" class="sr-only" aria-label="Close submenu"></button>
            </div>
        </div>
        </div>
<script>
function nVIDiscountContactsHyvaTopmenuDesktopMenuSubMenu() {
    return Object.assign(
        {}
        ,{
            ['nVIDiscountContactsHyvaTopmenuDesktopMenuSubMenuFocus548'](event) {return this.moveFocusOut()},
            ['nVIDiscountContactsHyvaTopmenuDesktopMenuSubMenuShow547']() {return this.openSubmenuId === `${this.$el.dataset.hyvacsp1}`},
        }
    )
}
window.addEventListener('alpine:init', () => Alpine.data('nVIDiscountContactsHyvaTopmenuDesktopMenuSubMenu', nVIDiscountContactsHyvaTopmenuDesktopMenuSubMenu), {once: true});
</script>
                    </li>
                                                        <li class="top-level-menu-container flex items-center justify-between
                        desktop-lensetype-menu                        &#x20;desktop-lensetype-menu"
                        :class="nVIDiscountContactsHyvaTopmenuDesktopMenuClass542" data-hyvacsp1="1" data-hyvacsp2="5" data-hyvacsp3="5"
                        @keydown.escape="onSubmenuEscape"
                    >
                        <div class="top-level-menu-item group h-full flex print:hidden">
                                                            <button type="button" @click="nVIDiscountContactsHyvaTopmenuDesktopMenuClick543" data-hyvacsp4="5" class="px-3">Lens Types</button>
                                                    </div>
                                                    <div class="relative">
                                <button
                                    type="button"
                                    class="flex items-center ml-2 transition-transform duration-300"
                                    :class="nVIDiscountContactsHyvaTopmenuDesktopMenuClass544" data-hyvacsp5="5"
                                    x-ref="sr-button-5"
                                    :aria-expanded="nVIDiscountContactsHyvaTopmenuDesktopMenuAriaExpanded545" data-hyvacsp6="5"
                                    @click="nVIDiscountContactsHyvaTopmenuDesktopMenuClick546" data-hyvacsp7="5"
                                >
                                    <span class="sr-only">
                                        Toggle submenu for Lens Types                                    </span>
                                </button>
                            </div>
                                                <div x-data="nVIDiscountContactsHyvaTopmenuDesktopMenuSubMenu">
                <div
            x-ref="submenu-5"
            class="desktop-main-menu-submenu absolute left-0 top-full w-full overflow-hidden z-30 shadow-md bg-white flex"
            x-show="nVIDiscountContactsHyvaTopmenuDesktopMenuSubMenuShow547" data-hyvacsp1="5"
            x-cloak>
            <div class="w-full">
                <ul
                    class="desktop-main-menu-node-list grid items-center submenu-node-5"
                    title="Submenu for Lens&#x20;Types">
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-category ">
                            <div class="group">
                                
    <a href="https://www.discountcontacts.com/lens-type/daily-disposables"
        class="snowdog-menu-link category-node "
                    data-menu="menu-44"
            >
        Daily Disposables    </a>
            <div class="category-menu-item-subtitle font-bold">
            1&#x20;Day        </div>
                                </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-category ">
                            <div class="group">
                                
    <a href="https://www.discountcontacts.com/lens-type/weekly-disposables"
        class="snowdog-menu-link category-node "
                    data-menu="menu-47"
            >
        Weekly Disposables    </a>
            <div class="category-menu-item-subtitle font-bold">
            1-2&#x20;Weeks        </div>
                                </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-category ">
                            <div class="group">
                                
    <a href="https://www.discountcontacts.com/lens-type/monthly-disposables"
        class="snowdog-menu-link category-node "
                    data-menu="menu-50"
            >
        Monthly Disposables    </a>
            <div class="category-menu-item-subtitle font-bold">
            3-4&#x20;Weeks        </div>
                                </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-category ">
                            <div class="group">
                                
    <a href="https://www.discountcontacts.com/lens-type/colored-lenses"
        class="snowdog-menu-link category-node "
                    data-menu="menu-53"
            >
        Colored Lenses    </a>
            <div class="category-menu-item-subtitle font-bold">
            Fashion&#x2F;Cosmetic        </div>
                                </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-category ">
                            <div class="group">
                                
    <a href="https://www.discountcontacts.com/lens-type/toric-astigmatism"
        class="snowdog-menu-link category-node "
                    data-menu="menu-56"
            >
        Toric Astigmatism    </a>
            <div class="category-menu-item-subtitle font-bold">
            Corneal&#x20;Curvature        </div>
                                </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-category ">
                            <div class="group">
                                
    <a href="https://www.discountcontacts.com/lens-type/multifocal-presbyopia"
        class="snowdog-menu-link category-node "
                    data-menu="menu-59"
            >
        Multifocal Presbyopia    </a>
            <div class="category-menu-item-subtitle font-bold">
            Multi-distance        </div>
                                </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-custom_url ">
                            <div class="group">
                                
        <a href="/all-contacts"
        class="snowdog-menu-link menu-link !font-bold text-lg view-all-link"
                    data-menu="menu-140"
                        data-menu="menu-140"    >
        <span class="flex items-center py-3">
            Shop All            <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                <g clip-path="url(#clip0_300_678)">
                    <path d="M8.3332 5L7.1582 6.175L10.9749 10L7.1582 13.825L8.3332 15L13.3332 10L8.3332 5Z" fill="#323232"/>
                </g>
                <defs>
                    <clipPath id="clip0_300_678">
                        <rect width="20" height="20" fill="white"/>
                    </clipPath>
                </defs>
            </svg>
        </span>
    </a>
                            </div>
                                                    </li>
                                                                    <li
                            class="desktop-main-menu-submenu-node desktop-submenu-node-item node-cms_block ">
                            <div class="group">
                                                            </div>
                                                    </li>
                                    </ul>
                                <button @focus="nVIDiscountContactsHyvaTopmenuDesktopMenuSubMenuFocus548" class="sr-only" aria-label="Close submenu"></button>
            </div>
        </div>
        </div>
<script>
function nVIDiscountContactsHyvaTopmenuDesktopMenuSubMenu() {
    return Object.assign(
        {}
        ,{
            ['nVIDiscountContactsHyvaTopmenuDesktopMenuSubMenuFocus548'](event) {return this.moveFocusOut()},
            ['nVIDiscountContactsHyvaTopmenuDesktopMenuSubMenuShow547']() {return this.openSubmenuId === `${this.$el.dataset.hyvacsp1}`},
        }
    )
}
window.addEventListener('alpine:init', () => Alpine.data('nVIDiscountContactsHyvaTopmenuDesktopMenuSubMenu', nVIDiscountContactsHyvaTopmenuDesktopMenuSubMenu), {once: true});
</script>
                    </li>
                            </ul>
        </nav>
    </div>
<script>
function nVIDiscountContactsHyvaTopmenuDesktopMenu() {
    return Object.assign(
        initTopmenuDesktop_6a27e7ee4f871()
        ,{
            ['nVIDiscountContactsHyvaTopmenuDesktopMenuAriaExpanded545']() {return this.openSubmenuId === `${this.$el.dataset.hyvacsp6}` ? 'true' : 'false'},
            ['nVIDiscountContactsHyvaTopmenuDesktopMenuClass542']() {return {
                            'bg-white rounded-t-lg shadow-md': `${this.$el.dataset.hyvacsp1}` && this.openSubmenuId === `${this.$el.dataset.hyvacsp2}`,
                            'submenu-expanded': this.openSubmenuId === `${this.$el.dataset.hyvacsp3}`
                        }},
            ['nVIDiscountContactsHyvaTopmenuDesktopMenuClass544']() {return {
                                        'rotate-180' : this.openSubmenuId === `${this.$el.dataset.hyvacsp5}`
                                    }},
            ['nVIDiscountContactsHyvaTopmenuDesktopMenuClick543'](event) {return this.toggleSubmenu(`${this.$el.dataset.hyvacsp4}`)},
            ['nVIDiscountContactsHyvaTopmenuDesktopMenuClick546'](event) {return this.toggleSubmenu(`${this.$el.dataset.hyvacsp7}`)},
        }
    )
}
window.addEventListener('alpine:init', () => Alpine.data('nVIDiscountContactsHyvaTopmenuDesktopMenu', nVIDiscountContactsHyvaTopmenuDesktopMenu), {once: true});
</script>

        <!--Search-->
        <div
            class="search-content-container z-10 w-full bg-white col-start-1 col-span-full row-start-2 mb-4 lg:mb-0 lg:row-start-1 lg:col-span-1 lg:col-start-3 print:hidden"
            id="search-content"
        >
            <div x-data="initLiveSearch"
     x-init="initPopover"
     @close-search.window="closePopover"
     @open-search.window="openPopover"
     @search-open.window="focusSearchInput"
     @keydown.escape="closePopover"
>
    <search role="search" class="bg-white py-5 w-full">
        <form class="form minisearch"
              id="search_mini_form"
              action="https://www.discountcontacts.com/catalogsearch/result/"
              method="get"
        >
            <div class="group relative">
                <label class="hidden" for="search" data-role="minisearch-label">
                    <span>Search</span>
                </label>
                <input id="search"
                       class="quick-search-input w-full p-2 pl-10 text-brandAltText border-brandLightSlate appearance-none rounded-3xl focus:border-brandLightestBlue"
                       type="search"
                       :value="queryPhrase"
                       name="q"
                       value=""
                       placeholder="Search"
                       maxlength="128"
                       role="combobox"
                       aria-haspopup="false"
                       aria-autocomplete="both"
                       autocomplete="off"
                       spellcheck="false"
                       autocorrect="off" 
                       aria-expanded="false"
                       @input="handleInput"
                       @click.away="closePopover"
                       x-ref="searchInput"
                />
            </div>
        </form>
    </search>
    <section
        class="absolute top-full max-w-full inset-x-0 text-black z-30 search-autocomplete"
        :class="getSearchClasses"
        aria-label="Search&#x20;Suggestions"
        x-cloak
    >
        <div class="search-bar-results-wrapper container max-h-screen overflow-y-scroll">
            <template x-if="showSuggestions">
                <div class="search-bar-suggested">
                    <div class="mb-4">
                        <strong class="typo-big-body">
                            Suggested                        </strong>
                    </div>
                    <ul class="" role="list">
                        <template x-for="suggestion in liveSearchSuggestions">
                            <li class="mb-4">
                                <button
                                    x-text="suggestion"
                                    @click="searchSuggestion"
                                    type="button"
                                    class="btn-link text-left"
                                ></button>
                            </li>
                        </template>
                    </ul>
                </div>
            </template>
            <template x-if="showResults">
                <div class="search-bar-results">
                    <div class="flex justify-between mb-4">
                        <strong class="typo-big-body">
                            Results                        </strong>
                        <button class="btn btn-primary" type="submit" form="search_mini_form">
                            View All Results                        </button>
                    </div>
                    <ul class="grid gap-6 md:grid-cols-4" role="list">
                        <template x-for="product in liveSearchProducts">
                            <li class="rounded border border-grey">
                                <button
                                    class="w-full p-3 gap-6 flex flex-col items-center cursor-pointer"
                                    @click="handleProductClick"
                                >
                                    <img
                                        :src="product.image"
                                        :alt="product.name"
                                        class="shrink-0 object-contain"
                                    >
                                    <div>
                                        <p><strong class="typo-small-body-bold" x-text="product.name"></strong></p>
                                    </div>
                                </button>
                            </li>
                        </template>
                    </ul>
                </div>
            </template>
        </div>
    </section>
</div>

<script>
    'use strict';
    window.addEventListener(
        'alpine:init',
        () => Alpine.data('initLiveSearch', () => ({
            queryPhrase: '',
            liveSearchProducts: [],
            liveSearchSuggestions: [],
            minQueryLength: 3,
            pageSize: 8,
            searchOpen: false,
            search: null,
            searchId: "04c4dae5-34e6-4b95-9d8f-8ae382fed4c8_" +
                "dcl_" +
                "dcl_store_" +
                "c_7167",

            initPopover() {
                this.search = this.buildSearch();
                this.initTogglePopover();
            },

            buildSearch() {
                window.magentoStorefrontEvents.context.setSearchExtension({
                    version: "4.7.0"
                });
                return new MagentoLiveSearch({
                    environmentId: "04c4dae5-34e6-4b95-9d8f-8ae382fed4c8",
                    websiteCode: "dcl",
                    storeCode: "dcl_store",
                    storeViewCode: "c_7167",
                    apiKey: "search_gql",
                });
            },

            // this will open the popover, whenever the search-input has focus
            initTogglePopover() {
                const popover = document.getElementById('search');

                popover.addEventListener('focus', () => {
                    if (this.isQueryLengthValid()) {
                        this.openPopover();
                    } else {
                        this.closePopover();
                    }
                });
            },

            closePopover() {
                this.searchOpen = false;
            },

            openPopover() {
                this.searchOpen = true;
            },

            closeSearchInput() {
                this.$dispatch('close-search-input');
            },
            focusSearchInput() {
                this.$nextTick(() => this.$refs.searchInput.focus());
            },
            handleInput() {
                this.queryPhrase = this.$el.value;

                if (!this.isQueryLengthValid()) {
                    if (this.searchOpen){
                        this.closePopover();
                    }
                    return;
                }

                this.getProducts();
                this.$nextTick(() => {
                    this.openPopover();
                });
            },

            showProductPrice(){
                return this.product.price ? hyva.formatPrice(this.product.price) : '';
            },

            handleProductClick() {
                window.magentoStorefrontEvents.context.setSearchResults(
                    window.magentoStorefrontEvents.context.getSearchResults()
                );

                window.magentoStorefrontEvents.publish.searchProductClick("search-bar", `${this.product.sku}`);

                // Timeout to prevent submission before event has fired.
                setTimeout(() => window.location.href = this.product.url, 500);
            },

            // this will submit the form with the clicked suggestion as the search-phrase
            searchSuggestion() {
                document.getElementById('search').value = this.suggestion;
                document.getElementById('search_mini_form').submit();
            },

            showResults(){
                return this.liveSearchProducts.length >= 1 && this.isQueryLengthValid();
            },

            showSuggestions(){
                return this.liveSearchSuggestions.length >= 1 && this.isQueryLengthValid();
            },

            isQueryLengthValid() {
                return this.queryPhrase.length >= this.minQueryLength;
            },

            getSearchClasses() {
                return this.searchOpen ? 'block' : 'hidden';
            },

            // get products from fetch-request and update liveSearchProducts and liveSearchSuggestions
            async getProducts() {
                this.searchOpen = true;
                const result = await this.getLiveSearchProducts();
                let products = [];

                this.liveSearchProducts = result.data.productSearch.items.map(item => ({
                    name: item.product.name,
                    price: item.product.price_range.maximum_price.regular_price.value,
                    currency: item.product.price_range.maximum_price.regular_price.currency,
                    image: item.product.thumbnail?.url || item.product.image?.url || 'https://www.discountcontacts.com/media/catalog/product/placeholder/websites/1/placeholder_DCL_1.png',
                    url: item.product.canonical_url,
                    id: item.product.id,
                    sku: item.product.sku
                }));

                this.liveSearchSuggestions = result.data.productSearch.suggestions;
                //search-results-view
            },

            // retrieve products from magento live search service
            async getLiveSearchProducts() {
                this.searchRequestId = Math.random().toString(16).slice(2);

                if (!this.search) {
                    return [];
                }

                const searchCtx = {
                    units: [{
                        searchUnitId: "search-bar",
                        queryTypes: ["products"],
                        phrase: this.queryPhrase,
                        currentPage: 1,
                        pageSize: this.pageSize,
                        filter:[
                            {attribute:"visibility",in:["Search","Catalog, Search"]},
                            {attribute:"inStock",eq:"true"}
                        ],
                        sort: [{attribute: "relevance", direction: "DESC"}],
                        searchRequestId: this.searchRequestId
                    }]
                };

                window.magentoStorefrontEvents.context.setSearchInput(searchCtx);
                window.magentoStorefrontEvents.publish.searchRequestSent("search-bar");

                const before = Date.now();

                const result = await this.search.productSearch({
                    phrase: this.queryPhrase,
                    page_size: this.pageSize,
                    sort: [{attribute: "relevance", direction: "DESC"}],
                    filter:[
                        {attribute:"visibility",in:["Search","Catalog, Search"]},
                        {attribute:"inStock",eq:"true"}
                    ],
                    current_page: 1,
                    data: {
                        products: true,
                        facets: true,
                        suggestions: true
                    },
                    context: {
                        customerGroup: "b6589fc6ab0dc82cf12099d1c2d40ab994e8410c"
                    }
                });

                const after = Date.now();

                const productItems = result.data.productSearch.items || [];
                const suggestions = result.data.productSearch.suggestions || [];
                const facets = result.data.productSearch.facets || [];

                const formattedProductItems = productItems.map((item, key) => ({
                    name: item.product.name,
                    sku: item.product.sku,
                    url: item.product.canonical_url,
                    imageUrl: item.product.image ? item.product.image.url : 'https://www.discountcontacts.com/media/catalog/product/placeholder/websites/1/placeholder_DCL_1.png',
                    price: item.product.price_range.minimum_price.final_price.value,
                    rank: key,
                }));

                const formattedSuggestions = suggestions.map((item, key) => ({
                    suggestion: item,
                    rank: key,
                }));

                const formattedFacets = facets.map((facet) => ({
                    attribute: facet.attribute,
                    title: facet.title,
                    type: facet.type || "PINNED",
                    buckets: facet.buckets.map((bucket) => bucket),
                }));

                const searchCtxUpdated = {
                    units: [{
                        searchUnitId: "search-bar",
                        searchRequestId: this.searchRequestId,
                        executionTime: after - before,
                        products: formattedProductItems,
                        categories: [],
                        suggestions: formattedSuggestions,
                        page: result.data.productSearch.page_info.current_page,
                        perPage: result.data.productSearch.page_info.page_size,
                        facets: formattedFacets
                    }]
                };

                window.magentoStorefrontEvents.context.setSearchResults(searchCtxUpdated);
                window.magentoStorefrontEvents.publish.searchResponseReceived("search-bar");

                return result;
            }
        })),
        {once: true}
    )
</script>
        </div>

        <div class="flex items-center gap-2 md:gap-1 order-3 md:-mr-1 print:hidden">

            <!-- Additional Header Elements -->
            
            <!--Customer Icon & Dropdown-->
            
<div class="customer-account-button-container">
            
<script>
    document.addEventListener('alpine:init', () => {
        // console.log("userManager: Alpine init fired");
        Alpine.data('signInButton', () => ({
            triggerAccountSidebar() {
                const event = new CustomEvent('toggle-authentication', {
                    bubbles: true,
                    detail:{
                        forceAuthentication:true
                    }
                });
                window.dispatchEvent(event);
            }
        }));
    });
</script>
<button
    type="button"
    class="flex hover:bg-buttonColor-tertiary/10 outline-offset-2 p-1 rounded items-center md:gap-1"
    id="headerLoginButton"
    x-data="signInButton"
    @click="triggerAccountSidebar"
    title="Open&#x20;sign&#x20;in&#x2F;register&#x20;screen"
    aria-label="Sign&#x20;In"
>
    <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="icon">
        <g clip-path="url(#clip0_53_8891)">
            <path d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM7.07 18.28C7.5 17.38 10.12 16.5 12 16.5C13.88 16.5 16.51 17.38 16.93 18.28C15.57 19.36 13.86 20 12 20C10.14 20 8.43 19.36 7.07 18.28ZM18.36 16.83C16.93 15.09 13.46 14.5 12 14.5C10.54 14.5 7.07 15.09 5.64 16.83C4.62 15.49 4 13.82 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 13.82 19.38 15.49 18.36 16.83ZM12 6C10.06 6 8.5 7.56 8.5 9.5C8.5 11.44 10.06 13 12 13C13.94 13 15.5 11.44 15.5 9.5C15.5 7.56 13.94 6 12 6ZM12 11C11.17 11 10.5 10.33 10.5 9.5C10.5 8.67 11.17 8 12 8C12.83 8 13.5 8.67 13.5 9.5C13.5 10.33 12.83 11 12 11Z" fill="#323232"/>
        </g>
        <defs>
            <clipPath id="clip0_53_8891">
                <rect width="24" height="24" fill="white"/>
            </clipPath>
        </defs>
    </svg>
    <span class="sr-only">Sign In</span>
</button>
    </div>
            <!--Cart Icon-->
                            <button
                            id="menu-cart-icon"
                class="inline-block rounded p-1 hover:bg-buttonColor-tertiary/10 outline-offset-2"
                x-ref="cartButton"
                :aria-disabled="nVIDiscountContactsHtmlHeaderAriaDisabled471"
                :aria-label="nVIDiscountContactsHtmlHeaderAriaLabel472" data-hyvacsp1="Toggle&#x20;My&#x20;Cart" data-hyvacsp2="Cart&#x20;is&#x20;empty" data-hyvacsp3="&#x25;1&#x20;items" data-hyvacsp4="&#x25;1&#x20;item"
                                    @click.prevent.stop="nVIDiscountContactsHtmlHeaderClickPreventStop473"
                    @toggle-cart.window="nVIDiscountContactsHtmlHeaderToggleCartWindow474"
                    :aria-expanded="isCartOpen"
                    aria-haspopup="dialog"
                            >
            <span class="flex items-center md:gap-1">
                <span class="relative">
                    <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <g clip-path="url(#clip0_53_8893)">
                            <path d="M15.55 13C16.3 13 16.96 12.59 17.3 11.97L20.88 5.48C21.25 4.82 20.77 4 20.01 4H5.21L4.27 2H1V4H3L6.6 11.59L5.25 14.03C4.52 15.37 5.48 17 7 17H19V15H7L8.1 13H15.55ZM6.16 6H18.31L15.55 11H8.53L6.16 6ZM7 18C5.9 18 5.01 18.9 5.01 20C5.01 21.1 5.9 22 7 22C8.1 22 9 21.1 9 20C9 18.9 8.1 18 7 18ZM17 18C15.9 18 15.01 18.9 15.01 20C15.01 21.1 15.9 22 17 22C18.1 22 19 21.1 19 20C19 18.9 18.1 18 17 18Z" fill="#323232"/>
                        </g>
                        <defs>
                        <clipPath id="clip0_53_8893">
                            <rect width="24" height="24" fill="white"/>
                        </clipPath>
                        </defs>
                    </svg>
                    <span
                        x-text="nVIDiscountContactsHtmlHeaderText475"
                        x-show="nVIDiscountContactsHtmlHeaderShow476"
                        x-cloak
                        class="absolute -top-1.5 -right-1.5 h-5 px-2 py-1 rounded-full bg-buttonColor-tertiary text-white
                            text-xs leading-none text-center uppercase tabular-nums"
                        aria-hidden="true"
                    ></span>
                </span>
                <span class="sr-only">My Cart</span>
            </span>
                            </button>
                    </div>
    </div>

    <!--Cart Drawer-->
    <script>
    function initCartDrawer() {
        return {
            open: false,
            isLoading: false,
            cart: {},
            maxItemsToDisplay: 10,
            itemsCount: 0,
            getData(data) {
                if (data.cart) {
                    this.cart = data.cart;
                    this.itemsCount = data.cart.items && data.cart.items.length || 0;
                    this.setCartItems();
                }
                this.isLoading = false;
            },
            cartItems: [],
            getItemCountTitle() {
                return hyva.strf('\u00250\u0020of\u0020\u00251\u0020products\u0020in\u0020cart\u0020displayed', this.maxItemsToDisplay, this.itemsCount)
            },
            setCartItems() {
                this.cartItems = this.cart.items && this.cart.items.sort((a, b) => b.item_id - a.item_id) || [];

                if (this.cartItems.length) {
                    this.cartItems.forEach(item => {
                        if(item.product_price_value && item.qty) {
                            item.combined_price = `$${(item.product_price_value * item.qty).toFixed(2)}`;
                        }
                    });
                }

                if (this.maxItemsToDisplay > 0) {
                    this.cartItems = this.cartItems.slice(0, parseInt(this.maxItemsToDisplay, 10));
                }
            },
            deleteItemFromCart(itemId) {
                this.isLoading = true;

                const formKey = hyva.getFormKey();
                const postUrl = BASE_URL + 'checkout/sidebar/removeItem/';

                fetch(postUrl, {
                    "headers": {
                        "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
                    },
                    "body": "form_key=" + formKey + "&item_id=" + itemId,
                    "method": "POST",
                    "mode": "cors",
                    "credentials": "include"
                }).then(response => {
                    if (response.redirected) {
                        window.location.href = response.url;
                    } else if (response.ok) {
                        return response.json();
                    } else {
                        window.dispatchMessages && window.dispatchMessages([{
                            type: 'warning',
                            text: 'Could\u0020not\u0020remove\u0020item\u0020from\u0020quote.'
                        }]);
                        this.isLoading = false;
                    }
                }).then(result => {
                    window.dispatchMessages && window.dispatchMessages([{
                        type: result.success ? 'success' : 'error',
                        text: result.success
                            ? 'You\u0020removed\u0020the\u0020item.'
                            : result.error_message
                    }], result.success ? 5000 : 0)
                    window.dispatchEvent(new CustomEvent('reload-customer-section-data'));
                });
            },
            scrollLock(use = true) {
                document.body.style.overflow = use ? "hidden" : "";
            },
            toggleCartDrawer(event) {
                if (event.detail && event.detail.isOpen !== undefined) {
                    if (event.detail.isOpen) {
                        this.openCartDrawer();
                    } else {
                        this.open = false;
                        this.scrollLock(false);
                        this.$refs && this.$refs.cartDialogContent && hyva.releaseFocus(this.$refs.cartDialogContent);
                    }
                } else {
                                        this.openCartDrawer()
                }
            },
            openCartDrawer() {
                this.open = true;
                this.scrollLock(true);
                this.$nextTick(() => {
                    this.$refs && this.$refs.cartDialogContent && hyva.trapFocus(this.$refs.cartDialogContent)
                })
            },
            closeCartDrawer() {
                this.$dispatch('toggle-cart', { isOpen: false })
            },
            getSectionDataExtraActions() {
                if (!this.cart.extra_actions) {
                    return '';
                }

                const contentNode = document.createElement('div');
                contentNode.innerHTML = this.cart.extra_actions;

                hyva.activateScripts(contentNode);

                return contentNode.innerHTML;
            }
        }
    }
</script>
<section x-cloak
    x-show="cart"
    id="cart-drawer"
    class="print:hidden"
    x-data="nVIDiscountContactsHtmlCartCartDrawer"
    @private-content-loaded.window="nVIDiscountContactsHtmlCartCartDrawerPrivateContentLoadedWindow447"
    @toggle-cart.window="nVIDiscountContactsHtmlCartCartDrawerToggleCartWindow448"
    @keydown.escape="closeCartDrawer">
    <div role="dialog"
        aria-labelledby="cart-drawer-title"
        aria-modal="true"
        :aria-hidden="!open"
        class="fixed inset-y-0 right-0 z-30 flex max-w-full">
        <div class="backdrop"
            x-show="open"
            x-transition:enter="ease-in-out duration-500"
            x-transition:enter-start="opacity-0"
            x-transition:enter-end="opacity-100"
            x-transition:leave="ease-in-out duration-500"
            x-transition:leave-start="opacity-100"
            x-transition:leave-end="opacity-0"
            role="button"
            @click="closeCartDrawer"
            aria-label="Close&#x20;My&#x20;Cart"></div>
        <div class="relative w-screen max-w-md shadow-2xl"
            x-show="open"
            x-transition:enter="transform transition ease-in-out duration-500 sm:duration-700"
            x-transition:enter-start="translate-x-full"
            x-transition:enter-end="translate-x-0"
            x-transition:leave="transform transition ease-in-out duration-500 sm:duration-700"
            x-transition:leave-start="translate-x-0"
            x-transition:leave-end="translate-x-full"
            x-ref="cartDialogContent"
            role="region"
            :tabindex="nVIDiscountContactsHtmlCartCartDrawerTabindex449"
            aria-label="My&#x20;Cart">
            <div class="flex flex-col h-full max-h-screen bg-white shadow-xl">
                
                <header class="relative px-4 py-6 sm:px-6">
                    <p id="cart-drawer-title" class="font-bold text-2xl leading-none">
                        <strong>My Cart</strong>
                        <span class="items-total text-xs"
                              x-show="nVIDiscountContactsHtmlCartCartDrawerShow450"
                              x-text="nVIDiscountContactsHtmlCartCartDrawerText451">
                        </span>
                    </p>
                </header>

                
                <template x-if="!itemsCount">
                    <div class="relative px-4 py-6 bg-white border-bs sm:px-6 border-container">
                        Cart is empty                    </div>
                </template>

                <template x-if="itemsCount">
                    <div class="relative flex flex-col h-full flex-grow px-1 py-3 sm:px-3 bg-white overflow-y-auto overscroll-y-contain soft-divide-y">
                        <template x-for="item in cartItems">
                            <div class="grid grid-cols-[6rem_1fr] p-4 gap-4 border-brandLightGray">
                                <a :href="nVIDiscountContactsHtmlCartCartDrawerHref452"
                                   class="cart-thumbnail"
                                   :aria-label="nVIDiscountContactsHtmlCartCartDrawerAriaLabel453" data-hyvacsp1="Product&#x20;&quot;&#x25;0&quot;"
                                >
                                    <img
                                        :src="nVIDiscountContactsHtmlCartCartDrawerSrc454"
                                        :width="nVIDiscountContactsHtmlCartCartDrawerWidth455"
                                        :height="nVIDiscountContactsHtmlCartCartDrawerHeight456"
                                        loading="lazy"
                                        alt=""
                                    />
                                </a>
                                <div>
                                    <p class="font-bold mb-2 leading-[1.5]">
                                        <span x-html="nVIDiscountContactsHtmlCartCartDrawerHtml457"></span>
                                    </p>
                                    <p class="text-sm hidden">
                                        <strong>SKU:</strong>
                                        <span class="text-brandDisabled" x-html="nVIDiscountContactsHtmlCartCartDrawerHtml458"></span>
                                    </p>
                                    <template x-if="nVIDiscountContactsHtmlCartCartDrawerIf459">
                                        <p class="text-sm">
                                            <strong>Multifocal:</strong>
                                            <span class="text-brandDisabled" x-html="nVIDiscountContactsHtmlCartCartDrawerHtml460"></span>
                                        </p>
                                    </template>
                                    <template x-if="nVIDiscountContactsHtmlCartCartDrawerIf461">
                                        <p class="text-sm">
                                            <strong>Pack Size:</strong>
                                            <span class="text-brandDisabled" x-html="nVIDiscountContactsHtmlCartCartDrawerHtml462"></span>
                                        </p>
                                    </template>
                                    <p class="text-sm">
                                        <strong>Right Quantity:</strong>
                                        <span class="text-brandDisabled" x-html="nVIDiscountContactsHtmlCartCartDrawerHtml463"></span>
                                    </p>
                                    <p class="text-sm">
                                        <strong>Left Quantity:</strong>
                                        <span class="text-brandDisabled" x-html="nVIDiscountContactsHtmlCartCartDrawerHtml464"></span>
                                    </p>
                                    <p class="text-sm flex items-center justify-between">
                                        <strong>Total Contacts Price:</strong>
                                        <span class="font-bold" x-html="nVIDiscountContactsHtmlCartCartDrawerHtml465"></span>
                                    </p>
                                </div>
                                <div class="col-span-2">
                                    <button type="button"
                                            class="flex text-brandBlue hover:text-brandDisabled items-center"
                                            @click="nVIDiscountContactsHtmlCartCartDrawerClick466"
                                            :aria-label="nVIDiscountContactsHtmlCartCartDrawerAriaLabel467" data-hyvacsp2="Remove&#x20;product&#x20;&quot;&#x25;0&quot;&#x20;from&#x20;cart">
                                        <svg width="18" height="18" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
                                            <g clip-path="url(#clip0_222_16918)">
                                                <path d="M6 19.3721C6 20.4721 6.9 21.3721 8 21.3721H16C17.1 21.3721 18 20.4721 18 19.3721V7.37207H6V19.3721ZM8 9.37207H16V19.3721H8V9.37207ZM15.5 4.37207L14.5 3.37207H9.5L8.5 4.37207H5V6.37207H19V4.37207H15.5Z" fill="currentColor"/>
                                            </g>
                                            <defs>
                                                <clipPath id="clip0_222_16918">
                                                    <rect width="24" height="24" fill="white" transform="translate(0 0.37207)"/>
                                                </clipPath>
                                            </defs>
                                        </svg>
                                        <strong>Remove</strong>
                                    </button>
                                </div>
                            </div>
                        </template>
                    </div>
                </template>

                <template x-if="itemsCount">
                    <div class="">
                        
                        <div class="relative flex flex-col justify-between h-full py-3 px-1 border-t border-brandLighterGray sm:px-3">
                            <div class="w-full p-3 space-x-4">
                                <p class="flex items-center justify-between"><strong>Subtotal:</strong> <strong x-html="nVIDiscountContactsHtmlCartCartDrawerHtml468"></strong></p>
                            </div>
                            <div class="w-full p-3 space-x-4 ease-in-out rounded-lg">
                                <a href="https://www.discountcontacts.com/checkout/cart/"
                                   class="btn btn-primary justify-center"
                                >
                                    View Cart                                </a>
                            </div>
                        </div>
                        <div x-html="nVIDiscountContactsHtmlCartCartDrawerHtml469"></div>
                    </div>
                                    </template>

                            </div>

            <button
                type="button"
                @click="closeCartDrawer"
                aria-label="Close&#x20;My&#x20;Cart"
                class="absolute top-0 right-2 p-4 mt-2 text-black transition-colors hover:text-brandDisabled"
            >
                <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" width="24" height="24" aria-hidden="true">
  <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"/>
</svg>
            </button>
        </div>
        <div
    class="z-50 fixed inset-0 grid place-items-center bg-white/70 text-slate-800"
    x-cloak
    x-show="isLoading"
    x-transition.opacity.duration.200ms
>
    <div class="flex gap-10 items-center p-4">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 57 57" width="57" height="57" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
    <style>
        @keyframes spinner-ball-triangle1 {
            0% { transform: translate(0%, 0%); }
            33% { transform: translate(38%, -79%); }
            66% { transform: translate(77%, 0%); }
            100% { transform: translate(0%, 0%); }
        }

        @keyframes spinner-ball-triangle2 {
            0% { transform: translate(0%, 0%); }
            33% { transform: translate(38%, 79%); }
            66% { transform: translate(-38%, 79%); }
            100% { transform: translate(0%, 0%); }
        }

        @keyframes spinner-ball-triangle3 {
            0% { transform: translate(0%, 0%); }
            33% { transform: translate(-77%, 0%); }
            66% { transform: translate(-38%, -79%); }
            100% { transform: translate(0%, 0%); }
        }
    </style>
    <circle cx="5" cy="50" r="5" style="animation: spinner-ball-triangle1 2.2s linear infinite"/>
    <circle cx="27" cy="5" r="5" style="animation: spinner-ball-triangle2 2.2s linear infinite"/>
    <circle cx="49" cy="50" r="5" style="animation: spinner-ball-triangle3 2.2s linear infinite"/>
</svg>
        <span class="text-xl select-none">
            Loading...        </span>
    </div>
</div>
    </div>

</section>
<script>
function nVIDiscountContactsHtmlCartCartDrawer() {
    return Object.assign(
        initCartDrawer()
        ,{
            ['!itemsCount']() {return !this.itemsCount},
            ['!open']() {return !this.open},
            ['nVIDiscountContactsHtmlCartCartDrawerAriaLabel453']() {return hyva.strf(`${this.$el.dataset.hyvacsp1}`, this.item.product_name)},
            ['nVIDiscountContactsHtmlCartCartDrawerAriaLabel467']() {return hyva.strf(`${this.$el.dataset.hyvacsp2}`, this.item?.product_name)},
            ['nVIDiscountContactsHtmlCartCartDrawerClick466'](event) {return this.deleteItemFromCart(this.item.item_id)},
            ['nVIDiscountContactsHtmlCartCartDrawerHeight456']() {return this.item?.product_image?.height},
            ['nVIDiscountContactsHtmlCartCartDrawerHref452']() {return this.item?.product_url},
            ['nVIDiscountContactsHtmlCartCartDrawerHtml457']() {return this.item.product_name},
            ['nVIDiscountContactsHtmlCartCartDrawerHtml458']() {return this.item.product_sku},
            ['nVIDiscountContactsHtmlCartCartDrawerHtml460']() {return this.item.multifocal_add},
            ['nVIDiscountContactsHtmlCartCartDrawerHtml462']() {return this.item.per_box_count},
            ['nVIDiscountContactsHtmlCartCartDrawerHtml463']() {return this.item?.right_qty},
            ['nVIDiscountContactsHtmlCartCartDrawerHtml464']() {return this.item?.left_qty},
            ['nVIDiscountContactsHtmlCartCartDrawerHtml465']() {return this.item.combined_price},
            ['nVIDiscountContactsHtmlCartCartDrawerHtml468']() {return this.cart.subtotal},
            ['nVIDiscountContactsHtmlCartCartDrawerHtml469']() {return this.getSectionDataExtraActions()},
            ['nVIDiscountContactsHtmlCartCartDrawerIf459']() {return this.item.multifocal_add},
            ['nVIDiscountContactsHtmlCartCartDrawerIf461']() {return this.item.per_box_count},
            ['nVIDiscountContactsHtmlCartCartDrawerPrivateContentLoadedWindow447'](event) {return this.getData(this.$event.detail.data)},
            ['nVIDiscountContactsHtmlCartCartDrawerShow450']() {return this.maxItemsToDisplay && this.maxItemsToDisplay < this.itemsCount},
            ['nVIDiscountContactsHtmlCartCartDrawerSrc454']() {return this.item.product_image.src},
            ['nVIDiscountContactsHtmlCartCartDrawerTabindex449']() {return this.open ? 0 : -1},
            ['nVIDiscountContactsHtmlCartCartDrawerText451']() {return this.getItemCountTitle()},
            ['nVIDiscountContactsHtmlCartCartDrawerToggleCartWindow448'](event) {return this.toggleCartDrawer(this.$event)},
            ['nVIDiscountContactsHtmlCartCartDrawerWidth455']() {return this.item?.product_image?.width},
        }
    )
}
window.addEventListener('alpine:init', () => Alpine.data('nVIDiscountContactsHtmlCartCartDrawer', nVIDiscountContactsHtmlCartCartDrawer), {once: true});
</script>

    <!--Authentication Pop-Up-->
    <script>
    // function initAuthentication() {
    //     return {
    //         open: false,
    //         forceAuthentication: false,
    //         validateInput: function(event) {
    //             this.isInputValid = event.target.checkValidity();
    //         },
    //         onPrivateContentLoaded: function (data) {
    //             const isLoggedIn = data.customer && data.customer.firstname;
    //             if (!isLoggedIn) {
    //                 this.forceAuthentication = true;
    //             }
    //         },
    //     }
    // }
    // console.log("userManager: Attempt to register");
    document.addEventListener('alpine:init', () => {
        Alpine.store('nviSidebar',
            {
                currentStep: 1,
                checkUrl: `${window.location.origin}/nvi_customer/account/check`,
                loginUrl: `${window.location.origin}/nvi_customer/account/login`,
                registerUrl: `${window.location.origin}/nvi_customer/account/register`,
                validateUrl: `${window.location.origin}/nvi_customer/account/validate`,
                sendOtpUrl: `${window.location.origin}/nvi_customer/account/sendotp`,
                verifyOtpUrl: `${window.location.origin}/nvi_customer/account/verifyotp`,
                redirectUrl: `${window.location.origin}/customer/account`,
                usernameValue: '',
                userPhoneValue: '',
                userOtpOptions: '',
                selectedUserOtpOptions: '',
                userEnteredPW: '',
                userEnteredFName: '',
                userEnteredLName: '',
                userEnteredEmail: '',
                userEnteredNewPW: '',
                userEnteredOTPCode: '',

                // Update functions
                updateUsername(value) {
                    this.usernameValue = value;
                },
                updateUserPhone(value) {
                    this.userPhoneValue = value;
                },
                updateOtpOptions(value) {
                    this.userOtpOptions = value;
                },
                updateUserEnteredPW(value) {
                    this.userEnteredPW = value;
                },
                updateUserEnteredFName(value) {
                    this.userEnteredFName = value;
                },
                updateUserEnteredLName(value) {
                    this.userEnteredLName = value;
                },
                updateUserEnteredEmail(value) {
                    this.userEnteredEmail = value;
                },
                updateUserEnteredNewPW(value) {
                    this.userEnteredNewPW = value;
                },
                updateUserEnteredOTPCode(value) {
                    this.userEnteredOTPCode = value;
                },
                updateStep(value) {
                    this.currentStep = value;
                    try {
                        if (window.Alpine && typeof Alpine.store === 'function') {
                            const store = Alpine.store('nviSidebar') || Alpine.store('nviSidebar', { currentStep: value });
                            store.currentStep = value;
                        }
                    } catch (e) {}
                    const event = new CustomEvent('step-change', { detail: value });
                    window.dispatchEvent(event);
                    const messageEl = document.getElementById('messageStep' + value);
                    if (messageEl) {
                        messageEl.classList.add('hidden');
                        messageEl.innerText = '';
                    }
                },
                makeAjaxRequest(url, data, successCallback, errorCallback) {
                    fetch(url, {
                        method: 'POST',
                        headers: { contentType: "application/x-www-form-urlencoded; charset=UTF-8" },
                        mode: "cors",
                        body: new URLSearchParams(data)
                    })
                        .then(response => {
                            if (response.ok) {
                                return response.json();
                            } else {
                                console.warn("GET request failed", response);
                            }
                        })
                        .then((responseData) => {
                            if (successCallback) successCallback(responseData);
                        })
                        .catch((error) => {
                            if (errorCallback) errorCallback(error);
                            console.error('Error:', error);
                        });
                },
                populateUsernameText(value) {
                    const els = Array.from(document.querySelectorAll('[data-sidebar-email-address]'));
                    if (els.length && value) {
                        els.forEach(el => el.innerText = value);
                    }
                },
                populateUserPhoneText(value) {
                    const els = Array.from(document.querySelectorAll('[data-sidebar-phone-number]'));
                    if (els.length && value) {
                        els.forEach(el => el.innerText = value);
                    }
                },
                showLoginChoices(value) {
                    if (value.hasOwnProperty("password")) {
                        const passwordControl = document.querySelector('[data-method-password]');
                        passwordControl && passwordControl.classList.remove('hidden');
                    }
                    if (value.hasOwnProperty("sms_otp") || value.hasOwnProperty("email_otp")) {
                        const otpControl = document.querySelector('[data-method-otp]');
                        otpControl && otpControl.classList.remove('hidden');
                        if (value.hasOwnProperty("sms_otp")) {
                            const smsControl = document.querySelector('[data-method-sms]');
                            smsControl && smsControl.classList.remove('hidden');
                        }
                        if (value.hasOwnProperty("email_otp")) {
                            const emailControl = document.querySelector('[data-method-email]');
                            emailControl && emailControl.classList.remove('hidden');
                        }
                    }
                },
                checkUsername(callback) {
                    if (!this.usernameValue) {
                        console.error('Username is not set.');
                        return;
                    }

                    const data = { form_key: hyva.getFormKey(), email: this.usernameValue };
                    this.makeAjaxRequest(this.checkUrl, data, callback, (error) => {
                        console.error('Failed to check username', error);
                    });
                },
                login(callback) {
                    if (!this.usernameValue || !this.userEnteredPW) {
                        console.error('Username or Password is missing.');
                        return;
                    }

                    const data = {
                        form_key: hyva.getFormKey(),
                        email: this.usernameValue,
                        password: this.userEnteredPW
                    };

                    this.makeAjaxRequest(this.loginUrl, data, callback, (error) => {
                        console.error('Login failed', error);
                    });
                },
                validate(callback) {
                    if (!this.usernameValue || !this.userEnteredPW) {
                        console.error('Username or Password is missing.');
                        return;
                    }

                    const data = {
                        form_key: hyva.getFormKey(),
                        email: this.usernameValue,
                        password: this.userEnteredPW
                    };

                    this.makeAjaxRequest(this.validateUrl, data, callback, (error) => {
                        console.error('Validate failed', error);
                    });
                },
                register(callback) {
                    if (!this.userEnteredFName || !this.userEnteredLName || !this.userEnteredEmail || !this.userEnteredNewPW) {
                        console.error('Please enter all information.');
                        return;
                    }

                    const data = {
                        form_key: hyva.getFormKey(),
                        email: this.userEnteredEmail,
                        firstname: this.userEnteredFName,
                        lastname: this.userEnteredLName,
                        password: this.userEnteredNewPW
                    };

                    this.makeAjaxRequest(this.registerUrl, data, callback, (error) => {
                        console.error('Registration failed', error);
                    });
                },
                sendOtp(callback) {
                    if (!this.usernameValue || !this.selectedUserOtpOptions) {
                        console.error('Username is missing.');
                        return;
                    }
                    const msgEl = document.getElementById('messageStep4');
                    if (msgEl) {
                        msgEl.classList.add('hidden');
                        msgEl.innerText = '';
                    }

                    const data = {
                        form_key: hyva.getFormKey(),
                        email: this.usernameValue,
                        type: this.selectedUserOtpOptions
                    };
                    this.makeAjaxRequest(this.sendOtpUrl, data, callback, (error) => {
                        console.error('OTP verification failed', error);
                    });
                },
                verify(callback) {
                    if (!this.userEnteredOTPCode) {
                        console.error('Please enter the OTP code.');
                        return;
                    }

                    const data = {
                        form_key: hyva.getFormKey(),
                        otpcode: this.userEnteredOTPCode
                    };

                    this.makeAjaxRequest(this.verifyOtpUrl, data, callback, (error) => {
                        console.error('Registration failed', error);
                    });
                },
            }
        );

        // console.log("userManager: Alpine init fired");
        Alpine.data('initAuthentication', () => ({
            init(){
                document.addEventListener('private-content-loaded', (event) => {
                    const data = event?.detail?.data;
                    const isLoggedIn = data.customer && data.customer.firstname;
                    if (!isLoggedIn) {
                        this.forceAuthentication = true;
                    }
                });
            },
            open: false,
            forceAuthentication: false,
            validateInput(event) {
                this.isInputValid = event.target.checkValidity();
            },
            onEscape() {
                this.$dispatch('close-authentication');
            },
            closePanel() {
                this.$dispatch('close-authentication');
            },
            onCloseAuthentication() {
                this.open = false;
                document.body.classList.remove('overflow-hidden');
            },
            onToggleAuthentication(event) {
                this.open = event?.detail?.forceAuthentication;
                const passedUrl = event?.detail?.url;
                this.$nextTick(() => {
                    const defaultUrl = 'https://www.discountcontacts.com/customer/account/';
                    const targetUrl = passedUrl || defaultUrl;
                    try {
                        if (window.Alpine && Alpine.store('nviSidebar')) {
                            Alpine.store('nviSidebar').redirectUrl = targetUrl;
                        }
                    } catch(e){}
                    document.body.classList.add('overflow-hidden');
                });
            }
        }));
    });
    // console.log("userManager: component registered");
</script>
<section id="authentication-popup"
        class="print:hidden"
        x-data="initAuthentication"
        @toggle-authentication.window="onToggleAuthentication($event)"
        @close-authentication.window="onCloseAuthentication"
        @keydown.window.escape="onEscape">
    <div
        class="backdrop z-30"
        aria-hidden="true"
        x-cloak
        x-show="open"
        x-transition:enter="ease-in-out duration-500"
        x-transition:enter-start="opacity-0"
        x-transition:enter-end="opacity-100"
        x-transition:leave="ease-in-out duration-500"
        x-transition:leave-start="opacity-100"
        x-transition:leave-end="opacity-0"
    ></div>
    <div role="dialog"
         aria-modal="true"
         class="inset-y-0 right-0 z-30 flex max-w-full fixed"
         x-cloak
         x-show="open">
        <div class="relative w-screen max-w-[32rem] pt-20 bg-white"
             x-show="open"
             x-cloak
             x-transition:enter="transform transition ease-in-out duration-500 sm:duration-700"
             x-transition:enter-start="translate-x-full"
             x-transition:enter-end="translate-x-0"
             x-transition:leave="transform transition ease-in-out duration-500 sm:duration-700"
             x-transition:leave-start="translate-x-0"
             x-transition:leave-end="translate-x-full">
            <div
                x-show="open"
                x-cloak
                x-transition:enter="ease-in-out duration-500"
                x-transition:enter-start="opacity-0"
                x-transition:enter-end="opacity-100"
                x-transition:leave="ease-in-out duration-500"
                x-transition:leave-start="opacity-100"
                x-transition:leave-end="opacity-0" class="absolute top-0 right-2 flex p-2 mt-2">
                <button
                    type="button"
                    @click="closePanel"
                    aria-label="Close&#x20;panel"
                    class="p-2 text transition duration-150 ease-in-out hover:text-gray-300">
                    <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" width="24" height="24" role="img">
  <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"/>
<title>Close panel</title></svg>
                </button>
            </div>
            <template x-if="open">
                <div class="login-sidebar-content flex flex-col h-full bg-white shadow-xl overflow-y-auto p-4 lg:p-12">
                    <div class="block-customer-login">
                        <script>
    function nVIDiscountContactsHeaderDynamicList() {
        return {
            currentStep: (window.Alpine && Alpine.store('nviSidebar') ? Alpine.store('nviSidebar').currentStep : 1),
            ['nVIHeaderDynamicListInit']() {
                // react to store currentStep changes
                this.$watch(() => (window.Alpine && Alpine.store('nviSidebar') ? Alpine.store('nviSidebar').currentStep : this.currentStep), (value) => {
                    if (typeof value !== 'undefined') this.currentStep = value;
                });
            },
            ['nVIHeaderDynamicListStepChangeWindow'](event) {
                if (event && Object.prototype.hasOwnProperty.call(event, 'detail')) {
                    this.currentStep = event.detail;
                }
            },
        };
    }
    document.addEventListener('alpine:init', () => Alpine.data('nVIDiscountContactsHeaderDynamicList', nVIDiscountContactsHeaderDynamicList));
</script>

<ul
    class="sidebar-steps"
    x-data="nVIDiscountContactsHeaderDynamicList"
    x-init="nVIHeaderDynamicListInit"
    @step-change.window="nVIHeaderDynamicListStepChangeWindow">
    
<li
    class="sidebar-step flex flex-col gap-12"
    x-data="nVIDiscountContactsHeaderDynamicStepAccount"
    x-show="currentStep === 1"
    x-init="nVIAccountInit"
    @step-change.window="nVIAccountStepChangeWindow">
    <p id="authenticate-customer-login-username">
        <strong class="font-bold text-3xl leading-none">Sign In</strong>
    </p>

    <div class="field email required">
        <label class="label" for="form-login-username">
            <strong>Email</strong>
        </label>
        <div class="control">
            <input name="username"
                id="form-login-username"
                x-ref="customer-email"
                x-model="usernameValue"
                @input="nVIAccountInputEmail"
                @keydown.enter="nVIAccountEnterKey"
                type="email"
                placeholder="Enter Email"
                autocomplete="email"
                required
                class="form-input input-text w-full"
            >
        </div>
    </div>

    <div class="flex flex-col gap-4">
        <div id="messageStep1" class="message hidden text-bold border-2 p-2 my-4"></div>
        <button
            type="button"
            @click="initiateCheck"
            :disabled="!isInputValid || isLoading"
            class="btn btn-primary w-full justify-center"
            :class="{ 'btn-loading': isLoading }">
            <span x-show="isLoading !== true">
                Continue            </span>
            <span x-cloak x-show="isLoading === true">
                Loading                <svg width="24" height="24" viewBox="0 0 24 24" class="ml-4" xmlns="http://www.w3.org/2000/svg"><style>.spinner_P7sC{transform-origin:center;animation:spinner_svv2 .75s infinite linear}@keyframes spinner_svv2{100%{transform:rotate(360deg)}}</style><path d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z" class="spinner_P7sC" fill="currentColor"/></svg>
            </span>
        </button>
        <div class="flex flex-wrap gap-x-1 p-6 mt-4 text-center border bg-brandLightGray rounded-sm">
            <h2 class="w-full text-xl pb-4 title-font font-bold">New to Discount Contacts?</h2>
            <button
                type="button"
                class="btn btn-secondary w-full justify-center text-lg"
                @click="nVIAccountCreateClick"
                title="Register&#x20;a&#x20;new&#x20;account">
                Create an Account            </button>
        </div>
    </div>
</li>


<script>
    function getNviSidebar() { return (window.Alpine && Alpine.store('nviSidebar')) || window.sidebarState || null; }
    function nVIDiscountContactsHeaderDynamicStepAccount() {
        return Object.assign(
            {
                isInputValid: false,
                isLoading: false,
                usernameValue: (getNviSidebar() ? getNviSidebar().usernameValue : ''),
                currentStep: (window.Alpine && Alpine.store('nviSidebar') ? Alpine.store('nviSidebar').currentStep : 1),
                validateInput(event) {
                    const input = (event && event.target) || this.$refs['customer-email'];
                    this.isInputValid = !!(input && input.validity && input.validity.valid);
                },
                validateOnStepLoad() {
                    const emailInput = this.$refs['customer-email'];
                    if (emailInput && emailInput.value !== '') {
                        this.validateInput({target: emailInput});
                    }
                    this.$nextTick(() => {
                        const firstInput = this.$refs['customer-email'];
                        if (firstInput) {
                            firstInput.focus();
                        }
                    });
                },
                handleEnterEvent(event) {
                    this.validateInput(event);
                    this.initiateCheck();
                },
                createAccountClick() {
                    const store = getNviSidebar();
                    if (store && typeof store.updateStep === 'function') {
                        store.updateStep(10);
                    } else if (this.$dispatch) {
                        this.$dispatch('step-change', 10);
                    }
                },
                initiateCheck() {
                    if (!this.isInputValid) {
                        return;
                    }
                    this.isLoading = true;
                    const store = getNviSidebar();
                    (store && typeof store.checkUsername === 'function' ? store.checkUsername.bind(store) : (cb) => cb({
                        success: false,
                        message: 'Sidebar store not available'
                    }))((response) => {
                        const elMessage = document.getElementById('messageStep1');
                        if (response.success === true) {
                            this.isLoading = false;
                            const store = getNviSidebar();
                            store && store.updateUserPhone && store.updateUserPhone(response.last4Phone);
                            store && store.updateOtpOptions && store.updateOtpOptions(response.login_options);
                            store && store.updateUsername && store.updateUsername(response.email);
                            store && store.populateUsernameText && store.populateUsernameText(response.email);
                            store && store.populateUserPhoneText && store.populateUserPhoneText(response.last4Phone);
                            store && store.showLoginChoices && store.showLoginChoices(response.login_options);
                            if (elMessage) {
                                elMessage.classList.add('hidden');
                            }
                            if (store && typeof store.updateStep === 'function') {
                                store.updateStep(2);
                            } else if (this.$dispatch) {
                                this.$dispatch('step-change', 2);
                            }
                        } else {
                            this.isLoading = false;
                            if (elMessage) {
                                elMessage.classList.remove('hidden');
                                elMessage.classList.add('error');
                                elMessage.classList.remove('success');
                                elMessage.innerHTML = `${response.message.replace(/\r?\n/g, '<br>')}`;
                            }
                        }
                    });
                },
            },
            {
                // CSP-friendly named wrappers
                ['nVIAccountInit']() {
                    // keep username in sync with store
                    this.$watch('usernameValue', (value) => {
                        const store = getNviSidebar();
                        if (store && typeof store.updateUsername === 'function') {
                            store.updateUsername(value);
                        }
                    });
                    // react to store currentStep changes
                    this.$watch(() => (window.Alpine && Alpine.store('nviSidebar') ? Alpine.store('nviSidebar').currentStep : this.currentStep), (value) => {
                        if (typeof value !== 'undefined') this.currentStep = value;
                    });
                    // react to store usernameValue changes
                    this.$watch(() => (window.Alpine && Alpine.store('nviSidebar') ? Alpine.store('nviSidebar').usernameValue : this.usernameValue), (value) => {
                        if (typeof value !== 'undefined' && value !== this.usernameValue) this.usernameValue = value;
                    });
                    this.$nextTick(() => { const store = getNviSidebar(); this.usernameValue = store ? store.usernameValue : this.usernameValue; });
                    this.validateOnStepLoad();
                },
                ['nVIAccountStepChangeWindow'](event) { if (event && event.detail === 1) this.validateOnStepLoad() },
                ['nVIAccountInputEmail'](event) {
                    this.validateInput(event);
                    const value = event?.target?.value || this.usernameValue || '';
                    const store = getNviSidebar();
                    if (store && typeof store.updateUsername === 'function') {
                        store.updateUsername(value);
                    }
                    this.$dispatch('value-updated', { value });
                },
                ['nVIAccountEnterKey'](event) { this.handleEnterEvent(event) },
                ['nVIAccountCreateClick']() {
                    const store = getNviSidebar();
                    if (store && typeof store.updateStep === 'function') {
                        store.updateStep(10);
                    } else if (this.$dispatch) {
                        this.$dispatch('step-change', 10);
                    }
                }
            }
        );
    }
    document.addEventListener('alpine:init', () => Alpine.data('nVIDiscountContactsHeaderDynamicStepAccount', nVIDiscountContactsHeaderDynamicStepAccount));
</script>
    
<li
    class="sidebar-step flex flex-col gap-8"
    x-show="currentStep === 2"
    x-data="nVIDiscountContactsHeaderDynamicStepPassword"
    x-init="nVIPasswordInit"
    @step-change.window="nVIPasswordStepChangeWindow">
    <p id="authenticate-customer-login-password" class="flex flex-col gap-6 mb-4">
        <strong class="font-bold text-3xl leading-none">Sign In</strong>
        <button
            class="menu-link inline-flex items-center text-sm font-normal pt-2 pb-2 pr-4"
            type="button"
            @click="nVIPasswordBackClick">
            <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                <g clip-path="url(#clip0_885_2328)">
                    <path d="M12.842 6.175L11.667 5L6.66699 10L11.667 15L12.842 13.825L9.02533 10L12.842 6.175Z" fill="currentColor"/>
                </g>
                <defs>
                    <clipPath id="clip0_885_2328">
                        <rect width="20" height="20" fill="white"/>
                    </clipPath>
                </defs>
            </svg>
            Back        </button>
    </p>
    <div class="field email email-static border-b border-brandLightestBlue pb-8 mb-4">
        <div class="control">
            <p class="font-bold mb-1">Email</p>
            <div class="flex justify-between">
                <span class="static-username" data-sidebar-email-address></span>
                <button type="button" class="btn-icon" @click="nVIPasswordEditEmailClick" title="Edit&#x20;Email&#x20;Address">
                    <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <path d="M13.5858 3.58579C14.3668 2.80474 15.6332 2.80474 16.4142 3.58579C17.1953 4.36683 17.1953 5.63316 16.4142 6.41421L15.6213 7.20711L12.7929 4.37868L13.5858 3.58579Z" fill="currentColor"/>
                        <path d="M11.3787 5.79289L3 14.1716V17H5.82842L14.2071 8.62132L11.3787 5.79289Z" fill="currentColor"/>
                    </svg>
                </button>
            </div>
        </div>
    </div>
    <div class="field flex flex-col 2fa !m-0 gap-8 hidden" data-method-otp>
        <p>Please select a method to sign-in. We can send you a one-time code to securely sign in. Or enter your password.</p>
        <div class="flex flex-col gap-y-4">
            <button
                class="btn btn-pack text-left w-full border-2 border-brandLightestBlue hidden"
                type="button"
                @click="nVIPasswordOtpSmsClick"
                data-method-sms>
                <div class="flex justify-between items-start w-full">
                    <div class="btn-text-container">
                        <strong class="block text-black">Text a one-time code to:</strong>
                        <strong class="block text-black" data-sidebar-phone-number></strong>
                        <span class="block text-brandDisabled font-normal">Standard rates may apply</span>
                    </div>
                    <span class="btn-icon-container">
                        <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                            <g clip-path="url(#clip0_300_678)">
                                <path d="M8.3332 5L7.1582 6.175L10.9749 10L7.1582 13.825L8.3332 15L13.3332 10L8.3332 5Z" fill="currentColor"/>
                            </g>
                            <defs>
                                <clipPath id="clip0_300_678">
                                    <rect width="20" height="20" fill="white"/>
                                </clipPath>
                            </defs>
                        </svg>
                    </span>
                </div>
            </button>
            <button
                class="btn btn-pack text-left w-full border-2 border-brandLightestBlue hidden"
                type="button"
                @click="nVIPasswordOtpEmailClick"
                data-method-email>
                <div class="flex justify-between items-start w-full">
                    <div class="btn-text-container">
                        <strong class="block text-black">Email a one-time code to:</strong>
                        <strong class="block text-black" data-sidebar-email-address></strong>
                    </div>
                    <span class="btn-icon-container">
                        <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                            <g clip-path="url(#clip0_300_678)">
                                <path d="M8.3332 5L7.1582 6.175L10.9749 10L7.1582 13.825L8.3332 15L13.3332 10L8.3332 5Z" fill="currentColor"/>
                            </g>
                            <defs>
                                <clipPath id="clip0_300_678">
                                    <rect width="20" height="20" fill="white"/>
                                </clipPath>
                            </defs>
                        </svg>
                    </span>
                </div>
            </button>
        </div>
    </div>
    <div data-method-password class="hidden">
        <div
            x-data="nVIPasswordFieldShow"
            class="field password required border-t pt-12 mb-12">
            <form x-data @keydown.enter.prevent>
                <label for="form-login-password" class="label">
                    <strong>Password</strong>
                </label>
                <div class="control password-toggle relative">
                    <input name="password"
                        id="form-login-password"
                        :type="showPassword ? 'text' : 'password'"
                        class="form-input input-text w-full"
                        required
                        x-ref="customer-password"
                        @input="validateInput($event)"
                        @keydown.enter="handleEnterEvent($event)"
                        placeholder="Enter&#x20;Password"
                        autocomplete="off"
                        @change="errors = 0" />
                    <button type="button" @click="showPassword = !showPassword" class="btn-icon absolute right-4 top-3 text-brandBlue hover:text-brandDisabled hover:bg-transparent">
                        <span x-show="!showPassword">
                            <span class="sr-only">Show Password</span>
                            <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22">
                                <g transform="matrix(.02146 0 0 .02146 1 1)" fill="currentColor">
                                    <path d="m466.07 161.53c-205.6 0-382.8 121.2-464.2 296.1-2.5 5.3-2.5 11.5 0 16.9 81.4 174.9 258.6 296.1 464.2 296.1 205.6 0 382.8-121.2 464.2-296.1 2.5-5.3 2.5-11.5 0-16.9-81.4-174.9-258.6-296.1-464.2-296.1m0 514.7c-116.1 0-210.1-94.1-210.1-210.1 0-116.1 94.1-210.1 210.1-210.1 116.1 0 210.1 94.1 210.1 210.1 0 116-94.1 210.1-210.1 210.1" />
                                    <circle cx="466.08" cy="466.02" r="134.5" />
                                </g>
                            </svg>
                        </span>
                        <span x-show="showPassword">
                            <span class="sr-only">Hide Password</span>
                            <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                                <path fill-rule="evenodd" clip-rule="evenodd" d="M3.70711 2.29289C3.31658 1.90237 2.68342 1.90237 2.29289 2.29289C1.90237 2.68342 1.90237 3.31658 2.29289 3.70711L16.2929 17.7071C16.6834 18.0976 17.3166 18.0976 17.7071 17.7071C18.0976 17.3166 18.0976 16.6834 17.7071 16.2929L16.2339 14.8197C17.7715 13.5924 18.939 11.9211 19.5424 9.99996C18.2681 5.94288 14.4778 3 10.0002 3C8.37665 3 6.84344 3.38692 5.48779 4.07358L3.70711 2.29289ZM7.96813 6.55391L9.48201 8.0678C9.6473 8.02358 9.82102 8 10.0003 8C11.1048 8 12.0003 8.89543 12.0003 10C12.0003 10.1792 11.9767 10.353 11.9325 10.5182L13.4463 12.0321C13.7983 11.4366 14.0003 10.7419 14.0003 10C14.0003 7.79086 12.2094 6 10.0003 6C9.25838 6 8.56367 6.20197 7.96813 6.55391Z" fill="currentColor"/>
                                <path d="M12.4541 16.6967L9.74965 13.9923C7.74013 13.8681 6.1322 12.2601 6.00798 10.2506L2.33492 6.57754C1.50063 7.57223 0.856368 8.73169 0.458008 10C1.73228 14.0571 5.52257 17 10.0002 17C10.8469 17 11.6689 16.8948 12.4541 16.6967Z" fill="currentColor"/>
                            </svg>
                        </span>
                    </button>
                </div>
            </form>
            <div class="text-right mt-2">
                <a href="https://www.discountcontacts.com/customer/account/forgotpassword/"
                    class="link"
                >
                    Forgot Your Password?                </a>
            </div>
        </div>
        <div id="messageStep2" class="message hidden text-bold border-2 p-2 my-4"></div>
        <div class="flex flex-col gap-4">
            <div class="flex">
                <button
                    type="button"
                    @click="initiateCheck"
                    :disabled="!isInputValid || isLoading"
                    class="btn btn-primary w-full justify-center"
                    :class="{ 'btn-loading': isLoading }">
                    <span x-show="isLoading !== true">
                        Sign In                    </span>
                    <span x-cloak x-show="isLoading === true">
                        Loading                        <svg width="24" height="24" class="ml-4" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><style>.spinner_P7sC{transform-origin:center;animation:spinner_svv2 .75s infinite linear}@keyframes spinner_svv2{100%{transform:rotate(360deg)}}</style><path d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z" class="spinner_P7sC" fill="currentColor"/></svg>
                    </span>
                </button>
            </div>
        </div>
    </div>
</li>


<script>
    function getNviSidebar() { return (window.Alpine && Alpine.store('nviSidebar')) || window.sidebarState || null; }
    function nVIDiscountContactsHeaderDynamicStepPassword() {
        return {
            isInputValid: false,
            isLoading: false,
            usernameValue: (getNviSidebar() ? getNviSidebar().usernameValue : ''),
            currentStep: (window.Alpine && Alpine.store('nviSidebar') ? Alpine.store('nviSidebar').currentStep : 2),
            validateInput(event) {
                const input = (event && event.target) || this.$refs['customer-password'];
                if (input) {
                    input.setCustomValidity('');
                    input.checkValidity();
                    this.isInputValid = !!(input.validity && input.validity.valid);
                }
            },
            validateOnStepLoad() {
                const passwordInput = this.$refs['customer-password'];

                if(passwordInput.value.length < 8) {
                    window.dataLayer.push({'ecommerce': {
                        'event': 'SignInAttempt',
                        'status': 'Attempt'}
                    });
                    // Push login success event
                    window.dataLayer.push({
                        'event': 'SignInFailed',
                        'ecommerce': {
                        'event': 'SignInFailed',
                        'status': 'Fail',
                        'reason': 'Password is empty'
                        }
                    });
                }
                if (passwordInput && passwordInput.value !== '') {
                    this.validateInput({ target: passwordInput });
                }
            },
            handleEnterEvent(event) {
                this.validateInput(event);
                this.initiateCheck();
            },
            initiateCheck() {
                if (!this.isInputValid) {
                    return;
                }
                this.isLoading = true;
                const elPW = document.getElementById('form-login-password');
                if (elPW) {
                    getNviSidebar() && getNviSidebar().updateUserEnteredPW && getNviSidebar().updateUserEnteredPW(elPW.value);
                }
                const store = getNviSidebar();
                (store && typeof store.login === 'function' ? store.login.bind(store) : (cb)=>cb({success:false,message:'Sidebar store not available'}))(response => {
                    const elMessage = document.getElementById('messageStep2');
                    if (response.success === true) {
                        this.isLoading = false;
                        // Confirm Login and Reload page
                        if (elMessage) {
                            elMessage.classList.remove('hidden');
                            elMessage.classList.remove('error');
                            elMessage.classList.add('success');
                            elMessage.innerText = 'Login\u0020successful.\u0020Reloading\u0020page.';
                            window.dataLayer.push({'ecommerce': {
                                'event': 'SignInAttempt',
                                'status': 'Attempt'}
                            });
                            // Push login success event
                            window.dataLayer.push({
                                'event': 'SignInStatus',
                                'ecommerce': {
                                'event': 'SignInStatus',
                                'status': 'Success',
                                'reason': response.message
                                }
                            });
                        }
                        setTimeout(() => {
                            if (elMessage) elMessage.classList.add('hidden');
                            const redirectUrl = getNviSidebar() ? getNviSidebar().redirectUrl : window.location.href;
                            console.log('redirecting to ', redirectUrl);
                            window.location.assign(redirectUrl);
                        }, 1000);

                    } else {
                        this.isLoading = false;
                        if (elMessage) {
                            elMessage.classList.remove('hidden');
                            elMessage.classList.add('error');
                            elMessage.classList.remove('success');
                            elMessage.innerHTML = '<span>'+response.message+'</span>';
                        }
                        elPW.setCustomValidity('Invalid Password');
                        elPW.scrollIntoView();
                        this.isInputValid = false;
                        window.dataLayer.push({'ecommerce': {
                                'event': 'SignInAttempt',
                                'status': 'Attempt'}
                            });
                        // Push login failed event
                        window.dataLayer.push({
                            'event': 'SignInFailed',
                            'ecommerce': {
                            'event': 'SignInFailed',
                            'status': 'Fail',
                            'reason': response.message
                            }
                        });
                    }
                });
            },
            OTPCheck(method) {
                if (getNviSidebar()) { getNviSidebar().selectedUserOtpOptions = method; }
                this.isLoading = true;
                const store = getNviSidebar();
                (store && typeof store.sendOtp === 'function' ? store.sendOtp.bind(store) : (cb)=>cb({success:false,message:'Sidebar store not available'}))(response => {
                    const elMessage = document.getElementById('messageStep2');
                    if (response.success === true) {
                        this.isLoading = false;
                        if (method === 'sms_otp') {
                            store.updateStep(3);
                        } else {
                            store.updateStep(4);
                        }
                        if (elMessage) elMessage.classList.add('hidden');
                    } else {
                        this.isLoading = false;
                        if (elMessage) {
                            elMessage.classList.remove('hidden');
                            elMessage.classList.add('error');
                            elMessage.classList.remove('success');
                            elMessage.innerHTML = response.message;
                            window.dataLayer.push({'ecommerce': {'event': 'SignInAttempt','status': 'Attempt'}});
                            window.dataLayer.push({'event': 'SignInFailed','ecommerce': {'event': 'SignInFailed','status': 'Fail','reason': response.message}});
                        }
                    }
                });
            },
            // Named handlers for CSP
            ['nVIPasswordInit']() {
                // react to store usernameValue changes
                this.$watch(() => (window.Alpine && Alpine.store('nviSidebar') ? Alpine.store('nviSidebar').usernameValue : this.usernameValue), (value) => {
                    if (typeof value !== 'undefined' && value !== this.usernameValue) this.usernameValue = value;
                });
                // react to store currentStep changes
                this.$watch(() => (window.Alpine && Alpine.store('nviSidebar') ? Alpine.store('nviSidebar').currentStep : this.currentStep), (value) => {
                    if (typeof value !== 'undefined') this.currentStep = value;
                });
                this.$nextTick(() => { const store = getNviSidebar(); this.usernameValue = store ? store.usernameValue : this.usernameValue; });
            },
            ['nVIPasswordStepChangeWindow'](event) {
                if (event && event.detail === 2) {
                    const store = getNviSidebar();
                    this.usernameValue = store ? store.usernameValue : this.usernameValue;
                }
            },
            ['nVIPasswordBackClick']() {
                const store = getNviSidebar();
                if (store && typeof store.updateStep === 'function') {
                    store.updateStep(1);
                } else if (this.$dispatch) {
                    this.$dispatch('step-change', 1);
                }
            },
            ['nVIPasswordEditEmailClick']() {
                const store = getNviSidebar();
                if (store && typeof store.updateStep === 'function') {
                    store.updateStep(1);
                } else if (this.$dispatch) {
                    this.$dispatch('step-change', 1);
                }
            },
            ['nVIPasswordOtpSmsClick']() { this.OTPCheck('sms_otp') },
            ['nVIPasswordOtpEmailClick']() { this.OTPCheck('email_otp') },
        };
    }
    document.addEventListener('alpine:init', () => Alpine.data('nVIDiscountContactsHeaderDynamicStepPassword', nVIDiscountContactsHeaderDynamicStepPassword));

    function nVIPasswordFieldShow() { return { showPassword: false }; }
    document.addEventListener('alpine:init', () => Alpine.data('nVIPasswordFieldShow', nVIPasswordFieldShow));
</script>
    <li
    id="loginSMSOTPStep"
    class="sidebar-step flex flex-col gap-6"
    x-data="nVIDiscountContactsHeaderDynamicStepSMS"
    x-show="currentStep === 3"
    x-init="nVISmsInit"
    @step-change.window="nVISmsStepChangeWindow">
    <p id="authenticate-customer-login-sms" class="flex flex-col gap-6">
        <strong class="font-bold text-3xl leading-none">Sign In</strong>
        <button
            class="menu-link inline-flex items-center text-sm font-normal pt-2 pb-2 pr-4"
            type="button"
            @click="nVISmsBackClick">
            <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                <g clip-path="url(#clip0_885_2328)">
                    <path d="M12.842 6.175L11.667 5L6.66699 10L11.667 15L12.842 13.825L9.02533 10L12.842 6.175Z" fill="currentColor"/>
                </g>
                <defs>
                    <clipPath id="clip0_885_2328">
                        <rect width="20" height="20" fill="white"/>
                    </clipPath>
                </defs>
            </svg>
            Back        </button>
    </p>
    <div class="field email email-static border-b border-brandLightestBlue pb-8 !m-0">
        <div class="control">
            <div class="flex justify-between">
                <div class="">
                    <strong class="block">Phone Number</strong>
                    <span class="static-phone-number" data-sidebar-phone-number></span>
                </div>
                <button type="button" class="btn-icon" @click="nVISmsEditClick" title="Edit&#x20;Username&#x20;or&#x20;Email&#x20;Address">
                    <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <path d="M13.5858 3.58579C14.3668 2.80474 15.6332 2.80474 16.4142 3.58579C17.1953 4.36683 17.1953 5.63316 16.4142 6.41421L15.6213 7.20711L12.7929 4.37868L13.5858 3.58579Z" fill="currentColor"/>
                        <path d="M11.3787 5.79289L3 14.1716V17H5.82842L14.2071 8.62132L11.3787 5.79289Z" fill="currentColor"/>
                    </svg>
                </button>
            </div>
        </div>
    </div>
    <div class="field flex flex-col sms gap-6 mt-6">
        <p>A code was sent to your phone number.</p>
        <strong class="block">Enter the 6-digit code:</strong>
        <div
            x-data="otpInputSMS()"
            x-init="init()"
            class="code-input border border-brandLightestBlue rounded-lg flex justify-center items-center"
            >
            <template x-for="(id, index) in ['sms-code1', 'sms-code2', 'sms-code3', 'sms-code4', 'sms-code5', 'sms-code6']" :key="id">
                <input
                    type="text"
                    maxlength="1"
                    size="1"
                    min="0"
                    max="9"
                    pattern="[0-9]{1}"
                    :id="id"
                    placeholder="-"
                    autocomplete="one-time-code"
                    @input="moveToNext($event, index)"
                    @change="moveToNext($event, index)"
                    @keydown.backspace="moveToNext($event, index, true)"
                    @paste="handlePaste($event)"
                    @keydown.enter="handleEnter($event)"
                    @keydown.space="handleEnter($event)"
                    @focus="handleFocus($event)"
                    :data-index="index"
                    required
                    class="otp-input form-input input-text w-full h-[4.5rem] text-black font-bold text-4xl text-center rounded-xl !border-0 focus:ring-0 focus:bg-brandLightGray" />
            </template>
        </div>

        <script type="application/javascript">
            function otpInputSMS() {
                return {
                    otpInputs: [],
                    combinedInput: '',
                    alpineContainer: null,
                    init() {
                        this.$nextTick(() => {
                            this.otpInputs = Array.from(this.$el.querySelectorAll('.otp-input'));
                            this.alpineContainer = document.getElementById('loginSMSOTPStep');
                        });
                    },
                    moveToNext(event, index, isDelete) {
                        const input = event.target;
                        const value = input.value;

                        if (!/^\d$/.test(value)) {
                            input.value = '';
                            if (!isDelete) {
                                return;
                            }
                        }

                        this.combinedInput = '';
                        this.otpInputs.forEach(itemInput => {
                            if (itemInput.value) {
                                this.combinedInput += itemInput.value;
                            }
                        });

                        if (this.alpineContainer) {
                            const alpineData = Alpine.$data(this.alpineContainer);
                            alpineData.validateSMSInput(this.combinedInput);
                        }

                        if (isDelete) {
                            event.preventDefault();
                            if (value !== '') {
                                input.value = '';
                            }
                            if (index >= 1) {
                                this.otpInputs[index - 1].focus();
                                this.otpInputs[index - 1].select();
                            }
                        } else if (index < this.otpInputs.length - 1 && value !== '') {
                            this.otpInputs[index + 1].focus();
                        }
                    },
                    handlePaste(event) {
                        const pastedText = event.clipboardData.getData('text');
                        if (pastedText.length === 6) {
                            this.otpInputs.forEach((input, index) => {
                                input.value = pastedText[index] || '';
                                this.combinedInput += input.value;
                            });
                            this.otpInputs[5].focus();
                            this.validateSMSInput(this.combinedInput);
                        } else {
                            console.log('Pasted value not a valid OTP code');
                            event.preventDefault();
                        }
                    },
                    handleEnter(event) {
                        event.preventDefault();
                        this.initiateCheck();
                    },
                    handleFocus(event) {
                        const firstInput = document.getElementById('sms-code1');
                        if (firstInput && firstInput.value === '') {
                            setTimeout(() => {
                                firstInput.focus();
                            }, 100);
                        }
                    }
                };
            }
        </script>
        
        <div class="flex flex-col gap-3 items-center mb-6" x-show="!maxAttemptsExhausted">
            <span class="block">Didn&#039;t get a code?</span>
            <div id="otpCountdown" x-data="otpCountdown" @step-change.window="if ($event.detail === 3) startTimer()">
                <div x-show="!isTimerDone" class="otp-timer">
                    Resend OTP in <span x-text="timeLeft"></span> seconds
                </div>
                <button
                    x-show="isTimerDone"
                    type="button"
                    class="link"
                    id="resendSMSOTP"
                    @resend-otp.window="resetTimer()"
                    @click="sendCode();">
                    Send another one-time code                </button>
            </div>
        </div>
        <div id="messageStep3" class="message hidden text-bold border-2 p-2 my-4"></div>
        <button
            type="button"
            @click="initiateCheck"
            x-ref="smsOtpSubmitBtton"
            :disabled="!isInputValid || isLoading"
            class="btn btn-primary w-full justify-center"
            :class="{ 'btn-loading': isLoading }">
            <span x-show="isLoading !== true">
                Sign In            </span>
            <span x-cloak x-show="isLoading === true">
                Loading                <svg width="24" height="24" class="ml-4" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><style>.spinner_P7sC{transform-origin:center;animation:spinner_svv2 .75s infinite linear}@keyframes spinner_svv2{100%{transform:rotate(360deg)}}</style><path d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z" class="spinner_P7sC" fill="currentColor"/></svg>
            </span>
        </button>
    </div>
</li>


<script>
    function getNviSidebar() { return (window.Alpine && Alpine.store('nviSidebar')) || window.sidebarState || null; }
    function nVIDiscountContactsHeaderDynamicStepSMS() {
        return {
            otpSent: false,
            remainingAttempts: 0,
            maxAttemptsExhausted: false,
            isInputValid: false,
            isLoading: false,
            currentStep: (window.Alpine && Alpine.store('nviSidebar') ? Alpine.store('nviSidebar').currentStep : 3),
            validateSMSInput(combinedInput = null) {
                if (combinedInput) {
                    this.isInputValid = combinedInput.length === 6;
                }
            },
            validateOnStepLoad() {
                const smsOtpInput = this.$refs['sms-otp'];
                if (smsOtpInput && smsOtpInput.value !== '') {
                    this.validateSMSInput({ target: smsOtpInput });
                }
                this.$nextTick(() => {
                    const firstInput = document.getElementById('sms-code1');
                    if (firstInput) {
                        setTimeout(() => { firstInput.focus(); }, 100);
                    }
                });
            },
            sendCode() {
                this.$dispatch('resend-otp');
                const store = getNviSidebar();
                if (store && typeof store.sendOtp === 'function') { store.sendOtp(); }
                const elMessage = document.getElementById('messageStep3');
                if (elMessage) {
                    elMessage.classList.remove('hidden');
                    elMessage.classList.remove('error');
                    elMessage.classList.add('success');
                    elMessage.innerText = 'Code\u0020Sent\u0021';
                }
            },
            handleSendCodeResponse(response) {
                this.maxAttemptsExhausted = response.max_attempts_exhausted ?? false;
                this.remainingAttempts = response.remaining_attempts ?? 0;
                const elMessage = document.getElementById('messageStep3');
                if (response.success) {
                    if (elMessage) {
                        elMessage.classList.remove('hidden');
                        elMessage.classList.remove('error');
                        elMessage.classList.add('success');
                        elMessage.innerText = 'Code\u0020Sent\u0021';
                        this.otpSent = true;
                    }
                } else {
                    if (elMessage) {
                        elMessage.classList.remove('hidden');
                        elMessage.classList.add('error');
                        elMessage.classList.remove('success');
                        elMessage.innerHTML = '<span>'+response.message+'</span>';
                    }
                }
            },
            initiateCheck() {
                if (!this.isInputValid) {
                    return;
                }
                this.isLoading = true;
                const elSMSOTPContainer = document.getElementById('loginSMSOTPStep');
                if (elSMSOTPContainer) {
                    const elsSMSOTP = Array.from(elSMSOTPContainer.querySelectorAll('.otp-input'));
                    let combinedValue = '';
                    if (elsSMSOTP.length) {
                        elsSMSOTP.forEach( el => combinedValue += el.value);
                    }
                    getNviSidebar().updateUserEnteredOTPCode(combinedValue);
                }
                getNviSidebar().verify(response => {
                    const elMessage = document.getElementById('messageStep3');
                    this.remainingAttempts = response.remaining_attempts ?? 0;
                    if (response.success === true) {
                        this.isLoading = false;
                        // Confirm Login and Reload page
                        if (elMessage) {
                            elMessage.classList.remove('hidden');
                            elMessage.classList.remove('error');
                            elMessage.classList.add('success');
                            elMessage.innerText = 'Login&#x20;successful.&#x20;Reloading&#x20;page.';
                            window.dataLayer.push({'ecommerce': {
                                'event': 'SignInAttempt',
                                'status': 'Attempt'}
                            });
                            // Push login success event
                            window.dataLayer.push({
                                'event': 'SignInStatus',
                                'ecommerce': {
                                'event': 'SignInStatus',
                                'status': 'Success',
                                'reason': response.message
                                }
                            });
                        }
                        setTimeout(() => {
                            console.log('redirecting to ', getNviSidebar().redirectUrl);
                            window.location.assign(getNviSidebar().redirectUrl);
                        }, 1000);
                    } else {
                        // Code failed
                        this.isLoading = false;
                        if (elMessage) {
                            elMessage.classList.remove('hidden');
                            elMessage.classList.add('error');
                            elMessage.classList.remove('success');
                            let msg = response.remaining_attempts_msg ? response.message + response.remaining_attempts_msg : response.message;
                            elMessage.innerHTML = '<span>'+response.message+'</span>';
                            window.dataLayer.push({'ecommerce': {
                                'event': 'SignInAttempt',
                                'status': 'Attempt'}
                            });

                            // Push login failed event
                            window.dataLayer.push({
                                'event': 'SignInFailed',
                                'ecommerce': {
                                'event': 'SignInFailed',
                                'status': 'Fail',
                                'reason': response.message
                            }
                            });
                        }
                        this.isInputValid = false;
                    }
                });
            },
            // Named wrappers
            ['nVISmsInit']() {
                // react to store currentStep changes
                this.$watch(() => (window.Alpine && Alpine.store('nviSidebar') ? Alpine.store('nviSidebar').currentStep : this.currentStep), (value) => {
                    if (typeof value !== 'undefined') this.currentStep = value;
                });
                this.validateOnStepLoad();
            },
            ['nVISmsStepChangeWindow'](event) { if (event && event.detail === 3) this.validateOnStepLoad() },
            ['nVISmsBackClick']() {
                const store = getNviSidebar();
                if (store && typeof store.updateStep === 'function') {
                    store.updateStep(2);
                } else if (this.$dispatch) {
                    this.$dispatch('step-change', 2);
                }
            },
            ['nVISmsEditClick']() {
                const store = getNviSidebar();
                if (store && typeof store.updateStep === 'function') {
                    store.updateStep(1);
                } else if (this.$dispatch) {
                    this.$dispatch('step-change', 1);
                }
            }
        };
    }
    document.addEventListener('alpine:init', () => Alpine.data('nVIDiscountContactsHeaderDynamicStepSMS', nVIDiscountContactsHeaderDynamicStepSMS));

    function otpCountdown(){
        return {
            initialSeconds: 30,
            timeLeft: 30,
            isTimerDone: false,
            timer: null,

            startTimer() {
                this.stopTimer();

                this.isTimerDone = false;
                this.timeLeft = this.initialSeconds;

                this.timer = setInterval(() => {
                    if (this.timeLeft > 0) {
                        this.timeLeft--;
                    } else {
                        this.stopTimer();
                        this.isTimerDone = true;
                    }
                }, 1000);
            },

            stopTimer() {
                if (this.timer) {
                    clearInterval(this.timer);
                }
            },

            resetTimer() {
                this.startTimer();
            }
        }
    }
    window.addEventListener('alpine:init', () => Alpine.data('otpCountdown', otpCountdown), {once: true});
</script>
    <li
    id="loginEmailOTPStep"
    class="sidebar-step flex flex-col gap-6"
    x-data="nVIDiscountContactsHeaderDynamicStepEmail" data-hyvacsp1="Code&#x20;Sent&#x21;" data-hyvacsp2="Login&#x20;successful.&#x20;Reloading&#x20;page."
    x-show="nVIDiscountContactsHeaderDynamicStepEmailShow349"
    x-init="nVIDiscountContactsHeaderDynamicStepEmailInit350"
    @step-change.window="nVIDiscountContactsHeaderDynamicStepEmailStepChangeWindow351">
    <p id="authenticate-customer-login-email" class="flex flex-col gap-6">
        <strong class="font-bold text-3xl leading-none">Sign In</strong>
        <button
            class="menu-link inline-flex items-center text-sm font-normal pt-2 pb-2 pr-4"
            type="button"
            @click="nVIDiscountContactsHeaderDynamicStepEmailClick352">
            <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                <g clip-path="url(#clip0_885_2328)">
                    <path d="M12.842 6.175L11.667 5L6.66699 10L11.667 15L12.842 13.825L9.02533 10L12.842 6.175Z" fill="currentColor"/>
                </g>
                <defs>
                    <clipPath id="clip0_885_2328">
                        <rect width="20" height="20" fill="white"/>
                    </clipPath>
                </defs>
            </svg>
            Back        </button>
    </p>
    <div class="field email email-static border-b border-brandLightestBlue pb-8 !m-0">
        <div class="control">
            <div class="flex justify-between">
                <div class="">
                    <strong class="block">Email</strong>
                    <span class="static-phone-number" data-sidebar-email-address></span>
                </div>
                <button type="button" class="btn-icon" @click="nVIDiscountContactsHeaderDynamicStepEmailClick353" title="Edit&#x20;Username&#x20;or&#x20;Email&#x20;Address">
                    <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <path d="M13.5858 3.58579C14.3668 2.80474 15.6332 2.80474 16.4142 3.58579C17.1953 4.36683 17.1953 5.63316 16.4142 6.41421L15.6213 7.20711L12.7929 4.37868L13.5858 3.58579Z" fill="currentColor"/>
                        <path d="M11.3787 5.79289L3 14.1716V17H5.82842L14.2071 8.62132L11.3787 5.79289Z" fill="currentColor"/>
                    </svg>
                </button>
            </div>
        </div>
    </div>
    <div class="field flex flex-col email gap-6 mt-6">
        <p>A code was sent to your e-mail address.</p>
        <strong class="block">Enter the 6-digit code:</strong>
        <div
            x-data="nVIDiscountContactsHeaderDynamicStepEmail1"
            x-init="nVIDiscountContactsHeaderDynamicStepEmailInit354"
            class="code-input border border-brandLightestBlue rounded-lg flex justify-center items-center"
            >
            <template x-for="(id, index) in nVIDiscountContactsHeaderDynamicStepEmailFor355" :key="id">
                <input
                    type="text"
                    maxlength="1"
                    size="1"
                    min="0"
                    max="9"
                    pattern="[0-9]{1}"
                    :id="id"
                    placeholder="-"
                    autocomplete="one-time-code"
                    @input="nVIDiscountContactsHeaderDynamicStepEmailInput356"
                    @change="nVIDiscountContactsHeaderDynamicStepEmailChange357"
                    @keydown.backspace="nVIDiscountContactsHeaderDynamicStepEmailKeydownBackspace358"
                    @keydown.enter="nVIDiscountContactsHeaderDynamicStepEmailKeydownEnter359"
                    @keydown.space="nVIDiscountContactsHeaderDynamicStepEmailKeydownSpace360"
                    @focus="nVIDiscountContactsHeaderDynamicStepEmailFocus361"
                    @paste="nVIDiscountContactsHeaderDynamicStepEmailPaste362"
                    :data-index="index"
                    required
                    class="otp-input form-input input-text w-full h-[4.5rem] text-black font-bold text-4xl text-center rounded-xl !border-0 focus:ring-0 focus:bg-brandLightGray" />
            </template>
        </div>


        <div class="flex flex-col gap-3 items-center mb-6" x-show="!maxAttemptsExhausted">
            <span class="block">Didn&#039;t get a code?</span>
            <div id="otpCountdown" x-data="otpCountdown" @step-change.window="if ($event.detail === 4) startTimer()">
                <div x-show="!isTimerDone" class="otp-timer">
                    Resend OTP in <span x-text="timeLeft"></span> seconds
                </div>
                <button
                    x-show="isTimerDone"
                    type="button"
                    class="link"
                    id="resendEmailOTP"
                    @resend-otp.window="resetTimer()"
                    @click="nVIDiscountContactsHeaderDynamicStepEmailClick363">
                    Send another one-time code                </button>
            </div>
        </div>
        <div id="messageStep4" class="message hidden text-bold border-2 p-2 my-4"></div>
        <button
            type="button"
            @click="initiateCheck"
            x-ref="emailOtpSubmitBtton"
            :disabled="nVIDiscountContactsHeaderDynamicStepEmailDisabled364"
            class="btn btn-primary w-full justify-center"
            :class="nVIDiscountContactsHeaderDynamicStepEmailClass365">
            <span x-show="nVIDiscountContactsHeaderDynamicStepEmailShow366">
                Sign In            </span>
            <span x-cloak x-show="nVIDiscountContactsHeaderDynamicStepEmailShow367">
                Loading                <svg width="24" height="24" class="ml-4" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><style>.spinner_P7sC{transform-origin:center;animation:spinner_svv2 .75s infinite linear}@keyframes spinner_svv2{100%{transform:rotate(360deg)}}</style><path d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z" class="spinner_P7sC" fill="currentColor"/></svg>
            </span>
        </button>
    </div>
</li>
<script>
function getNviSidebar() { return (window.Alpine && Alpine.store('nviSidebar')) || window.sidebarState || null; }
function otpInputEmail() {
    return {
        otpInputs: [],
        combinedInput: '',
        alpineContainer: null,
        init() {
            this.$nextTick(() => {
                this.otpInputs = Array.from(this.$el.querySelectorAll('.otp-input'));
                this.alpineContainer = document.getElementById('loginEmailOTPStep');
            });
        },
        moveToNext(event, index, isDelete) {
            const input = event.target;
            const value = input.value;

            if (!/^\d$/.test(value)) {
                input.value = '';
                if (!isDelete) {
                    return;
                }
            }

            this.combinedInput = '';
            this.otpInputs.forEach(itemInput => {
                if (itemInput.value) {
                    this.combinedInput += itemInput.value;
                }
            });

            if (this.alpineContainer) {
                const alpineData = Alpine.$data(this.alpineContainer);
                alpineData.validateInputEmail(this.combinedInput);
            }

            if (isDelete) {
                event.preventDefault();
                if (value !== '') {
                    input.value = '';
                }
                if (index >= 1) {
                    this.otpInputs[index - 1].focus();
                    this.otpInputs[index - 1].select();
                }
            } else if (index < this.otpInputs.length - 1 && value !== '') {
                this.otpInputs[index + 1].focus();
            }
        },
        handlePaste(event) {
            const pastedText = event.clipboardData.getData('text');
            if (pastedText.length === 6) {
                this.otpInputs.forEach((input, index) => {
                    input.value = pastedText[index] || '';
                    this.combinedInput += input.value;
                });
                this.otpInputs[5].focus();
                this.validateInputEmail(this.combinedInput);
            } else {
                console.log('Pasted value not a valid OTP code');
                event.preventDefault();
            }
        },
        handleEnter(event) {
            event.preventDefault();
            this.initiateCheck();
        },
        handleFocus(event) {
            const firstInput = document.getElementById('email-code1');
            if (firstInput && firstInput.value === '') {
                setTimeout(() => {
                    firstInput.focus();
                }, 100);
            }
        }
    };
}
function otpCountdown() {
    return {
        initialSeconds: 30,
        timeLeft: 30,
        isTimerDone: false,
        timer: null,

        startTimer() {
            this.stopTimer();

            this.isTimerDone = false;
            this.timeLeft = this.initialSeconds;

            this.timer = setInterval(() => {
                if (this.timeLeft > 0) {
                    this.timeLeft--;
                } else {
                    this.stopTimer();
                    this.isTimerDone = true;
                }
            }, 1000);
        },

        stopTimer() {
            if (this.timer) {
                clearInterval(this.timer);
            }
        },

        resetTimer() {
            this.startTimer();
        }
    }
}
window.addEventListener('alpine:init', () => Alpine.data('otpCountdown', otpCountdown), {once: true});
function getNviSidebar() { return (window.Alpine && Alpine.store('nviSidebar')) || window.sidebarState || null; }
function nVIDiscountContactsHeaderDynamicStepEmail() {
    return Object.assign(
        {
            otpSent: false,
            remainingAttempts: 0,
            maxAttemptsExhausted: false,
            currentStep: (window.Alpine && Alpine.store('nviSidebar') ? Alpine.store('nviSidebar').currentStep : 4),
            isInputValid: false,
            isLoading: false,
            validateInputEmail(combinedInput = null) {
                if (combinedInput) {
                    this.isInputValid = combinedInput.length === 6;
                }
            },
            validateOnStepLoad() {
                const emailOtpInput = this.$refs['email-otp'];
                if (emailOtpInput && emailOtpInput.value !== '') {
                    this.validateInputEmail({ target: emailOtpInput });
                }
                this.$nextTick(() => {
                    const firstInput = document.getElementById('email-code1');
                    if (firstInput) {
                        setTimeout(() => {
                            firstInput.focus();
                        }, 100);
                    }
                });
            },
            sendCode() {
                this.$dispatch('resend-otp');
                const store = getNviSidebar();
                if (store && typeof store.sendOtp === 'function') { store.sendOtp(); }
                const elMessage = document.getElementById('messageStep4');
                if (elMessage) {
                    elMessage.classList.remove('hidden');
                    elMessage.classList.remove('error');
                    elMessage.classList.add('success');
                    elMessage.innerText = 'Code\u0020Sent\u0021';
                }
            },
            handleSendCodeResponse(response) {
                this.maxAttemptsExhausted = response.max_attempts_exhausted ?? false;
                this.remainingAttempts = response.remaining_attempts ?? 0;
                const elMessage = document.getElementById('messageStep4');
                if (response.success) {
                    if (elMessage) {
                        elMessage.classList.remove('hidden');
                        elMessage.classList.remove('error');
                        elMessage.classList.add('success');
                        elMessage.innerText = 'Code\u0020Sent\u0021';
                        this.otpSent = true;
                    }
                } else {
                    if (elMessage) {
                        elMessage.classList.remove('hidden');
                        elMessage.classList.add('error');
                        elMessage.classList.remove('success');
                        elMessage.innerHTML = '<span>'+response.message+'</span>';
                    }
                }
            },
            initiateCheck() {
                if (!this.isInputValid) {
                    return;
                }
                this.isLoading = true;
                const elEmailOTPContainer = document.getElementById('loginEmailOTPStep');
                if (elEmailOTPContainer) {
                    const elsSMSOTP = Array.from(elEmailOTPContainer.querySelectorAll('.otp-input'));
                    let combinedValue = '';
                    if (elsSMSOTP.length) {
                        elsSMSOTP.forEach( el => combinedValue += el.value);
                    }
                    getNviSidebar().updateUserEnteredOTPCode(combinedValue);
                }
                getNviSidebar().verify(response => {
                    const elMessage = document.getElementById('messageStep4');
                    this.remainingAttempts = response.remaining_attempts ?? 0;
                    if (response.success === true) {
                        // Confirm Login and Reload page
                        if (elMessage) {
                            elMessage.classList.remove('hidden');
                            elMessage.classList.remove('error');
                            elMessage.classList.add('success');
                            elMessage.innerText = 'Login\u0020successful.\u0020Reloading\u0020page.';
                            window.dataLayer.push({'ecommerce': {
                                'event': 'SignInAttempt',
                                'status': 'Attempt'}
                            });
                            // Push login success event
                            window.dataLayer.push({
                                'event': 'SignInStatus',
                                'ecommerce': {
                                'event': 'SignInStatus',
                                'status': 'Success',
                                'reason': response.message
                                }
                            });
                        }
                        setTimeout(() => {
                            console.log('redirecting to ', getNviSidebar().redirectUrl);
                            window.location.assign(getNviSidebar().redirectUrl);
                        }, 1000);
                    } else {
                        // Code failed
                        this.isLoading = false;
                        if (elMessage) {
                            elMessage.classList.remove('hidden');
                            elMessage.classList.add('error');
                            elMessage.classList.remove('success');
                            let msg = response.remaining_attempts_msg ? response.message + response.remaining_attempts_msg : response.message;
                            elMessage.innerHTML = '<span>'+response.message+'</span>';
                            window.dataLayer.push({'ecommerce': {
                                'event': 'SignInAttempt',
                                'status': 'Attempt'}
                            });

                            // Push login failed event
                            window.dataLayer.push({
                                'event': 'SignInFailed',
                                'ecommerce': {
                                'event': 'SignInFailed',
                                'status': 'Fail',
                                'reason': response.message
                            }
                            });
                        }
                        this.isInputValid = false;
                    }
                });
            }
        }
        ,{
            ['nVIDiscountContactsHeaderDynamicStepEmailChange357'](event) {return this.moveToNext(this.$event, this.index)},
            ['nVIDiscountContactsHeaderDynamicStepEmailClass365']() {return { 'btn-loading': this.isLoading }},
            ['nVIDiscountContactsHeaderDynamicStepEmailClick352'](event) {
                const store = getNviSidebar();
                if (store && typeof store.updateStep === 'function') {
                    store.updateStep(2);
                } else if (this.$dispatch) {
                    this.$dispatch('step-change', 2);
                }
            },
            ['nVIDiscountContactsHeaderDynamicStepEmailClick353'](event) {
                const store = getNviSidebar();
                if (store && typeof store.updateStep === 'function') {
                    store.updateStep(1);
                } else if (this.$dispatch) {
                    this.$dispatch('step-change', 1);
                }
            },
            ['nVIDiscountContactsHeaderDynamicStepEmailClick363'](event) { return this.sendCode()},
            ['nVIDiscountContactsHeaderDynamicStepEmailDisabled364']() {return !this.isInputValid || this.isLoading},
            ['nVIDiscountContactsHeaderDynamicStepEmailFocus361'](event) {return this.handleFocus(this.$event)},
            ['nVIDiscountContactsHeaderDynamicStepEmailFor355']() {return ['email-code1', 'email-code2', 'email-code3', 'email-code4', 'email-code5', 'email-code6']},
            ['nVIDiscountContactsHeaderDynamicStepEmailInit350']() {this.validateInputEmail(); this.$watch(() => (window.Alpine && Alpine.store('nviSidebar') ? Alpine.store('nviSidebar').currentStep : this.currentStep), (value) => { if (typeof value !== 'undefined') this.currentStep = value; });},
            ['nVIDiscountContactsHeaderDynamicStepEmailInit354']() {return this.init()},
            ['nVIDiscountContactsHeaderDynamicStepEmailInput356'](event) {return this.moveToNext(this.$event, this.index)},
            ['nVIDiscountContactsHeaderDynamicStepEmailKeydownBackspace358'](event) {return this.moveToNext(this.$event, this.index, true)},
            ['nVIDiscountContactsHeaderDynamicStepEmailKeydownEnter359'](event) {return this.handleEnter(this.$event)},
            ['nVIDiscountContactsHeaderDynamicStepEmailKeydownSpace360'](event) {return this.handleEnter(this.$event)},
            ['nVIDiscountContactsHeaderDynamicStepEmailPaste362'](event) {return this.handlePaste(this.$event)},
            ['nVIDiscountContactsHeaderDynamicStepEmailShow349']() {return this.currentStep === 4},
            ['nVIDiscountContactsHeaderDynamicStepEmailShow366']() {return this.isLoading !== true},
            ['nVIDiscountContactsHeaderDynamicStepEmailShow367']() {return this.isLoading === true},
            ['nVIDiscountContactsHeaderDynamicStepEmailStepChangeWindow351'](event) {if (this.$event.detail === 4) this.validateOnStepLoad()},
        }
    )
}
window.addEventListener('alpine:init', () => Alpine.data('nVIDiscountContactsHeaderDynamicStepEmail', nVIDiscountContactsHeaderDynamicStepEmail), {once: true});
function nVIDiscountContactsHeaderDynamicStepEmail1() {
    return Object.assign(
        Object.assign(otpInputEmail(), nVIDiscountContactsHeaderDynamicStepEmail())
    )
}
window.addEventListener('alpine:init', () => Alpine.data('nVIDiscountContactsHeaderDynamicStepEmail1', nVIDiscountContactsHeaderDynamicStepEmail1), {once: true});
</script>
    
<li
    class="sidebar-step"
    x-show="currentStep === 10"
    @step-change.window="if ($event.detail === 10) initHyvaValidation($event.detail)"
    @value-updated.window="nVIRegisterValueUpdatedWindow"
    x-data="nVIDiscountContactsHeaderDynamicStepRegister"
    x-init="nVIRegisterInit; validateInput();">
    <form
        id="registrationForm"
        class="flex flex-col gap-6"
        x-data="hyva.formValidation($el)"
        @submit.prevent>
        <p id="authenticate-customer-create-account" class="flex flex-col gap-6">
            <strong class="font-bold text-3xl leading-none">Create an Account</strong>
            <button
                class="menu-link inline-flex items-center text-sm font-normal pt-2 pb-2 pr-4"
                type="button"
                @click="nVIRegisterBackClick">
                <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                    <g clip-path="url(#clip0_885_2328)">
                        <path d="M12.842 6.175L11.667 5L6.66699 10L11.667 15L12.842 13.825L9.02533 10L12.842 6.175Z" fill="currentColor"/>
                    </g>
                    <defs>
                        <clipPath id="clip0_885_2328">
                            <rect width="20" height="20" fill="white" />
                        </clipPath>
                    </defs>
                </svg>
                Back            </button>
        </p>
        <div class="register-fields flex flex-col gap-6">
            <div class="field first-name required">
                <label class="label font-bold" for="form-register-firstname">
                    <span>First Name</span>
                </label>
                <div class="control">
                    <input name="register-firstname"
                        id="form-register-firstname"
                        type="text"
                        placeholder="First&#x20;Name"
                        x-model="inputs.firstname"
                        data-validate='{"name": true}'
                        @input="nVIRegisterFirstNameInput"
                        autocomplete="firstname"
                        required
                        class="form-input input-text w-full" />
                </div>
            </div>
            <div class="field last-name required">
                <label class="label font-bold" for="form-register-lastname">
                    <span>Last Name</span>
                </label>
                <div class="control">
                    <input name="register-lastname"
                        id="form-register-lastname"
                        type="text"
                        placeholder="Last&#x20;Name"
                        x-model="inputs.lastname"
                        data-validate='{"name": true}'
                        @input="nVIRegisterLastNameInput"
                        autocomplete="lastname"
                        required
                        class="form-input input-text w-full" />
                </div>
            </div>
            <div class="field email required">
                <label class="label font-bold" for="form-register-email">
                    <span>Email</span>
                </label>
                <div class="control">
                    <input name="register-email"
                        id="form-register-email"
                        type="email"
                        placeholder="Email"
                        x-model="inputs.email"
                        @input="validateInput"
                        autocomplete="email"
                        required
                        class="form-input input-text w-full" />
                </div>
            </div>
            <div
                x-data="nVIRegisterPasswordField"
                class="field password required">
                <label class="label font-bold" for="form-register-password">
                    <span>Password</span>
                </label>
                <div class="control password-toggle relative">
                    <input name="register-password"
                        id="form-register-password"
                        :type="showPassword ? 'text' : 'password'"
                        x-model="inputs.password"
                        @input="validateInput"
                        @change="showValidationMessage"
                        @keydown.enter="handleEnterEvent($event)"
                        autocomplete="new-password"
                        required
                        minlength="8"
                        placeholder="Enter&#x20;Password"
                        class="form-input input-text w-full pl-12" />
                    <button type="button" @click="showPassword = !showPassword" class="btn-icon absolute right-4 top-3 text-brandBlue hover:text-brandDisabled hover:bg-transparent">
                        <span x-show="!showPassword">
                            <span class="sr-only">Show Password</span>
                            <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 22 22">
                                <g transform="matrix(.02146 0 0 .02146 1 1)" fill="currentColor">
                                    <path d="m466.07 161.53c-205.6 0-382.8 121.2-464.2 296.1-2.5 5.3-2.5 11.5 0 16.9 81.4 174.9 258.6 296.1 464.2 296.1 205.6 0 382.8-121.2 464.2-296.1 2.5-5.3 2.5-11.5 0-16.9-81.4-174.9-258.6-296.1-464.2-296.1m0 514.7c-116.1 0-210.1-94.1-210.1-210.1 0-116.1 94.1-210.1 210.1-210.1 116.1 0 210.1 94.1 210.1 210.1 0 116-94.1 210.1-210.1 210.1" />
                                    <circle cx="466.08" cy="466.02" r="134.5" />
                                </g>
                            </svg>
                        </span>
                        <span x-show="showPassword">
                            <span class="sr-only">Hide Password</span>
                            <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                                <path fill-rule="evenodd" clip-rule="evenodd" d="M3.70711 2.29289C3.31658 1.90237 2.68342 1.90237 2.29289 2.29289C1.90237 2.68342 1.90237 3.31658 2.29289 3.70711L16.2929 17.7071C16.6834 18.0976 17.3166 18.0976 17.7071 17.7071C18.0976 17.3166 18.0976 16.6834 17.7071 16.2929L16.2339 14.8197C17.7715 13.5924 18.939 11.9211 19.5424 9.99996C18.2681 5.94288 14.4778 3 10.0002 3C8.37665 3 6.84344 3.38692 5.48779 4.07358L3.70711 2.29289ZM7.96813 6.55391L9.48201 8.0678C9.6473 8.02358 9.82102 8 10.0003 8C11.1048 8 12.0003 8.89543 12.0003 10C12.0003 10.1792 11.9767 10.353 11.9325 10.5182L13.4463 12.0321C13.7983 11.4366 14.0003 10.7419 14.0003 10C14.0003 7.79086 12.2094 6 10.0003 6C9.25838 6 8.56367 6.20197 7.96813 6.55391Z" fill="currentColor"/>
                                <path d="M12.4541 16.6967L9.74965 13.9923C7.74013 13.8681 6.1322 12.2601 6.00798 10.2506L2.33492 6.57754C1.50063 7.57223 0.856368 8.73169 0.458008 10C1.73228 14.0571 5.52257 17 10.0002 17C10.8469 17 11.6689 16.8948 12.4541 16.6967Z" fill="currentColor"/>
                            </svg>
                        </span>
                    </button>
                </div>
                <div class="flex flex-wrap">
                    <p class="text-brandDisabled text-sm pt-2" x-show="passwordIsEmpty">8 Characters minimum. </p>
                    <p class="text-red text-sm pt-1" x-show="!passwordIsEmpty && !passwordIsValid">Please enter at least 8 Characters</p>

                    <div class="pt-1" x-data="nVIRegisterPasswordInfo">
                                            <div class="mb-2">
                            <button type="button" class="link" @click="showPasswordInfo = !showPasswordInfo">Learn about secure passwords.</button>                        </div>
                        <div class="" x-show="showPasswordInfo" x-cloak>
                            <style>.cmsb109-mb-1 {
margin-bottom: 0.25rem
}
.cmsb109-mb-2 {
margin-bottom: 0.5rem
}
.cmsb109-mt-4 {
margin-top: 1rem
}
.cmsb109-flex {
display: flex
}
.cmsb109-list-inside {
list-style-position: inside
}
.cmsb109-list-disc {
list-style-type: disc
}
.cmsb109-gap-6 {
gap: 1.5rem
}
.cmsb109-p-6 {
padding: 1.5rem
}
.cmsb109-text-sm {
font-size: 0.875rem;
line-height: 1.25rem
}
.cmsb109-font-normal {
font-weight: 400
}</style>
<div data-content-type="html" data-appearance="default" data-element="main" data-decoded="true"><div class="password-information cmsb109-mt-4 cmsb109-p-6 message warning">
    <div class="cmsb109-flex cmsb109-gap-6">
        <div>
            <svg width="21" height="21" viewBox="0 0 21 21" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path d="M10.8554 7.78615C11.6991 7.78615 12.3831 7.10218 12.3831 6.25846C12.3831 5.41474 11.6991 4.73077 10.8554 4.73077C10.0117 4.73077 9.32769 5.41474 9.32769 6.25846C9.32769 7.10218 10.0117 7.78615 10.8554 7.78615Z" fill="currentColor"/>
                <path d="M8.44154 8.44154C8.44154 8.44154 7.92 8.45077 7.92 8.80615C7.92 9.16154 8.25231 9.23077 8.39077 9.23077C8.52923 9.23077 9.33692 9.08308 9.18 10.1262C9.02308 11.1692 8.49692 13.9892 8.49692 13.9892C8.49692 13.9892 8.18769 15.0554 8.96769 15.7477C9.74308 16.44 10.6985 16.2692 11.2062 16.1815C11.7185 16.0985 12.54 15.7569 12.9646 15.1477C13.1262 14.8938 13.0938 14.8154 12.9738 14.6908C12.8585 14.5615 12.7062 14.6354 12.5769 14.7231C12.4477 14.8062 11.8015 15.1292 11.5523 15.0323C11.0954 14.8292 11.1369 14.3077 11.1785 14.04C11.2108 13.8046 12.0646 9.37846 12.0646 9.37846C12.0646 9.37846 12.1477 8.82 11.9354 8.61231C11.7185 8.39539 11.2108 8.45077 11.2108 8.45077L8.44154 8.44154Z" fill="currentColor"/>
                <path d="M17.9262 3.07846C15.9369 1.09385 13.3015 0 10.5 0C7.68923 0 5.04923 1.08923 3.07385 3.07385C1.09385 5.05846 0 7.69846 0 10.5C0 13.3108 1.08923 15.9462 3.07385 17.9215C5.06308 19.9062 7.69846 21 10.5 21C13.3015 21 15.9415 19.9108 17.9262 17.9308C19.9108 15.9415 21.0046 13.3062 21.0046 10.5046C21.0046 7.69385 19.9108 5.05846 17.9262 3.07846ZM10.5 19.2323C5.68615 19.2323 1.76769 15.3138 1.76769 10.5C1.76769 5.68615 5.68615 1.76769 10.5 1.76769C15.3138 1.76769 19.2323 5.68615 19.2323 10.5C19.2323 15.3138 15.3138 19.2323 10.5 19.2323Z" fill="currentColor"/>
            </svg>
        </div>
        <div>
            <p class="cmsb109-font-normal cmsb109-text-sm cmsb109-mb-2">Account passwords must be at least 8 characters and are case sensitive.</p>
            <p class="cmsb109-font-normal cmsb109-text-sm cmsb109-mb-2"><strong>To create a secure password, follow the guidelines:</strong></p>
            <ul class="cmsb109-list-disc cmsb109-list-inside cmsb109-mb-2 cmsb109-font-normal cmsb109-text-sm">
                <li class="cmsb109-mb-1">Use a combination of upper case and lower case letters, numbers, and special characters (?_!@#).</li>
                <li class="cmsb109-mb-1">The longer the password, the more secure it is! But make sure it's easy to remember.</li>
                <li class="cmsb109-mb-1">This password should be different than any of your other online accounts (bank, social media, email).</li>
                <li>Don't use personal information (names, phone numbers, DOB) or common passwords (password, qwerty, sarah1231).</li>
            </ul>
            <p class="cmsb109-font-normal cmsb109-text-sm"><strong>Note:</strong> We will never ask you to provide your password by e-mail or phone.</p>
        </div>
    </div>
</div></div>                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div>
            <p class="text-sm">
                                By clicking Create Account, you acknowledge you have read and agreed to our <a href="/terms" class="link" target="_blank">Terms &amp; Conditions</a> and <a href="/privacy-policy" class="link" target="_blank">Privacy Policy</a>.            </p>
        </div>
                <div>
            <div id="messageStep10" class="message block hidden text-bold border-2 p-2 my-4"></div>
            <div class="flex">
                <button
                    type="submit"
                    @click="initiateCheck"
                    :disabled="!isInputValid || isLoading"
                    class="btn btn-primary w-full justify-center"
                    :class="{ 'btn-loading': isLoading }">
                    <span x-show="isLoading !== true">
                        Create Account                    </span>
                    <span x-cloak x-show="isLoading === true">
                        Loading                        <svg width="24" height="24" class="ml-4" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><style>.spinner_P7sC{transform-origin:center;animation:spinner_svv2 .75s infinite linear}@keyframes spinner_svv2{100%{transform:rotate(360deg)}}</style><path d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z" class="spinner_P7sC" fill="currentColor"/></svg>
                    </span>
                </button>
            </div>
        </div>
    </form>
    <script>
        function getNviSidebar() { return (window.Alpine && Alpine.store('nviSidebar')) || window.sidebarState || null; }
        function nVIDiscountContactsHeaderDynamicStepRegister() {
            return Object.assign(
                {
                    currentStep: (window.Alpine && Alpine.store('nviSidebar') ? Alpine.store('nviSidebar').currentStep : 10),
                    isInputValid: false,
                    isLoading: false,
                    passwordIsEmpty: true,
                    passwordIsValid: false,
                    elForm: document.getElementById('registrationForm'),
                    inputs: {
                        firstname: '',
                        lastname: '',
                        email: '',
                        password: ''
                    },
                    errors: {
                        firstname: false,
                        lastname: false,
                        email: false,
                        password: false
                    },
                    initHyvaValidation(step) {
                        this.currentStep = step;
                        this.$nextTick(() => {
                            if (this.elForm) {
                                hyva.formValidation(this.elForm);
                            }
                        });
                    },
                    handleEnterEvent(event) {
                        this.validateInput(event);
                        this.initiateCheck();
                    },
                    showValidationMessage() {
                        if (this.inputs.password.length === 0) {
                            this.passwordIsEmpty = true;
                            this.passwordIsValid = false;
                        } else if (this.inputs.password.length < 8) {
                            this.passwordIsEmpty = false;
                            this.passwordIsValid = false;
                        } else {
                            this.passwordIsEmpty = false;
                            this.passwordIsValid = true;
                        }
                    },
                    validateInput() {
                        this.errors.firstname = this.inputs.firstname === '';
                        this.errors.lastname = this.inputs.lastname === '';
                        const regEmail = this.inputs.email || '';
                        this.errors.email = !regEmail.includes('@') || regEmail === '';
                        this.errors.password = this.inputs.password === '' || this.inputs.password.length < 8;
                        this.isInputValid = Object.values(this.errors).every(error => error === false);
                    },
                    initiateCheck() {
                        if (!this.isInputValid) {
                            return;
                        }

                        if (this.elForm) {
                            hyva.formValidation(this.elForm).validate().then(() => {
                                this.isLoading = true;
                                const { firstname, lastname, email, password } = this.inputs;
                                const store = getNviSidebar();
                                if (store) {
                                    store.updateUserEnteredFName && store.updateUserEnteredFName(firstname);
                                    store.updateUserEnteredLName && store.updateUserEnteredLName(lastname);
                                    store.updateUserEnteredEmail && store.updateUserEnteredEmail(email);
                                    store.updateUserEnteredNewPW && store.updateUserEnteredNewPW(password);
                                }
                                (store && typeof store.register === 'function' ? store.register.bind(store) : (cb)=>cb({success:false,message:'Sidebar store not available'}))(response => {
                                    const elMessage = document.getElementById('messageStep10');
                                    if (response.success === true) {
                                        this.isLoading = false;
                                        // Confirm Registration and Reload page
                                        if (elMessage) {
                                            elMessage.classList.remove('hidden');
                                            elMessage.classList.remove('error');
                                            elMessage.classList.add('success');
                                            elMessage.innerText = 'Registration\u0020successful.\u0020Reloading\u0020page.';
                                        }
                                        setTimeout(() => {
                                            const redirectUrl = getNviSidebar() ? getNviSidebar().redirectUrl : window.location.href;
                                            console.log('redirecting to ', redirectUrl);
                                            window.location.assign(redirectUrl);
                                        }, 1000);
                                    } else {
                                        this.isLoading = false;
                                        if (elMessage) {
                                            elMessage.classList.remove('hidden');
                                            elMessage.classList.add('error');
                                            elMessage.classList.remove('success');
                                            elMessage.innerHTML = `${response.message.replace(/\r?\n/g, '<br>')}`;
                                            const elMessageLink = elMessage.querySelector('a');
                                            if (elMessageLink) {
                                                elMessageLink.addEventListener('click', e => {
                                                    e.preventDefault();
                                                    this.$dispatch('step-change', 1)
                                                });
                                            }
                                        }
                                    }
                                });
                            }).catch((invalidFields) => {
                                console.warn('Validation failed', invalidFields);
                                invalidFields[0]?.focus();
                            });
                        }
                    }
                },
                {
                    ['nVIRegisterInit']() { this.$watch(() => (window.Alpine && Alpine.store('nviSidebar') ? Alpine.store('nviSidebar').currentStep : this.currentStep), (value) => { if (typeof value !== 'undefined') this.currentStep = value; }); },
                    ['nVIRegisterBackClick'](event) {
                        const store = getNviSidebar();
                        if (store && typeof store.updateStep === 'function') {
                            store.updateStep(1);
                        } else if (this.$dispatch) {
                            this.$dispatch('step-change', 1);
                        }
                    },
                    ['nVIRegisterFirstNameInput'](event) {
                        this.inputs.firstname = event?.target?.value || '';
                        this.validateInput();
                        try { localStorage.setItem('registeredFName', this.inputs.firstname); } catch (e) {}
                    },
                    ['nVIRegisterLastNameInput'](event) {
                        this.inputs.lastname = event?.target?.value || '';
                        this.validateInput();
                        try { localStorage.setItem('registeredLName', this.inputs.lastname); } catch (e) {}
                    },
                    ['nVIRegisterValueUpdatedWindow'](event) {
                        if (event && event.detail && 'value' in event.detail) {
                            this.inputs.email = event.detail.value;
                            this.validateInput();
                        }
                    }
                }
            );
        }
        window.addEventListener('alpine:init', () => Alpine.data('nVIDiscountContactsHeaderDynamicStepRegister', nVIDiscountContactsHeaderDynamicStepRegister), { once: true });

        function nVIRegisterPasswordField() { return { showPassword: false } }
        window.addEventListener('alpine:init', () => Alpine.data('nVIRegisterPasswordField', nVIRegisterPasswordField), { once: true });

        function nVIRegisterPasswordInfo() { return { showPasswordInfo: false } }
        window.addEventListener('alpine:init', () => Alpine.data('nVIRegisterPasswordInfo', nVIRegisterPasswordInfo), { once: true });

        // Add name Validation Rule
        hyva.formValidation.addRule('name', (value, options, field, context) => {
            if (value && value.length && /[^a-zA-Z]/.test(value)) {
                return 'Name\u0020must\u0020not\u0020contain\u0020spaces,\u0020numbers\u0020or\u0020special\u0020characters.';
            }
            return true;
        });
    </script>
    </li>
</ul>


                    </div>
                </div>
            </template>
        </div>
    </div>
</section>
</div>

<script>
function nVIDiscountContactsHtmlHeader() {
    return Object.assign(
        initHeader()
        ,{
            ['nVIDiscountContactsHtmlHeaderAriaDisabled471']() {return this.isCartEmpty()},
            ['nVIDiscountContactsHtmlHeaderAriaLabel472']() {return `
                    this.$el.dataset.hyvacsp1,
                    ${this.isCartEmpty()
                        ? `${this.$el.dataset.hyvacsp2}`
                        : this.cart.summary_count > 1
                            ? hyva.str(`${this.$el.dataset.hyvacsp3}`, this.cart.summary_count)
                            : hyva.str(`${this.$el.dataset.hyvacsp4}`, this.cart.summary_count)
                    }`},
            ['nVIDiscountContactsHtmlHeaderClickPreventStop473'](event) {return (() => {
                        this.$dispatch('toggle-cart', { isOpen: true })
                    })()},
            ['nVIDiscountContactsHtmlHeaderPrivateContentLoadedWindow470'](event) {return this.getData(event.detail.data)},
            ['nVIDiscountContactsHtmlHeaderShow476']() {return !this.isCartEmpty()},
            ['nVIDiscountContactsHtmlHeaderText475']() {return this.cart.summary_count},
            ['nVIDiscountContactsHtmlHeaderToggleCartWindow474'](event) {return this.toggleCart(this.$event)},
        }
    )
}
window.addEventListener('alpine:init', () => Alpine.data('nVIDiscountContactsHtmlHeader', nVIDiscountContactsHtmlHeader), {once: true});
</script>
</header><div class="top-container"><nav class="breadcrumbs" aria-label="Breadcrumb">
    <div class="container">
        <ol class="items list-reset py-3 rounded flex flex-wrap text-grey text-sm">
                            <li class="item flex home">
                                                                <a href="https://www.discountcontacts.com/"
                        class="no-underline hover:underline"
                        title="Go&#x20;to&#x20;Home&#x20;Page"
                        >Home</a>
                                    </li>
                            <li class="item flex cms_page">
                                            <span aria-hidden="true" class="separator px-2">
                            <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                                <g clip-path="url(#clip0_300_678)">
                                    <path d="M8.3332 5L7.1582 6.175L10.9749 10L7.1582 13.825L8.3332 15L13.3332 10L8.3332 5Z" fill="#323232"/>
                                </g>
                                <defs>
                                    <clipPath id="clip0_300_678">
                                        <rect width="20" height="20" fill="white"/>
                                    </clipPath>
                                </defs>
                            </svg>
                        </span>
                                                                <span
                        class="text-primary-lighter"
                        aria-current="page"
                        >AC Lens | Welcome to Discount Contacts </span>
                                    </li>
                    </ol>
    </div>
</nav>
</div><main id="maincontent" class="page-main-full-width"><div id="contentarea" tabindex="-1"></div>
<div class="page messages"><script>
        window.defaultSuccessMessageTimeout = 5000;
        function initMessages() {
        "use strict";
        return {
            messages: window.mageMessages || [],
            isEmpty() {
                return this.messages.reduce(
                    function (isEmpty, message) {
                        return isEmpty && message === undefined
                    }, true
                )
            },
            removeMessage(messageIndex) {
                this.messages[messageIndex] = undefined;
            },
            addMessages(messages, hideAfter) {
                messages.map((message) => {
                    this.messages = this.messages.concat(message);
                    if (hideAfter === undefined && message.type === 'success' && window.defaultSuccessMessageTimeout) {
                        hideAfter = window.defaultSuccessMessageTimeout;
                    }
                    if (hideAfter) {
                        // If the hideAfter is set to 1 hour, set it to 3 seconds
                        if (hideAfter === 3600000) {
                            hideAfter = 3000;
                        }
                        this.setHideTimeOut(this.messages.length -1, hideAfter);
                    }
                });
            },
            setHideTimeOut(messageIndex, hideAfter) {
                setTimeout((messageIndex) => {
                    this.removeMessage(messageIndex);
                }, hideAfter, messageIndex);
            },
            eventListeners: {
                ['@messages-loaded.window'](event) {
                    this.addMessages(event.detail.messages, event.detail.hideAfter)
                },
                ['@private-content-loaded.window'](event) {
                    const data = event.detail.data;
                    if (
                        data.messages &&
                        data.messages.messages &&
                        data.messages.messages.length
                    ) {
                        this.addMessages(data.messages.messages);
                    }
                },
                ['@clear-messages.window']() {
                    this.messages = [];
                }
            }
        }
    }
</script>
<section id="messages"
         x-data="nVIDiscountContactsMessages"
         x-bind="eventListeners"
         aria-live="assertive"
         role="alert"
>
    <template x-if="nVIDiscountContactsMessagesIf487">
        <div class="w-full">
            <div class="messages container mx-auto py-3">
                <template x-for="(message, index) in messages" :key="index">
                    <div>
                        <template x-if="message">
                            <div class="message" :class="nVIDiscountContactsMessagesClass488"
                                 :ui-id="nVIDiscountContactsMessagesUiId489"
                            >
                                <span x-html="nVIDiscountContactsMessagesHtml490"></span>
                                <button
                                    type="button"
                                    class="text-gray-600 hover:text-black"
                                    aria-label="Close message"
                                    @click.prevent="nVIDiscountContactsMessagesClickPrevent491"
                                >
                                    <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="stroke-current" width="18" height="18" aria-hidden="true">
  <path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"/>
</svg>
                                </button>
                            </div>
                        </template>
                    </div>
                </template>
            </div>
        </div>
    </template>
</section>
<script>
function nVIDiscountContactsMessages() {
    return Object.assign(
        initMessages()
        ,{
            ['nVIDiscountContactsMessagesClass488']() {return this.message.type},
            ['nVIDiscountContactsMessagesClickPrevent491'](event) {return this.removeMessage(this.index)},
            ['nVIDiscountContactsMessagesHtml490']() {return this.message?.text},
            ['nVIDiscountContactsMessagesIf487']() {return !this.isEmpty()},
            ['nVIDiscountContactsMessagesUiId489']() {return 'message-' + this.message.type},
        }
    )
}
window.addEventListener('alpine:init', () => Alpine.data('nVIDiscountContactsMessages', nVIDiscountContactsMessages), {once: true});
</script>
</div><div class="columns"><div class="column main"><style>.cmsp85-block {
display: block
}</style>
<div data-content-type="block" data-appearance="default" data-element="main"><div class="widget block block-static-block">
    <style>.cmsb121-absolute {
position: absolute
}
.cmsb121-relative {
position: relative
}
.cmsb121-block {
display: block
}
.cmsb121-flex {
display: flex
}
.cmsb121-hidden {
display: none
}
.cmsb121-border {
border-width: 1px
}
.cmsb121-blur {
--tw-blur: blur(8px);
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)
}
.cmsb121-backdrop-filter {
-webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)
}</style>
<div data-content-type="html" data-appearance="default" data-element="main" data-decoded="true"><style>
.contacts-category-hero {
  box-shadow: inset 0 0 12px rgb(0 0 0 / 0.35);
  position: relative;
  width: 100%;
  background: #c6e3f3;
  margin-bottom: 3rem;
}
.hero-header {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 0 100px;
}
.hero-header img {
  width: 180px;
  margin-bottom: 12px;
}
.hero-header .lockup {
  font-size: 1rem;
  line-height: 1.5rem;
  width: 100%;
  border-radius: 12px;
  padding: 20px;
}

.hero-header .lockup h1{
  font-size: 1.5rem;
font-weight: 700;
}

.hero-header .lockup h3{
  font-size: 1.5rem;
}
.lens-brands {
  background-color: #fff;
  max-width: 1200px;
  margin: -20px auto;
  padding: 12px 0 0 12px;
  box-shadow: 0 0 8px rgb(0 0 0 / 0.35);
}
.lens-brands::after {
  content: "";
  z-index: 1;
  display: block;
  width: 100%;
  height: 206px;
  left: 0;
  position: absolute;
  background-image: linear-gradient(rgba(255, 255, 255, 0), #fff 30%);
  margin-top: -196px;
}
.lens-brands a {
  display: inline-block;
  position: relative;
  z-index: 2;
  margin: 0 6px 6px 0;
  width: 227px;
  height: 80px;
  text-indent: -9999px;
  overflow: hidden;
  border: 1px solid #ccc;
  border-radius: 2px;
}
.lens-brands a:hover {
  box-shadow: inset 0 4px 6px rgb(0 0 0 / 0.15);
}
.hero-header .a-btn {
  margin-top: 30px;
}
.hero h1,
.hero h2 {
  font-size: 32px;
  color: var(--color-blue-dark);
  line-height: 1em;
  margin: 0 0 0.4em;
}
.hero h2 {
  font-size: 24px;
}
.lens-brands a.shop-all {
  text-indent: 0;
  font-size: 14px;
  color: var(--color-blue-dark);
  border-color: #fff;
  text-align: center;
  padding: 32px 0 32px;
  height: 22px;
  text-decoration: none;
}
.lens-brands a.shop-all:hover {
  box-shadow: none;
}
@media (max-width: 1240px) {
  .hero {
    background-position: calc(50% + 40px) top;
    background-size: auto 85%;
  }
  .hero-header {
    max-width: 992px;
    padding: 30px 0 80px;
  }
  .lens-brands {
    max-width: 992px;
    margin: -20px auto;
  }
  .lens-brands::after {
    height: 206px;
    background-image: linear-gradient(rgba(255, 255, 255, 0), #fff 30%);
    margin-top: -196px;
  }
  .lens-brands a {
    margin: 0 6px 6px 0;
    width: 186px;
  }
}
@media (max-width: 1060px) {
  .hero {
    background-size: auto 65%;
  }
  .hero-header {
    max-width: 800px;
  }

  .hero-header .lockup {
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
  }
  .lens-brands {
    max-width: 800px;
  }
  .lens-brands::after {
    height: 312px;
    background-image: linear-gradient(rgba(255, 255, 255, 0), #fff 20%);
    margin-top: -306px;
  }
}
@media (max-width: 840px) {
  .hero-header {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px 0 54px;
  }
  .hero {
    background-size: auto 60%;
    background-position: calc(50% + 80px) top;
  }
  .hero-header .lockup {
    width: 100%;
  }
  .lens-brands {
    max-width: 600px;
  }
  .lens-brands::after {
    height: 394px;
    margin-top: -366px;
    background-image: linear-gradient(rgba(255, 255, 255, 0), #fff 20%);
  }
  .lens-brands a.shop-all {
    margin: 0 208px 8px 208px;
    width: 186px;
    padding: 10px 0 10px;
  }
}
@media (max-width: 628px) {
  .hero-header {
    width: 100%;
    max-width: 345px;
    margin: 2rem auto 2rem;
    padding: 0;
  }
  .hero {
    background-size: auto 60%;
    background-position: calc(50% + 10px) -6%;
  }
  .hero-header .lockup {
    width: 100%;
    max-width: 345px;
  }
  .hero h2 {
    font-size: 1.2em;
    line-height: 1.4em;
  }
  .hero-header .a-btn {
    margin-top: 10px;
    padding: 12px 20px !important;
    width: 218px;
  }
  .lens-brands {
    max-width: 345px;
    padding: 10px 0 0 10px;
  }
  .lens-brands::after {
    height: 430px;
    margin-top: -420px;
    background-image: linear-gradient(rgba(255, 255, 255, 0), #fff 20%);
  }
  .lens-brands a {
    width: 158px;
    height: 70px;
    margin: 0 6px 6px 0;
  }
  .lens-brands a.shop-all {
    width: 157px;
    margin: 0;
    padding: 10px 0 10px;
    height: 42px;
  }
}

.lens-brands a.precision-1 {
  background: url("https://www.discountcontacts.com/media/wysiwyg/HomePage/precision-1.svg")
    center center / 74% 80% no-repeat;
}
.lens-brands a.acuvue {
  background: url("https://www.discountcontacts.com/media/wysiwyg/HomePage/acuvue.svg")
    center center / 80% 80% no-repeat;
}
.lens-brands a.air-optix {
  background: url("https://www.discountcontacts.com/media/wysiwyg/HomePage/air-optix.svg")
    center center / 90% 80% no-repeat;
}
.lens-brands a.biofinity {
  background: url("https://www.discountcontacts.com/media/wysiwyg/HomePage/biofinity.svg")
    center center / 74% 80% no-repeat;
}
.lens-brands a.biotrue {
  background: url("https://www.discountcontacts.com/media/wysiwyg/HomePage/biotrue.svg")
    center center / 74% 80% no-repeat;
}
.lens-brands a.dailies {
  background: url("https://www.discountcontacts.com/media/wysiwyg/HomePage/dailies.svg")
    center center / 74% 80% no-repeat;
}
.lens-brands a.proclear {
  background: url("https://www.discountcontacts.com/media/wysiwyg/HomePage/proclear.svg")
    center center / 74% 80% no-repeat;
}
.lens-brands a.clariti {
  background: url("https://www.discountcontacts.com/media/wysiwyg/HomePage/clariti.svg")
    center center / 74% 80% no-repeat;
}
.lens-brands a.ultra {
  background: url("https://www.discountcontacts.com/media/wysiwyg/HomePage/bausch-lomb.svg")
    center center / 74% 80% no-repeat;
}
</style></div><div data-content-type="html" data-appearance="default" data-element="main" data-decoded="true"><div class="contacts-category-hero">   <div class="hero-header"> <div class="lockup"><h1>AC Lens is now Discount Contacts!</h1> <br>At Discount Contacts, you'll find even better prices on all major brands of contact lenses. Plus, save 30% on your first discountcontacts.com order with coupon code DCLNC30<br><br><form action="/all-contacts"><button class="btn btn-primary">Shop Contact Lenses</button></form>     </div>    </div>   <div class="lens-brands"> <a class="acuvue" href="/contacts/acuvue/c/500">Acuvue</a> <a class="air-optix" href="/contacts/air%E2%80%93optix/c/500">Air Optix</a> <a class="biofinity" href="/contacts/biofinity/c/500">Biofinity</a> <a class="biotrue" href="/contacts/biotrue%E2%80%93oneday/c/500">Biotrue</a> <a class="clariti" href="/contacts/clariti%E2%80%931day/c/500">Clariti</a><a class="dailies" href="/contacts/focus/c/500">Dailies</a> <a class="precision-1" href="/contacts/precision%E2%80%931/c/500">Precision 1</a><a class="proclear" href="/contacts/proclear/c/500">Proclear</a> <a class="ultra" href="/contacts/ultra/c/500">Ultra</a> <a class="shop-all" href="/contacts/c/500">Shop All Brands</a></div> </div></div></div>
</div>
<script>
    const rawRequest = "";
    const searchRequest = rawRequest ? JSON.parse(rawRequest) : null;

    const rawResponse = "";
    const searchResponse = rawResponse ? JSON.parse(rawResponse) : null;

    const rawExecutionTime = "0";
    const executionTime = rawExecutionTime ? parseFloat(rawExecutionTime) : null;

    const requestId = "ca88edd8\u002D1a30\u002D4028\u002Db2fd\u002D3db29adf6759";

    const rawAttributes = "";
    const attributes = rawAttributes ? JSON.parse(rawAttributes) : null;

    const rawPageSize = "12";
    const pageSize = rawPageSize ? parseInt(rawPageSize) : null;

    const customerGroup = "b6589fc6ab0dc82cf12099d1c2d40ab994e8410c";

    window.LiveSearchMetrics = {
        searchRequest,
        searchResponse,
        requestId,
        executionTime,
        attributes,
        pageSize,
        context: {
            'customerGroup' : customerGroup
        }
    };

    window.addEventListener('load', function () {
        magentoStorefrontEvents.context.setSearchExtension({
            version: "4.7.0"
        });
    })
</script>

<script>
    'use strict';

    window.addEventListener('DOMContentLoaded', () => {
        if (!window.magentoStorefrontEvents) {
            return;
        }

        magentoStorefrontEvents.context.setEventForwarding({
            aep: 'true',
        });

        magentoStorefrontEvents.context.setAEP({
            imsOrgId: '602B1E4C65DC57620A495C2E\u0040AdobeOrg',
            datastreamId: '82e2e552\u002Dcc72\u002D4144\u002D86e7\u002Dd44c7bfd0bc5',
            webSdkName: '',
        });

        magentoStorefrontEvents.context.setExperiencePlatformConnectorExtension({
            version: "3.2.1"
        });
    });
</script>

</div></div></main><footer class="page-footer"><div class="footer content"><div class="body-font">
    <div class="container pt-4 pb-8 lg:pb-4 lg:py-12 mx-auto lg:border-b-2">
        <div class="footer-upper-container flex color-black">
                            
    <div
        class=" snowdog-menu-footer w-full flex flex-wrap"
        x-data="initMenuFooter"
    >
        <ul class="footer-menu w-full flex flex-col flex-wrap lg:flex-row lg:flex-nowrap lg:justify-between lg:gap-6 divide-container lg:divide-y-0" >
                                            <li x-data="footerNode"
                    class=""
                >
                                            <div class="group">
                            <style>#html-body [data-pb-style=O866QHM]{justify-content:flex-start;display:flex;flex-direction:column;background-position:left top;background-size:cover;background-repeat:no-repeat;background-attachment:scroll}</style><div class="social-block-row" data-content-type="row" data-appearance="full-bleed" data-enable-parallax="0" data-parallax-speed="0.5" data-background-images="{}" data-background-type="image" data-video-loop="true" data-video-play-only-visible="true" data-video-lazy-load="true" data-video-fallback-src="" data-element="main" data-pb-style="O866QHM"><h2 class="social-block-heading" data-content-type="heading" data-appearance="default" data-element="main">DiscountContacts.com provides brand name contact lenses at low prices.</h2></div>                        </div>
                                    </li>
                                            <li x-data="footerNode"
                    class=""
                >
                                            <div @keydown.escape="onEscape">
                            <span x-show="isDesktop"
                                x-cloak="tablet"
                                class="block mb-6"
                            >
                                <strong> Need Help? </strong>
                            </span>
                            <button x-show="isMobile"
                                x-cloak="desktop"
                                x-ref="submenu-toggle"
                                class="
                                    w-full py-4 font-bold
                                "
                                @click="toggleSubmenu"
                                :aria-expanded="open"
                                type="button"
                            >
                                <div class="flex items-center justify-between">
                                    <span>
                                        Need Help?                                    </span>
                                    <div class="transition-transform"
                                        :class="chevronClass"
                                    >
                                        <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="text-gray-500" width="20" height="20" aria-hidden="true">
  <path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7"/>
</svg>
                                    </div>
                                </div>
                            </button>
                            <!-- Desktop: always show on desktop without collapse/ref -->
                            <div x-show="isDesktop"
                                x-cloak="tablet"
                                class="pb-2"
                                aria-hidden="false"
                            >
                                        <ul class="space-y-2"
        title="Need&#x20;Help&#x3F;"
    >
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link "
    href="https://www.discountcontacts.com/faq"
            data-menu="menu-146"
    >
    FAQs</a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link Contact&#x20;Us"
    href="https://www.discountcontacts.com/contact-us"
            data-menu="menu-149"
    >
    Contact Us</a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link RX&#x20;Help"
    href="https://www.discountcontacts.com/how-to-read-your-contacts-prescription"
            data-menu="menu-164"
    >
    RX Help</a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
        <a href="/sales/order/history"
        class="snowdog-menu-link footer-link link&#x20;requireAuthorization-link"
                    data-menu="menu-167"
                        data-menu="menu-167"    >
        Order Status    </a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link Sitemap"
    href="https://www.discountcontacts.com/sitemap"
            data-menu="menu-170"
    >
    Sitemap</a>
                </div>
                            </li>
            </ul>
                            </div>
                            <!-- Mobile/Tablet: show based on local open state with collapse and ref for focus management -->
                            <div x-show="open"
                                x-cloak="tablet"
                                x-ref="submenu"
                                x-collapse
                                class="pb-2"
                            >
                                        <ul class="space-y-2"
        title="Need&#x20;Help&#x3F;"
    >
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link "
    href="https://www.discountcontacts.com/faq"
            data-menu="menu-146"
    >
    FAQs</a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link Contact&#x20;Us"
    href="https://www.discountcontacts.com/contact-us"
            data-menu="menu-149"
    >
    Contact Us</a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link RX&#x20;Help"
    href="https://www.discountcontacts.com/how-to-read-your-contacts-prescription"
            data-menu="menu-164"
    >
    RX Help</a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
        <a href="/sales/order/history"
        class="snowdog-menu-link footer-link link&#x20;requireAuthorization-link"
                    data-menu="menu-167"
                        data-menu="menu-167"    >
        Order Status    </a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link Sitemap"
    href="https://www.discountcontacts.com/sitemap"
            data-menu="menu-170"
    >
    Sitemap</a>
                </div>
                            </li>
            </ul>
                            </div>
                        </div>
                                    </li>
                                            <li x-data="footerNode"
                    class=""
                >
                                            <div @keydown.escape="onEscape">
                            <span x-show="isDesktop"
                                x-cloak="tablet"
                                class="block mb-6"
                            >
                                <strong> Learn More </strong>
                            </span>
                            <button x-show="isMobile"
                                x-cloak="desktop"
                                x-ref="submenu-toggle"
                                class="
                                    w-full py-4 font-bold
                                "
                                @click="toggleSubmenu"
                                :aria-expanded="open"
                                type="button"
                            >
                                <div class="flex items-center justify-between">
                                    <span>
                                        Learn More                                    </span>
                                    <div class="transition-transform"
                                        :class="chevronClass"
                                    >
                                        <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="text-gray-500" width="20" height="20" aria-hidden="true">
  <path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7"/>
</svg>
                                    </div>
                                </div>
                            </button>
                            <!-- Desktop: always show on desktop without collapse/ref -->
                            <div x-show="isDesktop"
                                x-cloak="tablet"
                                class="pb-2"
                                aria-hidden="false"
                            >
                                        <ul class="space-y-2"
        title="Learn&#x20;More"
    >
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link "
    href="https://www.discountcontacts.com/free-shipping"
            data-menu="menu-152"
    >
    Free Shipping &amp; Returns</a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link "
    href="https://www.discountcontacts.com/fsa-hsa"
            data-menu="menu-155"
    >
    Vision Insurance</a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link Online&#x20;Prescription&#x20;Renewal"
    href="https://www.discountcontacts.com/online-prescription-renewal"
            data-menu="menu-173"
    >
    Online Prescription Renewal</a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link Blue&#x20;Light&#x20;Contacts"
    href="https://www.discountcontacts.com/blue-light-contacts"
            data-menu="menu-176"
    >
    Blue Light Contacts</a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link Caring&#x20;for&#x20;Contacts"
    href="https://www.discountcontacts.com/contact-lens-care"
            data-menu="menu-179"
    >
    Caring for Contacts</a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
        <a href="/subscription"
        class="snowdog-menu-link footer-link Subscriptions"
                    data-menu="menu-187"
                        data-menu="menu-187"    >
        Subscriptions    </a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link All&#x20;Offers"
    href="https://www.discountcontacts.com/offers"
            data-menu="menu-196"
    >
    All Offers</a>
                </div>
                            </li>
            </ul>
                            </div>
                            <!-- Mobile/Tablet: show based on local open state with collapse and ref for focus management -->
                            <div x-show="open"
                                x-cloak="tablet"
                                x-ref="submenu"
                                x-collapse
                                class="pb-2"
                            >
                                        <ul class="space-y-2"
        title="Learn&#x20;More"
    >
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link "
    href="https://www.discountcontacts.com/free-shipping"
            data-menu="menu-152"
    >
    Free Shipping &amp; Returns</a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link "
    href="https://www.discountcontacts.com/fsa-hsa"
            data-menu="menu-155"
    >
    Vision Insurance</a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link Online&#x20;Prescription&#x20;Renewal"
    href="https://www.discountcontacts.com/online-prescription-renewal"
            data-menu="menu-173"
    >
    Online Prescription Renewal</a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link Blue&#x20;Light&#x20;Contacts"
    href="https://www.discountcontacts.com/blue-light-contacts"
            data-menu="menu-176"
    >
    Blue Light Contacts</a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link Caring&#x20;for&#x20;Contacts"
    href="https://www.discountcontacts.com/contact-lens-care"
            data-menu="menu-179"
    >
    Caring for Contacts</a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
        <a href="/subscription"
        class="snowdog-menu-link footer-link Subscriptions"
                    data-menu="menu-187"
                        data-menu="menu-187"    >
        Subscriptions    </a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link All&#x20;Offers"
    href="https://www.discountcontacts.com/offers"
            data-menu="menu-196"
    >
    All Offers</a>
                </div>
                            </li>
            </ul>
                            </div>
                        </div>
                                    </li>
                                            <li x-data="footerNode"
                    class=""
                >
                                            <div @keydown.escape="onEscape">
                            <span x-show="isDesktop"
                                x-cloak="tablet"
                                class="block mb-6"
                            >
                                <strong> Our Company </strong>
                            </span>
                            <button x-show="isMobile"
                                x-cloak="desktop"
                                x-ref="submenu-toggle"
                                class="
                                    w-full py-4 font-bold
                                "
                                @click="toggleSubmenu"
                                :aria-expanded="open"
                                type="button"
                            >
                                <div class="flex items-center justify-between">
                                    <span>
                                        Our Company                                    </span>
                                    <div class="transition-transform"
                                        :class="chevronClass"
                                    >
                                        <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="text-gray-500" width="20" height="20" aria-hidden="true">
  <path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7"/>
</svg>
                                    </div>
                                </div>
                            </button>
                            <!-- Desktop: always show on desktop without collapse/ref -->
                            <div x-show="isDesktop"
                                x-cloak="tablet"
                                class="pb-2"
                                aria-hidden="false"
                            >
                                        <ul class="space-y-2"
        title="Our&#x20;Company"
    >
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link "
    href="https://www.discountcontacts.com/about-us"
            data-menu="menu-158"
    >
    About Us</a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
        <a href="/accessibility-statement"
        class="snowdog-menu-link footer-link Accessibility"
                    data-menu="menu-185"
                        data-menu="menu-185"    >
        Accessibility    </a>
                </div>
                            </li>
            </ul>
                            </div>
                            <!-- Mobile/Tablet: show based on local open state with collapse and ref for focus management -->
                            <div x-show="open"
                                x-cloak="tablet"
                                x-ref="submenu"
                                x-collapse
                                class="pb-2"
                            >
                                        <ul class="space-y-2"
        title="Our&#x20;Company"
    >
                                <li class="">
                <div class="group">
                    
<a class="snowdog-menu-link footer-link "
    href="https://www.discountcontacts.com/about-us"
            data-menu="menu-158"
    >
    About Us</a>
                </div>
                            </li>
                                <li class="">
                <div class="group">
                    
        <a href="/accessibility-statement"
        class="snowdog-menu-link footer-link Accessibility"
                    data-menu="menu-185"
                        data-menu="menu-185"    >
        Accessibility    </a>
                </div>
                            </li>
            </ul>
                            </div>
                        </div>
                                    </li>
                    </ul>
    </div>
                                                                                                                                                                </div>
    </div>
    <div class="footer-lower-container flex flex-col container lg:pt-12 lg:pb-[3.75rem] lg:w-full lg:flex-row lg:flex-row-reverse">
        <div class="footer-legal-container py-4 lg:py-0">
            <div data-content-type="html" data-appearance="default" data-element="main" data-decoded="true"><style>
input[type='button']#ot-sdk-btn.ot-sdk-show-settings {
  color: #000;
  font-size: 1rem;
  text-align: left;
}
@media (min-width: 1024px) {
  input[type='button']#ot-sdk-btn.ot-sdk-show-settings {
    display: inline-block;
    min-width: 7.5rem;
    font-size: 0.875rem;
  }
}
</style>
<div class="footer-legal">
<a href="/terms" class="footer-link">Term of Use</a>
<a target="_blank" href="https://www.discountcontacts.com/privacy-policy" class="footer-link">Privacy Policy</a>
<input type="button" id="ot-sdk-btn" class="ot-sdk-show-settings footer-link" value="Privacy Center">
<a href="/hipaa-notice" class="footer-link">HIPAA Notice</a>
</div></div>        </div>
        <div class="footer-copyright-container pt-8 pb-5 lg:py-0">
            <div class="flex flex-col">
    <p class="mb-2">© 1999-2026 Discount Contacts. All Rights Reserved.</p>
    <p>Certain&#x20;activities&#x20;provided&#x20;via&#x20;the&#x20;website&#x20;may&#x20;be&#x20;covered&#x20;by&#x20;U.S&#x20;patent&#x20;5,930,474</p>
</div>        </div>
    </div>
</div>

</div></footer>
<script>
    (function() {
        const register = (Alpine) => {
            Alpine.data('dataServicesShoppingCartContextData', () => ({
                initContext(cartData) {
                    let contextCartItems = [];

                    if (cartData && cartData.items) {
                        cartData.items.forEach(function (item) {
                            contextCartItems.push({
                                id: item.item_id,
                                formattedPrice: parseFloat(item.product_price_value ? item.product_price_value : 0),
                                quantity: item.qty,
                                product: {
                                    productType: item.product_type,
                                    productId: item.product_id,
                                    name: item.product_name,
                                    sku: item.product_sku,
                                    mainImageUrl: item.product_image.src
                                },
                                prices: {
                                    price: {
                                        value: parseFloat(item.product_price_value ? item.product_price_value : 0)
                                    }
                                }
                            });
                        });

                        if (typeof magentoStorefrontEvents !== 'undefined' && magentoStorefrontEvents.context && typeof magentoStorefrontEvents.context.setShoppingCart === 'function') {
                            magentoStorefrontEvents.context.setShoppingCart({
                                id: cartData.dsCartId,
                                totalQuantity: cartData.summary_count,
                                prices: {
                                    subtotalExcludingTax: {
                                        value: parseFloat(cartData.subtotalAmountExclTax ? cartData.subtotalAmountExclTax : 0)
                                    },
                                    subtotalIncludingTax: {
                                        value: parseFloat(cartData.subtotalAmount ? cartData.subtotalAmount : 0)
                                    }
                                },
                                items: contextCartItems,
                                possibleOnepageCheckout: cartData.possible_onepage_checkout,
                                giftMessageSelected : false,
                                giftWrappingSelected : false
                            });
                        }
                    }

                    window.dispatchEvent(new Event("shoppingCartContextSet"));
                },
                onPrivateContentLoaded(e) {
                    const cartFromEvent = e && e.detail && e.detail.data ? e.detail.data.cart : null;
                    let cart = cartFromEvent;
                    if (!cart && typeof customerData !== 'undefined' && customerData && typeof customerData.get === 'function') {
                        try {
                            cart = customerData.get('cart');
                        } catch (err) {
                            // ignore
                        }
                    }
                    if (cart) {
                        this.initContext(cart);
                    }
                },
                nVIDataServicesSetCartContextPrivateContentLoadedWindow5(){
                    this.initContext(this.$event.detail.data.cart);
                }
            }));
        };

        document.addEventListener('alpine:init', () => register(window.Alpine));
        if (window.Alpine) register(window.Alpine);
    })();
</script>

<div x-data="dataServicesShoppingCartContextData"
     @private-content-loaded.window="onPrivateContentLoaded">
</div>
<script type="text/javascript" id="" class="optanon-category-C0001">
    document.addEventListener('ftr:tokenReady', function(evt) {
        var token = evt.detail; // Retrieve the token to be sent to your back-end
        console.log("ForterToken-"+token);
    }, { once: true });
    (function () {
        var merchantConfig = {
            csp: true,
        };

        var siteId = 'a9eff3f5569f';
        var enabled = '1';
function t(t,e){for(var n=t.split(""),r=0;r<n.length;++r)n[r]=String.fromCharCode(n[r].charCodeAt(0)+e);return n.join("")}function e(e){return t(e,-_).replace(/%SN%/g,siteId)}function n(t){try{if("number"==typeof t&&window.location&&window.location.pathname){for(var e=window.location.pathname.split("/"),n=[],r=0;r<=Math.min(e.length-1,Math.abs(t));r++)n.push(e[r]);return n.join("/")||"/"}}catch(t){}return"/"}function r(){var t="no"+"op"+"fn",e="g"+"a",n="n"+"ame";return window[e]&&window[e][n]===t}function o(){return!(!navigator.brave||"function"!=typeof navigator.brave.isBrave)}function i(){return document.currentScript&&document.currentScript.src}function a(t){try{$.ex=t,r()&&-1===$.ex.indexOf(z.uB)&&($.ex+=z.uB),o()&&-1===$.ex.indexOf(z.uBr)&&($.ex+=z.uBr),i()&&-1===$.ex.indexOf(z.nIL)&&($.ex+=z.nIL),window.ftr__snp_cwc||($.ex+=z.s),H($)}catch(t){}}function c(t,e){function n(i){try{i.blockedURI===t&&i.disposition===o&&(e(),document.removeEventListener(r,n))}catch(t){document.removeEventListener(r,n)}}var r="securitypolicyviolation",o="enforce";document.addEventListener(r,n),setTimeout(function(){document.removeEventListener(r,n)},2*60*1e3)}function f(t,e,n,r){var o=!1;t="https://"+t,c(t,function(){r(!0),o=!0});var i=document.createElement("script");if(i.onerror=function(){if(!o)try{r(!1),o=!0}catch(t){}},i.onload=n,i.type="text/javascript",i.id="ftr__script",i.async=!0,i.src=t,window.ftr__config&&window.ftr__config.m&&!0===window.ftr__config.m.ptb&&document.body)document.body.appendChild(i);else{var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(i,a)}}function u(){setTimeout(l,B,z.uDF)}function s(t,e,n,r){var o=!1,i=new XMLHttpRequest;if(c("https:"+t,function(){n(new Error("CSP Violation"),!0),o=!0}),"//"===t.slice(0,2)&&(t="https:"+t),"withCredentials"in i)i.open("GET",t,!0);else{if("undefined"==typeof XDomainRequest)return;i=new XDomainRequest,i.open("GET",t)}Object.keys(r).forEach(function(t){i.setRequestHeader(t,r[t])}),i.onload=function(){"function"==typeof e&&e(i)},i.onerror=function(t){if("function"==typeof n&&!o)try{n(t,!1),o=!0}catch(t){}},i.onprogress=function(){},i.ontimeout=function(){"function"==typeof n&&n("tim"+"eo"+"ut",!1)},setTimeout(function(){i.send()},0)}function d(t,siteId,e){function n(t){var e=t.toString(16);return e.length%2?"0"+e:e}function r(t){if(t<=0)return"";for(var e="0123456789abcdef",n="",r=0;r<t;r++)n+=e[Math.floor(Math.random()*e.length)];return n}function o(t){for(var e="",r=0;r<t.length;r++)e+=n(t.charCodeAt(r));return e}function i(t){for(var e=t.split(""),n=0;n<e.length;++n)e[n]=String.fromCharCode(255^e[n].charCodeAt(0));return e.join("")}e=e?"1":"0";var a=[];return a.push(t),a.push(siteId),a.push(e),function(t){var e=40,n="";return t.length<e/2&&(n=","+r(e/2-t.length-1)),o(i(t+n))}(a.join(","))}function h(){function t(){M&&setTimeout(l,B,z.dUAL)}function e(t,e){M=e?"F"+"T"+"R"+"A"+"U"+"C":"F"+"T"+"R"+"A"+"U",setTimeout(l,B,z.uAS)}window.ftr__fdad(t,e)}function w(){function t(){M&&setTimeout(l,B,z.uDAD)}function e(t,e){M=e?"F"+"T"+"R"+"A"+"U"+"C":"F"+"T"+"R"+"A"+"U",setTimeout(l,B,z.uDS)}window.ftr__radd(t,e)}function l(t){function e(){for(var t=0;t<=z.tmosSecs.length;t++)clearTimeout(et[t])}function n(){try{e(),a(t+z.uS)}catch(t){}}function r(n){try{e(),$.td=1*new Date-$.ts,a(n?t+z.uF+z.cP:t+z.uF),t===z.uFP&&u(),t===z.uDF&&(j?w():h()),t!==z.uAS&&t!==z.dUAL||j||w(),t!==z.uDS&&t!==z.uDAD||j&&h()}catch(t){a(z.eUoe)}}try{!function(t){for(var e=0;e<=z.tmosSecs.length;e++)e===z.tmosSecs.length?et[e]=setTimeout(r,1e3*z.tmosSecs[e-1]+1e3):et[e]=setTimeout(a,1e3*z.tmosSecs[e],t+z.tmos[e])}(t);var o;switch(t){case z.uFP:o=N;break;case z.uDF:o=I;break;default:o=M}if(!o)return;if(o==="F"+"T"+"R"+"A"+"U"+"C")return void r(!0);if(o==="F"+"T"+"R"+"A"+"U")return void r(!1);f(o,void 0,n,r)}catch(e){a(t+z.eTlu)}}var g="22g5iz6v:uihsv}w1forxgiurqw1qhw2vwdwxv",v="fort",p="erTo",m="ken",_=3;window.ftr__config={m:merchantConfig,s:"31",si:siteId};var y=!1,U=!1,T,x,A=v+p+m,S=400*24*60,D,C=10;D={write:function(t,e,r,o){void 0===o&&(o=!0);var i=0;window.ftr__config&&window.ftr__config.m&&window.ftr__config.m.ckDepth&&(i=window.ftr__config.m.ckDepth);var a,c,f=n(i);if(r?(a=new Date,a.setTime(a.getTime()+60*r*1e3),c="; expires="+a.toGMTString()):c="",!o)return void(document.cookie=escape(t)+"="+escape(e)+c+"; path="+f);for(var u=1,s=document.domain.split("."),d=C,h=!0;h&&s.length>=u&&d>0;){var w=s.slice(-u).join(".");document.cookie=escape(t)+"="+escape(e)+c+"; path="+f+"; domain="+w;var l=D.read(t);null!=l&&l==e||(w="."+w,document.cookie=escape(t)+"="+escape(e)+c+"; path="+f+"; domain="+w),h=-1===document.cookie.indexOf(t+"="+e),u++,d--}},read:function(t){var e=null;try{for(var n=escape(t)+"=",r=document.cookie.split(";"),o=32,i=0;i<r.length;i++){for(var a=r[i];a.charCodeAt(0)===o;)a=a.substring(1,a.length);0===a.indexOf(n)&&(e=unescape(a.substring(n.length,a.length)))}}finally{return e}}};var R=window.ftr__config.s;R+="ck";var L=function(t){var e=!1,n=null,r=function(){try{if(!n||!e)return;n.remove&&"function"==typeof n.remove?n.remove():document.head.removeChild(n),e=!1}catch(t){}};document.head&&(!function(){n=document.createElement("link"),n.setAttribute("rel","pre"+"con"+"nect"),n.setAttribute("cros"+"sori"+"gin","anonymous"),n.onload=r,n.onerror=r,n.setAttribute("href",t),document.head.appendChild(n),e=!0}(),setTimeout(r,3e3))},E=e(g||"22g5iz6v:uihsv}w1forxgiurqw1qhw2vwdwxv"),q=t("[0Uhtxhvw0LG",-_),b=t("[0Fruuhodwlrq0LG",-_),P=t("Li0Qrqh0Pdwfk",-_),k=e("dss1vlwhshuirupdqfhwhvw1qhw"),F=e("2241414142gqv0txhu|"),M,O="fgq71iruwhu1frp",I,V;I=e("(VQ(1"+O+"2vq2(VQ(2vfulsw1mv"),V=e("(VQ(1"+O+"2vqV2(VQ(2vfulsw1mv");var N;window.ftr__config&&window.ftr__config.m&&window.ftr__config.m.fpi&&(N=e("fgq71")+window.ftr__config.m.fpi+e("2vq2(VQ(2vfulsw1mv"));var j=!1;j=!1;var B=10;window.ftr__startScriptLoad=1*new Date;var G=function(t){var e="ft"+"r:tok"+"enR"+"eady";window.ftr__tt&&clearTimeout(window.ftr__tt),window.ftr__tt=setTimeout(function(){try{delete window.ftr__tt,t+="_tt";var n=document.createEvent("Event");n.initEvent(e,!1,!1),n.detail=t,document.dispatchEvent(n); if(window.newrelic){window.newrelic.noticeError(new Error('Token generated.')); var err = new Error('Report caught to New Relic'); newrelic.noticeError(err); newrelic.log('Token log created.');} }catch(t){ if(window.newrelic){window.newrelic.noticeError(new Error('Token generation failed.')); window.newrelic.noticeError(new Error(t.message)); newrelic.log('Token failed log created.');} }},1e3)},H=function(t){var e=function(t){return t||""},n=e(t.id)+"_"+e(t.ts)+"_"+e(t.td)+"_"+e(t.ex)+"_"+e(R),r=S;!isNaN(window.ftr__config.m.ckTTL)&&window.ftr__config.m.ckTTL&&(r=window.ftr__config.m.ckTTL),D.write(A,n,r,!0),G(n),window.ftr__gt=n},X=function(){var t=D.read(A)||"",e=t.split("_"),n=function(t){return e[t]||void 0};return{id:n(0),ts:n(1),td:n(2),ex:n(3),vr:n(4)}},Q=function(){for(var t={},e="fgu",n=[],r=0;r<256;r++)n[r]=(r<16?"0":"")+r.toString(16);var o=function(t,e,r,o,i){var a=i?"-":"";return n[255&t]+n[t>>8&255]+n[t>>16&255]+n[t>>24&255]+a+n[255&e]+n[e>>8&255]+a+n[e>>16&15|64]+n[e>>24&255]+a+n[63&r|128]+n[r>>8&255]+a+n[r>>16&255]+n[r>>24&255]+n[255&o]+n[o>>8&255]+n[o>>16&255]+n[o>>24&255]},i=function(){if(window.Uint32Array&&window.crypto&&window.crypto.getRandomValues){var t=new window.Uint32Array(4);return window.crypto.getRandomValues(t),{d0:t[0],d1:t[1],d2:t[2],d3:t[3]}}return{d0:4294967296*Math.random()>>>0,d1:4294967296*Math.random()>>>0,d2:4294967296*Math.random()>>>0,d3:4294967296*Math.random()>>>0}},a=function(){var t="",e=function(t,e){for(var n="",r=t;r>0;--r)n+=e.charAt(1e3*Math.random()%e.length);return n};return t+=e(2,"0123456789"),t+=e(1,"123456789"),t+=e(8,"0123456789")};return t.safeGenerateNoDash=function(){try{var t=i();return o(t.d0,t.d1,t.d2,t.d3,!1)}catch(t){try{return e+a()}catch(t){}}},t.isValidNumericalToken=function(t){return t&&t.toString().length<=11&&t.length>=9&&parseInt(t,10).toString().length<=11&&parseInt(t,10).toString().length>=9},t.isValidUUIDToken=function(t){return t&&32===t.toString().length&&/^[a-z0-9]+$/.test(t)},t.isValidFGUToken=function(t){return 0==t.indexOf(e)&&t.length>=12},t}(),z={uDF:"UDF",dUAL:"dUAL",uAS:"UAS",uDS:"UDS",uDAD:"UDAD",uFP:"UFP",mLd:"1",eTlu:"2",eUoe:"3",uS:"4",uF:"9",tmos:["T5","T10","T15"],tmosSecs:[5,10,15],bIR:"43",uB:"u",uBr:"b",cP:"c",nIL:"i",s:"s"};try{var $=X();try{$.id&&(Q.isValidNumericalToken($.id)||Q.isValidUUIDToken($.id)||Q.isValidFGUToken($.id))?window.ftr__ncd=!1:($.id=Q.safeGenerateNoDash(),window.ftr__ncd=!0),$.ts=window.ftr__startScriptLoad,H($),window.ftr__snp_cwc=!!D.read(A),window.ftr__snp_cwc||(I=V);for(var J="for"+"ter"+".co"+"m",K="ht"+"tps://c"+"dn9."+J,W="ht"+"tps://"+$.id+"-"+siteId+".cd"+"n."+J,Y="http"+"s://cd"+"n3."+J,Z=[K,W,Y],tt=0;tt<Z.length;tt++)L(Z[tt]);var et=new Array(z.tmosSecs.length);window.ftr__fdad=function(e,n){if(y)return window.ftr__altd2=x,void e();y=!0;var r={};r[P]=d(window.ftr__config.s,siteId,window.ftr__config.m.csp),s(E,function(n){try{var r=n.getAllResponseHeaders().toLowerCase();if(r.indexOf(b.toLowerCase())>=0){var o=n.getResponseHeader(b);x=window.ftr__altd2=t(atob(o),-_-1)}if(r.indexOf(q.toLowerCase())<0)return;var i=n.getResponseHeader(q),a=t(atob(i),-_-1);if(a){var c=a.split(":");if(c&&2===c.length){for(var f=c[0],u=c[1],s="",d=0,h=0;d<20;++d)s+=d%3>0&&h<12?siteId.charAt(h++):$.id.charAt(d);var w=u.split(",");if(w.length>1){var l=w[0],g=w[1];M=f+"/"+l+"."+s+"."+g}}}e()}catch(t){}},function(t,e){n&&n(t,e)},r)},window.ftr__radd=function(t,e){function n(e){try{var n=e.response,r=function(t){function e(t,n,i){try{if(i>=r)return{name:"",nextOffsetToProcess:n,error:"Max pointer dereference depth exceeded"};for(var a=[],c=n,f=t.getUint8(c),u=0;u<o;){if(u++,192==(192&f)){var s=(63&f)<<8|t.getUint8(c+1),d=e(t,s,i+1);if(d.error)return d;var h=d.name;return a.push(h),{name:a.join("."),nextOffsetToProcess:c+2}}if(!(f>0)){if(0!==f)return{name:"",nextOffsetToProcess:c,error:"Unexpected length at the end of name: "+f.toString()};return{name:a.join("."),nextOffsetToProcess:c+1}}for(var w="",l=1;l<=f;l++)w+=String.fromCharCode(t.getUint8(c+l));a.push(w),c+=f+1,f=t.getUint8(c)}return{name:"",nextOffsetToProcess:c,error:"Max iterations exceeded"}}catch(t){return{name:"",nextOffsetToProcess:n,error:"Unexpected error while parsing response: "+t.toString()}}}var n,r=4,o=100,i=16,a=new DataView(t),c=a.getUint16(0),f=a.getUint16(2),u=a.getUint16(4),s=a.getUint16(6),d=a.getUint16(8),h=a.getUint16(10),w=12,l=[],g=0;for(g=0;g<u;g++){if(n=e(a,w,0),n.error)throw new Error(n.error);if(w=n.nextOffsetToProcess,!Number.isInteger(w))throw new Error("invalid returned offset");var v=n.name,p=a.getUint16(w);w+=2;var m=a.getUint16(w);w+=2,l.push({qname:v,qtype:p,qclass:m})}var _=[];for(g=0;g<s;g++){if(n=e(a,w,0),n.error)throw new Error(n.error);if(w=n.nextOffsetToProcess,!Number.isInteger(w))throw new Error("invalid returned offset");var y=n.name,U=a.getUint16(w);if(U!==i)throw new Error("Unexpected record type: "+U.toString());w+=2;var T=a.getUint16(w);w+=2;var x=a.getUint32(w);w+=4;var A=a.getUint16(w);w+=2;for(var S="",D=w,C=0;D<w+A&&C<o;){C++;var R=a.getUint8(D);D+=1;S+=(new TextDecoder).decode(t.slice(D,D+R)),D+=R}if(C>=o)throw new Error("Max iterations exceeded while reading TXT data");w+=A,_.push({name:y,type:U,class:T,ttl:x,data:S})}return{transactionId:c,flags:f,questionCount:u,answerCount:s,authorityCount:d,additionalCount:h,questions:l,answers:_}}(n);if(!r)throw new Error("Error parsing DNS response");if(!("answers"in r))throw new Error("Unexpected response");var o=r.answers;if(0===o.length)throw new Error("No answers found");var i=o[0].data;i=i.replace(/^"(.*)"$/,"$1");var a=function(t){var e=40,n=32,r=126;try{for(var o=atob(t),i="",a=0;a<o.length;a++)i+=function(t){var o=t.charCodeAt(0),i=o-e;return i<n&&(i=r-(n-i)+1),String.fromCharCode(i)}(o[a]);return atob(i)}catch(t){return}}(i);if(!a)throw new Error("failed to decode the value");var c=function(t){var e="_"+"D"+"L"+"M"+"_",n=t.split(e);if(!(n.length<2)){var r=n[0],o=n[1];if(!(r.split(".").length-1<1))return{jURL:r,eURL:o}}}(a);if(!c)throw new Error("failed to parse the value");var f=c.jURL,u=c.eURL;M=function(t){for(var e="",n=0,r=0;n<20;++n)e+=n%3>0&&r<12?siteId.charAt(r++):$.id.charAt(n);return t.replace("/PRM1","").replace("/PRM2","/main.").replace("/PRM3",e).replace("/PRM4",".js")}(f),T=window.ftr__altd3=u,t()}catch(t){}}function r(t,n){e&&e(t,n)}if(U)return window.ftr__altd3=T,void t();window.ftr__config.m.dr==="N"+"D"+"R"&&e(new Error("N"+"D"+"R"),!1),F&&k||e(new Error("D"+"P"+"P"),!1),U=!0;try{var o=function(t){for(var e=new Uint8Array([0,0]),n=new Uint8Array([1,0]),r=new Uint8Array([0,1]),o=new Uint8Array([0,0]),i=new Uint8Array([0,0]),a=new Uint8Array([0,0]),c=t.split("."),f=[],u=0;u<c.length;u++){var s=c[u];f.push(s.length);for(var d=0;d<s.length;d++)f.push(s.charCodeAt(d))}f.push(0);var h=16,w=new Uint8Array([0,h]),l=new Uint8Array([0,1]),g=new Uint8Array(e.length+n.length+r.length+o.length+i.length+a.length+f.length+w.length+l.length);return g.set(e,0),g.set(n,e.length),g.set(r,e.length+n.length),g.set(o,e.length+n.length+r.length),g.set(i,e.length+n.length+r.length+o.length),g.set(a,e.length+n.length+r.length+o.length+i.length),g.set(f,e.length+n.length+r.length+o.length+i.length+a.length),g.set(w,e.length+n.length+r.length+o.length+i.length+a.length+f.length),g.set(l,e.length+n.length+r.length+o.length+i.length+a.length+f.length+w.length),g}(k);!function(t,e,n,r,o){var i=!1,a=new XMLHttpRequest;if(c("https:"+t,function(){o(new Error("CSP Violation"),!0),i=!0}),"//"===t.slice(0,2)&&(t="https:"+t),"withCredentials"in a)a.open("POST",t,!0);else{if("undefined"==typeof XDomainRequest)return;a=new XDomainRequest,a.open("POST",t)}a.responseType="arraybuffer",a.setRequestHeader("Content-Type",e),a.onload=function(){"function"==typeof r&&r(a)},a.onerror=function(t){if("function"==typeof o&&!i)try{o(t,!1),i=!0}catch(t){}},a.onprogress=function(){},a.ontimeout=function(){"function"==typeof o&&o("tim"+"eo"+"ut",!1)},setTimeout(function(){a.send(n)},0)}(F,"application/dns-message",o,n,r)}catch(t){e(t,!1)}};var nt=N?z.uFP:z.uDF;setTimeout(l,B,nt)}catch(t){a(z.mLd)}}catch(t){}})();
</script>

<script>
    (() => {
        function src_default(Alpine) {
            Alpine.directive("intersect", Alpine.skipDuringClone((el, { value, expression, modifiers }, { evaluateLater, cleanup }) => {
                let evaluate = evaluateLater(expression);
                let options = {
                    rootMargin: getRootMargin(modifiers),
                    threshold: getThreshold(modifiers)
                };
                let observer = new IntersectionObserver((entries) => {
                    entries.forEach((entry) => {
                        if (entry.isIntersecting === (value === "leave"))
                            return;
                        evaluate();
                        modifiers.includes("once") && observer.disconnect();
                    });
                }, options);
                observer.observe(el);
                cleanup(() => {
                    observer.disconnect();
                });
            }));
        }
        function getThreshold(modifiers) {
            if (modifiers.includes("full"))
                return 0.99;
            if (modifiers.includes("half"))
                return 0.5;
            if (!modifiers.includes("threshold"))
                return 0;
            let threshold = modifiers[modifiers.indexOf("threshold") + 1];
            if (threshold === "100")
                return 1;
            if (threshold === "0")
                return 0;
            return Number(`.${threshold}`);
        }
        function getLengthValue(rawValue) {
            let match = rawValue.match(/^(-?[0-9]+)(px|%)?$/);
            return match ? match[1] + (match[2] || "px") : void 0;
        }
        function getRootMargin(modifiers) {
            const key = "margin";
            const fallback = "0px 0px 0px 0px";
            const index = modifiers.indexOf(key);
            if (index === -1)
                return fallback;
            let values = [];
            for (let i = 1; i < 5; i++) {
                values.push(getLengthValue(modifiers[index + i] || ""));
            }
            values = values.filter((v) => v !== void 0);
            return values.length ? values.join(" ").trim() : fallback;
        }

        document.addEventListener("alpine:init", () => {
            window.Alpine.plugin(src_default);
        });
    })();
</script>
<script>
    for (const [selector, deferUntil] of Object.entries({".product-slider section[x-data]":"intersect",".product-info [x-data]":"intersect","#filters-content [x-data]":"intersect","#review_form":"intersect","section[x-data^=initRecentlyViewedProductsComponent]":"intersect","div[x-data^=initBundleOptions]":"intersect","#product_addtocart_form [x-data]":"intersect","#notice-cookie-block":"idle"})) {
        document.querySelectorAll(selector).forEach(el => el.setAttribute('x-defer', `${deferUntil}`));
    }
</script>
<script>
    (function () {
        "use strict";

        const hasAlpine = new Promise(resolve => {
            window.addEventListener('alpine:initialized', resolve, {once: true, passive: true});
        });

        const hasInteract = new Promise(resolve => {
            (events => {
                const onInteract = () => {
                    resolve();
                    events.forEach(type => window.removeEventListener(type, onInteract));
                }
                events.forEach(type => window.addEventListener(type, onInteract, {once: true, passive: true}))
            })(['touchstart', 'mouseover', 'wheel', 'scroll', 'keydown'])
        });

        const onIntersect = (el) => {
            return new Promise(resolve => {
                const observer = new IntersectionObserver(entries => {
                    for (const entry of entries) {
                        if (entry.isIntersecting) {
                            observer.disconnect()
                            resolve();
                        }
                    }
                }, {});
                observer.observe(el);
            });
        }

        function runComponent(el) {
            hasAlpine.then(() => {
                el.removeAttribute('x-ignore');
                queueMicrotask(() => Alpine.initTree(el));
            });
        }

        function initDeferredComponents() {
            document.querySelectorAll('[x-data][x-defer]').forEach(el => {
                el.setAttribute('x-ignore', '');
                const deferUntil = (el.getAttribute('x-defer') || '').trim();
                switch (deferUntil) {
                    case 'interact':
                        hasInteract.then(() => runComponent(el));
                        break;
                    case 'intersect':
                        onIntersect(el).then(() => runComponent(el))
                        break;
                    case 'idle':
                        window.requestIdleCallback
                            ? window.requestIdleCallback(() => runComponent(el), {timeout: 4000})
                            : setTimeout(() => runComponent(el), 4000);
                        break;
                    case 'eager':
                        runComponent(el);
                        break;
                    default:
                        if (deferUntil.startsWith('event:') && deferUntil.length > 6) {
                            window.addEventListener(deferUntil.substring(6), () => runComponent(el), {once: true, passive: true});
                        }
                }
            });
        }

        window.addEventListener('alpine:init', initDeferredComponents, {once: true, passive: true});
    })()
</script>
<script>
(()=>{function g(n){n.directive("collapse",e),e.inline=(t,{modifiers:i})=>{i.includes("min")&&(t._x_doShow=()=>{},t._x_doHide=()=>{})};function e(t,{modifiers:i}){let r=l(i,"duration",250)/1e3,u=l(i,"min",0),h=!i.includes("min");t._x_isShown||(t.style.height=`${u}px`),!t._x_isShown&&h&&(t.hidden=!0),t._x_isShown||(t.style.overflow="hidden");let c=(d,s)=>{let o=n.setStyles(d,s);return s.height?()=>{}:o},f={transitionProperty:"height",transitionDuration:`${r}s`,transitionTimingFunction:"cubic-bezier(0.4, 0.0, 0.2, 1)"};t._x_transition={in(d=()=>{},s=()=>{}){h&&(t.hidden=!1),h&&(t.style.display=null);let o=t.getBoundingClientRect().height;t.style.height="auto";let a=t.getBoundingClientRect().height;o===a&&(o=u),n.transition(t,n.setStyles,{during:f,start:{height:o+"px"},end:{height:a+"px"}},()=>t._x_isShown=!0,()=>{t.getBoundingClientRect().height==a&&(t.style.overflow=null)})},out(d=()=>{},s=()=>{}){let o=t.getBoundingClientRect().height;n.transition(t,c,{during:f,start:{height:o+"px"},end:{height:u+"px"}},()=>t.style.overflow="hidden",()=>{t._x_isShown=!1,t.style.height==`${u}px`&&h&&(t.style.display="none",t.hidden=!0)})}}}}function l(n,e,t){if(n.indexOf(e)===-1)return t;let i=n[n.indexOf(e)+1];if(!i)return t;if(e==="duration"){let r=i.match(/([0-9]+)ms/);if(r)return r[1]}if(e==="min"){let r=i.match(/([0-9]+)px/);if(r)return r[1]}return i}document.addEventListener("alpine:init",()=>{window.Alpine.plugin(g)});})();
</script>
<script>
    function initMenuFooter() {
        return {
            init(){
                this.checkIsDesktopResolution();
                window.addEventListener('resize', (event) => {
                    this.checkIsDesktopResolution();
                });
                document.addEventListener("visibilitychange", (event) => {
                    this.checkIsDesktopResolution();
                });
            },
            isDesktop: true,
            isMobile: false,

            checkIsDesktopResolution() {
                this.isDesktop = window.matchMedia('(min-width: 1024px)').matches;
                this.isMobile = !this.isDesktop;
            },
        }
    }

    function footerNode() {
        return {

            open: false,
            get chevronClass() {
                return this.open ? 'rotate-180' : ''
            },
            toggleSubmenu(event) {
                const focusableElements = 'button:not([disabled]), a[href]:not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])';

                event.stopPropagation();

                this.open = !this.open;

                if (this.open) {
                    this.$nextTick(() => {
                        this.$refs['submenu']?.querySelector(focusableElements)?.focus();
                    });
                } else {
                    this.$nextTick(() => {
                        this.$refs['submenu-toggle']?.focus();
                    });
                }
            },
            onEscape(event) {
                if (this.$root && this.$root.isMobile) {
                    this.toggleSubmenu(event);
                }
            }
        }
    }
    window.addEventListener('alpine:init', () => {
        Alpine.data('initMenuFooter', initMenuFooter);
        Alpine.data('footerNode', footerNode);
    }, { once: true });
</script>

<script type="module"
        src="https://www.discountcontacts.com/static/version1780656299/frontend/NVI/DiscountContacts/en_US/Hyva_Theme/js/alpine3.min.js"
        defer
        crossorigin
></script>
<script>
    'use strict';
    function dispatchMessages(messages, hideAfter) {
        const messagesEvent = new CustomEvent("messages-loaded", {
            detail: {
                messages: messages,
                hideAfter: hideAfter
            }
        });
        window.dispatchEvent(messagesEvent);
    }

    if (typeof hyva === 'undefined' || (!hyva.getBrowserStorage || !hyva.getCookie || !hyva.setCookie)) {
        console.warn("Hyvä helpers are not loaded yet. Make sure they are included before this script");
    }

    (function( hyva, undefined ) {

        hyva.initFormKey = () => {
            const inputSelector = 'input[name="form_key"]',
                formKey = hyva.getFormKey();

            Array.from(document.querySelectorAll(inputSelector)).map(function (input) {
                input.value = formKey
            });
        }

        hyva.initMessages = () => {
            try {
                const messages = hyva.getCookie('mage-messages');
                window.mageMessages = messages ? JSON.parse(decodeURIComponent(messages).replace(/\+/g, ' ')) : [];

                dispatchMessages(window.mageMessages);

                                // empty `mage-messages` cookie
                const skipSetDomain = true;
                hyva.setCookie('mage-messages','', -1, skipSetDomain);

            } catch (error) {
                console.warn('Error parsing Cookie Messages:', error);
            }
        }

        window.addEventListener('DOMContentLoaded', hyva.initFormKey);
        hyva.alpineInitialized(hyva.initMessages)

    }( window.hyva = window.hyva || {} ));
</script>
<script>
    'use strict';
    {
        const private_content_key = 'mage-cache-storage';
        const private_content_expire_key = 'mage-cache-timeout';
        const private_content_version_key = 'private_content_version';
        const section_data_ids_key = 'section_data_ids';
        const mage_cache_session_id_key = 'mage-cache-sessid';
        const last_visited_store_key = 'last_visited_store';

        const ttl = 3600;

        if (typeof hyva === 'undefined' || (!hyva.getBrowserStorage || !hyva.getCookie || !hyva.setCookie)) {
            console.warn("Hyvä helpers are not loaded yet. Make sure they are included before this script");
        }

        function loadSectionData () {
            const browserStorage = hyva.getBrowserStorage();
            if (!browserStorage) {
                typeof window.dispatchMessages !== "undefined" && window.dispatchMessages(
                    [{
                        type: "warning",
                        text: "Please enable LocalStorage in your browser."
                    }]
                );
                return;
            }
            try {
                let isInvalid = false;

                if (hyva.getCookie(last_visited_store_key) !== CURRENT_STORE_CODE) {
                    isInvalid = true;
                }
                hyva.setCookie(last_visited_store_key, CURRENT_STORE_CODE, false, false);

                if (!hyva.getCookie(mage_cache_session_id_key)) {
                    isInvalid = true;
                    browserStorage.removeItem(private_content_key);
                    const skipSetDomain = true;
                    const days = false;
                    hyva.setCookie(mage_cache_session_id_key, true, days, skipSetDomain)
                }

                const cookieVersion = hyva.getCookie(private_content_version_key);
                const storageVersion = browserStorage.getItem(private_content_version_key);

                if (cookieVersion && !storageVersion || cookieVersion !== storageVersion) {
                    isInvalid = true;
                }

                const privateContentExpires = browserStorage.getItem(private_content_expire_key);
                if (privateContentExpires && new Date(privateContentExpires) < new Date()) {
                    browserStorage.removeItem(private_content_key);
                }

                if (isInvalid && cookieVersion) {
                    fetchPrivateContent([]);
                } else if (cookieVersion && storageVersion && cookieVersion === storageVersion) {
                    const privateContent = JSON.parse(browserStorage.getItem(private_content_key));
                    if (
                        privateContent &&
                        privateContentExpires &&
                        privateContent.cart &&
                        privateContent.customer
                    ) {
                        dispatchPrivateContent(privateContent);
                    } else {
                        fetchPrivateContent([]);
                    }
                } else {
                    if (document.getElementById('default-section-data')) {
                        const privateContent = JSON.parse(document.getElementById('default-section-data').innerText.trim());
                        dispatchPrivateContent(privateContent);
                    } else {
                        dispatchPrivateContent({});
                    }
                }

            } catch (error) {
                console.warn('Error retrieving Private Content:', error);
            }
        }

        hyva.alpineInitialized(loadSectionData)
        window.addEventListener('reload-customer-section-data', loadSectionData);

        window.processSectionDataBeforeDispatch = window.processSectionDataBeforeDispatch || (data => data);

        function dispatchPrivateContent(data) {

            const privateContentEvent = new CustomEvent("private-content-loaded", {
                detail: {
                    data: window.processSectionDataBeforeDispatch(data)
                }
            });
            window.dispatchEvent(privateContentEvent);
        }

        function fetchPrivateContent(sections) {
            fetch(`${BASE_URL}customer/section/load/?sections=${encodeURIComponent(sections.join(','))}`, {
                method: 'GET',
                headers: {
                    'Content-Type': 'application/json',
                    'X-Requested-With': 'XMLHttpRequest'
                }
            })
                .then(response => response.ok && response.json())
                .then(
                    data => {
                        if (data) {
                            try {
                                const browserStorage = hyva.getBrowserStorage();

                                // merge new data preserving non-invalidated sections
                                const oldSectionData = JSON.parse(browserStorage.getItem(private_content_key) || '{}') || {};

                                if ((! data.cart || ! data.cart.cartId) && oldSectionData['checkout-data']) {
                                    delete oldSectionData['checkout-data'];
                                }
                                const newSectionData = Object.assign(oldSectionData, data);

                                dispatchPrivateContent(newSectionData);

                                // don't persist messages, they've been dispatched already
                                if (newSectionData.messages && newSectionData.messages.messages ) {
                                    newSectionData.messages.messages = [];
                                }

                                browserStorage.setItem(private_content_key, JSON.stringify(newSectionData));

                                const expiresAt = new Date(Date.now() + (ttl * 1000)).toISOString();
                                browserStorage.setItem(private_content_expire_key, expiresAt);

                                const newCookieVersion = hyva.getCookie(private_content_version_key);
                                browserStorage.setItem(private_content_version_key, newCookieVersion);

                                // We don't need the section_data_ids in Hyvä, but we store them for compatibility
                                // with Luma Fallback. Otherwise, not all sections are loaded in Luma Checkout
                                hyva.setCookie(
                                    section_data_ids_key,
                                    JSON.stringify(
                                        Object.keys(data).reduce((sectionDataIds, sectionKey) => {
                                            sectionDataIds[sectionKey] = data[sectionKey]['data_id'];
                                            return sectionDataIds;
                                        }, {})
                                    ),
                                    false,
                                    true
                                );
                            } catch (error) {
                                console.warn("Couldn't store privateContent", error);
                            }
                        }
                    }
                );
        }
    }
</script>
<script>
    (() => {
        document.addEventListener('submit', event => event.target.action = event.target.action.replace('%25uenc%25', hyva.getUenc()));
    })()
</script>
<script>
    (events => {
        const dispatchUserInteractionEvent = () => {
            events.forEach(type => window.removeEventListener(type, dispatchUserInteractionEvent))
            window.dispatchEvent(new Event('init-external-scripts'))
        };
        events.forEach(type => window.addEventListener(type, dispatchUserInteractionEvent, {once: true, passive: true}))
    })(['touchstart', 'mousemove', 'wheel', 'scroll', 'keydown'])
</script>
<!-- Account type: 'Google Tag Manager' is not supported  -->
<script>
    function initConfigurableOptions(productId, optionConfig) {

        function findPathParam(key) {
                        const baseUrl = (BASE_URL.substring(0, 2) === '//' ? 'http:' : '') + BASE_URL;
            const baseUrlParts = (new URL(baseUrl)).pathname.replace(/\/$/, '').split('/');
            const pathParts = window.location.pathname.split('/').slice(baseUrlParts.length + 3);
            for (let i = 0; i < pathParts.length; i += 2) {
                if (pathParts[i] === key && pathParts.length > i) {
                    return pathParts[i + 1];
                }
            }
        }

        return {
            optionConfig,
            productId,
            itemId: (new URLSearchParams(window.location.search)).get('id') || findPathParam('id'),
            allowedAttributeOptions: [],
            selectedValues: [],
            init() {
                this.findAllowedAttributeOptions();
                this.$nextTick(() => {
                    if (typeof this.optionConfig.defaultValues === 'object') {
                        for (const [attributeId, value] of Object.entries(this.optionConfig.defaultValues)) {
                            this.changeOption(attributeId, value + '');
                        }
                    }
                    this.preselectQuerystringItems();
                    this.preselectLocationHashItems();
                });
            },
            productIndex: 0,
            productIndexForPrice: 0,
            optionIsActive(attributeId, optionId) {
                                return !!this.getAllowedAttributeOptions(attributeId).find(
                    option => option.id === optionId
                )
            },
            optionIsEnabled(attributeId, optionId) {
                                for (const productId in this.optionConfig.index) {
                    if (this.optionConfig.index[productId][attributeId] === optionId) {
                        return true;
                    }
                }
                return false;
            },
            findSimpleIndex() {
                                this.productIndex = this.calculateSimpleIndexForPartialSelection(this.selectedValues);
                this.productIndexForPrice = this.findCheapestProductForPartialSelection(this.selectedValues);
            },
            calculateSimpleIndexForPartialSelection(selectedValues) {
                if (selectedValues.length === 0) return 0;
                return this.findProductIdsForPartialSelection(selectedValues)[0];
            },
            calculateSimpleIndexForFullSelection(selectedValues) {
                if (! this.isFullSelection(selectedValues)) return false;

                const productIndexes = this.optionConfig.index;
                return Object.keys(productIndexes).find(productIndex => {
                    const productCandidateOptions = productIndexes[productIndex];

                    for (const productOption in productCandidateOptions) {
                        if (
                            !selectedValues[productOption] ||
                            selectedValues[productOption] !== productCandidateOptions[productOption]
                        ) {
                            return false;
                        }
                    }
                    return productIndex;
                });
            },
            findAllowedAttributeOptions() {
                                this.allowedAttributeOptions = this.calculateAllowedAttributeOptions(this.selectedValues);
            },
            calculateAllowedAttributeOptions(selectedValues) {
                const allAttributes = this.optionConfig.attributes;
                const allAttributesSorted = Object.values(allAttributes).sort((a,b) => {
                    return a.position - b.position
                });

                const newAllowedAttributeOptions = [];

                allAttributesSorted.forEach(attribute => {
                    const selectionWithoutAttr = Object.assign({}, this.removeAttrFromSelection(selectedValues, attribute.id));
                    const availableIndexes = this.calculateAvailableProductIndexes(selectionWithoutAttr);
                    newAllowedAttributeOptions[attribute.id] = allAttributes[attribute.id].options.filter(option => {
                        return !!option.products.find(product => {
                            return availableIndexes.includes(product);
                        })
                    });
                });
                return newAllowedAttributeOptions;
            },
            calculateAvailableProductIndexes(selectedOptions) {
                if (Object.keys(selectedOptions).length === 0) {
                                        if (Object.values(this.optionConfig.salable || {}).length) {
                                                return [].concat.apply([], [].concat.apply([], Object.values(this.optionConfig.salable).map(Object.values))).filter((x, i, a) => a.indexOf(x) === i)
                    }
                                        return Object.keys(this.optionConfig.index);
                }

                                const selectedIds = Object.keys(selectedOptions);
                if (Object.values(this.optionConfig.salable || {}).length) {
                                        const selectedOptionIndexes = selectedIds.map(attrId => {
                        const optionValue = selectedOptions[attrId];
                        return this.optionConfig.salable[attrId] && this.optionConfig.salable[attrId][optionValue] || []
                    })
                                        return selectedOptionIndexes.reduce((acc, optionIndexes) => {
                        return acc.filter(index => optionIndexes.includes(index));
                    });
                } else {
                                        const productIndexes = this.optionConfig.index;
                    return Object.keys(productIndexes).filter(index => {
                                                for (const attrId of selectedIds) {
                            if (productIndexes[index][attrId] !== `${selectedOptions[attrId]}`) return false
                        }
                        return true
                    });
                }
            },
            findAttributeByOptionId(optionId) {
                for (const attributeId in this.optionConfig.attributes) {
                    const attributeOptions = this.optionConfig.attributes[attributeId].options || [];
                    if (attributeOptions.find(option => option.id === optionId)) {
                        return attributeId;
                    }
                }
            },
            getAllowedAttributeOptions(attributeId) {
                return this.allowedAttributeOptions[attributeId] || []
            },
            getAllAttributeOptions(attributeId) {
                return (
                    this.optionConfig.attributes[attributeId] &&
                    this.optionConfig.attributes[attributeId].options
                ) || []
            },
            getProductIdsForOption(option) {
                const attributeId = this.findAttributeByOptionId(option.id);
                const allOptions = this.optionConfig.attributes[attributeId];
                const opt = (allOptions && allOptions.options || []).find(o => o.id === option.id);
                return opt && opt.products
                    ? opt.products
                    : [];
            },
            findProductIdsForPartialSelection(optionSelection) {
                const candidateProducts = Object.values(optionSelection).reduce((candidates, optionId) => {
                    const newCandidates = this.getProductIdsForOption({id: optionId});
                    return candidates === null
                        ? newCandidates
                        : candidates.filter(productId => newCandidates.includes(productId));
                }, null);
                return candidateProducts || [];
            },
            findCheapestProductForPartialSelection(optionSelection) {
                const candidateProducts = this.findProductIdsForPartialSelection(optionSelection);
                return candidateProducts.reduce((cheapest, simpleIdx) => {
                    // in the first iteration we start with simpleIdx as the currently cheapest product
                    if (! this.optionConfig.optionPrices[cheapest]) return simpleIdx;
                    const knownCheapestPrice = this.optionConfig.optionPrices[cheapest].finalPrice.amount;
                    return knownCheapestPrice > this.optionConfig.optionPrices[simpleIdx].finalPrice.amount
                        ? simpleIdx
                        : cheapest;
                }, 0)
            },
            findProductIdToUseForOptionPrice(option) {
                // try to find a product for a complete selection
                const attributeId = this.findAttributeByOptionId(option.id);
                const optionSelection = Object.assign({}, this.selectedValues, {[attributeId]: option.id});
                const matchingSimpleIndex = this.calculateSimpleIndexForFullSelection(optionSelection);
                // if there is no complete selection, use the cheapest product for the option
                return matchingSimpleIndex || this.findCheapestProductForPartialSelection(optionSelection);
            },
            getAttributeOptionLabel(option) {
                const optionProduct = this.findProductIdToUseForOptionPrice(option);

                if ((! optionProduct) || (optionProduct === this.productIndexForPrice)) {
                    return option.label;
                }

                const currentPrice = this.getOptionPriceAdjustmentBasePrice();

                if (this.optionConfig.optionPrices[optionProduct]) {
                    const optionPrice = this.optionConfig.optionPrices[optionProduct].finalPrice.amount;
                    if (optionPrice !== currentPrice){
                        return option.label + ' ' + hyva.formatPrice(optionPrice - currentPrice, true);
                    }
                }
                return option.label;
            },
            getOptionPriceAdjustmentBasePrice() {
                if (this.optionConfig.optionPrices[this.productIndexForPrice]) {
                    return this.optionConfig.optionPrices[this.productIndexForPrice].finalPrice.amount
                }
                return this.optionConfig.prices.finalPrice.amount; // default price if no option selection
            },
            clearOptionIfActive(optionId, value) {
                if (this.selectedValues[optionId] === value) {
                    this.blurLabel()
                    this.changeOption(optionId, '')
                }
            },
            removeAttrFromSelection(selectedValues, attributeId) {
                                attributeId = parseInt(attributeId);
                return selectedValues.reduce((newSelection, val, attr) => {
                    if (attr !== attributeId) {
                        newSelection[attr] = val;
                    }
                    return newSelection;
                }, []);
            },
            changeOption(attributeId, value) {
                if (value === '') {
                    this.selectedValues = this.removeAttrFromSelection(this.selectedValues, attributeId)
                } else if (value && this.getAllowedAttributeOptions(attributeId).find(option => option.id === value)) {
                                        this.selectedValues[attributeId] = value;
                }
                this.findSimpleIndex();
                this.findAllowedAttributeOptions();
                this.updatePrices();
                this.updateGallery();

                const candidates = this.findProductIdsForPartialSelection(this.selectedValues);

                window.dispatchEvent(
                    new CustomEvent(
                        'configurable-selection-changed',
                        {
                            detail: {
                                productId: this.productId,
                                optionId: attributeId,
                                value: value,
                                productIndex: this.productIndex,
                                selectedValues: this.selectedValues,
                                candidates: candidates,
                                skuCandidates: Object.values(candidates).map(id => this.optionConfig.sku[id]),
                            }
                        }
                    )
                );
            },
            calculateIsMinimalPrice() {
                return ! this.isFullSelection(this.selectedValues);
            },
            isFullSelection(selectedValues) {
                return Object.values(selectedValues).length === Object.keys(this.optionConfig.attributes).length;
            },
            updatePrices() {
                const value = this.optionConfig.optionPrices[this.productIndexForPrice] || this.optionConfig.prices;
                window.dispatchEvent(
                    new CustomEvent(
                        "update-prices-" + this.productId,
                        {
                            detail: Object.assign(
                                value,
                                { isMinimalPrice: this.calculateIsMinimalPrice() }
                            )
                        }
                    )
                );
            },
            updateGallery () {
                if (this.productIndex) {
                    const images = this.optionConfig.images[this.productIndex];
                    images && window.dispatchEvent(new CustomEvent(
                        "update-gallery",
                        { detail: this.sortImagesByPosition(images) }
                    ));
                } else {
                    window.dispatchEvent(new Event("reset-gallery"));
                }
            },
            sortImagesByPosition(images) {
                return images.sort((x, y) => {
                    return x.position === y.position ? 0 : (parseInt(x.position) > parseInt(y.position) ? 1 : -1)
                });
            },
            onGetCartData(data) {
                            },
            preselectCartItems(data) {
                // pre-select options based on cart data for current (quote) itemId
                const cart = data && data.cart;
                if (cart && cart.items) {
                    const cartItem = cart.items.find((item) => {
                        return (
                            item.item_id === this.itemId
                            && item.product_id === this.productId
                        )
                    });
                    if (cartItem && cartItem.options && cartItem.options.length) {
                        cartItem.options.map(option => {
                            this.changeOption(option.option_id, option.option_value);
                        })
                    }
                }
            },
            preselectQuerystringItems() {
                // pre-select option like ?size=167
                const urlQueryParams = new URLSearchParams(window.location.search.replace('?',''));
                this.preselectItemsBasedOnLocation(attribute => urlQueryParams.get(attribute.code));
            },
            preselectLocationHashItems() {
                // pre-select option like #144=167
                const urlHashParams = new URLSearchParams(window.location.hash.replace('#',''));
                this.preselectItemsBasedOnLocation(attribute => urlHashParams.get(attribute.id));
            },
            preselectItemsBasedOnLocation(getLocationValue) {
                Object.values(this.optionConfig.attributes).map(attribute => {
                    const v = getLocationValue(attribute);
                    v && this.changeOption(attribute.id, v)
                });
            }
        }
    }
</script>

<script>
    function initSwatchOptions(swatchConfig) {
        return {
            swatchConfig,
            getAttributeSwatchData(attributeId) {
                const swatchConfig = Object.assign({}, this.swatchConfig[attributeId]);
                swatchConfig['details'] = JSON.parse(swatchConfig['additional_data']);

                return swatchConfig;
            },
            mapSwatchTypeNumberToTypeCode(typeNumber) {
                switch ("" + typeNumber) {
                    case "1":
                        return "color"
                    case "2":
                        return "image"
                    case "3":
                        return "empty"
                    case "0":
                    default:
                        return "text"
                }
            },
            getTypeOfFirstOption(attributeId) {
                for (const optionId in this.swatchConfig[attributeId]) {
                    const option = this.swatchConfig[attributeId][optionId];
                    if (typeof option.type !== 'undefined') {
                        return this.mapSwatchTypeNumberToTypeCode(option.type);
                    }
                }
            },
            getVisualSwatchType(attributeId, targetOptionId) {
                // If a type configuration is present for the given option id, use it
                const config = this.swatchConfig[attributeId];
                if (config[targetOptionId] && typeof config[targetOptionId].type !== 'undefined') {
                    return this.mapSwatchTypeNumberToTypeCode(config[targetOptionId].type);
                }

                // Otherwise - if no config is present for the target option - use the type of the first option
                // with a type property from the attribute, thus assuming its the same type as the target option.
                // (This edge case condition can occur on single swatch products if some options are not salable)
                return this.getTypeOfFirstOption(attributeId);
            },
            getSwatchType(attributeId, optionId) {
                // Deserialize the attribute details the first time they are used
                if (this.swatchConfig[attributeId] && ! this.swatchConfig[attributeId].details) {
                    this.swatchConfig[attributeId] = this.getAttributeSwatchData(attributeId);
                }
                const type =  this.swatchConfig[attributeId] &&
                    this.swatchConfig[attributeId].details &&
                    this.swatchConfig[attributeId].details.swatch_input_type ||
                    "empty";
                return type === 'visual' ? this.getVisualSwatchType(attributeId, optionId) : type;
            },
            isTextSwatch(attributeId, optionId) {
                return this.getSwatchType(attributeId, optionId) === 'text';
            },
            isVisualSwatch(attributeId, optionId) {
                const type = this.getSwatchType(attributeId, optionId);

                return ['image', 'color'].includes(type);
            },
            getSwatchBackgroundStyle(attributeId, optionId) {
                const config = this.getSwatchConfig(attributeId, optionId);
                const type = this.getSwatchType(attributeId, optionId);

                if (type === "color") {
                        return 'background-color:' + config.value;
                } else if (type === "image") {
                        return "background: #fff url('" + config.value + "') no-repeat center";
                } else {
                    return '';
                }
            },
            getSwatchText(attributeId, optionId) {
                const config = this.getSwatchConfig(attributeId, optionId);
                return config.label || config.value || this.getOptionLabelFromOptionConfig(attributeId, optionId);
            },
            getOptionLabelFromOptionConfig(attributeId, optionId) {
                // Fallback if no value is present in swatchConfig data
                // Reference issue https://gitlab.hyva.io/hyva-themes/magento2-default-theme/-/issues/190
                const option = this.getAllAttributeOptions(attributeId).filter(option => option.id === optionId);
                return option && option[0] && option[0].label ||'';
            },
            getSwatchConfig(attributeId, optionId) {
                return this.swatchConfig[attributeId] && this.swatchConfig[attributeId][optionId]
                    ? this.swatchConfig[attributeId][optionId]
                    : false;
            },
            activeTooltipItem: false,
            tooltipPositionElement: false,
            isTooltipVisible() {
                return this.activeTooltipItem &&
                    this.getSwatchConfig(
                        this.activeTooltipItem.attribute,
                        this.activeTooltipItem.item
                    );
            },
            isFirstItemCol() {
                return this.activeTooltipItem.index === 0;
            },
            getTooltipImageStyle(attributeId, optionId) {
                const config = this.getSwatchConfig(attributeId, optionId);
                const type = this.getSwatchType(attributeId, optionId);

                if (type === "color") {
                    return 'background-color:' + config.value + '; width: 110px; height: 90px;';
                } else if (type === "image") {
                    return "background: #ffffff url('" + config.thumb +
                        "') center center no-repeat; width: 110px; height: 90px;";
                } else {
                    return 'display:none';
                }
            },
            getTooltipPosition() {
                return this.tooltipPositionElement ?
                    `top: ${this.tooltipPositionElement.offsetTop}px;` +
                    `left: ${
                        this.tooltipPositionElement.offsetLeft - (
                            this.tooltipPositionElement.closest('.snap') &&
                            this.tooltipPositionElement.closest('.snap').scrollLeft ||
                            0
                        )
                    }px;` : ''
            },
            getTooltipLabel() {
                return this.getSwatchConfig(this.activeTooltipItem.attribute, this.activeTooltipItem.item).label
            },
            focusedLabel: false,
            focusLabel(optionId) {
                this.focusedLabel = optionId;
            },
            blurLabel() {
                this.focusedLabel = false;
            },
            showSwatches: false,
            initShowSwatchesIntersect() {
                if ('IntersectionObserver' in window && !window.scrollY) {
                    let io = new IntersectionObserver(
                        entries => {
                            entries.map(entry => {
                                if (entry.isIntersecting) {
                                    this.showSwatches = true;
                                    io.unobserve(this.$root);
                                }
                            })
                        }
                    );
                    io.observe(this.$root);
                } else {
                    this.showSwatches = true
                }
            }
        }
    }
</script>
<script type="application/javascript">
    const saveLoggedInStatusFromEvent = event => {
        const isLoggedIn = event?.detail?.data?.customer;
        if (isLoggedIn) {
            window.customer = {isLoggedIn: typeof(event?.detail?.data?.customer?.fullname) != 'undefined'};
        }
    };
    const checkLinkAuthorization = event => {
        if (event) {
            const linkTarget = event.target.getAttribute('href');
            if (!window?.customer?.isLoggedIn) {
                event.target.href="#";
                document.dispatchEvent(new CustomEvent('toggle-authentication', {
                    bubbles: true,
                    detail: {
                        forceAuthentication:true,
                        url: linkTarget
                    }
                }));
            }
        }
    };
    const manageAuthorizationEvents = event => {
        if (event) {
            saveLoggedInStatusFromEvent(event);
            linkAuthorizationManager(event);
            checkUrlAuthorization(event);
        }
    };
    const checkUrlAuthorization = (event) => {
        const currentParams = new URLSearchParams(window.location.search);
        const strRedirectParam = 'redirectOnLogin';
        if (currentParams.has(strRedirectParam)) {
            const redirectUrl = currentParams.get(strRedirectParam);
            if (redirectUrl) {
                if (!window?.customer?.isLoggedIn) {
                    document.dispatchEvent(new CustomEvent('toggle-authentication', {
                        bubbles: true,
                        detail: {
                            url: redirectUrl
                        }
                    }));
                } else {
                    window.location.assign(decodeURI(redirectUrl));
                }
            } else {
                console.log('Redirect with invalid or missing URL')
            }
        }
    };
    const linkAuthorizationManager = event => {
        const strRequireAuthorization = 'requireAuthorization-link';
        const elsAuthorizationLinks = Array.from(document.querySelectorAll(`.${strRequireAuthorization}`));
        if (elsAuthorizationLinks.length) {
            elsAuthorizationLinks.forEach(elLink => elLink.addEventListener('click', checkLinkAuthorization));
        }
    };
    document.addEventListener('DOMContentLoaded', manageAuthorizationEvents);
    window.addEventListener('private-content-loaded', manageAuthorizationEvents);
</script>
<script type="text/json" id="default-section-data">
    {"messages":[],"customer":[],"compare-products":[],"last-ordered-items":[],"cart":[],"directory-data":{"US":{"name":"United States","regions":{"1":{"code":"AL","name":"Alabama"},"4":{"code":"AK","name":"Alaska"},"7":{"code":"AS","name":"American Samoa"},"10":{"code":"AZ","name":"Arizona"},"13":{"code":"AR","name":"Arkansas"},"16":{"code":"AE","name":"Armed Forces Africa"},"19":{"code":"AA","name":"Armed Forces Americas"},"22":{"code":"AE","name":"Armed Forces Canada"},"25":{"code":"AE","name":"Armed Forces Europe"},"28":{"code":"AE","name":"Armed Forces Middle East"},"31":{"code":"AP","name":"Armed Forces Pacific"},"34":{"code":"CA","name":"California"},"37":{"code":"CO","name":"Colorado"},"40":{"code":"CT","name":"Connecticut"},"43":{"code":"DE","name":"Delaware"},"46":{"code":"DC","name":"District of Columbia"},"49":{"code":"FM","name":"Federated States Of Micronesia"},"52":{"code":"FL","name":"Florida"},"55":{"code":"GA","name":"Georgia"},"58":{"code":"GU","name":"Guam"},"61":{"code":"HI","name":"Hawaii"},"64":{"code":"ID","name":"Idaho"},"67":{"code":"IL","name":"Illinois"},"70":{"code":"IN","name":"Indiana"},"73":{"code":"IA","name":"Iowa"},"76":{"code":"KS","name":"Kansas"},"79":{"code":"KY","name":"Kentucky"},"82":{"code":"LA","name":"Louisiana"},"85":{"code":"ME","name":"Maine"},"88":{"code":"MH","name":"Marshall Islands"},"91":{"code":"MD","name":"Maryland"},"94":{"code":"MA","name":"Massachusetts"},"97":{"code":"MI","name":"Michigan"},"100":{"code":"MN","name":"Minnesota"},"103":{"code":"MS","name":"Mississippi"},"106":{"code":"MO","name":"Missouri"},"109":{"code":"MT","name":"Montana"},"112":{"code":"NE","name":"Nebraska"},"115":{"code":"NV","name":"Nevada"},"118":{"code":"NH","name":"New Hampshire"},"121":{"code":"NJ","name":"New Jersey"},"124":{"code":"NM","name":"New Mexico"},"127":{"code":"NY","name":"New York"},"130":{"code":"NC","name":"North Carolina"},"133":{"code":"ND","name":"North Dakota"},"136":{"code":"MP","name":"Northern Mariana Islands"},"139":{"code":"OH","name":"Ohio"},"142":{"code":"OK","name":"Oklahoma"},"145":{"code":"OR","name":"Oregon"},"148":{"code":"PW","name":"Palau"},"151":{"code":"PA","name":"Pennsylvania"},"154":{"code":"PR","name":"Puerto Rico"},"157":{"code":"RI","name":"Rhode Island"},"160":{"code":"SC","name":"South Carolina"},"163":{"code":"SD","name":"South Dakota"},"166":{"code":"TN","name":"Tennessee"},"169":{"code":"TX","name":"Texas"},"172":{"code":"UT","name":"Utah"},"175":{"code":"VT","name":"Vermont"},"178":{"code":"VI","name":"Virgin Islands"},"181":{"code":"VA","name":"Virginia"},"184":{"code":"WA","name":"Washington"},"187":{"code":"WV","name":"West Virginia"},"190":{"code":"WI","name":"Wisconsin"},"193":{"code":"WY","name":"Wyoming"}}},"data_id":1781000178},"captcha":[],"wishlist":{"items":[]},"instant-purchase":[],"loggedAsCustomer":[],"multiplewishlist":[],"persistent":[],"review":[],"hyva_enterprise":[],"hyva_checkout":[],"recently_viewed_product":[],"recently_compared_product":[],"product_data_storage":[],"paypal-billing-agreement":[]}</script>
</div><script type="text/javascript">window.NREUM||(NREUM={});NREUM.info={"beacon":"bam.nr-data.net","licenseKey":"NRJS-349a75c2ea128bf6874","applicationID":"1562250045","transactionName":"MgcHY0BWVkFYBhEKDQtNJFRGXldcFgYIEE0VAwJSHUFRV04=","queueTime":0,"applicationTime":389,"atts":"HkAQFQhMRR4bBEdZGRgf","errorBeacon":"bam.nr-data.net","agent":""}</script></body>
</html>
