UCP status report
aclens.com
aclens.com responded, but its profile did not pass schema validation.
HTTP 200
Release none
Checked 28 Nov, 11:00 UTC
To fix first
Problem
Serve profile as application/json
The profile URL did not return parseable JSON.
Also worth fixing
To fix
Publish Organization schema (JSON-LD) on the homepage
No Organization-typed JSON-LD detected on your homepage.
To fix
Publish a /llms.txt brand brief
No /llms.txt file detected at the root of your domain.
To fix
Publish a sitemap.xml
No sitemap.xml detected at the root of your domain.
To fix
Add Open Graph meta tags to the homepage
OG tags missing or incomplete on your homepage.
Passed
5 OK
HTTPS, AI bot access, Mobile viewport meta, Public keys published, No validation warnings
Show all 5
- HTTPS: Profile URL uses https://
- AI bot access: robots.txt allows /.well-known/ucp
- Mobile viewport meta: <meta name="viewport"> present
- Public keys published: Keys published at the top level
- No validation warnings: No outstanding validation issues
Check trace
How aclens.com answered our check
What our check asked for and read, under the UCP spec's own sections, and every request we made.
- Requests
- 5
- Connections
- 4
- At the store, summed
- 153 ms
- Network, summed
- 2.02 s
- Compressed
- no
- Requests signed
- yes
-
Discovery↗Discovery & negotiationhow agents find the profileFound · 1 request
-
Identity & Auth↗Identity & authenticationhow each side proves who it isSigned by us · 0 keys
-
Payment↗Payment architecturehow the store takes paymentNone declared
-
Transport↗Transport layerhow agents call the storeNone declared
-
Capabilities↗Standard capabilitieswhat agents can do there0 declared
UCP CheckerUCPCheckerBot/1.0
- Signed · Web Bot Auth
- key K_DlV2MybP…
- Discovery & negotiation/.well-known/ucp · 200
GET /.well-known/ucp301 Moved Permanently18 ms
- read from profileIdentity & authenticationsigned · 0 keys
- read from profilePayment architecturenone declared
- not calledTransport layernone declared
- read from profileStandard capabilities0 declared
- Outside UCProbots.txt · homepage · /llms.txt
GET /robots.txt301 Moved Permanently205 msGET /301 Moved Permanently650 msGET /llms.txt301 Moved Permanently650 msGET /sitemap.xml301 Moved Permanently650 ms
- Checked its linksspec · schemas · handlers
www.discountcontacts.com · 10 requestsall answer 200 OKup to 635 ms
Found
Discovery & negotiation1 request
Served at /.well-known/ucp with 200 OK, 437.1 KB. robots.txt allows /.well-known/ucp.
Read
Identity & authenticationread from profile
Every request we made was signed (Web Bot Auth, RFC 9421). The profile publishes no keys, so the store's own signed messages can't be checked.
None
Payment architectureread from profile
No payment handlers declared.
None
Transport layernot called
No services are declared.
Read
Standard capabilitiesread from profile
0 declared at 2026-08-25.
Discovery & negotiation1 request · 301 Moved Permanently18 ms
GET /.well-known/ucp
301 Moved Permanently
→ www.discountcontacts.com/welcome/aclens
18 ms
Redirected to https://www.discountcontacts.com/welcome/aclens.
- DNS 0 ms
- Wait 17 ms
- Download 0 ms
- URL
https://aclens.com/.well-known/ucp- Server
104.17.78.96- Sent user-agent
UCPCheckerBot/1.0 (+https://ucpchecker.com/methodology)- Sent accept
application/json- Sent accept-encoding
gzip, deflate, br, zstd- Sent signature-agent
sig1="https://ucpchecker.com/.well-known/http-message-signatures-directory"- Sent signature
- Web Bot Auth (RFC 9421)
- Got server
cloudflare- Got content-type
text/html; charset=UTF-8- Got location
https://www.discountcontacts.com/welcome/aclens- Got cf-ray
a618de085b880ab9-EWR
Outside UCP · its other files4 requests · 4 × 301 Moved Permanently1,262 ms
GET /robots.txt
301 Moved Permanently
→ www.discountcontacts.com/welcome/aclens
205 ms
Redirected to https://www.discountcontacts.com/welcome/aclens.
- DNS 0 ms
- Connect 3 ms
- TLS 192 ms
- Wait 8 ms
- Download 0 ms
- URL
https://aclens.com/robots.txt- Server
104.17.78.96- Sent user-agent
UCPCheckerBot/1.0 (+https://ucpchecker.com/methodology)- Sent accept
text/plain- Sent accept-encoding
gzip, deflate, br, zstd- Sent signature-agent
sig1="https://ucpchecker.com/.well-known/http-message-signatures-directory"- Sent signature
- Web Bot Auth (RFC 9421)
- Got server
cloudflare- Got content-type
text/html; charset=UTF-8- Got location
https://www.discountcontacts.com/welcome/aclens- Got cf-ray
a618de06d9820ab9-EWR
GET /
301 Moved Permanently
→ www.discountcontacts.com/welcome/aclens
650 ms
Redirected to https://www.discountcontacts.com/welcome/aclens.
- DNS 0 ms
- Connect 2 ms
- TLS 600 ms
- Wait 46 ms
- Download 0 ms
- URL
https://aclens.com/- Server
104.17.78.96- Sent user-agent
UCPCheckerBot/1.0 (+https://ucpchecker.com/methodology)- Sent accept-encoding
gzip, deflate, br, zstd- Sent signature-agent
sig1="https://ucpchecker.com/.well-known/http-message-signatures-directory"- Sent signature
- Web Bot Auth (RFC 9421)
- Got server
cloudflare- Got content-type
text/html; charset=UTF-8- Got location
https://www.discountcontacts.com/welcome/aclens- Got cf-ray
a618de0d3d98e97b-EWR
GET /llms.txt
301 Moved Permanently
→ www.discountcontacts.com/welcome/aclens
650 ms
Redirected to https://www.discountcontacts.com/welcome/aclens.
- DNS 0 ms
- Connect 62 ms
- TLS 545 ms
- Wait 42 ms
- Download 0 ms
- URL
https://aclens.com/llms.txt- Server
104.17.78.96- Sent user-agent
UCPCheckerBot/1.0 (+https://ucpchecker.com/methodology)- Sent accept
text/plain- Sent accept-encoding
gzip, deflate, br, zstd- Sent signature-agent
sig1="https://ucpchecker.com/.well-known/http-message-signatures-directory"- Sent signature
- Web Bot Auth (RFC 9421)
- Got server
cloudflare- Got content-type
text/html; charset=UTF-8- Got location
https://www.discountcontacts.com/welcome/aclens- Got cf-ray
a618de0d3e3fc345-EWR
GET /sitemap.xml
301 Moved Permanently
→ www.discountcontacts.com/welcome/aclens
650 ms
Redirected to https://www.discountcontacts.com/welcome/aclens.
- DNS 0 ms
- Connect 121 ms
- TLS 490 ms
- Wait 37 ms
- Download 0 ms
- URL
https://aclens.com/sitemap.xml- Server
104.17.78.96- Sent user-agent
UCPCheckerBot/1.0 (+https://ucpchecker.com/methodology)- Sent accept
application/xml,text/xml- Sent accept-encoding
gzip, deflate, br, zstd- Sent signature-agent
sig1="https://ucpchecker.com/.well-known/http-message-signatures-directory"- Sent signature
- Web Bot Auth (RFC 9421)
- Got server
cloudflare- Got content-type
text/html; charset=UTF-8- Got location
https://www.discountcontacts.com/welcome/aclens- Got cf-ray
a618de0d4eb44352-EWR
Links in the profile · spec, schemas, handlers10 requests · 10 × 200 OK1,737 ms
GET www.discountcontacts.com/welcome/aclens
200 OK
437.1 KB · text/html
206 ms
Answered.
- DNS 6 ms
- Connect 2 ms
- TLS 159 ms
- Wait 22 ms
- Download 14 ms
- URL
https://www.discountcontacts.com/welcome/aclens- Server
104.18.28.184- Sent user-agent
UCPCheckerBot/1.0 (+https://ucpchecker.com/methodology)- Sent accept
text/plain- Sent accept-encoding
gzip, deflate, br, zstd- Sent signature-agent
sig1="https://ucpchecker.com/.well-known/http-message-signatures-directory"- Sent signature
- Web Bot Auth (RFC 9421)
- Got server
cloudflare- Got content-type
text/html; charset=UTF-8- Got content-encoding
br- Got cache-control
no-store, no-cache, must-revalidate, max-age=0- Got cf-ray
a618de08085abdee-EWR
GET www.discountcontacts.com/welcome/aclens
200 OK
437.1 KB · text/html
33 ms
Answered.
- DNS 0 ms
- Wait 13 ms
- Download 16 ms
- URL
https://www.discountcontacts.com/welcome/aclens- Server
104.18.28.184- Sent user-agent
UCPCheckerBot/1.0 (+https://ucpchecker.com/methodology)- Sent accept
application/json- Sent accept-encoding
gzip, deflate, br, zstd- Sent signature-agent
sig1="https://ucpchecker.com/.well-known/http-message-signatures-directory"- Sent signature
- Web Bot Auth (RFC 9421)
- Got server
cloudflare- Got content-type
text/html; charset=UTF-8- Got content-encoding
br- Got cache-control
no-store, no-cache, must-revalidate, max-age=0- Got cf-ray
a618de08790ebdee-EWR
GET www.discountcontacts.com/welcome/aclens
200 OK
437.1 KB · text/html
600 ms
Answered.
- DNS 7 ms
- Connect 214 ms
- TLS 222 ms
- Wait 147 ms
- Download 8 ms
- URL
https://www.discountcontacts.com/welcome/aclens- Server
104.18.28.184- Sent user-agent
UCPCheckerBot/1.0 (+https://ucpchecker.com/methodology)- Sent accept
application/json- Sent accept-encoding
gzip, deflate, br, zstd- Sent signature-agent
sig1="https://ucpchecker.com/.well-known/http-message-signatures-directory"- Sent signature
- Web Bot Auth (RFC 9421)
- Got server
cloudflare- Got content-type
text/html; charset=UTF-8- Got content-encoding
br- Got cache-control
no-store, no-cache, must-revalidate, max-age=0- Got cf-ray
a618de107fc3182d-EWR
GET www.discountcontacts.com/welcome/aclens
200 OK
437.1 KB · text/html
628 ms
Answered.
- DNS 7 ms
- Connect 6 ms
- TLS 409 ms
- Wait 159 ms
- Download 46 ms
- URL
https://www.discountcontacts.com/welcome/aclens- Server
104.18.28.184- Sent user-agent
UCPCheckerBot/1.0 (+https://ucpchecker.com/methodology)- Sent accept-encoding
gzip, deflate, br, zstd- Sent signature-agent
sig1="https://ucpchecker.com/.well-known/http-message-signatures-directory"- Sent signature
- Web Bot Auth (RFC 9421)
- Got server
cloudflare- Got content-type
text/html; charset=UTF-8- Got content-encoding
br- Got cache-control
no-store, no-cache, must-revalidate, max-age=0- Got cf-ray
a618de104ac0cef2-EWR
GET www.discountcontacts.com/welcome/aclens
200 OK
437.1 KB · text/html
631 ms
Answered.
- DNS 8 ms
- Connect 62 ms
- TLS 357 ms
- Wait 157 ms
- Download 46 ms
- URL
https://www.discountcontacts.com/welcome/aclens- Server
104.18.28.184- Sent user-agent
UCPCheckerBot/1.0 (+https://ucpchecker.com/methodology)- Sent accept
text/plain- Sent accept-encoding
gzip, deflate, br, zstd- Sent signature-agent
sig1="https://ucpchecker.com/.well-known/http-message-signatures-directory"- Sent signature
- Web Bot Auth (RFC 9421)
- Got server
cloudflare- Got content-type
text/html; charset=UTF-8- Got content-encoding
br- Got cache-control
no-store, no-cache, must-revalidate, max-age=0- Got cf-ray
a618de105e493869-EWR
GET www.discountcontacts.com/welcome/aclens
200 OK
437.1 KB · text/html
633 ms
Answered.
- DNS 8 ms
- Connect 136 ms
- TLS 295 ms
- Wait 148 ms
- Download 45 ms
- URL
https://www.discountcontacts.com/welcome/aclens- Server
104.18.28.184- Sent user-agent
UCPCheckerBot/1.0 (+https://ucpchecker.com/methodology)- Sent accept
application/xml,text/xml- Sent accept-encoding
gzip, deflate, br, zstd- Sent signature-agent
sig1="https://ucpchecker.com/.well-known/http-message-signatures-directory"- Sent signature
- Web Bot Auth (RFC 9421)
- Got server
cloudflare- Got content-type
text/html; charset=UTF-8- Got content-encoding
br- Got cache-control
no-store, no-cache, must-revalidate, max-age=0- Got cf-ray
a618de1068e472a5-EWR
GET www.discountcontacts.com/welcome/aclens
200 OK
437.1 KB · text/html
633 ms
Answered.
- DNS 7 ms
- Connect 288 ms
- TLS 153 ms
- Wait 150 ms
- Download 32 ms
- URL
https://www.discountcontacts.com/welcome/aclens- Server
104.18.28.184- Sent user-agent
UCPCheckerBot/1.0 (+https://ucpchecker.com/methodology)- Sent accept
application/json- Sent accept-encoding
gzip, deflate, br, zstd- Sent signature-agent
sig1="https://ucpchecker.com/.well-known/http-message-signatures-directory"- Sent signature
- Web Bot Auth (RFC 9421)
- Got server
cloudflare- Got content-type
text/html; charset=UTF-8- Got content-encoding
br- Got cache-control
no-store, no-cache, must-revalidate, max-age=0- Got cf-ray
a618de1079e510f3-EWR
GET www.discountcontacts.com/welcome/aclens
200 OK
437.1 KB · text/html
635 ms
Answered.
- DNS 7 ms
- Connect 353 ms
- TLS 93 ms
- Wait 154 ms
- Download 27 ms
- URL
https://www.discountcontacts.com/welcome/aclens- Server
104.18.28.184- Sent user-agent
UCPCheckerBot/1.0 (+https://ucpchecker.com/methodology)- Sent accept
application/json- Sent accept-encoding
gzip, deflate, br, zstd- Sent signature-agent
sig1="https://ucpchecker.com/.well-known/http-message-signatures-directory"- Sent signature
- Web Bot Auth (RFC 9421)
- Got server
cloudflare- Got content-type
text/html; charset=UTF-8- Got content-encoding
br- Got cache-control
no-store, no-cache, must-revalidate, max-age=0- Got cf-ray
a618de108cf8c46d-EWR
GET www.discountcontacts.com/welcome/aclens
200 OK
437.1 KB · text/html
238 ms
Answered.
- DNS 0 ms
- Connect 40 ms
- TLS 163 ms
- Wait 18 ms
- Download 15 ms
- URL
https://www.discountcontacts.com/welcome/aclens- Server
104.18.28.184- Sent user-agent
UCPCheckerBot/1.0 (+https://ucpchecker.com/methodology)- Sent accept
application/json- Sent accept-encoding
gzip, deflate, br, zstd- Sent signature-agent
sig1="https://ucpchecker.com/.well-known/http-message-signatures-directory"- Sent signature
- Web Bot Auth (RFC 9421)
- Got server
cloudflare- Got content-type
text/html; charset=UTF-8- Got content-encoding
br- Got cache-control
no-store, no-cache, must-revalidate, max-age=0- Got cf-ray
a618de118fcb786b-EWR
GET www.discountcontacts.com/welcome/aclens
200 OK
437.1 KB · text/html
251 ms
Answered.
- DNS 0 ms
- Connect 104 ms
- TLS 103 ms
- Wait 34 ms
- Download 8 ms
- URL
https://www.discountcontacts.com/welcome/aclens- Server
104.18.28.184- Sent user-agent
UCPCheckerBot/1.0 (+https://ucpchecker.com/methodology)- Sent accept
text/plain,text/markdown- Sent accept-encoding
gzip, deflate, br, zstd- Sent signature-agent
sig1="https://ucpchecker.com/.well-known/http-message-signatures-directory"- Sent signature
- Web Bot Auth (RFC 9421)
- Got server
cloudflare- Got content-type
text/html; charset=UTF-8- Got content-encoding
br- Got cache-control
no-store, no-cache, must-revalidate, max-age=0- Got cf-ray
a618de118a781768-EWR
- DISCOVERYProfile did not pass schema validation: Response is not a valid JSON object
UCP profile as served 437.1 KB as served · 7307 lines
<!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":["rum_v2"],"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.324.1.min.js.LICENSE.txt */
(()=>{var e={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 a in s)if(void 0!==e[a])try{if(null===e[a]){r[a]=null;continue}Array.isArray(e[a])&&Array.isArray(t[a])?r[a]=Array.from(new Set([...e[a],...t[a]])):e[a]instanceof Map||e[a]instanceof Set||e[a]instanceof Date||e[a]instanceof RegExp?r[a]=e[a]:"object"==typeof e[a]&&null!==t[a]&&"object"==typeof t[a]?r[a]=i(e[a],t[a]):r[a]=e[a]}catch(e){r[a]||(0,n.R)(1,e)}return r}catch(e){(0,n.R)(2,e)}}},2555(e,t,r){"use strict";r.d(t,{f:()=>a});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 a(e){try{return!!e.licenseKey&&!!e.errorBeacon&&!!e.applicationID}catch(e){return!1}}r.d(t,["D",0,e=>(0,i.a)(e,s)])},7699(e,t,r){"use strict";var n=r(860);const i=1e6,s={[n.K7.logging]:!0,[n.K7.genericEvents]:!0,[n.K7.jserrors]:!0,[n.K7.ajax]:!0};r.d(t,["It",0,i,"KC",0,s,"qh",0,"SESSION_ERROR","zd",0,5e5])},9324(e,t,r){"use strict";r.d(t,["A",0,"@newrelic/rrweb","x",0,"1.324.1"])},981(e,t,r){"use strict";r.d(t,["R",0,{AJAX:"AjaxRequest",PA:"PageAction",UA:"UserAction",BP:"BrowserPerformance",WS:"WebSocket",SPV:"SecurityPolicyViolation",JSE:"JavaScriptError",LOG:"Log",PVE:"PageView",PVT:"PageViewTiming",SR:"SessionReplay",ST:"SessionTrace",BI:"BrowserInteraction"}])},9752(e,t,r){"use strict";const n="newrelic-iframe-",i=n+"timing-update",s=n+"api",a=n+"api-response",o=n+"vitals-update",c=n+"ajax";r.d(t,["$8",0,o,"Gi",0,a,"KU",0,c,"Pl",0,n,"cS",0,s,"cr",0,i])},6154(e,t,r){"use strict";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),a=i?window:"undefined"!=typeof WorkerGlobalScope&&("undefined"!=typeof self&&self instanceof WorkerGlobalScope&&self||"undefined"!=typeof globalThis&&globalThis instanceof WorkerGlobalScope&&globalThis),o=Boolean("hidden"===a?.document?.visibilityState),c=""+a?.location,d=/iPad|iPhone|iPod/.test(a.navigator?.userAgent),u=d&&"undefined"==typeof SharedWorker,l=(()=>{const e=a.navigator?.userAgent?.match(/Firefox[/\s](\d+\.\d+)/);return Array.isArray(e)&&e.length>=2?+e[1]:0})(),f=Date.now()-(0,n.t)();r.d(t,["OF",0,d,"RI",0,i,"WN",0,f,"bv",0,s,"gm",0,a,"lR",0,l,"m",0,c,"mw",0,o,"sb",0,u,"zk",0,()=>{const e=a?.performance?.getEntriesByType?.("navigation")?.[0];if(e&&e.responseStart>0&&e.responseStart<a.performance.now())return e}])},7295(e,t,r){"use strict";r.d(t,{Xv:()=>a,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 a(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,a;i>0?(s=r.substring(0,i),a=r.substring(i)):(s=r,a="*");let[c]=s.split(":");n.push({hostname:o(c),pathname:o(a,!0)})}}function o(e,t=!1){const r=e.replace(/[.+?^${}()|[\]\\]/g,e=>"\\"+e).replace(/\*/g,".*?");return new RegExp((t?"^":"")+r+"$")}},3241(e,t,r){"use strict";r.d(t,{W:()=>i});var n=r(6154);function i(e={}){try{n.gm.dispatchEvent(new CustomEvent("newrelic",{detail:e}))}catch(e){}}},1687(e,t,r){"use strict";r.d(t,{Ak:()=>o,Ze:()=>d,x3:()=>c});var n=r(3241),i=r(3606),s=r(860),a=r(2646);function o(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,o=i.i.handlers;if(s&&!s.aborted&&s.backlog&&o){if((0,n.W)({type:"lifecycle",name:"drain",feature:t}),r){const e=s.backlog[t],r=o[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 a.y&&!t[0].listeners(e).includes(t[1])&&t[0].on(e,t[1])})})}}s.isolatedBacklog||delete o[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)}})}},7836(e,t,r){"use strict";var n=r(384),i=r(8990),s=r(2646),a=r(5607);const o="nr@context:".concat(a.W),c=function e(t,r){var n={},a={},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 o=h(n);g(e).forEach(e=>{e.apply(o,r)});var d=v()[a[e]];d&&d.push([f,e,r,o]);return o},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])=>{a[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()[a[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,o,()=>new s.y(o)):new s.y(o)}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),r.d(t,["P",0,o,"ee",0,c])},2646(e,t,r){"use strict";r.d(t,{y:()=>n});class n{constructor(e){this.contextId=e}}},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))}},3606(e,t,r){"use strict";r.d(t,{i:()=>s});var n=r(9908);s.on=a;var i=s.handlers={};function s(e,t,r,s){a(s||n.d,i,e,t,r)}function a(e,t,r,i,s){s||(s="feature"),e||(e=n.d);var a=t[s]=t[s]||{};(a[r]=a[r]||[]).push([e,i])}},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})},5607(e,t,r){"use strict";const n=(0,r(9566).bz)();r.d(t,["W",0,n])},9566(e,t,r){"use strict";r.d(t,{LA:()=>a,ZF:()=>o,bz:()=>s,el:()=>c});var n=r(6154);function i(e,t){return e?15&e[t]:16*Math.random()|0}function s(){const e=n.gm?.crypto||n.gm?.msCrypto;let t,r=0;return e&&e.getRandomValues&&(t=e.getRandomValues(new Uint8Array(30))),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".split("").map(e=>"x"===e?i(t,r++).toString(16):"y"===e?(3&i()|8).toString(16):e).join("")}function a(e){const t=n.gm?.crypto||n.gm?.msCrypto;let r,s=0;t&&t.getRandomValues&&(r=t.getRandomValues(new Uint8Array(e)));const a=[];for(var o=0;o<e;o++)a.push(i(r,s++).toString(16));return a.join("")}function o(){return a(16)}function c(){return a(32)}},2614(e,t,r){"use strict";r.d(t,["BB",0,18e5,"Wt",0,"NRBA_SESSION::","g",0,{OFF:0,FULL:1,ERROR:2},"iL",0,{SAME_TAB:"same-tab",CROSS_TAB:"cross-tab"},"tS",0,{STARTED:"session-started",PAUSE:"session-pause",RESET:"session-reset",RESUME:"session-resume",UPDATE:"session-update"},"wk",0,144e5])},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})},1863(e,t,r){"use strict";function n(){return Math.floor(performance.now())}r.d(t,{t:()=>n})},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}},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{}}}},7866(e,t,r){"use strict";r.d(t,["Nc",0,/^\s*at Function code \(Function code:\d+:\d+\)\s*/i,"cn",0,/^\s*(?:([^@]*)(?:\(.*?\))?@)?((?:file|http|https|chrome|safari-extension).*?):(\d+)(?::(\d+))?\s*$/i,"fL",0,/^\s*at .+ \(eval at \S+ \((?:(?:file|http|https):[^)]+)?\)(?:, [^:]*:\d+:\d+)?\)$/i,"h3",0,/function (.+?)\s*\(/,"hB",0,/^\s*at (?:((?:\[object object\])?(?:[^(]*\([^)]*\))*[^()]*(?: \[as \S+\])?) )?\(?((?:file|http|https|chrome-extension):.*?)?:(\d+)(?::(\d+))?\)?\s*$/i])},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}}))}},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}},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})},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})}},3304(e,t,r){"use strict";r.d(t,{A:()=>i});var n=r(7836);function i(e){try{return JSON.stringify(e,(()=>{const e=new WeakSet;return(t,r)=>{if("object"==typeof r&&null!==r){if(e.has(r))return;e.add(r)}return r}})())??""}catch(e){try{n.ee.emit("internal-error",[e])}catch(e){}return""}}},9232(e,t,r){"use strict";r.d(t,["f",0,{MFE:"MFE",BA:"BA"}])},7560(e,t,r){"use strict";r.d(t,{N:()=>a,j:()=>c});var n=r(9119),i=r(944);const s=(0,r(6389).J)(e=>(0,i.R)(80,e));function a(e){if(!Array.isArray(e?.assets)||!e.assets.length)return;const t=e.assets.map(o).filter(Boolean);return t.length?{assets:t,scripts:t.filter(e=>e.isScript)}:void 0}function o(e){if(!e||"object"!=typeof e)return;const{matcher:t,type:r}=e;let i="string"==typeof t&&t.endsWith(".js");return void 0!==r&&(!function(e){return"script"===e||"asset"===e}(r)?s(r):i=function(e){return"script"===e}(r)),a=t,"[object RegExp]"===Object.prototype.toString.call(a)?{pattern:t,test:e=>(t.lastIndex=0,t.test((0,n.L)(e))),isScript:i}:"string"==typeof t&&t.length>0?{pattern:t,test:e=>(0,n.L)(e).includes(t),isScript:i}:void s(t);var a}function c(e,t,{scriptsOnly:r=!1}={}){if(!e||!t)return!1;return(r?e.scripts:e.assets).some(e=>e.test(t))}},5718(e,t,r){"use strict";r.d(t,{xo:()=>A,AZ:()=>v,cI:()=>g,Qr:()=>S,QL:()=>y});var n=r(6154),i=r(1863),s=r(9119),a=r(7866);class o{dom=new c;performance=new c;constructor(e){this.url=e,this.claimedBy=new Set}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}function d(e=()=>{},t){return{get:()=>void 0!==t?t:e(),set:e=>{t=e}}}let u;try{u=v(y())[0]}catch(e){u=v(e)[0]}const l=new Map;let f=[];const h=new WeakMap;function p(e){let t=h.get(e);return t||(t={weighedAssetUrls:new Set,widenedAssetUrls:new Set,recordManifestScriptWindow:(t,r)=>{t&&(e.scriptStart=e.scriptStart>0?Math.min(e.scriptStart,t):t),r&&(e.scriptEnd=e.scriptEnd>0?Math.max(e.scriptEnd,r):r)}},h.set(e,t)),t}function g(e){return l.get(e)}function m(e){const t=g(e);if(t)return t;const r=new o(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=m((0,s.L)(e.src));if(t.dom.value)return;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().forEach(e=>{if((e=>"script"===e.initiatorType||["link","fetch"].includes(e.initiatorType)&&(0,s.L)(e.name).endsWith(".js"))(e)){const t=m((0,s.L)(e.name));t.performance.value||(t.performance.start=Math.floor(e.startTime),t.performance.end=Math.floor(e.responseEnd),t.performance.value=e)}if(!f.length)return;const t=[];f.forEach(({test:r,addedAt:n},s)=>{(r(e)||(0,i.t)()-n>1e4)&&t.push(s)}),f=f.filter((e,r)=>!t.includes(r))})}).observe({type:"resource",buffered:!0})}function v(e){if(!e||"string"!=typeof e)return[];const t=new Set,r=e.split("\n");for(const e of r){const r=e.match(a.cn)||e.match(a.hB)||e.match(a.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 y(){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 b(e,t){return(0,s.L)(e.name)===t}function E(e,t){e.fetchStart=Math.floor(t.startTime),e.fetchEnd=Math.floor(t.responseEnd),e.asset=t.name,e.type=t.initiatorType,w(e,t)}function w(e,t){const r=(0,s.L)(t.name),{weighedAssetUrls:n}=p(e);n.has(r)||(n.add(r),e.totalWeight=(e.totalWeight||0)+(t.transferSize||0),"blocking"===t.renderBlockingStatus?e.renderBlocking=!0:"non-blocking"===t.renderBlockingStatus&&!0!==e.renderBlocking&&(e.renderBlocking=!1))}function R(e,t,r,n,i){if(w(e,t),"scripts"!==i&&"all"!==i)return;const{widenedAssetUrls:a}=p(e),o=(0,s.L)(t.name);if(a.has(o))return;a.add(o);if("all"===i||r.isScript){const r=Math.floor(t.startTime),n=Math.floor(t.responseEnd);e.fetchStart=e.fetchStart>0?Math.min(e.fetchStart,r):r,e.fetchEnd=e.fetchEnd>0?Math.max(e.fetchEnd,n):n}if(r.isScript){const r=g((0,s.L)(t.name));if(r){const t=()=>{const{start:t,end:n}=r.script;p(e).recordManifestScriptWindow(t,n)};t(),!r.dom.end&&r.dom.value&&["load","error"].forEach(e=>r.dom.value.addEventListener(e,t,{once:!0}))}n.resolved||(e.asset=t.name,e.type=t.initiatorType,n.resolved=!0)}}function T(e,t){const r=e.filter(e=>e.test(t.name));return r.find(e=>e.isScript)||r[0]}function A(e,t){const r=t?.manifest;if(!r||!r.assets.length)return;const s={resolved:!1},{assets:a}=r;(n.gm.performance?.getEntriesByType("resource")||[]).forEach(r=>{const n=T(a,r);n&&R(e,r,n,s,t.timingMethod)}),function(e,t,r,s){n.gm.PerformanceObserver?.supportedEntryTypes?.includes("resource")&&f.push({addedAt:(0,i.t)(),test:n=>{const i=T(t,n);return i&&R(e,n,i,r,s),!1}})}(e,a,s,t.timingMethod)}function S(e){const t=e?.id,r={registeredAt:(0,i.t)(),reportedAt:void 0,fetchStart:0,fetchEnd:0,scriptStart:0,scriptEnd:0,asset:void 0,type:"unknown",totalWeight:0,renderBlocking:void 0},a=y();if(!a)return r;const o=n.gm.performance?.getEntriesByType("navigation")?.[0]?.name||"";try{const e=v(a),c=(e.length>1?e.filter(e=>u!==e):e)[0];if(!c)return r;if(o.includes(c))return r.asset=(0,s.L)(o),r.type="inline",r;r.correlation=g(c);const l=r.correlation?.performance.value||n.gm.performance?.getEntriesByType("resource")?.find(e=>b(e,c));if(l)E(r,l);else{(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})(c)&&(r.asset=c,r.type="preload"),function(e,t){n.gm.PerformanceObserver?.supportedEntryTypes?.includes("resource")&&f.push({addedAt:(0,i.t)(),test:r=>!!b(r,t)&&(E(e,r),!0)})}(r,c)}const h=r.correlation,m=!!t&&!!h?.claimedBy.has(t);h&&t&&h.claimedBy.add(t);const y=()=>{const e=h?.script.start;if(!m||!e)return!1;return r.registeredAt-e>1e4};let w=0,R=0;p(r).recordManifestScriptWindow=(e,t)=>{e&&(w=w>0?Math.min(w,e):e),t&&(R=R>0?Math.max(R,t):t)},Object.defineProperty(r,"scriptStart",d(()=>{const e=y()?r.registeredAt:h?.script.start??r.fetchEnd;return w>0?Math.min(e,w):e})),Object.defineProperty(r,"scriptEnd",d(()=>{const e=y()?r.registeredAt:h?.script.end??r.registeredAt;return R>0?Math.max(e,R):e}))}catch(e){}return r}},5732(e,t,r){"use strict";r.d(t,{$5:()=>m,B5:()=>g,K6:()=>u,M$:()=>o,Ms:()=>d,NG:()=>c,Ux:()=>h,YA:()=>p,yx:()=>l});var n=r(5718),i=r(7560),s=r(9119),a=r(9232);function o(e){return e?.type===a.f.MFE}function c(e,t){if(!y(e,t))return;const r=t.runtime.registeredEntities;return r?.find(t=>t.metadata.target.iframeInterfaceId===e)}function d(e,t){if(!y(e,t))return[];const r=t.runtime.registeredEntities;return r?.filter(t=>String(t.metadata.target.id)===String(e)).map(e=>e.metadata.target)||[]}function u(e,t){if(!y(e,t))return[];const r=t.runtime.registeredEntities,n=(0,s.L)(e),a=r?.filter(t=>{const r=t.metadata.target?.manifest;return r?(0,i.j)(r,e,{scriptsOnly:!1}):!!t.metadata.timings?.asset&&(0,s.L)(t.metadata.timings.asset)===n});return f(a).map(e=>e.metadata.target)}function l(e,t){if(!y(e,t))return[];const r=t.runtime.registeredEntities,n=r?.filter(t=>{const r=t.metadata.target?.manifest;return r?(0,i.j)(r,e,{scriptsOnly:!0}):!!t.metadata.timings?.asset?.endsWith(e)});return f(n).map(e=>e.metadata.target)}function f(e){if(!e?.length)return e||[];const t=new Map,r=[];for(const n of e){const e=n.metadata?.timings?.asset;if(!e){r.push(n);continue}const i="".concat(e,"::").concat(n.metadata?.target?.id),s=t.get(i);if(s){if(s.metadata.target?.blocked&&!n.metadata.target?.blocked){const e=r.indexOf(s);-1!==e&&(r[e]=n),t.set(i,n)}}else t.set(i,n),r.push(n)}return r}function h(e,t){return v(t)?o(e)?e.attributes:t.agentRef.runtime.v2Target.attributes:{}}function p(e,t){return g(e,t)?{"child.id":e.id,"child.type":e.type,...h(void 0,t)}:{}}function g(e,t){return o(e)&&!!v(t)&&t.agentRef.init.api.register.duplicate_data_to_container}function m(e){if(!e?.runtime)return[];if(!y(!0,e)||!e.runtime.registeredEntities?.length)return[e.runtime.v2Target];const t=[];try{var r=(0,n.AZ)((0,n.QL)());let i=r.length-1;for(;r[i];)t.push(...l(r[i--],e))}catch(e){}const i=function(e){const t=new Set,r=[];for(const n of e){const e=n?.instance;t.has(e)||(t.add(e),r.push(n))}return r}(t);return i.length||i.push(e.runtime.v2Target),i}function v(e){return 2===e?.harvestEndpointVersion}function y(e,t){return!!e&&!!t?.init.api.register.enabled}},5289(e,t,r){"use strict";r.d(t,{GG:()=>a,Qr:()=>c,sB:()=>o});var n=r(3878),i=r(6389);function s(){return"undefined"==typeof document||"complete"===document.readyState}function a(e,t){if(s())return e();const r=(0,i.J)(e),a=setInterval(()=>{s()&&(clearInterval(a),r())},500);(0,n.sp)("load",r,t)}function o(e){if(s())return e();(0,n.DD)("DOMContentLoaded",e)}function c(e){if(s())return e();(0,n.sp)("popstate",e)}},384(e,t,r){"use strict";r.d(t,{Zm:()=>c,bQ:()=>u,dV:()=>d,pV:()=>l});var n=r(6154),i=r(1863),s=r(944),a=r(1910);const o={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,a.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:o.beacon,errorBeacon:o.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()}r.d(t,["NT",0,o])},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)}},8139(e,t,r){"use strict";r.d(t,{u:()=>f});var n=r(7836),i=r(3434),s=r(8990),a=r(6154);const o={},c=a.gm.XMLHttpRequest,d="addEventListener",u="removeEventListener",l="nr@wrapped:".concat(n.P);function f(e,t){var r=function(e){return(e||n.ee).get("events")}(e);if(o[r.debugId]++)return r;o[r.debugId]=1;var f=(0,i.YM)(r,!0,t);function p(e){f.inPlace(e,[d,u],"-",g)}function g(e,t){return e[1]}return"getPrototypeOf"in Object&&(a.RI&&h(document,p),c&&h(c.prototype,p),h(a.gm,p)),r.on(d+"-start",function(e,t){var r=e[1];if(null!==r&&("function"==typeof r||"object"==typeof r)&&"newrelic"!==e[0]){var n=(0,s.I)(r,l,function(){var e={object:function(){if("function"!=typeof r.handleEvent)return;return r.handleEvent.apply(r,arguments)},function:r}[typeof r];return e?f(e,"fn-",null,e.name||"anonymous"):r});this.wrapped=e[1]=n}}),r.on(u+"-start",function(e){e[1]=this.wrapped||e[1]}),r}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)}},3434(e,t,r){"use strict";r.d(t,{YM:()=>d});var n=r(7836),i=r(5607),s=r(5732);const a="nr@original:".concat(i.W);var o=Object.prototype.hasOwnProperty,c=!1;function d(e,t,r){return e||(e=n.ee),i.inPlace=function(e,t,r,n,s,a){r||(r="");const o="-"===r.charAt(0);for(let c=0;c<t.length;c++){const d=t[c],u=e[d];l(u)||(e[d]=i(u,o?d+r:r,n,d,s,a))}},i.flag=a,i;function i(t,n,i,c,f,h){return l(t)?t:(n||(n=""),nrWrapper[a]=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){u([e],r)}for(var n in e)o.call(e,n)&&(t[n]=e[n])}(t,nrWrapper,e),nrWrapper);function nrWrapper(){var a,o,l,p;let g,m;try{o=this,a=[...arguments],m=h?(0,s.$5)(r):[r?.runtime?.v2Target],l="function"==typeof i?i(a,o):i||{}}catch(t){u([t,"",[a,o,c],l],e)}d(n+"start",[a,o,c,m],l,f);const v=performance.now();let y;try{return p=t.apply(o,a),y=performance.now(),p}catch(e){throw y=performance.now(),d(n+"err",[a,o,e,m],l,f),g=e,g}finally{const e=y-v,t={start:v,end:y,duration:e,isLongTask:e>=50,methodName:c,thrownError:g};t.isLongTask&&d("long-task",[t,o,m],l,f),d(n+"end",[a,o,p,m],l,f)}}}function d(r,n,i,s){if(!c||t){var a=c;c=!0;try{e.emit(r,n,i,t,s)}catch(t){u([t,r,n,i],e)}c=a}}}function u(e,t){t||(t=n.ee);try{t.emit("internal-error",e)}catch(e){}}function l(e){return!(e&&"function"==typeof e&&e.apply&&!e[a])}r.d(t,["Jt",0,a])},9300(e,t,r){"use strict";const n=r(860).K7.ajax;r.d(t,["TZ",0,n,"f5",0,"ajaxRequest.id","mo",0,{NONE:"none",FAILURES:"failures",ALL:"all"}])},3333(e,t,r){"use strict";var n=r(981);const i=r(860).K7.genericEvents,s=[n.R.PA,n.R.UA,n.R.BP];r.d(t,["$v",0,{RESOURCES:"experimental.resources",REGISTER:"register"},"TZ",0,i,"Zp",0,["auxclick","click","copy","keydown","paste","scrollend"],"kd",0,s,"qN",0,["focus","blur"]])},6774(e,t,r){"use strict";const n=r(860).K7.jserrors;r.d(t,["T",0,n])},993(e,t,r){"use strict";const n=r(860).K7.logging;r.d(t,["A$",0,{OFF:0,ERROR:1,WARN:2,INFO:3,DEBUG:4,TRACE:5},"TZ",0,n,"p_",0,{ERROR:"ERROR",WARN:"WARN",INFO:"INFO",DEBUG:"DEBUG",TRACE:"TRACE"}])},3785(e,t,r){"use strict";r.d(t,{R:()=>c,b:()=>d});var n=r(9908),i=r(1863),s=r(860),a=r(3969),o=r(993);function c(e,t,r={},c=o.p_.INFO,d=!0,u,l=(0,i.t)()){(0,n.p)(a.xV,["API/logging/".concat(c.toLowerCase(),"/called")],void 0,s.K7.metrics,e),(0,n.p)("log",[l,t,r,c,d,u],void 0,s.K7.logging,e)}function d(e){return"string"==typeof e&&Object.values(o.p_).some(t=>t===e.toUpperCase().trim())}},3969(e,t,r){"use strict";const n=r(860).K7.metrics;r.d(t,["TZ",0,n,"XG",0,"storeEventMetrics","xV",0,"storeSupportabilityMetrics"])},6630(e,t,r){"use strict";const n=r(860).K7.pageViewEvent;r.d(t,["T",0,n])},782(e,t,r){"use strict";const n=r(860).K7.pageViewTiming;r.d(t,["T",0,n])},6344(e,t,r){"use strict";var n=r(2614);const i=r(860).K7.sessionReplay,s={[n.g.ERROR]:15e3,[n.g.FULL]:3e5,[n.g.OFF]:0};r.d(t,["Qb",0,{API:"api",RESUME:"resume",SWITCH_TO_FULL:"switchToFull",INITIALIZE:"initialize",PRELOAD:"preload"},"TZ",0,i,"Vh",0,"errorDuringReplay","_s",0,{DomContentLoaded:0,Load:1,FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Custom:5},"bc",0,{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"}},"yP",0,s])},5270(e,t,r){"use strict";r.d(t,{Aw:()=>a,SR:()=>s,rF:()=>o});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 a(e){return!0===e?.session_replay.preload&&s(e)}function o(e,t){try{if("string"==typeof t?.type&&"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)}},3738(e,t,r){"use strict";const n=r(860).K7.sessionTrace,i="-start",s="-end",a="fn"+i,o="fn"+s;r.d(t,["He",0,"bstResource","Kp",0,s,"Lc",0,o,"Rz",0,"pushState","TZ",0,n,"bD",0,"resource","bc",0,{CROSS_TAB:{message:"Session Entity was set to OFF on another tab"},ENTITLEMENTS:{message:"Session Trace is not allowed and will not be started"},RESET:{message:"Session was reset"},SESSION_CHANGED:{message:"Session identifier changed unexpectedly"}},"d3",0,i,"uP",0,a])},3962(e,t,r){"use strict";const n=r(860).K7.softNav;r.d(t,["O2",0,{INITIAL_PAGE_LOAD:"",ROUTE_CHANGE:1,UNSPECIFIED:2},"OV",0,"popstate","Qu",0,{INTERACTION:1,AJAX:2,CUSTOM_END:3,CUSTOM_TRACER:4},"TZ",0,n,"ih",0,{IP:"in progress",PF:"pending finish",FIN:"finished",CAN:"cancelled"},"pP",0,"initialPageLoad","tC",0,["click","keydown","submit"]])},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)}}},7767(e,t,r){"use strict";var n=r(6154);r.d(t,["V",0,e=>n.RI&&!0===e?.privacy.cookies_enabled])},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)}},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("log",e,t)}start(){return this.#e("start")}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)}}},4261(e,t,r){"use strict";r.d(t,["BL",0,"finished","CH",0,"recordReplay","Dl",0,"setUserId","Fw",0,"setPageViewName","PA",0,"setCurrentRouteName","Pv",0,"consent","Tb",0,"pauseReplay","U2",0,"addToTrace","V1",0,"measure","Wb",0,"wrapLogger","bt",0,"setErrorHandler","cD",0,"setCustomAttribute","dT",0,"interaction","eY",0,"register","fF",0,"recordCustomEvent","hG",0,"addPageAction","hw",0,"api-ixn-","k6",0,"addRelease","nb",0,"setApplicationVersion","o5",0,"noticeError"])},1738(e,t,r){"use strict";r.d(t,{U:()=>l,Y:()=>u});var n=r(3241),i=r(9908),s=r(1863),a=r(944),o=r(3969),c=r(8362),d=r(860);function u(e,t,r,s){const u=s||r;!u||u[e]&&u[e]!==c.d.prototype[e]||(u[e]=function(){(0,i.p)(o.xV,["API/"+e+"/called"],void 0,d.K7.metrics,r.ee),(0,n.W)({drained:!!r.runtime?.activatedFeatures,type:"data",name:"api",feature:"api-"+e,data:{}});try{return t.apply(this,arguments)}catch(e){(0,a.R)(23,e)}})}function l(e,t,r,n,a){const o=e.info;null===r?delete o.jsAttributes[t]:o.jsAttributes[t]=r,(a||null===r)&&(0,i.p)("api-"+n,[(0,s.t)(),t,r],void 0,"session",e.ee)}},8374(e,t,r){r.nc=(()=>{try{return document?.currentScript?.nonce}catch(e){}return""})()},860(e,t,r){"use strict";const n="events",i="jserrors",s="browser/blobs",a="browser/logs",o={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"},c={[o.pageViewEvent]:1,[o.pageViewTiming]:2,[o.metrics]:3,[o.jserrors]:4,[o.softNav]:5,[o.ajax]:6,[o.sessionTrace]:7,[o.sessionReplay]:8,[o.logging]:9,[o.genericEvents]:10},d={[o.pageViewEvent]:"rum",[o.pageViewTiming]:n,[o.ajax]:n,[o.softNav]:n,[o.metrics]:i,[o.jserrors]:i,[o.sessionTrace]:s,[o.sessionReplay]:s,[o.logging]:a,[o.genericEvents]:"ins"};r.d(t,["$J",0,d,"K7",0,o,"P3",0,c,"XX",0,i,"Yy",0,a,"df",0,s,"hg",0,"connect"])}};const t={};function r(n){const i=t[n];if(void 0!==i)return i.exports;const s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.m=e,r.d=(e,t)=>{if(Array.isArray(t))for(var n=0;n<t.length;){var i=t[n++],s=t[n++];r.o(e,i)?0===s&&n++:0===s?Object.defineProperty(e,i,{enumerable:!0,value:t[n++]}):Object.defineProperty(e,i,{enumerable:!0,get:s})}else for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,n)=>(r.f[n](e,t),t),[])),r.u=e=>({212:"nr-spa-compressor",238:"nr-spa-iframe-message-handler",249:"nr-spa-recorder",478:"nr-spa"}[e]+"-1.324.1.min.js"),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{const e={},t="NRBA-1.324.1.PROD:";r.l=(n,i,s,a)=>{if(e[n])return void e[n].push(i);let o,c;if(void 0!==s){const e=document.getElementsByTagName("script");for(var d=0;d<e.length;d++){const r=e[d];if(r.getAttribute("src")==n||r.getAttribute("data-webpack")==t+s){o=r;break}}}if(!o){c=!0;var u={478:"sha512-nAmyGQJA9Xa/xLFrjAfteHmCXCj99XBX+KvqWk0WH5UrAa2YHhcGcj9eoazvcLEiczWuHTntO8wwAWs3I+TEeQ==",249:"sha512-8baIx82923Xi5K0q00GExdErVnpK0P6jRsqlNxDXvjHcnmpnTqah0km3pHv/9bQWt052Cdnd4JJs55neaGuLPg==",212:"sha512-ioc+ScgYvw3pO3ke7sekIpBPV27DCyD8gUmnkuTFa/5JXJ+V2qQ3HXw18akD76CdBYA02ciLBV+dcp7tV+Sdqw==",238:"sha512-th2K18c2zreO7LeTIdGLCkPO0xbWs8nmlQNoLHj6wdVdPdBfwsaCyKlRdrl3OJA2Bn1hUBqzN3yRe1ewubPUEg=="};o=document.createElement("script"),o.charset="utf-8",r.nc&&o.setAttribute("nonce",r.nc),o.setAttribute("data-webpack",t+s),o.src=n,0!==o.src.indexOf(window.location.origin+"/")&&(o.crossOrigin="anonymous"),u[a]&&(o.integrity=u[a])}e[n]=[i];const l=(t,r)=>{o.onerror=o.onload=null,clearTimeout(f);const i=e[n];if(delete e[n],o.parentNode?.removeChild(o),i?.forEach(e=>e(r)),t)return t(r)},f=setTimeout(l.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=l.bind(null,o.onerror),o.onload=l.bind(null,o.onload),c&&document.head.appendChild(o)}})(),r.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="https://js-agent.newrelic.com/",(()=>{const e={38:0,788:0};r.f.j=(t,n)=>{let i=r.o(e,t)?e[t]:void 0;if(0!==i)if(i)n.push(i[2]);else{const s=new Promise((r,n)=>i=e[t]=[r,n]);n.push(i[2]=s);const a=r.p+r.u(t),o=new Error,c=n=>{if(r.o(e,t)&&(i=e[t],0!==i&&(e[t]=void 0),i)){const e=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src;o.message="Loading chunk "+t+" failed: ("+e+": "+r+")",o.name="ChunkLoadError",o.type=e,o.request=r,i[1](o)}};r.l(a,c,"chunk-"+t,t)}};const t=(t,n)=>{let[i,s,a]=n;var o,c,d=0;if(i.some(t=>0!==e[t])){for(o in s)r.o(s,o)&&(r.m[o]=s[o]);if(a)a(r)}for(t&&t(n);d<i.length;d++)c=i[d],r.o(e,c)&&e[c]&&e[c][0](),e[c]=0},n=self["webpackChunk:NRBA-1.324.1.PROD"]=self["webpackChunk:NRBA-1.324.1.PROD"]||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})(),(()=>{"use strict";r(8374);var e=r(8362),t=r(860);const n=Object.values(t.K7);var i=r(384),s=r(1741);var a=r(2555),o=r(3333),c=r(9300);const d=e=>{if(!e||"string"!=typeof e)return!1;try{document.createDocumentFragment().querySelector(e)}catch{return!1}return!0};var u=r(2614),l=r(944),f=r(8122);const h="[data-nr-mask]",p=e=>(0,f.a)(e,(()=>{const e={feature_flags:[],experimental:{register:!1,resources:!1,iframe_bridge:!1,iframe_domains:[]},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,capture_payloads:c.mo.NONE},api:{register:{get enabled(){return e.feature_flags.includes(o.$v.REGISTER)||e.experimental.register},set enabled(t){e.experimental.register=t},duplicate_data_to_container:!1,get allow_iframe_bridge(){return e.feature_flags.includes(o.$v.IFRAME_BRIDGE)||e.experimental.iframe_bridge},set allow_iframe_bridge(t){e.experimental.iframe_bridge=t},get iframe_domains(){return e.experimental.iframe_domains},set iframe_domains(t){Array.isArray(t)?e.experimental.iframe_domains=t:(0,l.R)(1,t)}}},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(o.$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:u.wk,inactiveMs:u.BB},session_replay:{autoStart:!0,enabled:!1,preload:!1,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){d(t)?e.mask_selector="".concat(t,",").concat(h):""===t||null===t?e.mask_selector=h:(0,l.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){d(t)?e.block_selector+=",".concat(t):""!==t&&(0,l.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,l.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"]},web_sockets:{enabled:!1}}})());var g=r(6154),m=r(9324);let v=0;const y={buildEnv:"PROD",distMethod:"CDN",version:m.x,originTime:g.WN},b={consented:!1},E={activatedFeatures:void 0,appMetadata:{},configured:!1,get consented(){return this.session?.state?.consent||b.consented},set consented(e){b.consented=e},customTransaction:void 0,denyList:[],disabled:!1,drainRegistry:new Map,connector:void 0,harvester:void 0,v2Target: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++v},listeningForIframeMessages:!1};var w=r(9232);var R=r(7836),T=r(3241);const A={accountID:void 0,trustKey:void 0,agentID:void 0,licenseKey:void 0,applicationID:void 0,xpid:void 0};var S=r(9908),x=r(9752);function O(e,t={},n,o){let{init:c,info:d,loader_config:u,runtime:l={},exposed:h=!0}=t;if(!d){const e=(0,i.pV)();c=e.init,d=e.info,u=e.loader_config}var m;e.init=p(c||{}),e.loader_config=(m=u||{},(0,f.a)(m,A)),d.jsAttributes??={},g.bv&&(d.jsAttributes.isWorker=!0),e.info=(0,a.D)(d);const v=e.init;e.runtime??=(e=>{const t=(0,f.a)(e,E),r=Object.keys(y).reduce((e,t)=>(e[t]={value:y[t],writable:!1,configurable:!0,enumerable:!0},e),{});return Object.defineProperties(t,r)})(l),e.runtime.v2Target??={type:w.f.BA,instance:e.agentIdentifier,get id(){return e.runtime.appMetadata?.agents?.[0]?.entityGuid},get attributes(){return{"entity.guid":this.id,appId:e.info.applicationID}}},v.proxy.assets&&(e=>{const t=e.startsWith("http");e+="/",r.p=t?e:"https://"+e})(v.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,i.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=n,e.ee=R.ee.get(e.agentIdentifier),e.exposed=h,(0,T.W)({drained:!!e.runtime.activatedFeatures,type:"lifecycle",name:"initialize",feature:void 0,data:e.config}),e.init.api.register.allow_iframe_bridge&&g.gm.addEventListener("message",t=>{"string"==typeof t.data?.type&&t.data.type.startsWith(x.Pl)&&(0,S.p)("iframe-message",[t],void 0,"IFRAME",e.ee)}),e.runtime.configured=!0)}var _=r(1863),k=r(4261),N=r(1738);var L=r(1687),M=r(4234),P=r(5289),I=r(5270),j=r(7767),C=r(6389),D=r(7699);const B=new WeakSet,H=new WeakMap;class W extends M.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,L.Ak)(e,this.featureName),t()}))}):(0,L.Ak)(e,t)}importAggregator(e,t,n={}){if(this.featAggregate)return;const i=async()=>{if(await this.deferred,this.#t(e),!(0,a.f)(e.info))return(0,l.R)(43),e.ee.abort(),void this.loadedSuccessfully(!1);try{await async function(e,t,n){if(H.has(e))return H.get(e);const i=(async()=>{if((0,j.V)(e.init))try{const{setupAgentSession:t}=await r.e(478).then(r.bind(r,8766));t(e)}catch(e){(0,l.R)(20,e),t.emit("internal-error",[e]),(0,S.p)(D.qh,[e],void 0,n,t)}if(e.init.api.register.allow_iframe_bridge)try{const{setupIframeMFEMessageListener:t}=await r.e(238).then(r.bind(r,6417));t(e)}catch(e){(0,l.R)(23,e)}const[{Connector:i},{Harvester:s}]=await Promise.all([r.e(478).then(r.bind(r,6589)),r.e(478).then(r.bind(r,5237))]);e.runtime.connector=new i(e),e.runtime.harvester=new s(e);const a=Object.values(e.features).filter(t=>e.runtime.drainRegistry.has(t.featureName));Promise.all(a.map(e=>e.onAggregateImported)).then(()=>e.runtime.harvester.startTimer())})();H.set(e,i),await i}(e,this.ee,this.featureName)}catch(e){return(0,l.R)(79,e),this.ee.abort(),void this.loadedSuccessfully(!1)}try{if(!this.#r(this.featureName,e.runtime.session,e.init))return this.abortHandler?.(),(0,L.Ze)(this.agentRef,this.featureName),void this.loadedSuccessfully(!1);const{Aggregate:r}=await t();this.featAggregate=new r(e,n),e.runtime.harvester.initializedAggregates.push(this.featAggregate),this.loadedSuccessfully(!0)}catch(e){(0,l.R)(34,e),this.abortHandler?.(),(0,L.Ze)(this.agentRef,this.featureName,!0),this.loadedSuccessfully(!1)}};g.RI?(0,P.GG)(()=>i(),!0):i()}#r(e,r,n){if(this.blocked)return!1;switch(e){case t.K7.sessionReplay:return(0,I.SR)(n)&&!!r;case t.K7.sessionTrace:return!!r;default:return!0}}#t(e){if(!B.has(e)&&(B.add(e),!(0,a.f)(e.info))){const t=(0,i.pV)();let r={...t.info?.jsAttributes};try{r={...r,...e.info?.jsAttributes}}catch(e){}O(e,{...t,info:{...t.info,jsAttributes:r},runtime:e.runtime},e.runtime.loaderType)}}}var U=r(6630);class K extends W{static featureName=U.T;constructor(e){var t;super(e,U.T),this.setupInspectionEvents(),t=e,(0,N.Y)(k.Fw,function(e,r){"string"==typeof e&&("/"!==e.charAt(0)&&(e="/"+e),t.runtime.customTransaction=(r||"http://custom.transaction")+e,(0,S.p)("api-"+k.Fw,[(0,_.t)()],void 0,void 0,t.ee))},t),this.importAggregator(e,()=>e.init.feature_flags.includes("rum_v2")?r.e(478).then(r.bind(r,908)):r.e(478).then(r.bind(r,7927)))}setupInspectionEvents(){const e=(e,t)=>{e&&(0,T.W)({timeStamp:e.timeStamp,loaded:"complete"===e.target.readyState,type:"window",name:t,data:e.target.location+""})};(0,P.sB)(t=>{e(t,"DOMContentLoaded")}),(0,P.GG)(t=>{e(t,"load")}),(0,P.Qr)(t=>{e(t,"navigate")}),this.ee.on(u.tS.UPDATE,(e,t)=>{(0,T.W)({type:"lifecycle",name:"session",data:t})})}}class F extends e.d{constructor(e){var t;(super(),g.gm)?(this.features={},(0,i.bQ)(this.agentIdentifier,this),this.desiredFeatures=new Set(e.features||[]),this.desiredFeatures.add(K),O(this,e,e.loaderType||"agent"),t=this,(0,N.Y)(k.cD,function(e,r,n=!1){if("string"==typeof e){if(["string","number","boolean"].includes(typeof r)||null===r)return(0,N.U)(t,e,r,k.cD,n);(0,l.R)(40,typeof r)}else(0,l.R)(39,typeof e)},t),function(e){(0,N.Y)(k.Dl,function(t,r=!1){if("string"!=typeof t&&null!==t)return void(0,l.R)(41,typeof t);const n=e.info.jsAttributes["enduser.id"];r&&null!=n&&n!==t?(0,S.p)("api-setUserIdAndResetSession",[t],void 0,"session",e.ee):(0,N.U)(e,"enduser.id",t,k.Dl,!0)},e)}(this),function(e){(0,N.Y)(k.nb,function(t){if("string"==typeof t||null===t)return(0,N.U)(e,"application.version",t,k.nb,!1);(0,l.R)(42,typeof t)},e)}(this),function(e){(0,N.Y)("start",function(){e.ee.emit("manual-start-all")},e)}(this),function(e){(0,N.Y)(k.Pv,function(t=!0){if("boolean"==typeof t){if((0,S.p)("api-"+k.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,l.R)(65,typeof t)},e)}(this),this.run()):(0,l.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 n.forEach(r=>{t[r]=!!e[r]?.enabled}),t}(this.init),r=[...this.desiredFeatures],i=this.init.feature_flags.includes("rum_v2");r.sort((e,r)=>t.P3[e.featureName]-t.P3[r.featureName]),r.forEach(r=>{if(!e[r.featureName]&&(i||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,l.R)(36,{targetFeature:r.featureName,missingDependencies:n}),this.features[r.featureName]=new r(this)})}catch(e){(0,l.R)(22,e);for(const e in this.features)this.features[e].abortHandler?.();const t=(0,i.Zm)();delete t.initializedAgents[this.agentIdentifier]?.features,delete this.sharedAggregator;return t.ee.get(this.agentIdentifier).abort(),!1}}}var V=r(2843),z=r(782);class G extends W{static featureName=z.T;constructor(e){super(e,z.T),g.RI&&((0,V.u)(()=>(0,S.p)("docHidden",[(0,_.t)()],void 0,z.T,this.ee),!0),(0,V.G)(()=>(0,S.p)("winPagehide",[(0,_.t)()],void 0,z.T,this.ee)),this.importAggregator(e,()=>r.e(478).then(r.bind(r,9917))))}}var q=r(3969);class Y extends W{static featureName=q.TZ;constructor(e){super(e,q.TZ),this.importAggregator(e,()=>r.e(478).then(r.bind(r,6555)))}}var Z=r(6774),J=r(3878),X=r(3304);class Q{constructor(e,t,r,n,i){this.name="UncaughtError",this.message="string"==typeof e?e:(0,X.A)(e),this.sourceURL=t,this.line=r,this.column=n,this.__newrelic=i}}function ee(e){return ne(e)?e:new Q(void 0!==e?.message?e.message:e,e?.filename||e?.sourceURL,e?.lineno||e?.line,e?.colno||e?.col,e?.__newrelic,e?.cause)}function te(e){const t="Unhandled Promise Rejection: ";if(!e?.reason)return;if(ne(e.reason)){try{e.reason.message.startsWith(t)||(e.reason.message=t+e.reason.message)}catch(e){}return ee(e.reason)}const r=ee(e.reason);return(r.message||"").startsWith(t)||(r.message=t+r.message),r}function re(e){if(e.error instanceof SyntaxError&&!/:\d+$/.test(e.error.stack?.trim())){const t=new Q(e.message,e.filename,e.lineno,e.colno,e.error.__newrelic,e.cause);return t.name=SyntaxError.name,t}return ne(e.error)?e.error:ee(e)}function ne(e){return e instanceof Error&&!!e.stack}function ie(e,r,n,i,s=(0,_.t)()){"string"==typeof e&&(e=new Error(e)),(0,S.p)("err",[e,s,!1,r,n.runtime.isRecording,void 0,i],void 0,t.K7.jserrors,n.ee),(0,S.p)("uaErr",[],void 0,t.K7.genericEvents,n.ee)}var se=r(993),ae=r(3785);function oe(e,{customAttributes:t={},level:r=se.p_.INFO}={},n,i,s=(0,_.t)()){(0,ae.R)(n.ee,e,t,r,!1,i,s)}function ce(e,r,n,i,s=(0,_.t)()){(0,S.p)("api-"+k.hG,[s,e,r,i],void 0,t.K7.genericEvents,n.ee)}function de(e,r,n,i,s=(0,_.t)()){const{start:a,end:o,customAttributes:c}=r||{},d={customAttributes:c||{}};if("object"!=typeof d.customAttributes||"string"!=typeof e||0===e.length)return void(0,l.R)(57);const u=(e,t)=>null==e?t:"number"==typeof e?e:e instanceof PerformanceMark?e.startTime:Number.NaN;if(d.start=u(a,0),d.end=u(o,s),Number.isNaN(d.start)||Number.isNaN(d.end))(0,l.R)(57);else{if(d.duration=d.end-d.start,!(d.duration<0))return(0,S.p)("api-"+k.V1,[d,e,i],void 0,t.K7.genericEvents,n.ee),d;(0,l.R)(58)}}function ue(e,r={},n,i,s=(0,_.t)()){(0,S.p)("api-"+k.fF,[s,e,r,i],void 0,t.K7.genericEvents,n.ee)}var le=r(5718);const fe=(e,t)=>e?.nrMfeId===t.id&&(!e?.nrMfeObserved||e?.nrMfeObserved===t.instance),he=e=>{try{return g.gm.CSS.escape(e)}catch(t){return e}},pe=(e,t={})=>{const r=t.id,n=t.instance;if(!e||!r||!n)return!1;try{let r=1===e.nodeType?e:e.parentElement;for(;r?.tagName;){if(fe(r.dataset,t))return r.dataset.nrMfeObserved=n,!0;r=r.parentNode}}catch(e){}return!1},ge=(e,t)=>{const r=g.gm.document?.querySelectorAll('[data-nr-mfe-id="'.concat(he(e.id),'"]')),n=(Array.from(r)||[]).find(t=>fe(t.dataset,e));let i=!!n;i&&(n.dataset.nrMfeObserved??=e.instance);const s=new g.gm.MutationObserver(r=>{r.forEach(r=>{r.addedNodes.forEach(r=>{const n=1===r.nodeType?r:null;!i&&fe(n?.dataset,e)&&(s.disconnect(),s.observe(n,{childList:!0,subtree:!0}),i=!0,n.dataset.nrMfeObserved=e.instance),(e=>{try{return e?.textContent?.trim()||["img","video","canvas","svg"].includes(e?.nodeName?.toLowerCase())}catch(e){return!1}})(r)&&(i||pe(r,e))&&t(r,s)})})});return s.observe(n||g.gm.document,{childList:!0,subtree:!0}),s},me=(e,t,r)=>{try{const n=new g.gm.PerformanceObserver(e=>{e.getEntries().forEach(r)});return n.observe(t),e.push(n),n}catch(e){return null}};function ve(e,t){let r,n,i=!1;const s=e=>null==e?e:e-(t?.scriptStart||t?.registeredAt||0),a={fcp:{get value(){const e=s(r);return e>1e4?void 0:e},set value(e){i||(r=e)}},lcp:{get value(){if(void 0!==a.fcp.value)return s(n)},set value(e){i||(n=e)}},cls:{value:void 0},inp:{value:void 0},disconnect:()=>{}};if(!(e&&g.RI&&g.gm.MutationObserver&&g.gm.PerformanceObserver))return a;const o=[];setTimeout(()=>{r||a.disconnect()},1e4);const c=()=>{if(!i){if(null==r){const e=(0,_.t)();if(s(e)>1e4)return void a.disconnect();r=e}n??=(0,_.t)(),a.cls.value??=0}},d=ge(e,(e,t)=>{c(),t.disconnect()});o.push(d);let u=0,l=null;const f=new Set;try{l=new g.gm.ResizeObserver(e=>{i||e.forEach(e=>{try{const t=e.contentRect.width*e.contentRect.height;t>u&&(u=t,a.lcp.value=(0,_.t)()),l.unobserve(e.target)}catch(e){}})})}catch(e){}const h=ge(e,e=>{if(c(),l)try{const t=1===e.nodeType?e:e.parentElement;t&&!f.has(t)&&(f.add(t),"IMG"===t.tagName?t.complete?l.observe(t):t.addEventListener("load",()=>{l.observe(t)},{once:!0}):"VIDEO"===t.tagName?t.readyState>=2?l.observe(t):t.addEventListener("loadeddata",()=>{l.observe(t)},{once:!0}):l.observe(t))}catch(e){}});l&&o.push(l),o.push(h),me(o,{type:"layout-shift",buffered:!0},t=>{i||t.hadRecentInput||(t.sources||[]).some(r=>!!pe(r.node,e)&&(c(),a.cls.value+=t.value,!0))}),me(o,{type:"event",buffered:!0,durationThreshold:40},t=>{!i&&t.interactionId&&pe(t.target,e)&&(void 0===a.inp.value||t.duration>a.inp.value)&&(c(),a.inp.value=t.duration)});const p=["pointerdown","keydown"],m=()=>{p.forEach(e=>{g.gm.removeEventListener(e,v,{passive:!0})})};a.disconnect=()=>{i=!0,o.forEach(e=>{try{e?.disconnect()}catch(e){}}),m(),["visibilitychange","pagehide"].forEach(e=>{g.gm.removeEventListener(e,a.disconnect,{once:!0,passive:!0})})};const v=t=>{pe(t?.target,e)&&((()=>{try{h?.disconnect(),l?.disconnect()}catch(e){}})(),m())};p.forEach(e=>{g.gm.addEventListener(e,v,{passive:!0})}),["visibilitychange","pagehide"].forEach(e=>{g.gm.addEventListener(e,a.disconnect,{once:!0,passive:!0})});const y=g.gm.document?.querySelectorAll('[data-nr-mfe-id="'.concat(he(e.id),'"]'));return Array.from(y||[]).some(t=>fe(t.dataset,e))&&c(),a}var ye=r(9566),be=r(7560),Ee=r(9119);const we=["entry","scripts","all"],Re=["name","id","type"],Te=new Map([[ce,"addPageAction"],[oe,"log"],[de,"measure"],[ie,"noticeError"],[ue,"recordCustomEvent"]]),Ae={experimental:(0,C.J)(()=>(0,l.R)(54,"newrelic.register")),disabled:(0,C.J)(()=>(0,l.R)(55)),invalidTarget:(0,C.J)(e=>(0,l.R)(48,e)),deregistered:(0,C.J)(()=>(0,l.R)(68)),invalidTimingMethod:(0,C.J)(e=>(0,l.R)(80,e)),duplicateName:(0,C.J)(e=>(0,l.R)(81,e)),duplicateId:(0,C.J)(e=>(0,l.R)(82,e))};function Se(e){(0,N.Y)(k.eY,function(t){return xe(e,t)},e)}function xe(e,r){Ae.experimental(),r||={},r.instance=(0,ye.LA)(8),r.type=w.f.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:w.f.BA},r.manifest=(0,be.N)(r.manifest),void 0===r.timingMethod||we.includes(r.timingMethod)||(Ae.invalidTimingMethod(r.timingMethod),r.timingMethod=void 0);const n=(0,le.Qr)(r);r.manifest&&(0,le.xo)(n,r);const i=ve(r,n),s=(0,Ee.L)(""+location),a={};Object.prototype.hasOwnProperty.call(r,"attributes")||Object.defineProperty(r,"attributes",{get:()=>({...a,"source.id":r.id,"source.name":r.name,"source.type":r.type,"parent.type":r.parent?.type||w.f.BA,"parent.id":r.parent?.id})}),Object.entries(r.tags).forEach(([e,t])=>{Re.includes(e)||(a["source.".concat(e)]=t)});let o=()=>{};const c=e.runtime.registeredEntities,d=e=>{r.blocked=!0,o=e};function u(e){return"string"==typeof e&&!!e.trim()&&e.trim().length<501}e.init.api.register.enabled||d(Ae.disabled),u(r.id)&&u(r.name)||d(()=>Ae.invalidTarget(r)),c.forEach(e=>{try{const{name:t,id:n}=e.metadata.target;t===r.name&&n!==r.id&&Ae.duplicateName(r),n===r.id&&t!==r.name&&Ae.duplicateId(r)}catch(e){}});const f={addPageAction:(t,n={})=>m(ce,[t,{...a,...n},e],r),deregister:()=>{p(),d(Ae.deregistered)},log:(t,n={})=>m(oe,[t,{...n,customAttributes:{...a,...n.customAttributes||{}}},e],r),measure:(t,n={})=>m(de,[t,{...n,customAttributes:{...a,...n.customAttributes||{}}},e],r),noticeError:(t,n={})=>m(ie,[t,{...a,...n},e],r),recordCustomEvent:(t,n={})=>m(ue,[t,{...a,...n},e],r),setApplicationVersion:e=>g("application.version",e),setCustomAttribute:(e,t)=>g(e,t),setUserId:e=>g("enduser.id",e),metadata:{get customAttributes(){return a},target:r,timings:n,vitals:i,events:{latestTimestamp:void 0}}},h=()=>(r.blocked&&o(),r.blocked);function p(){if(n.reportedAt)return;n.reportedAt=(0,_.t)(),i.disconnect(),n.fcp=i.fcp,n.lcp=i.lcp,n.cls=i.cls,n.inp=i.inp;const e=n.fetchEnd-n.fetchStart,t=n.scriptEnd-n.scriptStart,r={assetUrl:n.asset,assetType:n.type,registerUrl:s,deregisterUrl:(0,Ee.L)(""+location),pageUrl:void 0,currentUrl:void 0,timeAlive:n.reportedAt-n.registeredAt,timeToBeRequested:n.fetchStart,timeToExecute:t,timeToFetch:e,timeToLoad:e+t,timeToRegister:n.registeredAt,totalWeight:n.totalWeight,...void 0!==n.renderBlocking&&{renderBlocking:n.renderBlocking},...i.fcp.value>=0&&{"vitals.fcp.value":i.fcp.value},...i.lcp.value>=0&&{"vitals.lcp.value":i.lcp.value},...i.cls.value>=0&&{"vitals.cls.value":i.cls.value},...i.inp.value>=0&&{"vitals.inp.value":i.inp.value}};f.recordCustomEvent("MicroFrontEndTiming",r)}h()||(c.push(f),(0,V.G)(p));const g=(e,t)=>{h()||(a[e]=t)},m=(r,n,i)=>{if(h()&&r!==xe)return;const s=f.metadata.events.latestTimestamp??(0,_.t)();f.metadata.events.latestTimestamp=void 0;const a=Te.get(r)||"unknown";(0,S.p)(q.xV,["API/register/".concat(a,"/called")],void 0,t.K7.metrics,e.ee);try{return r(...n,i,s)}catch(e){(0,l.R)(50,e)}};return f}class Oe extends W{static featureName=Z.T;constructor(e){var t;super(e,Z.T),t=e,(0,N.Y)(k.o5,(e,r)=>ie(e,r,t),t),function(e){(0,N.Y)(k.bt,function(t){e.runtime.onerror=t},e)}(e),function(e){let t=0;(0,N.Y)(k.k6,function(e,r){++t>10||(this.runtime.releaseIds[e.slice(-200)]=(""+r).slice(-200))},e)}(e),Se(e);try{this.removeOnAbort=new AbortController}catch(e){}this.ee.on("internal-error",(t,r)=>{this.abortHandler&&(0,S.p)("ierr",[ee(t),(0,_.t)(),!0,{},e.runtime.isRecording,r],void 0,this.featureName,this.ee)}),g.gm.addEventListener("unhandledrejection",t=>{this.abortHandler&&(0,S.p)("err",[te(t),(0,_.t)(),!1,{unhandledPromiseRejection:1},e.runtime.isRecording],void 0,this.featureName,this.ee)},(0,J.jT)(!1,this.removeOnAbort?.signal)),g.gm.addEventListener("error",t=>{this.abortHandler&&(0,S.p)("err",[re(t),(0,_.t)(),!1,{},e.runtime.isRecording],void 0,this.featureName,this.ee)},(0,J.jT)(!1,this.removeOnAbort?.signal)),this.abortHandler=this.#n,this.importAggregator(e,()=>r.e(478).then(r.bind(r,9377)))}#n(){this.removeOnAbort?.abort(),this.abortHandler=void 0}}var _e=r(8990);let ke=1;function Ne(e){const t=typeof e;return!e||"object"!==t&&"function"!==t?-1:e===g.gm?0:(0,_e.I)(e,"nr@id",function(){return ke++})}function Le(e){if("string"==typeof e)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,X.A)(e).length}catch(e){return}}}var Me=r(8139),Pe=r(3434),Ie=r(5732);const je={},Ce=["open","send","setRequestHeader"];function De(e,t){var r=e||R.ee;const n=function(e){return(e||R.ee).get("xhr")}(r);if(void 0===g.gm.XMLHttpRequest)return n;if(je[n.debugId]++)return n;je[n.debugId]=1,(0,Me.u)(r,t);var i=(0,Pe.YM)(n,void 0,t),s=g.gm.XMLHttpRequest,a=g.gm.MutationObserver,o=g.gm.Promise,c=g.gm.setInterval,d="readystatechange",u=["onload","onerror","onabort","onloadstart","onloadend","onprogress","ontimeout"],f=[],h=g.gm.XMLHttpRequest=function(e){const r=new s(e),a=n.context(r);a.targets=(0,Ie.$5)(t);try{n.emit("new-xhr",[r],a),r.addEventListener(d,(o=a,function(){var e=this;e.readyState>3&&!o.resolved&&(o.resolved=!0,n.emit("xhr-resolved",[],e)),i.inPlace(e,u,"fn-",E)}),(0,J.jT)(!1))}catch(e){(0,l.R)(15,e);try{n.emit("internal-error",[e])}catch(e){}}var o;return r};function p(e,t){i.inPlace(t,["onreadystatechange"],"fn-",E)}if(function(e,t){for(var r in e)t[r]=e[r]}(s,h),h.prototype=s.prototype,i.inPlace(h.prototype,Ce,"-xhr-",E),n.on("send-xhr-start",function(e,t){p(e,t),function(e){f.push(e),a&&(m?m.then(b):c?c(b):(v=-v,y.data=v))}(t)}),n.on("open-xhr-start",p),a){var m=o&&o.resolve();if(!c&&!o){var v=1,y=document.createTextNode(v);new a(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++)p(0,f[e]);f.length&&(f=[])}function E(e,t){return t}return n}var Be="fetch-",He=Be+"body-",We=["arrayBuffer","blob","json","text","formData"],Ue=g.gm.Request,Ke=g.gm.Response,Fe="prototype";const Ve={};function ze(e,t){const r=function(e){return(e||R.ee).get("fetch")}(e);if(!(Ue&&Ke&&g.gm.fetch))return r;if(Ve[r.debugId]++)return r;function n(e,n,i){var s=e[n];"function"==typeof s&&(e[n]=function(){var e=[...arguments];const n={},a=(0,Ie.$5)(t);var o;r.emit(i+"before-start",[e],n),n[R.P]&&n[R.P].dt&&(o=n[R.P].dt);var c=s.apply(this,e);return r.emit(i+"start",[e,o],c),c.then(function(e){return r.emit(i+"end",[null,e,a],c),e},function(e){throw r.emit(i+"end",[e,void 0,a],c),e})})}return Ve[r.debugId]=1,We.forEach(e=>{n(Ue[Fe],e,He),n(Ke[Fe],e,He)}),n(g.gm,"fetch",Be),r.on(Be+"end",function(e,n,i){var s=this;if(s.targets=i||[t.runtime.v2Target],n){var a=n.headers.get("content-length");null!==a&&(s.rxSize=a),r.emit(Be+"done",[null,n],s)}else r.emit(Be+"done",[e],s)}),r}var Ge=r(7485);class qe{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,a=(0,ye.ZF)(),o=(0,ye.el)(),c=Date.now();this.agentRef.runtime?.timeKeeper?.ready&&(s=Math.floor(this.agentRef.runtime.timeKeeper.correctAbsoluteTimestamp(c)));var d={spanId:a,traceId:o,timestamp:c,timestampCorrected:s};return(e.sameOrigin||this.isAllowedOrigin(e)&&this.useTraceContextHeadersForCors())&&(d.traceContextParentHeader=this.generateTraceContextParentHeader(a,o),d.traceContextStateHeader=this.generateTraceContextStateHeader(a,s??c,r,n,i)),(e.sameOrigin&&!this.excludeNewrelicHeader()||!e.sameOrigin&&this.isAllowedOrigin(e)&&this.useNewrelicHeaderForCors())&&(d.newrelicHeader=this.generateTraceHeader(a,o,s??c,r,n,i)),d}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 g.gm?.btoa))return null;var a={v:[0,1],d:{ty:"Browser",ac:n,ap:i,id:e,tr:t,ti:r}};return s&&n!==s&&(a.d.tk=s),btoa((0,X.A)(a))}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,Ge.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 Ye=r(7295);function Ze(e){return"string"==typeof e?e:e instanceof(0,i.dV)().o.REQ?e.url:g.gm?.URL&&e instanceof URL?e.href:void 0}function $e(e,t){var r=(0,Ge.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}var Je=["load","error","abort","timeout"],Xe=Je.length,Qe=(0,i.dV)().o.REQ,et=(0,i.dV)().o.XHR;const tt="X-NewRelic-App-Data",rt="internal-error";class nt extends W{static featureName=c.TZ;constructor(e){super(e,c.TZ),this.dt=new qe(e),this.handler=(e,t,r,n)=>(0,S.p)(e,t,r,n,this.ee);try{const e={xmlhttprequest:"xhr",fetch:"fetch",beacon:"beacon"};g.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};$e(n,r.name),this.handler("xhr",[n,i,r.startTime,r.responseEnd,e[r.initiatorType]],void 0,t.K7.ajax)}})}catch(e){}ze(this.ee,e),De(this.ee,e),function(e,r,n,i){const s=[c.mo.ALL,c.mo.FAILURES].includes(e.init.ajax?.capture_payloads);function a(e){var t=this;t.totalCbs=0,t.called=0,t.cbTime=0,t.end=A,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){O(t,e)},(0,J.jT)(!1)),g.lR||e.addEventListener("progress",function(e){t.lastSize=e.loaded},(0,J.jT)(!1))}function o(e){this.params={method:e[0]},$e(this,e[1]),this.metrics={}}function d(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 u(e,t){s&&e.length>=2&&(this.requestHeaders??={},this.requestHeaders[e[0].toLowerCase()]=e[1])}function l(e,t){var n=this.metrics,i=e[0],s=this;if(n&&i){var a=Le(i);a&&(n.txSize=a)}this.startTime=(0,_.t)(),this.requestBody=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(rt,[e])}catch(e){}}};for(var o=0;o<Xe;o++)t.addEventListener(Je[o],this.listener,(0,J.jT)(!1))}function f(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 h(e,t){var r=""+Ne(e)+!!t;this.xhrGuids&&!this.xhrGuids[r]&&(this.xhrGuids[r]=!0,this.totalCbs+=1)}function p(e,t){var r=""+Ne(e)+!!t;this.xhrGuids&&this.xhrGuids[r]&&(delete this.xhrGuids[r],this.totalCbs-=1)}function m(){this.endTime=(0,_.t)()}function v(e,t){t instanceof et&&"load"===e[0]&&r.emit("xhr-load-added",[e[1],e[2]],t)}function y(e,t){t instanceof et&&"load"===e[0]&&r.emit("xhr-load-removed",[e[1],e[2]],t)}function b(e,t,r){t instanceof et&&("onload"===r&&(this.onload=!0),("load"===(e[0]&&e[0].type)||this.onload)&&(this.xhrCbStart=(0,_.t)()))}function E(e,t){this.xhrCbStart&&r.emit("xhr-cb-time",[(0,_.t)()-this.xhrCbStart,this.onload,t],t)}function w(e){var t,r=e[1]||{};if("string"==typeof e[0]?0===(t=e[0]).length&&g.RI&&(t=""+g.gm.location.href):e[0]&&e[0].url?t=e[0].url:g.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,Ge.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)o(e[0].headers,n)&&(this.dt=n);else{var s={};for(var a in r)s[a]=r[a];s.headers=new Headers(r.headers||{}),o(s.headers,n)&&(this.dt=n),e.length>1?e[1]=s:e.push(s)}}function o(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 R(e,t){this.params={},this.metrics={},this.startTime=(0,_.t)(),this.dt=t;let[r,n={}]=e;$e(this,Ze(r));const i=(""+(r&&r instanceof Qe&&r.method||n.method||"GET")).toUpperCase();this.params.method=i,this.txSize=Le(n.body||r?.body)||0;try{var a=n.headers||r?.headers;if(s&&a)if(this.requestHeaders??={},a instanceof Headers)a.forEach(function(e,t){this.requestHeaders[t.toLowerCase()]=e}.bind(this));else if("object"==typeof a)for(var o in a)this.requestHeaders[o.toLowerCase()]=a[o]}catch(e){}this.requestBody=n.body||r?.body}function T(e,t){if(this.endTime=(0,_.t)(),this.params||(this.params={}),(0,Ye.iW)(this.params))return;this.params.status=t?t.status:0;const n=()=>{const e=+this.rxSize,t=null==this.rxSize||isNaN(e)?void 0:e,r={txSize:this.txSize,rxSize:t,duration:this.endTime-this.startTime},n=[this.params,r,this.startTime,this.endTime,"fetch"];this.targets.forEach(e=>x(n,this,e))};t&&s?t.clone().text().then(e=>{this.responseBody=e,this.rxSize&&"0"!==this.rxSize&&0!==this.rxSize||void 0===e||0===this.params.status||(this.rxSize=Le(e)),t?.headers&&(this.responseHeaders={},t.headers.forEach(function(e,t){this.responseHeaders[t.toLowerCase()]=e}.bind(this)))}).catch(e=>{r.emit(rt,[e])}).finally(()=>{n()}):n()}function A(e){const t=this.params,n=this.metrics;if(this.ended)return;this.ended=!0;for(let t=0;t<Xe;t++)e.removeEventListener(Je[t],this.listener,!1);if(t.aborted)return;if((0,Ye.iW)(t))return;if(n.duration=this.endTime-this.startTime,this.loadCaptureCalled||4!==e.readyState?null==t.status&&(t.status=0):O(this,e),n.cbTime=this.cbTime,s){try{this.responseBody=e.responseText}catch(t){this.responseBody=e.response}if((!n.rxSize||0===n.rxSize)&&void 0!==this.responseBody&&0!==t.status){const e=Le(this.responseBody);void 0!==e&&(n.rxSize=e)}try{this.responseHeaders=function(e){const t={};return e?(e.split("\r\n").forEach(function(e){const r=e.indexOf(": ");if(r>0){const n=e.substring(0,r),i=e.substring(r+2);t[n.toLowerCase()]=i}}),t):t}(e.getAllResponseHeaders())}catch(e){r.emit(rt,[e])}}const i=[t,n,this.startTime,this.endTime,"xhr"];this.targets.forEach(e=>x(i,this,e))}function x(e,r,i){n("xhr",[...e,i],r,t.K7.ajax)}function O(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?Le(e.response):"text"===r||""===r||void 0===r?Le(e.responseText):void 0}(n,e.lastSize);if(void 0!==i&&0!==n.status&&(e.metrics.rxSize=i),e.sameOrigin&&n.getAllResponseHeaders().indexOf(tt)>=0){var s=n.getResponseHeader(tt);s&&((0,S.p)("sm",["Ajax/CrossApplicationTracing/Header/Seen"],void 0,t.K7.metrics,r),e.params.cat=s.split(", ").pop())}e.loadCaptureCalled=!0}r.on("new-xhr",a),r.on("open-xhr-start",o),r.on("open-xhr-end",d),r.on("send-xhr-start",l),r.on("setRequestHeader-xhr-start",u),r.on("xhr-cb-time",f),r.on("xhr-load-added",h),r.on("xhr-load-removed",p),r.on("xhr-resolved",m),r.on("addEventListener-end",v),r.on("removeEventListener-end",y),r.on("fn-end",E),r.on("fetch-before-start",w),r.on("fetch-start",R),r.on("fn-start",b),r.on("fetch-done",T)}(e,this.ee,this.handler,this.dt),this.importAggregator(e,()=>r.e(478).then(r.bind(r,3845)))}}const it={},st=["pushState","replaceState"];function at(e,t){const r=function(e){return(e||R.ee).get("history")}(e);return!g.RI||it[r.debugId]++||(it[r.debugId]=1,(0,Pe.YM)(r,void 0,t).inPlace(window.history,st,"-")),r}var ot=r(3738);function ct(e){(0,N.Y)(k.BL,function(r=Date.now()){const n=r-g.WN;n<0&&(0,l.R)(62,r),(0,S.p)(q.XG,[k.BL,{time:n}],void 0,t.K7.metrics,e.ee),e.addToTrace({name:k.BL,start:r,origin:"nr"}),(0,S.p)("api-"+k.hG,[n,k.BL],void 0,t.K7.genericEvents,e.ee)},e)}const{He:dt,bD:ut,d3:lt,Kp:ft,TZ:ht,Lc:pt,uP:gt,Rz:mt}=ot;class vt extends W{static featureName=ht;constructor(e){var n;super(e,ht),n=e,(0,N.Y)(k.U2,function(e){if(!(e&&"object"==typeof e&&e.name&&e.start))return;const r={n:e.name,s:e.start-g.WN,e:(e.end||e.start)-g.WN,o:e.origin||"",t:"api"};r.s<0||r.e<0||r.e<r.s?(0,l.R)(61,{start:r.s,end:r.e}):(0,S.p)("bstApi",[r],void 0,t.K7.sessionTrace,n.ee)},n),ct(e);if(!(0,j.V)(e.init))return void this.deregisterDrain();const i=this.ee;let s;at(i,e),this.eventsEE=(0,Me.u)(i,e),this.eventsEE.on(gt,function(e,t){this.bstStart=(0,_.t)()}),this.eventsEE.on(pt,function(e,r){(0,S.p)("bst",[e[0],r,this.bstStart,(0,_.t)()],void 0,t.K7.sessionTrace,i)}),i.on(mt+lt,function(e){this.time=(0,_.t)(),this.startPath=location.pathname+location.hash}),i.on(mt+ft,function(e){(0,S.p)("bstHist",[location.pathname+location.hash,this.startPath,this.time],void 0,t.K7.sessionTrace,i)});try{s=new PerformanceObserver(e=>{const r=e.getEntries();(0,S.p)(dt,[r],void 0,t.K7.sessionTrace,i)}),s.observe({type:ut,buffered:!0})}catch(e){}this.importAggregator(e,()=>r.e(478).then(r.bind(r,6974)),{resourceObserver:s})}}var yt=r(733),bt=r(6344);class Et extends W{static featureName=bt.TZ;#i;recorder;constructor(e){var n;let i;super(e,bt.TZ),n=e,(0,N.Y)(k.CH,function(){(0,S.p)(k.CH,[],void 0,t.K7.sessionReplay,n.ee)},n),function(e){(0,N.Y)(k.Tb,function(){(0,S.p)(k.Tb,[],void 0,t.K7.sessionReplay,e.ee)},e)}(e);const s="".concat(u.Wt).concat((0,yt.Y)(e.info.licenseKey,e.info.applicationID));try{i=JSON.parse(localStorage.getItem(s))}catch(e){}(0,I.SR)(e.init)&&this.ee.on(k.CH,()=>this.#s()),this.#a(i)&&this.importRecorder().then(e=>{e.startRecording(bt.Qb.PRELOAD,i?.sessionReplayMode)}),this.abortHandler=this.#n,this.importAggregator(this.agentRef,()=>r.e(478).then(r.bind(r,6167)),this),this.ee.on("err",e=>{this.blocked||this.agentRef.runtime.isRecording&&(this.errorNoticed=!0,(0,S.p)(bt.Vh,[e],void 0,this.featureName,this.ee))})}#a(e){return e&&(e.sessionReplayMode===u.g.FULL||e.sessionReplayMode===u.g.ERROR)||(0,I.Aw)(this.agentRef.init)}importRecorder(){return this.recorder?Promise.resolve(this.recorder):(this.#i??=Promise.all([r.e(478),r.e(249)]).then(r.bind(r,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!==u.g.FULL&&this.featAggregate.initializeRecording(u.g.FULL,!0,bt.Qb.API):this.importRecorder().then(()=>{this.recorder.startRecording(bt.Qb.API,u.g.FULL)}))}#n(){this.recorder?.stopRecording()}}var wt=r(3962);class Rt extends W{static featureName=wt.TZ;constructor(e){if(super(e,wt.TZ),function(e){const r=e.ee.get("tracer");function n(){}(0,N.Y)(k.dT,function(e){return(new n).get("object"==typeof e?e:{})},e);const i=n.prototype={createTracer:function(n,i){var s={},a=this,o="function"==typeof i;return(0,S.p)(q.xV,["API/createTracer/called"],void 0,t.K7.metrics,e.ee),function(){if(r.emit((o?"":"no-")+"fn-start",[(0,_.t)(),a,o],s),o)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,_.t)()],s)}}}};["actionText","setName","setAttribute","save","ignore","onEnd","getContext","end","get"].forEach(r=>{N.Y.apply(this,[r,function(){return(0,S.p)(k.hw+r,[performance.now(),...arguments],this,t.K7.softNav,e.ee),this},e,i])}),(0,N.Y)(k.PA,function(){(0,S.p)(k.hw+"routeName",[performance.now(),...arguments],void 0,t.K7.softNav,e.ee)},e)}(e),!g.RI||!(0,i.dV)().o.MO)return;const n=at(this.ee,e);try{this.removeOnAbort=new AbortController}catch(e){}wt.tC.forEach(e=>{(0,J.sp)(e,e=>{c(e)},!0,this.removeOnAbort?.signal)});const s=()=>(0,S.p)("newURL",[(0,_.t)(),""+window.location],void 0,this.featureName,this.ee);n.on("pushState-end",s),n.on("replaceState-end",s),(0,J.sp)(wt.OV,e=>{c(e),(0,S.p)("newURL",[e.timeStamp,""+window.location],void 0,this.featureName,this.ee)},!0,this.removeOnAbort?.signal);let a=!1;const o=new((0,i.dV)().o.MO)((e,t)=>{a||(a=!0,requestAnimationFrame(()=>{(0,S.p)("newDom",[(0,_.t)()],void 0,this.featureName,this.ee),a=!1}))}),c=(0,C.s)(e=>{"loading"!==document.readyState&&((0,S.p)("newUIEvent",[e],void 0,this.featureName,this.ee),o.observe(document.body,{attributes:!0,childList:!0,subtree:!0,characterData:!0}))},100,{leading:!0});this.abortHandler=function(){this.removeOnAbort?.abort(),o.disconnect(),this.abortHandler=void 0},this.importAggregator(e,()=>r.e(478).then(r.bind(r,4393)),{domObserver:o})}}var Tt=r(981);const At={},St=new Set;function xt(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 Ot{constructor(e,t){this.timestamp=(0,_.t)(),this.currentUrl=(0,Ee.L)(window.location.href),this.socketId=(0,ye.LA)(8),this.requestedUrl=(0,Ee.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 _t extends W{static featureName=o.TZ;constructor(e){super(e,o.TZ);const n=e.init.feature_flags.includes("websockets")||e.init.web_sockets?.enabled,s=!e.init.feature_flags.includes("no_spv"),a=[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,n,s];var c;let d;if(c=e,(0,N.Y)(k.hG,(e,t)=>ce(e,t,c),c),function(e){(0,N.Y)(k.fF,(t,r)=>ue(t,r,e),e)}(e),ct(e),Se(e),function(e){(0,N.Y)(k.V1,(t,r)=>de(t,r,e),e)}(e),this.removeOnAbort=new AbortController,this.abortHandler=()=>{this.removeOnAbort.abort(),this.abortHandler=void 0},n){const u=function(e,t){if(!(0,i.dV)().o.WS)return e;const r=e.get("websockets");if(At[r.debugId]++)return r;At[r.debugId]=1,(0,V.G)(()=>{const e=(0,_.t)();St.forEach(t=>{t.nrData.closedAt=e,t.nrData.closeCode=1001,t.nrData.closeReason="Page navigating away",t.nrData.closeWasClean=!1,t.nrData.openedAt&&(t.nrData.connectedDuration=e-t.nrData.openedAt),r.emit("ws",[t.nrData,t.targets],t)})});class n extends WebSocket{static name=Tt.R.WS;static toString(){return"function WebSocket() { [native code] }"}toString(){return"[object WebSocket]"}get[Symbol.toStringTag](){return n.name}#o(e){(e.__newrelic??={}).socketId=this.nrData.socketId,this.nrData.hasErrors??=!0}constructor(...e){super(...e),this.nrData=new Ot(e[0],e[1]),this.targets=(0,Ie.$5)(t),this.addEventListener("open",()=>{this.nrData.openedAt=(0,_.t)(),["protocol","extensions","binaryType"].forEach(e=>{this.nrData[e]=this[e]}),St.add(this)}),this.addEventListener("message",e=>{const{type:t,size:r}=xt(e.data);this.nrData.messageOrigin??=(0,Ee.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,_.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,St.delete(this),r.emit("ws",[this.nrData,this.targets],this)})}addEventListener(e,t,...r){const n=this,i="function"==typeof t?function(...e){try{return t.apply(this,e)}catch(e){throw n.#o(e),e}}:t?.handleEvent?{handleEvent:function(...e){try{return t.handleEvent.apply(t,e)}catch(e){throw n.#o(e),e}}}:t;return super.addEventListener(e,i,...r)}send(e){if(this.readyState===WebSocket.OPEN){const{type:t,size:r}=xt(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.#o(e),e}}close(...e){try{super.close(...e)}catch(e){throw this.#o(e),e}}}return g.gm.WebSocket=n,r}(this.ee,e);u.on("ws",(e,t)=>{(0,S.p)("ws-complete",[e,t],void 0,this.featureName,this.ee)})}if(s){if("function"==typeof g.gm.ReportingObserver){const l=new g.gm.ReportingObserver(e=>{e.forEach(e=>{(0,S.p)("spv",[kt(e),(0,_.t)()],void 0,t.K7.genericEvents,this.ee)}),l.disconnect()},{types:["csp-violation"],buffered:!0});l.observe()}g.gm.addEventListener("securitypolicyviolation",e=>{(0,S.p)("spv",[kt(e),e.timeStamp],void 0,t.K7.genericEvents,this.ee)},(0,J.jT)(!1,this.removeOnAbort.signal))}if(g.RI){if(ze(this.ee,e),De(this.ee,e),d=at(this.ee,e),e.init.user_actions.enabled){function f(t){const r=(0,Ge.D)(t);return e.beacons.includes(r.hostname+":"+r.port)}function h(){d.emit("navChange")}o.Zp.forEach(e=>(0,J.sp)(e,e=>(0,S.p)("ua",[e],void 0,this.featureName,this.ee),!0)),o.qN.forEach(e=>{const t=(0,C.s)(e=>{(0,S.p)("ua",[e],void 0,this.featureName,this.ee)},500,{leading:!0});(0,J.sp)(e,t)}),g.gm.addEventListener("error",()=>{(0,S.p)("uaErr",[],void 0,t.K7.genericEvents,this.ee)},(0,J.jT)(!1,this.removeOnAbort.signal)),this.ee.on("open-xhr-start",(e,r)=>{f(e[1])||r.addEventListener("readystatechange",()=>{2===r.readyState&&(0,S.p)("uaXhr",[],void 0,t.K7.genericEvents,this.ee)},(0,J.jT)(void 0,this.removeOnAbort.signal))}),this.ee.on("fetch-start",e=>{e.length>=1&&!f(Ze(e[0]))&&(0,S.p)("uaXhr",[],void 0,t.K7.genericEvents,this.ee)}),d.on("pushState-end",h),d.on("replaceState-end",h),window.addEventListener("hashchange",h,(0,J.jT)(!0,this.removeOnAbort.signal)),window.addEventListener("popstate",h,(0,J.jT)(!0,this.removeOnAbort.signal))}if(e.init.performance.resources.enabled&&g.gm.PerformanceObserver?.supportedEntryTypes.includes("resource")){new PerformanceObserver(e=>{e.getEntries().forEach(e=>{(0,S.p)("browserPerformance.resource",[e],void 0,this.featureName,this.ee)})}).observe({type:"resource",buffered:!0})}}a.some(e=>e)?this.importAggregator(e,()=>r.e(478).then(r.bind(r,8019))):this.deregisterDrain()}}function kt(e){const t=e.body??e;return{blockedUrl:t.blockedURL??e.blockedURI,documentUrl:t.documentURL??e.documentURI,effectiveDirective:t.effectiveDirective,originalPolicy:t.originalPolicy,sourceFile:t.sourceFile,statusCode:t.statusCode,lineNumber:t.lineNumber,columnNumber:t.columnNumber,disposition:"reporting"===t.disposition?"report":t.disposition,sample:t.sample,referrer:t.referrer}}var Nt=r(2646);const Lt=new Map;function Mt(e,t,r,n,i=!0,s){if("object"!=typeof t||!t||"string"!=typeof r||!r||"function"!=typeof t[r])return(0,l.R)(29);const a=function(e){return(e||R.ee).get("logger")}(e),o=(0,Pe.YM)(a,void 0,s),c=new Nt.y(R.P);c.level=n.level,c.customAttributes=n.customAttributes,c.autoCaptured=i;const d=t[r]?.[Pe.Jt]||t[r];return Lt.set(d,c),o.inPlace(t,[r],"wrap-logger-",()=>Lt.get(d),void 0,!0),a}var Pt=r(1910);class It extends W{static featureName=se.TZ;constructor(e){var t;super(e,se.TZ),t=e,(0,N.Y)("log",(e,r)=>oe(e,r,t),t),function(e){(0,N.Y)(k.Wb,(t,r,{customAttributes:n={},level:i=se.p_.INFO}={})=>{Mt(e.ee,t,r,{customAttributes:n,level:i},!1,e)},e)}(e),Se(e);const n=this.ee;["log","error","warn","info","debug","trace"].forEach(t=>{(0,Pt.i)(g.gm.console[t]),Mt(n,g.gm.console,t,{level:"log"===t?"info":t},void 0,e)}),this.ee.on("wrap-logger-end",function([t],r,i,s=[e.runtime.v2Target]){const{level:a,customAttributes:o,autoCaptured:c}=this;s.forEach(e=>{(0,ae.R)(n,t,o,a,c,e)})}),this.importAggregator(e,()=>r.e(478).then(r.bind(r,5288)))}}new F({features:[nt,K,G,vt,Et,Y,Oe,_t,It,Rt],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/version1795064876/frontend/NVI/DiscountContacts/en_US/css/styles.css" />
<script type="text/javascript" src="https://www.discountcontacts.com/static/version1795064876/frontend/NVI/DiscountContacts/en_US/NVI_ProductUrlRestructure/js/url-restructure.js"></script>
<script type="text/javascript" defer="defer" src="https://www.discountcontacts.com/static/version1795064876/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/version1795064876/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/version1795064876/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>
<script src="https://assets.adobedtm.com/8301839efabc/9844b2bde05e/launch-9334d2282bc9.min.js" async></script>
<meta name="p:domain_verify" content="S5Nd6kLPmik2GzerK4T4z0pPsX5PMh38"/>
<!-- Adobe Commerce One Trust Script -->
<!-- OneTrust Cookies Consent Notice start for discountcontacts.com -->
<script src="https://cdn.cookielaw.org/scripttemplates/otSDKStub.js" type="text/javascript" charset="UTF-8" data-domain-script="30afa669-93a7-45d3-b88b-3f7f0af9af89" ></script>
<script type="text/javascript">
function OptanonWrapper() { }
</script>
<!-- OneTrust Cookies Consent Notice end for discountcontacts.com --><script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
// Set default Consent Mode states
// gtag('consent', 'default', {
// 'ad_storage': 'granted',
// 'analytics_storage': 'granted',
// 'ad_user_data': 'granted',
// 'ad_personalization': 'granted',
// 'functionality_storage': 'granted',
// 'personalization_storage': 'granted',
// 'security_storage': 'granted',
// 'wait_for_update': 500
// });
</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/version1795064876/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/version1795064876/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/version1795064876/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";
let shopperContext = { shopperId: shopperId };
magentoStorefrontEvents.context.setShopper(shopperContext);
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="RVDJ8UvRtFP8BUDr" />
<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-Z0-9-]+)+$/.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>
<a class="action sr-only focus:not-sr-only focus:absolute focus:z-40 focus:bg-white contentarea" href="/accessibility-statement" target="_blank" >
Accessibility Statement</a>
<style>#html-body [data-pb-style=O02H8BB]{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=TMC2RHR]{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="O02H8BB"><div class="preheader_content_text" data-content-type="text" data-appearance="default" data-element="main" data-pb-style="TMC2RHR"><h2 style="text-align: center;"><strong><span style="color: rgb(255, 255, 255);">CYBER SAVINGS: Save 20% off $200 and 25% off $250+!</span></strong></h2></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_6b0aa05576e86 = () => ({
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_6b0aa05576e86()"
@keydown.escape="open && closeMenu"
@click.outside="open && closeMenu"
aria-label="Main menu"
role="navigation">
<button x-ref="open-menu-button"
@click="openMenu"
type="button"
aria-label="Open 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 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 Optix"
class=""
title="Air 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 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 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 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/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 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 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 Contacts"
class="print:block">
<img
src="https://www.discountcontacts.com/media/logo/stores/1/discount-contacts-logo.svg"
alt="Store 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_6b0aa0559344e = () => ({
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 menu">
<ul class="relative flex h-20">
<li class="top-level-menu-container flex items-center justify-between
desktop-brand-menu  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 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-6b0aa0559b6a1" 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-6b0aa0559b6a1 {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  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 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 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 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 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/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 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_6b0aa0559344e()
,{
['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"
aria-label="Search products here"
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 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 sign in/register screen"
aria-label="Sign 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 My Cart" data-hyvacsp2="Cart is empty" data-hyvacsp3="%1 items" data-hyvacsp4="%1 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 My 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 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 "%0""
>
<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 product "%0" from 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 My 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 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 a new 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 Email 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">
Message and data rates may apply. See <a href="/terms" target="_blank" class="link">Terms and Conditions</a> and our <a href="/privacy-policy" target="_blank" class="link">Privacy Policy</a> for more information </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 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 Username or Email 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'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\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;
}
});
},
// 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 Sent!" data-hyvacsp2="Login successful. Reloading 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 Username or Email 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'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 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 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 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 & 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 to Home 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>
(function() {
'use strict';
// Wait for jQuery to be available
var checkJQuery = setInterval(function() {
if (typeof jQuery !== 'undefined') {
clearInterval(checkJQuery);
initDefaultVariants();
}
}, 100);
function initDefaultVariants() {
console.log('PLP Default Variant: Starting (plain jQuery version)');
// Wait for DOM and swatches to be ready
jQuery(document).ready(function($) {
console.log('DOM ready, waiting for swatches...');
setTimeout(function() {
loadDefaultVariants($);
}, 2000);
});
}
function loadDefaultVariants($) {
console.log('Loading default variants for PLP products...');
// Get all configurable products on the page
var productIds = [];
$('.product-item').each(function() {
console.log('Product item:', $(this).attr('class'));
var $item = $(this);
var productId = $item.find('[data-product-id]').data('product-id');
if (!productId) {
// Try alternate methods
var $link = $item.find('.product-item-link');
var href = $link.attr('href');
console.log('Product link href:', href);
if (href) {
var match = href.match(/\/product\/(\d+)\//);
if (match) {
productId = match[1];
}
}
}
if (productId) {
$item.attr('data-parent-product-id', productId);
productIds.push(productId);
console.log('Found product ID:', productId);
}
});
console.log('Total product IDs found:', productIds.length, productIds);
if (productIds.length === 0) {
console.log('No product IDs found, exiting');
return;
}
// Get URL
var loadUrl = window.location.origin + '/nvi_producturlrestructure/defaultvariant/list';
console.log('Loading default variants from:', loadUrl);
// Get form key
var formKey = '';
if (typeof $.mage !== 'undefined' && typeof $.mage.cookies !== 'undefined') {
formKey = $.mage.cookies.get('form_key');
} else if (typeof $.cookie !== 'undefined') {
formKey = $.cookie('form_key');
}
console.log('Form key:', formKey);
// Load default variants for these products
$.ajax({
url: loadUrl,
type: 'POST',
dataType: 'json',
data: {
product_ids: productIds.join(','),
form_key: formKey
},
success: function(response) {
console.log('Default variants response:', response);
if (response.success && response.variants) {
applyDefaultVariants($, response.variants);
}
},
error: function(xhr, status, error) {
console.error('Error loading default variants:', error);
console.error('XHR status:', xhr.status);
console.error('XHR response:', xhr.responseText);
}
});
}
function applyDefaultVariants($, variants) {
console.log('Applying default variants:', variants);
$.each(variants, function(parentId, childId) {
var $product = $('.product-item[data-parent-product-id="' + parentId + '"]');
console.log('Looking for product with parent ID:', parentId, 'found:', $product.length);
if ($product.length) {
$product.attr('data-default-variant-id', childId);
console.log('Set default variant', childId, 'for product', parentId);
// Trigger swatch selection
selectSwatch($, $product, parseInt(childId));
}
});
}
function selectSwatch($, $product, variantId) {
console.log('Selecting swatch for variant:', variantId);
var $swatchOptions = $product.find('.swatch-option');
console.log('Found swatch options:', $swatchOptions.length);
$swatchOptions.each(function() {
var $option = $(this);
var products = $option.attr('option-products');
if (products) {
try {
var productList = JSON.parse(products);
console.log('Option products:', productList);
if (productList.indexOf(variantId) !== -1) {
console.log('Clicking swatch for variant:', variantId);
$option.trigger('click');
return false; // break loop
}
} catch (e) {
console.error('Error parsing products:', e);
}
}
});
}
})();
</script>
<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 = "6d2f6b3f\u002Dad4f\u002D4147\u002D944b\u002Dcdfdb2b91acb";
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 Help?"
>
<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 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 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 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 Help?"
>
<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 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 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 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 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 & 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 Prescription 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 Light 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 for 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 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 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 & 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 Prescription 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 Light 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 for 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 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 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 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 activities provided via the website may be covered by U.S patent 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"));
},
initShopperContext(customerData) {
if (customerData && (customerData.patientID || customerData.patient_id || customerData.fullname || customerData.firstname)) {
if (typeof magentoStorefrontEvents !== 'undefined' && magentoStorefrontEvents.context && typeof magentoStorefrontEvents.context.setShopper === 'function') {
let mseShopper = magentoStorefrontEvents.context.getShopper() || {};
let shopperData = {
...mseShopper,
shopperId: 'logged-in'
};
const patientID = customerData.patientID || customerData.patient_id;
if (patientID) {
shopperData.patientID = parseInt(patientID, 10);
}
magentoStorefrontEvents.context.setShopper(shopperData);
}
}
},
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);
}
const customerFromEvent = e && e.detail && e.detail.data ? e.detail.data.customer : null;
let customer = customerFromEvent;
if (!customer && typeof customerData !== 'undefined' && customerData && typeof customerData.get === 'function') {
try {
customer = customerData.get('customer');
} catch (err) {
// ignore
}
}
if (customer) {
this.initShopperContext(customer);
}
},
nVIDataServicesSetCartContextPrivateContentLoadedWindow5(){
this.initContext(this.$event.detail.data.cart);
if (this.$event.detail.data.customer) {
this.initShopperContext(this.$event.detail.data.customer);
}
}
}));
};
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
src="https://www.discountcontacts.com/static/version1795064876/frontend/NVI/DiscountContacts/en_US/NVI_BrandFilterSearch/js/brand-filter-search.js"
defer>
</script>
<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{z.ex=t,r()&&-1===z.ex.indexOf($.uB)&&(z.ex+=$.uB),o()&&-1===z.ex.indexOf($.uBr)&&(z.ex+=$.uBr),i()&&-1===z.ex.indexOf($.nIL)&&(z.ex+=$.nIL),window.ftr__snp_cwc||(z.ex+=$.s),H(z)}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,$.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,$.dUAL)}function e(t,e){M=e?"F"+"T"+"R"+"A"+"U"+"C":"F"+"T"+"R"+"A"+"U",setTimeout(l,B,$.uAS)}window.ftr__fdad(t,e)}function w(){function t(){M&&setTimeout(l,B,$.uDAD)}function e(t,e){M=e?"F"+"T"+"R"+"A"+"U"+"C":"F"+"T"+"R"+"A"+"U",setTimeout(l,B,$.uDS)}window.ftr__radd(t,e)}function l(t){function e(){for(var t=0;t<=$.tmosSecs.length;t++)clearTimeout(et[t])}function n(){try{e(),a(t+$.uS)}catch(t){}}function r(n){try{e(),z.td=1*new Date-z.ts,a(n?t+$.uF+$.cP:t+$.uF),t===$.uFP&&u(),t===$.uDF&&(j?w():h()),t!==$.uAS&&t!==$.dUAL||j||w(),t!==$.uDS&&t!==$.uDAD||j&&h()}catch(t){a($.eUoe)}}try{!function(t){for(var e=0;e<=$.tmosSecs.length;e++)e===$.tmosSecs.length?et[e]=setTimeout(r,1e3*$.tmosSecs[e-1]+1e3):et[e]=setTimeout(a,1e3*$.tmosSecs[e],t+$.tmos[e])}(t);var o;switch(t){case $.uFP:o=N;break;case $.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+$.eTlu)}}var g="22gfsg;5vq;9v581forxgiurqw1qhw2vwdwxv",v="fort",p="erTo",m="ken",_=3;window.ftr__config={m:merchantConfig,s:"32",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||"22gfsg;5vq;9v581forxgiurqw1qhw2vwdwxv"),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)}catch(t){}},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}(),$={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 z=X();try{z.id&&(Q.isValidNumericalToken(z.id)||Q.isValidUUIDToken(z.id)||Q.isValidFGUToken(z.id))?window.ftr__ncd=!1:(z.id=Q.safeGenerateNoDash(),window.ftr__ncd=!0),z.ts=window.ftr__startScriptLoad,H(z),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://"+z.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($.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++):z.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++):z.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?$.uFP:$.uDF;setTimeout(l,B,nt)}catch(t){a($.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/version1795064876/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":1795858549},"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":576,"atts":"HkAQFQhMRR4bBEdZGRgf","errorBeacon":"bam.nr-data.net","agent":""}</script></body>
</html>
Is aclens.com your store?
Claim it with one DNS record.
Why is aclens.com's profile invalid?
We found a UCP profile, but it failed schema validation against the official spec. The findings on this page list what failed — usually missing required fields, wrong data types, or version mismatches. A UCP agent may not be able to use a profile that doesn't validate, so these are worth fixing first.
How can aclens.com fix this?
Run the profile through our UCP Validator — it shows each problem and where it is in the file. Fix those, publish the profile again, then run a new check.
Does this mean aclens.com is broken for shoppers?
No. This check looks only at the UCP profile, not at the website people shop on. It only affects UCP agents, which read the profile.
How was this UCP report for aclens.com generated?
With public requests on 28 November 2026: we asked for
aclens.com/.well-known/ucp and read its robots.txt, then validated the profile against the UCP release it declares and checked that its spec and schema links resolve. No sign-in, no purchase and no manual review. How we check.How do I get a newer result for aclens.com?
This page shows the stored result of our last check (28 November 2026). To run a new one, enter aclens.com on the Check page.
Why does this status matter?
Universal Commerce Protocol is an open standard that lets a UCP agent find out what a store sells, build a cart and check out through a published contract instead of reading web pages. A valid UCP profile is how a store declares that support.
