@elevateab/sdk 1.2.6 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -19,8 +19,6 @@ npm install @elevateab/sdk
19
19
 
20
20
  Hydrogen uses automatic analytics tracking via Shopify's `useAnalytics()` hook.
21
21
 
22
- ### 1. Add the Provider
23
-
24
22
  ```tsx
25
23
  // app/root.tsx
26
24
  import { ElevateProvider, ElevateAnalytics } from "@elevateab/sdk";
@@ -34,6 +32,7 @@ export default function Root() {
34
32
  <ElevateProvider
35
33
  storeId="mystore.myshopify.com"
36
34
  storefrontAccessToken={env.PUBLIC_STOREFRONT_API_TOKEN}
35
+ preventFlickering={true}
37
36
  >
38
37
  <ElevateAnalytics />
39
38
  <Outlet />
@@ -45,34 +44,7 @@ export default function Root() {
45
44
 
46
45
  That's it. Analytics events are tracked automatically when users view pages, products, add to cart, etc.
47
46
 
48
- ### 2. Add Anti-Flicker (Recommended)
49
-
50
- Prevents content flash while tests load:
51
-
52
- ```tsx
53
- // app/root.tsx
54
- import { ElevateProvider, ElevateAnalytics, AntiFlickerScript } from "@elevateab/sdk";
55
-
56
- export default function Root() {
57
- return (
58
- <html>
59
- <head>
60
- <AntiFlickerScript />
61
- </head>
62
- <body>
63
- <ElevateProvider
64
- storeId="mystore.myshopify.com"
65
- storefrontAccessToken={env.PUBLIC_STOREFRONT_API_TOKEN}
66
- preventFlickering={true}
67
- >
68
- <ElevateAnalytics />
69
- <Outlet />
70
- </ElevateProvider>
71
- </body>
72
- </html>
73
- );
74
- }
75
- ```
47
+ The `preventFlickering={true}` prop prevents content flash while tests load.
76
48
 
77
49
  ---
78
50
 
@@ -84,14 +56,11 @@ Next.js requires manual tracking since it doesn't have Shopify's analytics syste
84
56
 
85
57
  ```tsx
86
58
  // app/layout.tsx
87
- import { ElevateNextProvider, AntiFlickerScript } from "@elevateab/sdk/next";
59
+ import { ElevateNextProvider } from "@elevateab/sdk/next";
88
60
 
89
61
  export default function RootLayout({ children }) {
90
62
  return (
91
63
  <html>
92
- <head>
93
- <AntiFlickerScript />
94
- </head>
95
64
  <body>
96
65
  <ElevateNextProvider
97
66
  storeId="mystore.myshopify.com"
@@ -109,7 +78,7 @@ export default function RootLayout({ children }) {
109
78
  The `ElevateNextProvider` automatically:
110
79
  - Tracks page views on route changes
111
80
  - Initializes analytics globally
112
- - Handles anti-flicker reveal
81
+ - Prevents content flicker (when `preventFlickering={true}`)
113
82
 
114
83
  ### 2. Track Product Views
115
84
 
@@ -327,7 +296,7 @@ interface ElevateProviderProps {
327
296
  storeId: string; // Required: your-store.myshopify.com
328
297
  storefrontAccessToken?: string; // For cart attribute tagging
329
298
  preventFlickering?: boolean; // Enable anti-flicker (default: false)
330
- hasLocalizedPaths?: boolean; // True if homepage is at /en-us/, /fr-ca/, etc.
299
+ flickerTimeout?: number; // Max wait time in ms (default: 3000)
331
300
  children: React.ReactNode;
332
301
  }
333
302
  ```
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var zr=Object.create;var He=Object.defineProperty;var qr=Object.getOwnPropertyDescriptor;var jr=Object.getOwnPropertyNames;var $r=Object.getPrototypeOf,Gr=Object.prototype.hasOwnProperty;var Be=(e,t)=>()=>(e&&(t=e(e=0)),t);var Wr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Gt=(e,t)=>{for(var r in t)He(e,r,{get:t[r],enumerable:!0})},Wt=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jr(t))!Gr.call(e,i)&&i!==r&&He(e,i,{get:()=>t[i],enumerable:!(s=qr(t,i))||s.enumerable});return e};var Je=(e,t,r)=>(r=e!=null?zr($r(e)):{},Wt(t||!e||!e.__esModule?He(r,"default",{value:e,enumerable:!0}):r,e)),Hr=e=>Wt(He({},"__esModule",{value:!0}),e);function Ht(e,t){let r=e.reduce((d,m)=>d+m.weight,0),i=Ve(t)%r,f=0;for(let d of e)if(f+=d.weight,i<f)return d;return e[0]}function Ve(e){let t=0;for(let r=0;r<e.length;r++){let s=e.charCodeAt(r);t=(t<<5)-t+s,t=t&t}return Math.abs(t)}function Jt(e){return!e.testId||!e.name||!e.variations||e.variations.length===0?!1:e.variations.reduce((r,s)=>r+s.weight,0)===100}function Yt(e){let t=Date.now(),r=Math.random().toString(36).substring(2,9);return`exp-${e.toLowerCase().replace(/[^a-z0-9]/g,"-")}-${t}-${r}`}function Qt(e,t,r,s){let i=e/r,f=t/s,d=(f-i)/i*100,l=Math.sqrt((e+t)/(r+s))*Math.sqrt(1/r+1/s),w=Math.abs(f-i)/l,o=Math.min(99.9,w*34);return{lift:d,confidence:o}}function gt(e){let t=[];for(let[r,s]of Object.entries(e.allTests)){if(!s.data.isLive)continue;let i=[],f=0;for(let[d,m]of Object.entries(s)){if(d==="data")continue;let l=m;if(typeof l=="object"&&l!==null&&"variationName"in l){let w=!!l.isControl;i.push({id:d,name:l.variationName,weight:l.trafficPercentage,isControl:w,productId:l.id,handle:l.handle,price:l.price,isA:!w&&f===0,isB:!w&&f===1,isC:!w&&f===2,isD:!w&&f===3}),w||f++}}i.length>0&&t.push({testId:r,name:s.data.name,enabled:s.data.isLive,type:s.data.type,variations:i})}return{tests:t,selectors:e.selectors}}var Ye=Be(()=>{"use strict"});function ae(){try{if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){let e=new Uint8Array(16);window.crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e).map(r=>r.toString(16).padStart(2,"0"));return[t.slice(0,4).join(""),t.slice(4,6).join(""),t.slice(6,8).join(""),t.slice(8,10).join(""),t.slice(10,16).join("")].join("-")}}catch(e){console.warn("[ElevateAB] Crypto UUID generation failed, falling back to Math.random()",e)}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function j(e,t){if(typeof document>"u")return;let r=new Date;r.setTime(r.getTime()+365*24*60*60*1e3);let s="; expires="+r.toUTCString();document.cookie=e+"="+(t||"")+s+"; path=/"}function L(e){if(typeof document>"u")return null;let t=e+"=",r=document.cookie.split(";");for(let s=0;s<r.length;s++){let i=r[s];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null}function F(e){let t=L(e);if(t)try{return JSON.parse(t)}catch(r){return console.error("[ElevateAB] Error parsing JSON from cookie",r),null}return null}function Kt(e){typeof document>"u"||(document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}function re(e,t){typeof sessionStorage>"u"||sessionStorage.setItem(e,JSON.stringify(t))}function Y(e){return typeof sessionStorage>"u"?null:sessionStorage.getItem(e)}function De(e){let t=Y(e);return t?JSON.parse(t):null}function bt(){let e=L("eabUserId");return e||(e=ae(),j("eabUserId",e)),e}function oe(){return bt()}function wt(){let e=Y("eabSessionId");return e||(e=ae(),re("eabSessionId",e)),e}function be(){return wt()}function Qe(e,t){if(typeof sessionStorage>"u")return;let r=Y("eabReferrer"),s=Y("eabEntry");r||re("eabReferrer",e),s||re("eabEntry",t)}function _e(){return{referrer:Y("eabReferrer")||"",entryPage:Y("eabEntry")||""}}var W=Be(()=>{"use strict"});function ke(){return F("ABTL")||{}}function ht(e){j("ABTL",JSON.stringify(e))}function Ke(e){return ke()[e]||null}function Xt(e,t){if(e[t]?.isControl)return-1;let s=0;for(let i=0;i<t;i++)e[i]?.isControl||s++;return s}function Jr(e,t){let r=e.every(o=>typeof o.weight=="number"),s=[],i=0;if(r)for(let o of e)i+=o.weight,s.push(i);else{let o=100/e.length;for(let c=0;c<e.length;c++)i+=o,s.push(i)}let d=Ve(t)%1e4/100,m=0;for(let o=0;o<s.length;o++)if(d<s[o]){m=o;break}let l=e[m]||e[0],w=Xt(e,m);return{...l,isA:w===0,isB:w===1,isC:w===2,isD:w===3}}function Xe(e,t,r){let s=Ke(e);if(s){let l=t.variations.findIndex(w=>w.id===s);if(l!==-1){let w=t.variations[l],o=Xt(t.variations,l);return{...w,isA:o===0,isB:o===1,isC:o===2,isD:o===3}}}let i=t.variations.filter(l=>!l.isDone);if(i.length===0)return null;let f=t.isPersonalization,d;f?d=i.find(w=>!w.isControl)||i[0]:d=Jr(i,r);let m=ke();return m[e]=d.id,ht(m),d}function Ze(e){let t=e.testTrafficPercentage;return typeof t!="number"||Ke(e.testId)?!0:Math.random()*100<t}var et=Be(()=>{"use strict";W();Ye()});var gr=Wr((Fe,at)=>{"use strict";(function(e,t){"use strict";var r="1.0.41",s="",i="?",f="function",d="undefined",m="object",l="string",w="major",o="model",c="name",n="type",a="vendor",u="version",k="architecture",x="console",g="mobile",h="tablet",E="smarttv",B="wearable",X="embedded",Se=500,ye="Amazon",ne="Apple",$e="ASUS",p="BlackBerry",b="Browser",S="Chrome",R="Edge",O="Firefox",M="Google",$="Honor",I="Huawei",V="Lenovo",G="LG",me="Microsoft",Z="Motorola",ee="Nvidia",ie="OnePlus",ge="Opera",dt="OPPO",Ie="Samsung",Vt="Sharp",Ue="Sony",lt="Xiaomi",ft="Zebra",Dt="Facebook",Nt="Chromium OS",Ft="Mac OS",Mt=" Browser",Nr=function(P,A){var _={};for(var U in P)A[U]&&A[U].length%2===0?_[U]=A[U].concat(P[U]):_[U]=P[U];return _},Ge=function(P){for(var A={},_=0;_<P.length;_++)A[P[_].toUpperCase()]=P[_];return A},zt=function(P,A){return typeof P===l?Re(A).indexOf(Re(P))!==-1:!1},Re=function(P){return P.toLowerCase()},Fr=function(P){return typeof P===l?P.replace(/[^\d\.]/g,s).split(".")[0]:t},pt=function(P,A){if(typeof P===l)return P=P.replace(/^\s\s*/,s),typeof A===d?P:P.substring(0,Se)},Oe=function(P,A){for(var _=0,U,te,H,C,y,J;_<A.length&&!y;){var mt=A[_],$t=A[_+1];for(U=te=0;U<mt.length&&!y&&mt[U];)if(y=mt[U++].exec(P),y)for(H=0;H<$t.length;H++)J=y[++te],C=$t[H],typeof C===m&&C.length>0?C.length===2?typeof C[1]==f?this[C[0]]=C[1].call(this,J):this[C[0]]=C[1]:C.length===3?typeof C[1]===f&&!(C[1].exec&&C[1].test)?this[C[0]]=J?C[1].call(this,J,C[2]):t:this[C[0]]=J?J.replace(C[1],C[2]):t:C.length===4&&(this[C[0]]=J?C[3].call(this,J.replace(C[1],C[2])):t):this[C]=J||t;_+=2}},Le=function(P,A){for(var _ in A)if(typeof A[_]===m&&A[_].length>0){for(var U=0;U<A[_].length;U++)if(zt(A[_][U],P))return _===i?t:_}else if(zt(A[_],P))return _===i?t:_;return A.hasOwnProperty("*")?A["*"]:P},Mr={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},qt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},jt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[u,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[u,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,u],[/opios[\/ ]+([\w\.]+)/i],[u,[c,ge+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[u,[c,ge+" GX"]],[/\bopr\/([\w\.]+)/i],[u,[c,ge]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[u,[c,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[u,[c,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[c,u],[/quark(?:pc)?\/([-\w\.]+)/i],[u,[c,"Quark"]],[/\bddg\/([\w\.]+)/i],[u,[c,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[u,[c,"UC"+b]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[u,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[u,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[u,[c,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[u,[c,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[u,[c,"Smart Lenovo "+b]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+b],u],[/\bfocus\/([\w\.]+)/i],[u,[c,O+" Focus"]],[/\bopt\/([\w\.]+)/i],[u,[c,ge+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[u,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[u,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[u,[c,ge+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[u,[c,"MIUI"+Mt]],[/fxios\/([\w\.-]+)/i],[u,[c,O]],[/\bqihoobrowser\/?([\w\.]*)/i],[u,[c,"360"]],[/\b(qq)\/([\w\.]+)/i],[[c,/(.+)/,"$1Browser"],u],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1"+Mt],u],[/samsungbrowser\/([\w\.]+)/i],[u,[c,Ie+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[u,[c,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[c,"Sogou Mobile"],u],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[c,u],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[c],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[u,c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,Dt],u],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[c,u],[/\bgsa\/([\w\.]+) .*safari\//i],[u,[c,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[u,[c,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[u,[c,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,S+" WebView"],u],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[u,[c,"Android "+b]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,u],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[u,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[u,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[u,Le,Mr]],[/(webkit|khtml)\/([\w\.]+)/i],[c,u],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],u],[/(wolvic|librewolf)\/([\w\.]+)/i],[c,u],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[u,[c,O+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[c,[u,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[c,[u,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[k,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[k,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[k,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[k,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[k,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[k,/ower/,s,Re]],[/ sun4\w[;\)]/i],[[k,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[k,Re]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[o,[a,Ie],[n,h]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[o,[a,Ie],[n,g]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[o,[a,ne],[n,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[o,[a,ne],[n,h]],[/(macintosh);/i],[o,[a,ne]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[o,[a,Vt],[n,g]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[o,[a,$],[n,h]],[/honor([-\w ]+)[;\)]/i],[o,[a,$],[n,g]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[o,[a,I],[n,h]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[o,[a,I],[n,g]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[o,/_/g," "],[a,lt],[n,h]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[o,/_/g," "],[a,lt],[n,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[o,[a,dt],[n,g]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[o,[a,Le,{OnePlus:["304","403","203"],"*":dt}],[n,h]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[o,[a,"Vivo"],[n,g]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[o,[a,"Realme"],[n,g]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[o,[a,Z],[n,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[o,[a,Z],[n,h]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[a,G],[n,h]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[o,[a,G],[n,g]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[o,[a,V],[n,h]],[/(nokia) (t[12][01])/i],[a,o,[n,h]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[o,/_/g," "],[n,g],[a,"Nokia"]],[/(pixel (c|tablet))\b/i],[o,[a,M],[n,h]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[o,[a,M],[n,g]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[o,[a,Ue],[n,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[o,"Xperia Tablet"],[a,Ue],[n,h]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[o,[a,ie],[n,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[o,[a,ye],[n,h]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[o,/(.+)/g,"Fire Phone $1"],[a,ye],[n,g]],[/(playbook);[-\w\),; ]+(rim)/i],[o,a,[n,h]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[o,[a,p],[n,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[o,[a,$e],[n,h]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[o,[a,$e],[n,g]],[/(nexus 9)/i],[o,[a,"HTC"],[n,h]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[a,[o,/_/g," "],[n,g]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[o,[a,"TCL"],[n,h]],[/(itel) ((\w+))/i],[[a,Re],o,[n,Le,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[o,[a,"Acer"],[n,h]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[o,[a,"Meizu"],[n,g]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[o,[a,"Ulefone"],[n,g]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[o,[a,"Energizer"],[n,g]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[o,[a,"Cat"],[n,g]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[o,[a,"Smartfren"],[n,g]],[/droid.+; (a(?:015|06[35]|142p?))/i],[o,[a,"Nothing"],[n,g]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[o,[a,"Archos"],[n,h]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[o,[a,"Archos"],[n,g]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[a,o,[n,h]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[a,o,[n,g]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[a,o,[n,h]],[/(surface duo)/i],[o,[a,me],[n,h]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[o,[a,"Fairphone"],[n,g]],[/(u304aa)/i],[o,[a,"AT&T"],[n,g]],[/\bsie-(\w*)/i],[o,[a,"Siemens"],[n,g]],[/\b(rct\w+) b/i],[o,[a,"RCA"],[n,h]],[/\b(venue[\d ]{2,7}) b/i],[o,[a,"Dell"],[n,h]],[/\b(q(?:mv|ta)\w+) b/i],[o,[a,"Verizon"],[n,h]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[o,[a,"Barnes & Noble"],[n,h]],[/\b(tm\d{3}\w+) b/i],[o,[a,"NuVision"],[n,h]],[/\b(k88) b/i],[o,[a,"ZTE"],[n,h]],[/\b(nx\d{3}j) b/i],[o,[a,"ZTE"],[n,g]],[/\b(gen\d{3}) b.+49h/i],[o,[a,"Swiss"],[n,g]],[/\b(zur\d{3}) b/i],[o,[a,"Swiss"],[n,h]],[/\b((zeki)?tb.*\b) b/i],[o,[a,"Zeki"],[n,h]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[a,"Dragon Touch"],o,[n,h]],[/\b(ns-?\w{0,9}) b/i],[o,[a,"Insignia"],[n,h]],[/\b((nxa|next)-?\w{0,9}) b/i],[o,[a,"NextBook"],[n,h]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[a,"Voice"],o,[n,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[a,"LvTel"],o,[n,g]],[/\b(ph-1) /i],[o,[a,"Essential"],[n,g]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[o,[a,"Envizen"],[n,h]],[/\b(trio[-\w\. ]+) b/i],[o,[a,"MachSpeed"],[n,h]],[/\btu_(1491) b/i],[o,[a,"Rotor"],[n,h]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[o,[a,ee],[n,h]],[/(sprint) (\w+)/i],[a,o,[n,g]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[a,me],[n,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[o,[a,ft],[n,h]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[o,[a,ft],[n,g]],[/smart-tv.+(samsung)/i],[a,[n,E]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[a,Ie],[n,E]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[a,G],[n,E]],[/(apple) ?tv/i],[a,[o,ne+" TV"],[n,E]],[/crkey/i],[[o,S+"cast"],[a,M],[n,E]],[/droid.+aft(\w+)( bui|\))/i],[o,[a,ye],[n,E]],[/(shield \w+ tv)/i],[o,[a,ee],[n,E]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[o,[a,Vt],[n,E]],[/(bravia[\w ]+)( bui|\))/i],[o,[a,Ue],[n,E]],[/(mi(tv|box)-?\w+) bui/i],[o,[a,lt],[n,E]],[/Hbbtv.*(technisat) (.*);/i],[a,o,[n,E]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[a,pt],[o,pt],[n,E]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[o,[n,E]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[n,E]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[a,o,[n,x]],[/droid.+; (shield)( bui|\))/i],[o,[a,ee],[n,x]],[/(playstation \w+)/i],[o,[a,Ue],[n,x]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[o,[a,me],[n,x]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[o,[a,Ie],[n,B]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[a,o,[n,B]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[o,[a,dt],[n,B]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[o,[a,ne],[n,B]],[/(opwwe\d{3})/i],[o,[a,ie],[n,B]],[/(moto 360)/i],[o,[a,Z],[n,B]],[/(smartwatch 3)/i],[o,[a,Ue],[n,B]],[/(g watch r)/i],[o,[a,G],[n,B]],[/droid.+; (wt63?0{2,3})\)/i],[o,[a,ft],[n,B]],[/droid.+; (glass) \d/i],[o,[a,M],[n,B]],[/(pico) (4|neo3(?: link|pro)?)/i],[a,o,[n,B]],[/; (quest( \d| pro)?)/i],[o,[a,Dt],[n,B]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[a,[n,X]],[/(aeobc)\b/i],[o,[a,ye],[n,X]],[/(homepod).+mac os/i],[o,[a,ne],[n,X]],[/windows iot/i],[[n,X]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[o,[n,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[o,[n,h]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[n,h]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[n,g]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[o,[a,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[u,[c,R+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[c,u],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[u,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[c,u],[/ladybird\//i],[[c,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[u,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,u],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[c,[u,Le,qt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[u,Le,qt],[c,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[u,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,Ft],[u,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[u,c],[/(ubuntu) ([\w\.]+) like android/i],[[c,/(.+)/,"$1 Touch"],u],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[c,u],[/\(bb(10);/i],[u,[c,p]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[u,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[u,[c,O+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[u,[c,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[u,[c,"watchOS"]],[/crkey\/([\d\.]+)/i],[u,[c,S+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,Nt],u],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,u],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],u],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c,u]]},q=function(P,A){if(typeof P===m&&(A=P,P=t),!(this instanceof q))return new q(P,A).getResult();var _=typeof e!==d&&e.navigator?e.navigator:t,U=P||(_&&_.userAgent?_.userAgent:s),te=_&&_.userAgentData?_.userAgentData:t,H=A?Nr(jt,A):jt,C=_&&_.userAgent==U;return this.getBrowser=function(){var y={};return y[c]=t,y[u]=t,Oe.call(y,U,H.browser),y[w]=Fr(y[u]),C&&_&&_.brave&&typeof _.brave.isBrave==f&&(y[c]="Brave"),y},this.getCPU=function(){var y={};return y[k]=t,Oe.call(y,U,H.cpu),y},this.getDevice=function(){var y={};return y[a]=t,y[o]=t,y[n]=t,Oe.call(y,U,H.device),C&&!y[n]&&te&&te.mobile&&(y[n]=g),C&&y[o]=="Macintosh"&&_&&typeof _.standalone!==d&&_.maxTouchPoints&&_.maxTouchPoints>2&&(y[o]="iPad",y[n]=h),y},this.getEngine=function(){var y={};return y[c]=t,y[u]=t,Oe.call(y,U,H.engine),y},this.getOS=function(){var y={};return y[c]=t,y[u]=t,Oe.call(y,U,H.os),C&&!y[c]&&te&&te.platform&&te.platform!="Unknown"&&(y[c]=te.platform.replace(/chrome os/i,Nt).replace(/macos/i,Ft)),y},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return U},this.setUA=function(y){return U=typeof y===l&&y.length>Se?pt(y,Se):y,this},this.setUA(U),this};q.VERSION=r,q.BROWSER=Ge([c,u,w]),q.CPU=Ge([k]),q.DEVICE=Ge([o,a,n,x,g,E,h,B,X]),q.ENGINE=q.OS=Ge([c,u]),typeof Fe!==d?(typeof at!==d&&at.exports&&(Fe=at.exports=q),Fe.UAParser=q):typeof define===f&&define.amd?define(function(){return q}):typeof e!==d&&(e.UAParser=q);var ve=typeof e!==d&&(e.jQuery||e.Zepto);if(ve&&!ve.ua){var We=new q;ve.ua=We.getResult(),ve.ua.get=function(){return We.getUA()},ve.ua.set=function(P){We.setUA(P);var A=We.getResult();for(var _ in A)ve.ua[_]=A[_]}}})(typeof window=="object"?window:Fe)});var Me,Rt=Be(()=>{"use strict";Me=`#graphql
1
+ "use strict";var zr=Object.create;var Je=Object.defineProperty;var qr=Object.getOwnPropertyDescriptor;var jr=Object.getOwnPropertyNames;var $r=Object.getPrototypeOf,Gr=Object.prototype.hasOwnProperty;var Ve=(e,t)=>()=>(e&&(t=e(e=0)),t);var Wr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Wt=(e,t)=>{for(var r in t)Je(e,r,{get:t[r],enumerable:!0})},Ht=(e,t,r,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of jr(t))!Gr.call(e,i)&&i!==r&&Je(e,i,{get:()=>t[i],enumerable:!(s=qr(t,i))||s.enumerable});return e};var Ye=(e,t,r)=>(r=e!=null?zr($r(e)):{},Ht(t||!e||!e.__esModule?Je(r,"default",{value:e,enumerable:!0}):r,e)),Hr=e=>Ht(Je({},"__esModule",{value:!0}),e);function Jt(e,t){let r=e.reduce((d,m)=>d+m.weight,0),i=De(t)%r,p=0;for(let d of e)if(p+=d.weight,i<p)return d;return e[0]}function De(e){let t=0;for(let r=0;r<e.length;r++){let s=e.charCodeAt(r);t=(t<<5)-t+s,t=t&t}return Math.abs(t)}function Yt(e){return!e.testId||!e.name||!e.variations||e.variations.length===0?!1:e.variations.reduce((r,s)=>r+s.weight,0)===100}function Qt(e){let t=Date.now(),r=Math.random().toString(36).substring(2,9);return`exp-${e.toLowerCase().replace(/[^a-z0-9]/g,"-")}-${t}-${r}`}function Kt(e,t,r,s){let i=e/r,p=t/s,d=(p-i)/i*100,l=Math.sqrt((e+t)/(r+s))*Math.sqrt(1/r+1/s),w=Math.abs(p-i)/l,o=Math.min(99.9,w*34);return{lift:d,confidence:o}}function bt(e){let t=[];for(let[r,s]of Object.entries(e.allTests)){if(!s.data.isLive)continue;let i=[],p=0;for(let[d,m]of Object.entries(s)){if(d==="data")continue;let l=m;if(typeof l=="object"&&l!==null&&"variationName"in l){let w=!!l.isControl;i.push({id:d,name:l.variationName,weight:l.trafficPercentage,isControl:w,productId:l.id,handle:l.handle,price:l.price,isA:!w&&p===0,isB:!w&&p===1,isC:!w&&p===2,isD:!w&&p===3}),w||p++}}i.length>0&&t.push({testId:r,name:s.data.name,enabled:s.data.isLive,type:s.data.type,variations:i})}return{tests:t,selectors:e.selectors}}var Qe=Ve(()=>{"use strict"});function ae(){try{if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){let e=new Uint8Array(16);window.crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;let t=Array.from(e).map(r=>r.toString(16).padStart(2,"0"));return[t.slice(0,4).join(""),t.slice(4,6).join(""),t.slice(6,8).join(""),t.slice(8,10).join(""),t.slice(10,16).join("")].join("-")}}catch(e){console.warn("[ElevateAB] Crypto UUID generation failed, falling back to Math.random()",e)}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function j(e,t){if(typeof document>"u")return;let r=new Date;r.setTime(r.getTime()+365*24*60*60*1e3);let s="; expires="+r.toUTCString();document.cookie=e+"="+(t||"")+s+"; path=/"}function O(e){if(typeof document>"u")return null;let t=e+"=",r=document.cookie.split(";");for(let s=0;s<r.length;s++){let i=r[s];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null}function F(e){let t=O(e);if(t)try{return JSON.parse(t)}catch(r){return console.error("[ElevateAB] Error parsing JSON from cookie",r),null}return null}function Xt(e){typeof document>"u"||(document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;")}function re(e,t){typeof sessionStorage>"u"||sessionStorage.setItem(e,JSON.stringify(t))}function Y(e){return typeof sessionStorage>"u"?null:sessionStorage.getItem(e)}function Ne(e){let t=Y(e);return t?JSON.parse(t):null}function wt(){let e=O("eabUserId");return e||(e=ae(),j("eabUserId",e)),e}function oe(){return wt()}function ht(){let e=Y("eabSessionId");return e||(e=ae(),re("eabSessionId",e)),e}function be(){return ht()}function Ke(e,t){if(typeof sessionStorage>"u")return;let r=Y("eabReferrer"),s=Y("eabEntry");r||re("eabReferrer",e),s||re("eabEntry",t)}function _e(){return{referrer:Y("eabReferrer")||"",entryPage:Y("eabEntry")||""}}var W=Ve(()=>{"use strict"});function ke(){return F("ABTL")||{}}function yt(e){j("ABTL",JSON.stringify(e))}function Xe(e){return ke()[e]||null}function Zt(e,t){if(e[t]?.isControl)return-1;let s=0;for(let i=0;i<t;i++)e[i]?.isControl||s++;return s}function Jr(e,t){let r=e.every(o=>typeof o.weight=="number"),s=[],i=0;if(r)for(let o of e)i+=o.weight,s.push(i);else{let o=100/e.length;for(let c=0;c<e.length;c++)i+=o,s.push(i)}let d=De(t)%1e4/100,m=0;for(let o=0;o<s.length;o++)if(d<s[o]){m=o;break}let l=e[m]||e[0],w=Zt(e,m);return{...l,isA:w===0,isB:w===1,isC:w===2,isD:w===3}}function Ze(e,t,r){let s=Xe(e);if(s){let l=t.variations.findIndex(w=>w.id===s);if(l!==-1){let w=t.variations[l],o=Zt(t.variations,l);return{...w,isA:o===0,isB:o===1,isC:o===2,isD:o===3}}}let i=t.variations.filter(l=>!l.isDone);if(i.length===0)return null;let p=t.isPersonalization,d;p?d=i.find(w=>!w.isControl)||i[0]:d=Jr(i,r);let m=ke();return m[e]=d.id,yt(m),d}function et(e){let t=e.testTrafficPercentage;return typeof t!="number"||Xe(e.testId)?!0:Math.random()*100<t}var tt=Ve(()=>{"use strict";W();Qe()});var br=Wr((Me,at)=>{"use strict";(function(e,t){"use strict";var r="1.0.41",s="",i="?",p="function",d="undefined",m="object",l="string",w="major",o="model",c="name",n="type",a="vendor",u="version",k="architecture",x="console",g="mobile",h="tablet",E="smarttv",B="wearable",X="embedded",Ie=500,ye="Amazon",ne="Apple",Ge="ASUS",f="BlackBerry",b="Browser",S="Chrome",R="Edge",L="Firefox",M="Google",$="Honor",I="Huawei",V="Lenovo",G="LG",me="Microsoft",Z="Motorola",ee="Nvidia",ie="OnePlus",ge="Opera",lt="OPPO",Ue="Samsung",Dt="Sharp",Re="Sony",pt="Xiaomi",ft="Zebra",Nt="Facebook",Ft="Chromium OS",Mt="Mac OS",zt=" Browser",Nr=function(P,A){var _={};for(var U in P)A[U]&&A[U].length%2===0?_[U]=A[U].concat(P[U]):_[U]=P[U];return _},We=function(P){for(var A={},_=0;_<P.length;_++)A[P[_].toUpperCase()]=P[_];return A},qt=function(P,A){return typeof P===l?Le(A).indexOf(Le(P))!==-1:!1},Le=function(P){return P.toLowerCase()},Fr=function(P){return typeof P===l?P.replace(/[^\d\.]/g,s).split(".")[0]:t},mt=function(P,A){if(typeof P===l)return P=P.replace(/^\s\s*/,s),typeof A===d?P:P.substring(0,Ie)},Oe=function(P,A){for(var _=0,U,te,H,C,y,J;_<A.length&&!y;){var gt=A[_],Gt=A[_+1];for(U=te=0;U<gt.length&&!y&&gt[U];)if(y=gt[U++].exec(P),y)for(H=0;H<Gt.length;H++)J=y[++te],C=Gt[H],typeof C===m&&C.length>0?C.length===2?typeof C[1]==p?this[C[0]]=C[1].call(this,J):this[C[0]]=C[1]:C.length===3?typeof C[1]===p&&!(C[1].exec&&C[1].test)?this[C[0]]=J?C[1].call(this,J,C[2]):t:this[C[0]]=J?J.replace(C[1],C[2]):t:C.length===4&&(this[C[0]]=J?C[3].call(this,J.replace(C[1],C[2])):t):this[C]=J||t;_+=2}},Be=function(P,A){for(var _ in A)if(typeof A[_]===m&&A[_].length>0){for(var U=0;U<A[_].length;U++)if(qt(A[_][U],P))return _===i?t:_}else if(qt(A[_],P))return _===i?t:_;return A.hasOwnProperty("*")?A["*"]:P},Mr={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},jt={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},$t={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[u,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[u,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,u],[/opios[\/ ]+([\w\.]+)/i],[u,[c,ge+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[u,[c,ge+" GX"]],[/\bopr\/([\w\.]+)/i],[u,[c,ge]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[u,[c,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[u,[c,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[c,u],[/quark(?:pc)?\/([-\w\.]+)/i],[u,[c,"Quark"]],[/\bddg\/([\w\.]+)/i],[u,[c,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[u,[c,"UC"+b]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[u,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[u,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[u,[c,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[u,[c,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[u,[c,"Smart Lenovo "+b]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+b],u],[/\bfocus\/([\w\.]+)/i],[u,[c,L+" Focus"]],[/\bopt\/([\w\.]+)/i],[u,[c,ge+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[u,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[u,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[u,[c,ge+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[u,[c,"MIUI"+zt]],[/fxios\/([\w\.-]+)/i],[u,[c,L]],[/\bqihoobrowser\/?([\w\.]*)/i],[u,[c,"360"]],[/\b(qq)\/([\w\.]+)/i],[[c,/(.+)/,"$1Browser"],u],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1"+zt],u],[/samsungbrowser\/([\w\.]+)/i],[u,[c,Ue+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[u,[c,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[c,"Sogou Mobile"],u],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[c,u],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[c],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[u,c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,Nt],u],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[c,u],[/\bgsa\/([\w\.]+) .*safari\//i],[u,[c,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[u,[c,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[u,[c,S+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,S+" WebView"],u],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[u,[c,"Android "+b]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,u],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[u,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[u,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[u,Be,Mr]],[/(webkit|khtml)\/([\w\.]+)/i],[c,u],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],u],[/(wolvic|librewolf)\/([\w\.]+)/i],[c,u],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[u,[c,L+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[c,[u,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[c,[u,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[k,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[k,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[k,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[k,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[k,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[k,/ower/,s,Le]],[/ sun4\w[;\)]/i],[[k,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[k,Le]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[o,[a,Ue],[n,h]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[o,[a,Ue],[n,g]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[o,[a,ne],[n,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[o,[a,ne],[n,h]],[/(macintosh);/i],[o,[a,ne]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[o,[a,Dt],[n,g]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[o,[a,$],[n,h]],[/honor([-\w ]+)[;\)]/i],[o,[a,$],[n,g]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[o,[a,I],[n,h]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[o,[a,I],[n,g]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[o,/_/g," "],[a,pt],[n,h]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[o,/_/g," "],[a,pt],[n,g]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[o,[a,lt],[n,g]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[o,[a,Be,{OnePlus:["304","403","203"],"*":lt}],[n,h]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[o,[a,"Vivo"],[n,g]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[o,[a,"Realme"],[n,g]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[o,[a,Z],[n,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[o,[a,Z],[n,h]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[a,G],[n,h]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[o,[a,G],[n,g]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[o,[a,V],[n,h]],[/(nokia) (t[12][01])/i],[a,o,[n,h]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[o,/_/g," "],[n,g],[a,"Nokia"]],[/(pixel (c|tablet))\b/i],[o,[a,M],[n,h]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[o,[a,M],[n,g]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[o,[a,Re],[n,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[o,"Xperia Tablet"],[a,Re],[n,h]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[o,[a,ie],[n,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[o,[a,ye],[n,h]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[o,/(.+)/g,"Fire Phone $1"],[a,ye],[n,g]],[/(playbook);[-\w\),; ]+(rim)/i],[o,a,[n,h]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[o,[a,f],[n,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[o,[a,Ge],[n,h]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[o,[a,Ge],[n,g]],[/(nexus 9)/i],[o,[a,"HTC"],[n,h]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[a,[o,/_/g," "],[n,g]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[o,[a,"TCL"],[n,h]],[/(itel) ((\w+))/i],[[a,Le],o,[n,Be,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[o,[a,"Acer"],[n,h]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[o,[a,"Meizu"],[n,g]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[o,[a,"Ulefone"],[n,g]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[o,[a,"Energizer"],[n,g]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[o,[a,"Cat"],[n,g]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[o,[a,"Smartfren"],[n,g]],[/droid.+; (a(?:015|06[35]|142p?))/i],[o,[a,"Nothing"],[n,g]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[o,[a,"Archos"],[n,h]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[o,[a,"Archos"],[n,g]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[a,o,[n,h]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[a,o,[n,g]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[a,o,[n,h]],[/(surface duo)/i],[o,[a,me],[n,h]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[o,[a,"Fairphone"],[n,g]],[/(u304aa)/i],[o,[a,"AT&T"],[n,g]],[/\bsie-(\w*)/i],[o,[a,"Siemens"],[n,g]],[/\b(rct\w+) b/i],[o,[a,"RCA"],[n,h]],[/\b(venue[\d ]{2,7}) b/i],[o,[a,"Dell"],[n,h]],[/\b(q(?:mv|ta)\w+) b/i],[o,[a,"Verizon"],[n,h]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[o,[a,"Barnes & Noble"],[n,h]],[/\b(tm\d{3}\w+) b/i],[o,[a,"NuVision"],[n,h]],[/\b(k88) b/i],[o,[a,"ZTE"],[n,h]],[/\b(nx\d{3}j) b/i],[o,[a,"ZTE"],[n,g]],[/\b(gen\d{3}) b.+49h/i],[o,[a,"Swiss"],[n,g]],[/\b(zur\d{3}) b/i],[o,[a,"Swiss"],[n,h]],[/\b((zeki)?tb.*\b) b/i],[o,[a,"Zeki"],[n,h]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[a,"Dragon Touch"],o,[n,h]],[/\b(ns-?\w{0,9}) b/i],[o,[a,"Insignia"],[n,h]],[/\b((nxa|next)-?\w{0,9}) b/i],[o,[a,"NextBook"],[n,h]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[a,"Voice"],o,[n,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[a,"LvTel"],o,[n,g]],[/\b(ph-1) /i],[o,[a,"Essential"],[n,g]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[o,[a,"Envizen"],[n,h]],[/\b(trio[-\w\. ]+) b/i],[o,[a,"MachSpeed"],[n,h]],[/\btu_(1491) b/i],[o,[a,"Rotor"],[n,h]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[o,[a,ee],[n,h]],[/(sprint) (\w+)/i],[a,o,[n,g]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[a,me],[n,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[o,[a,ft],[n,h]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[o,[a,ft],[n,g]],[/smart-tv.+(samsung)/i],[a,[n,E]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[a,Ue],[n,E]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[a,G],[n,E]],[/(apple) ?tv/i],[a,[o,ne+" TV"],[n,E]],[/crkey/i],[[o,S+"cast"],[a,M],[n,E]],[/droid.+aft(\w+)( bui|\))/i],[o,[a,ye],[n,E]],[/(shield \w+ tv)/i],[o,[a,ee],[n,E]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[o,[a,Dt],[n,E]],[/(bravia[\w ]+)( bui|\))/i],[o,[a,Re],[n,E]],[/(mi(tv|box)-?\w+) bui/i],[o,[a,pt],[n,E]],[/Hbbtv.*(technisat) (.*);/i],[a,o,[n,E]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[a,mt],[o,mt],[n,E]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[o,[n,E]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[n,E]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[a,o,[n,x]],[/droid.+; (shield)( bui|\))/i],[o,[a,ee],[n,x]],[/(playstation \w+)/i],[o,[a,Re],[n,x]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[o,[a,me],[n,x]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[o,[a,Ue],[n,B]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[a,o,[n,B]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[o,[a,lt],[n,B]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[o,[a,ne],[n,B]],[/(opwwe\d{3})/i],[o,[a,ie],[n,B]],[/(moto 360)/i],[o,[a,Z],[n,B]],[/(smartwatch 3)/i],[o,[a,Re],[n,B]],[/(g watch r)/i],[o,[a,G],[n,B]],[/droid.+; (wt63?0{2,3})\)/i],[o,[a,ft],[n,B]],[/droid.+; (glass) \d/i],[o,[a,M],[n,B]],[/(pico) (4|neo3(?: link|pro)?)/i],[a,o,[n,B]],[/; (quest( \d| pro)?)/i],[o,[a,Nt],[n,B]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[a,[n,X]],[/(aeobc)\b/i],[o,[a,ye],[n,X]],[/(homepod).+mac os/i],[o,[a,ne],[n,X]],[/windows iot/i],[[n,X]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[o,[n,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[o,[n,h]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[n,h]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[n,g]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[o,[a,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[u,[c,R+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[c,u],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[u,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[c,u],[/ladybird\//i],[[c,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[u,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,u],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[c,[u,Be,jt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[u,Be,jt],[c,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[u,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,Mt],[u,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[u,c],[/(ubuntu) ([\w\.]+) like android/i],[[c,/(.+)/,"$1 Touch"],u],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[c,u],[/\(bb(10);/i],[u,[c,f]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[u,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[u,[c,L+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[u,[c,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[u,[c,"watchOS"]],[/crkey\/([\d\.]+)/i],[u,[c,S+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,Ft],u],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,u],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],u],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c,u]]},q=function(P,A){if(typeof P===m&&(A=P,P=t),!(this instanceof q))return new q(P,A).getResult();var _=typeof e!==d&&e.navigator?e.navigator:t,U=P||(_&&_.userAgent?_.userAgent:s),te=_&&_.userAgentData?_.userAgentData:t,H=A?Nr($t,A):$t,C=_&&_.userAgent==U;return this.getBrowser=function(){var y={};return y[c]=t,y[u]=t,Oe.call(y,U,H.browser),y[w]=Fr(y[u]),C&&_&&_.brave&&typeof _.brave.isBrave==p&&(y[c]="Brave"),y},this.getCPU=function(){var y={};return y[k]=t,Oe.call(y,U,H.cpu),y},this.getDevice=function(){var y={};return y[a]=t,y[o]=t,y[n]=t,Oe.call(y,U,H.device),C&&!y[n]&&te&&te.mobile&&(y[n]=g),C&&y[o]=="Macintosh"&&_&&typeof _.standalone!==d&&_.maxTouchPoints&&_.maxTouchPoints>2&&(y[o]="iPad",y[n]=h),y},this.getEngine=function(){var y={};return y[c]=t,y[u]=t,Oe.call(y,U,H.engine),y},this.getOS=function(){var y={};return y[c]=t,y[u]=t,Oe.call(y,U,H.os),C&&!y[c]&&te&&te.platform&&te.platform!="Unknown"&&(y[c]=te.platform.replace(/chrome os/i,Ft).replace(/macos/i,Mt)),y},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return U},this.setUA=function(y){return U=typeof y===l&&y.length>Ie?mt(y,Ie):y,this},this.setUA(U),this};q.VERSION=r,q.BROWSER=We([c,u,w]),q.CPU=We([k]),q.DEVICE=We([o,a,n,x,g,E,h,B,X]),q.ENGINE=q.OS=We([c,u]),typeof Me!==d?(typeof at!==d&&at.exports&&(Me=at.exports=q),Me.UAParser=q):typeof define===p&&define.amd?define(function(){return q}):typeof e!==d&&(e.UAParser=q);var ve=typeof e!==d&&(e.jQuery||e.Zepto);if(ve&&!ve.ua){var He=new q;ve.ua=He.getResult(),ve.ua.get=function(){return He.getUA()},ve.ua.set=function(P){He.setUA(P);var A=He.getResult();for(var _ in A)ve.ua[_]=A[_]}}})(typeof window=="object"?window:Me)});var ze,Lt=Ve(()=>{"use strict";ze=`#graphql
2
2
  mutation cartAttributesUpdate($cartId: ID!, $attributes: [AttributeInput!]!) {
3
3
  cartAttributesUpdate(cartId: $cartId, attributes: $attributes) {
4
4
  cart {
@@ -14,7 +14,7 @@
14
14
  }
15
15
  }
16
16
  }
17
- `});var xr={};Gt(xr,{cleanupCartAttributes:()=>Ot,getCartAttributesPayload:()=>st,updateCartAttributes:()=>ze});function st(){let e=ke(),t=F("ABAU")||{},r=L("eabUserId"),s=L("eabUserPreview")==="true",i=L("abtid"),f={};for(let m in e)t[m]&&(f[m]=e[m]);let d=[{key:"_eabTestsList",value:JSON.stringify(f)},{key:"_eabUserId",value:r||""},{key:"_eabList",value:JSON.stringify(e)}];return s&&i&&d.push({key:"_eabPreviewTest",value:i}),d}async function ze(e,t={}){if(typeof window>"u")return{success:!1,error:"Not in browser environment"};if(!t.storefrontAccessToken&&!t.storefrontApiUrl)return console.warn("[ElevateAB] Missing storefrontAccessToken. For Next.js/non-Hydrogen stores, you must provide a Storefront Access Token. This token is SAFE to use client-side - it's a public token with limited permissions. Get it from: Shopify Admin \u2192 Settings \u2192 Apps \u2192 Develop apps"),{success:!1,error:"Missing storefrontAccessToken. Required for direct Storefront API calls."};try{let r=st(),s=e.startsWith("gid://")?e:`gid://shopify/Cart/${e}`,i=t.storefrontApiUrl||`https://${kr()}/api/2025-01/graphql.json`,f=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":t.storefrontAccessToken},body:JSON.stringify({query:Me,variables:{cartId:s,attributes:r}})});if(!f.ok)throw new Error(`HTTP error! status: ${f.status}`);let d=await f.json();if(d.errors||d.data?.cartAttributesUpdate?.userErrors?.length>0){let m=d.errors?.[0]?.message||d.data?.cartAttributesUpdate?.userErrors?.[0]?.message||"Unknown error";return console.error("[ElevateAB] Cart attributes update failed:",m),{success:!1,error:m}}return{success:!0}}catch(r){return console.error("[ElevateAB] Error updating cart attributes:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}async function Ot(e,t={}){if(typeof window>"u")return{success:!1,error:"Not in browser environment"};if(!t.storefrontAccessToken&&!t.storefrontApiUrl)return{success:!1,error:"Missing storefrontAccessToken. Required for direct Storefront API calls."};try{let r=e.startsWith("gid://")?e:`gid://shopify/Cart/${e}`,s=[{key:"_eabTestsList",value:""},{key:"_eabUserId",value:""},{key:"_eabList",value:""},{key:"_eabPreviewTest",value:""}],i=t.storefrontApiUrl||`https://${kr()}/api/2025-01/graphql.json`,f=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":t.storefrontAccessToken},body:JSON.stringify({query:Me,variables:{cartId:r,attributes:s}})});if(!f.ok)throw new Error(`HTTP error! status: ${f.status}`);let d=await f.json();if(d.errors||d.data?.cartAttributesUpdate?.userErrors?.length>0){let m=d.errors?.[0]?.message||d.data?.cartAttributesUpdate?.userErrors?.[0]?.message||"Unknown error";return console.error("[ElevateAB] Cart attributes cleanup failed:",m),{success:!1,error:m}}return{success:!0}}catch(r){return console.error("[ElevateAB] Error cleaning up cart attributes:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}function kr(){return typeof window>"u"?"":window.location.hostname}var ct=Be(()=>{"use strict";et();W();Rt()});var wo={};Gt(wo,{AntiFlickerScript:()=>Br,CART_ATTRIBUTES_UPDATE_MUTATION:()=>Me,COUNTRIES:()=>lr,DEFAULT_CONFIG:()=>bo,ElevateAnalytics:()=>Dr,ElevateProvider:()=>Or,REGIONS:()=>fr,VERSION:()=>go,assignAndPersistVariant:()=>Xe,assignVariant:()=>Ht,buildEabTestsParam:()=>Tt,calculateRevenueLift:()=>Qt,checkFacebookBrowser:()=>_t,checkFacebookInstagramBrowser:()=>wr,checkInstagramBrowser:()=>kt,checkPinterestBrowser:()=>Pt,checkTikTokBrowser:()=>xt,checkVisitorIdParams:()=>hr,cleanCartToken:()=>Pe,cleanupCartAttributes:()=>Ot,cleanupFlickerPrevention:()=>pr,clearPreviewMode:()=>ar,deleteCookie:()=>Kt,detectShopifyCurrency:()=>_r,extractCartToken:()=>xe,extractProductId:()=>K,extractProductVariantId:()=>ue,extractShopifyId:()=>z,extractShopifyType:()=>yr,generateExperimentId:()=>Yt,getAssignedVariant:()=>Ke,getCartAttributesPayload:()=>st,getCookie:()=>L,getCountryCode:()=>ce,getDeviceType:()=>tr,getFlickerPreventionScript:()=>it,getGeoLocation:()=>cr,getJsonCookie:()=>F,getJsonSessionItem:()=>De,getPageTypeFromPathname:()=>Ae,getPreviewState:()=>Ne,getPreviewVariation:()=>nr,getReferrerData:()=>_e,getSessionId:()=>be,getSessionItem:()=>Y,getTestList:()=>ke,getTrafficSource:()=>rr,getUserAgentNoBrowser:()=>Ce,getVisitorId:()=>oe,hasSessionView:()=>Zt,hasUniqueView:()=>er,hashString:()=>Ve,hideForFlicker:()=>It,initAnalytics:()=>qe,initializeSessionId:()=>wt,initializeVisitorId:()=>bt,injectFlickerStyles:()=>St,isCountryExcluded:()=>Et,isCountryIncluded:()=>Ct,isFlickerPreventionActive:()=>mr,isInPreviewMode:()=>sr,isPreviewTest:()=>or,isShopifyGid:()=>vr,matchesGeoTargeting:()=>dr,parseAddViewData:()=>Te,revealAfterFlicker:()=>ot,roundToTwo:()=>v,sanitizeString:()=>T,saveTestList:()=>ht,setCookie:()=>j,setCountryCode:()=>At,setGeoLocation:()=>ur,setReferrerData:()=>Qe,setSessionItem:()=>re,setupFlickerPrevention:()=>nt,shouldShowTest:()=>Ze,trackAddToCart:()=>Tr,trackCartView:()=>Cr,trackCheckoutCompleted:()=>Ir,trackCheckoutStarted:()=>Sr,trackPageView:()=>Lt,trackProductView:()=>Pr,trackRemoveFromCart:()=>Ar,trackSearchSubmitted:()=>Er,trackSessionView:()=>vt,trackUniqueView:()=>yt,trackViews:()=>tt,updateCartAttributes:()=>ze,updateUrlWithTestParams:()=>ir,useElevateConfig:()=>ut,useExperiment:()=>Rr,usePageViewTracking:()=>Ur,uuidv4:()=>ae,validateConfig:()=>Jt});module.exports=Hr(wo);Ye();W();et();W();function yt(e){let t=F("ABAU")||{};t[e]||(t[e]=!0,j("ABAU",JSON.stringify(t)))}function vt(e){let t=De("ABAV")||{};t[e]||(t[e]=!0,re("ABAV",t))}function tt(e){yt(e),vt(e)}function Zt(e){return!!(De("ABAV")||{})[e]}function er(e){return!!(F("ABAU")||{})[e]}function tr(){if(typeof navigator>"u")return"desktop";let e=navigator.userAgent||navigator.vendor||window.opera||"",t=e.toLowerCase();return/windows nt.*tablet pc|pixelbook/i.test(e)||/(?:macintosh|windows nt|win(?:95|98)|linux x86_64)/i.test(e)&&!/android|mobile|tablet|ipad|iphone|ipod/i.test(t)?"desktop":/ipad|playbook|tablet|kindle|nexus (7|10)|xoom|sm-t\d+|galaxy tab|tb-\d+|tb\d+[a-z]+|lenovo.*tb|dtab|ideatab|mediapad|matepad|honor.*pad|pad\s+\d+|mi\s+pad|redmi.*pad|xiaomi.*pad|oppo.*pad|oneplus.*pad|opd\d+|tcl.*tab|9\d{3}[a-z]|kobo|archos.*5(?!\d)|ereader|droipad/i.test(e)||/android(?!.*mobile)/i.test(t)&&!/dalvik.*miui|pocophone|mi\s+mix|edge\s+\d+|sm-g9\d+|pixel\s+\d|pixel\s+fold|advan\s+\d{4}/i.test(e)?"tablet":/android.+mobile|iphone|ipod|windows phone|blackberry|mobile|phone|kaios/i.test(t)||/^mobile;/i.test(e)||/dalvik.*miui|pocophone|mi\s+mix|pixel\s+\d|pixel\s+fold/i.test(e)?"mobile":"desktop"}function _t(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i.test(e)}function kt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/(instagram)[\/ ]([-\w\.]+)/i.test(e)}function xt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/musical_ly/i.test(e)}function Pt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/(pinterest)[\/ ]([-\w\.]+)/i.test(e)}function rr(){if(typeof window>"u")return"direct";let e=(document.referrer||"").toLowerCase(),t=e?new URL(e).hostname.replace("www.",""):"",r=window.location.hostname,s=_t(),i=kt(),f=xt(),d=Pt();return s||["facebook.com","fb.com","fb.me","m.facebook.com","l.facebook.com","lm.facebook.com"].includes(t)?"facebook":i||t.includes("instagram")?"instagram":f||["tiktok.com","pangleglobal.com","ads.tiktok.com"].includes(t)?"tiktok":d||t.includes("pinterest")||t==="pin.it"?"pinterest":t.includes("google")?"google":!e||r===t?"direct":"other"}W();function Yr(e){let t={},r={};if(!e)return{assignments:t,views:r};let s=e.split("~");for(let i of s){let f=i.split("_");if(f.length>=2){let d=f[0],m=f[1],l=f[2]==="1";t[d]=m,r[d]=l}}return{assignments:t,views:r}}function Ne(){if(typeof window>"u")return{isPreview:!1,previewTestId:null,forcedAssignments:{},previewedViews:{}};let e=new URLSearchParams(window.location.search),r=(e.get("eabUserPreview")||L("eabUserPreview"))==="true",s=e.get("abtid");s||(s=Y("eabPreviewTestId"));let i=e.get("eab_tests")||"",{assignments:f,views:d}=Yr(i);return e.has("eabUserPreview")&&j("eabUserPreview","true"),e.has("abtid")&&s&&re("eabPreviewTestId",s),{isPreview:r,previewTestId:s,forcedAssignments:f,previewedViews:d}}function or(e,t){if(!t)return!1;if(e===t)return!0;let r=e.slice(-5);return!!(r===t||t.endsWith(r)||e.endsWith(t))}function nr(e,t){if(!t.isPreview)return null;if(t.forcedAssignments[e])return t.forcedAssignments[e];let r=e.slice(-5);return t.forcedAssignments[r]?t.forcedAssignments[r]:null}function Tt(e,t){return Object.entries(e).map(([r,s])=>{let i=r.slice(-5),f=t[r]?"1":"0";return`${i}_${s}_${f}`}).join("~")}function ir(e,t,r){if(typeof window>"u")return;let s=new URL(window.location.href),i=Tt(e,t);i&&s.searchParams.set("eab_tests",i),r&&s.searchParams.set("eabUserId",r),window.history.replaceState({},"",s.toString())}function ar(){if(!(typeof document>"u")&&(document.cookie="eabUserPreview=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",typeof sessionStorage<"u"&&sessionStorage.removeItem("eabPreviewTestId"),typeof window<"u")){let e=new URL(window.location.href);e.searchParams.delete("eabUserPreview"),e.searchParams.delete("abtid"),e.searchParams.delete("eab_tests"),window.history.replaceState({},"",e.toString())}}function sr(){return Ne().isPreview}W();var se={SHOPIFY_LOCALIZATION:"localization",EAB_COUNTRY:"eabCountryCode",EAB_GEO:"eabGeoLocation"};function ce(){if(typeof window>"u")return null;let t=new URLSearchParams(window.location.search).get("country");if(t)return j(se.EAB_COUNTRY,t.toUpperCase()),t.toUpperCase();let r=L(se.SHOPIFY_LOCALIZATION);if(r)return r.toUpperCase();let s=L(se.EAB_COUNTRY);if(s)return s.toUpperCase();if(typeof localStorage<"u"){let i=localStorage.getItem(se.EAB_COUNTRY);if(i)return i.toUpperCase()}return null}function cr(){let e=ce(),t=L(se.EAB_GEO);if(t)try{let r=JSON.parse(t);return{country:r.country||e,region:r.region,city:r.city}}catch{}return{country:e}}function At(e){let t=e.toUpperCase();j(se.EAB_COUNTRY,t),typeof localStorage<"u"&&localStorage.setItem(se.EAB_COUNTRY,t)}function ur(e){e.country&&At(e.country),j(se.EAB_GEO,JSON.stringify(e))}function Ct(e,t){let r=t??ce();return r?e.map(i=>i.toUpperCase()).includes(r.toUpperCase()):!1}function Et(e,t){let r=t??ce();return r?e.map(i=>i.toUpperCase()).includes(r.toUpperCase()):!1}function dr(e){let t=ce();return!e.includeCountries?.length&&!e.excludeCountries?.length?!0:!t||e.excludeCountries?.length&&Et(e.excludeCountries,t)?!1:e.includeCountries?.length?Ct(e.includeCountries,t):!0}var lr={US:"US",CA:"CA",GB:"GB",AU:"AU",DE:"DE",FR:"FR",JP:"JP",MX:"MX",BR:"BR",IN:"IN"},fr={NORTH_AMERICA:["US","CA","MX"],EUROPE:["GB","DE","FR","IT","ES","NL","BE","AT","CH","PL","SE","NO","DK","FI","IE","PT"],APAC:["AU","NZ","JP","KR","SG","HK","TW","TH","MY","PH","ID","VN","IN"],LATAM:["MX","BR","AR","CL","CO","PE"]};var Q="eab-prevent-flicker",rt="eab-flicker-styles";function St(e=3e3){if(typeof document>"u"||document.getElementById(rt))return;let t=document.createElement("style");t.id=rt,t.textContent=`
17
+ `});var Pr={};Wt(Pr,{cleanupCartAttributes:()=>Ot,getCartAttributesPayload:()=>st,updateCartAttributes:()=>qe});function st(){let e=ke(),t=F("ABAU")||{},r=O("eabUserId"),s=O("eabUserPreview")==="true",i=O("abtid"),p={};for(let m in e)t[m]&&(p[m]=e[m]);let d=[{key:"_eabTestsList",value:JSON.stringify(p)},{key:"_eabUserId",value:r||""},{key:"_eabList",value:JSON.stringify(e)}];return s&&i&&d.push({key:"_eabPreviewTest",value:i}),d}async function qe(e,t={}){if(typeof window>"u")return{success:!1,error:"Not in browser environment"};if(!t.storefrontAccessToken&&!t.storefrontApiUrl)return console.warn("[ElevateAB] Missing storefrontAccessToken. For Next.js/non-Hydrogen stores, you must provide a Storefront Access Token. This token is SAFE to use client-side - it's a public token with limited permissions. Get it from: Shopify Admin \u2192 Settings \u2192 Apps \u2192 Develop apps"),{success:!1,error:"Missing storefrontAccessToken. Required for direct Storefront API calls."};try{let r=st(),s=e.startsWith("gid://")?e:`gid://shopify/Cart/${e}`,i=t.storefrontApiUrl||`https://${xr()}/api/2025-01/graphql.json`,p=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":t.storefrontAccessToken},body:JSON.stringify({query:ze,variables:{cartId:s,attributes:r}})});if(!p.ok)throw new Error(`HTTP error! status: ${p.status}`);let d=await p.json();if(d.errors||d.data?.cartAttributesUpdate?.userErrors?.length>0){let m=d.errors?.[0]?.message||d.data?.cartAttributesUpdate?.userErrors?.[0]?.message||"Unknown error";return console.error("[ElevateAB] Cart attributes update failed:",m),{success:!1,error:m}}return{success:!0}}catch(r){return console.error("[ElevateAB] Error updating cart attributes:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}async function Ot(e,t={}){if(typeof window>"u")return{success:!1,error:"Not in browser environment"};if(!t.storefrontAccessToken&&!t.storefrontApiUrl)return{success:!1,error:"Missing storefrontAccessToken. Required for direct Storefront API calls."};try{let r=e.startsWith("gid://")?e:`gid://shopify/Cart/${e}`,s=[{key:"_eabTestsList",value:""},{key:"_eabUserId",value:""},{key:"_eabList",value:""},{key:"_eabPreviewTest",value:""}],i=t.storefrontApiUrl||`https://${xr()}/api/2025-01/graphql.json`,p=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json","X-Shopify-Storefront-Access-Token":t.storefrontAccessToken},body:JSON.stringify({query:ze,variables:{cartId:r,attributes:s}})});if(!p.ok)throw new Error(`HTTP error! status: ${p.status}`);let d=await p.json();if(d.errors||d.data?.cartAttributesUpdate?.userErrors?.length>0){let m=d.errors?.[0]?.message||d.data?.cartAttributesUpdate?.userErrors?.[0]?.message||"Unknown error";return console.error("[ElevateAB] Cart attributes cleanup failed:",m),{success:!1,error:m}}return{success:!0}}catch(r){return console.error("[ElevateAB] Error cleaning up cart attributes:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error"}}}function xr(){return typeof window>"u"?"":window.location.hostname}var ct=Ve(()=>{"use strict";tt();W();Lt()});var wo={};Wt(wo,{AntiFlickerScript:()=>Br,CART_ATTRIBUTES_UPDATE_MUTATION:()=>ze,COUNTRIES:()=>pr,DEFAULT_CONFIG:()=>bo,ElevateAnalytics:()=>Dr,ElevateProvider:()=>Or,REGIONS:()=>fr,VERSION:()=>go,assignAndPersistVariant:()=>Ze,assignVariant:()=>Jt,buildEabTestsParam:()=>At,calculateRevenueLift:()=>Kt,checkFacebookBrowser:()=>kt,checkFacebookInstagramBrowser:()=>hr,checkInstagramBrowser:()=>xt,checkPinterestBrowser:()=>Tt,checkTikTokBrowser:()=>Pt,checkVisitorIdParams:()=>yr,cleanCartToken:()=>Te,cleanupCartAttributes:()=>Ot,cleanupFlickerPrevention:()=>mr,clearPreviewMode:()=>sr,deleteCookie:()=>Xt,detectShopifyCurrency:()=>kr,extractCartToken:()=>Pe,extractProductId:()=>K,extractProductVariantId:()=>ue,extractShopifyId:()=>z,extractShopifyType:()=>vr,generateExperimentId:()=>Qt,getAssignedVariant:()=>Xe,getCartAttributesPayload:()=>st,getCookie:()=>O,getCountryCode:()=>ce,getDeviceType:()=>rr,getFlickerPreventionScript:()=>xe,getGeoLocation:()=>ur,getJsonCookie:()=>F,getJsonSessionItem:()=>Ne,getPageTypeFromPathname:()=>Ce,getPreviewState:()=>Fe,getPreviewVariation:()=>ir,getReferrerData:()=>_e,getSessionId:()=>be,getSessionItem:()=>Y,getTestList:()=>ke,getTrafficSource:()=>or,getUserAgentNoBrowser:()=>Ee,getVisitorId:()=>oe,hasSessionView:()=>er,hasUniqueView:()=>tr,hashString:()=>De,hideForFlicker:()=>Ut,initAnalytics:()=>je,initializeSessionId:()=>ht,initializeVisitorId:()=>wt,injectFlickerStyles:()=>It,isCountryExcluded:()=>St,isCountryIncluded:()=>Et,isFlickerPreventionActive:()=>gr,isInPreviewMode:()=>cr,isPreviewTest:()=>nr,isShopifyGid:()=>_r,matchesGeoTargeting:()=>lr,parseAddViewData:()=>Ae,revealAfterFlicker:()=>nt,roundToTwo:()=>v,sanitizeString:()=>T,saveTestList:()=>yt,setCookie:()=>j,setCountryCode:()=>Ct,setGeoLocation:()=>dr,setReferrerData:()=>Ke,setSessionItem:()=>re,setupFlickerPrevention:()=>it,shouldShowTest:()=>et,trackAddToCart:()=>Ar,trackCartView:()=>Er,trackCheckoutCompleted:()=>Ur,trackCheckoutStarted:()=>Ir,trackPageView:()=>Bt,trackProductView:()=>Tr,trackRemoveFromCart:()=>Cr,trackSearchSubmitted:()=>Sr,trackSessionView:()=>_t,trackUniqueView:()=>vt,trackViews:()=>rt,updateCartAttributes:()=>qe,updateUrlWithTestParams:()=>ar,useElevateConfig:()=>ut,useExperiment:()=>Lr,usePageViewTracking:()=>Rr,uuidv4:()=>ae,validateConfig:()=>Yt});module.exports=Hr(wo);Qe();W();tt();W();function vt(e){let t=F("ABAU")||{};t[e]||(t[e]=!0,j("ABAU",JSON.stringify(t)))}function _t(e){let t=Ne("ABAV")||{};t[e]||(t[e]=!0,re("ABAV",t))}function rt(e){vt(e),_t(e)}function er(e){return!!(Ne("ABAV")||{})[e]}function tr(e){return!!(F("ABAU")||{})[e]}function rr(){if(typeof navigator>"u")return"desktop";let e=navigator.userAgent||navigator.vendor||window.opera||"",t=e.toLowerCase();return/windows nt.*tablet pc|pixelbook/i.test(e)||/(?:macintosh|windows nt|win(?:95|98)|linux x86_64)/i.test(e)&&!/android|mobile|tablet|ipad|iphone|ipod/i.test(t)?"desktop":/ipad|playbook|tablet|kindle|nexus (7|10)|xoom|sm-t\d+|galaxy tab|tb-\d+|tb\d+[a-z]+|lenovo.*tb|dtab|ideatab|mediapad|matepad|honor.*pad|pad\s+\d+|mi\s+pad|redmi.*pad|xiaomi.*pad|oppo.*pad|oneplus.*pad|opd\d+|tcl.*tab|9\d{3}[a-z]|kobo|archos.*5(?!\d)|ereader|droipad/i.test(e)||/android(?!.*mobile)/i.test(t)&&!/dalvik.*miui|pocophone|mi\s+mix|edge\s+\d+|sm-g9\d+|pixel\s+\d|pixel\s+fold|advan\s+\d{4}/i.test(e)?"tablet":/android.+mobile|iphone|ipod|windows phone|blackberry|mobile|phone|kaios/i.test(t)||/^mobile;/i.test(e)||/dalvik.*miui|pocophone|mi\s+mix|pixel\s+\d|pixel\s+fold/i.test(e)?"mobile":"desktop"}function kt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i.test(e)}function xt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/(instagram)[\/ ]([-\w\.]+)/i.test(e)}function Pt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/musical_ly/i.test(e)}function Tt(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||navigator.vendor||window.opera;return/(pinterest)[\/ ]([-\w\.]+)/i.test(e)}function or(){if(typeof window>"u")return"direct";let e=(document.referrer||"").toLowerCase(),t=e?new URL(e).hostname.replace("www.",""):"",r=window.location.hostname,s=kt(),i=xt(),p=Pt(),d=Tt();return s||["facebook.com","fb.com","fb.me","m.facebook.com","l.facebook.com","lm.facebook.com"].includes(t)?"facebook":i||t.includes("instagram")?"instagram":p||["tiktok.com","pangleglobal.com","ads.tiktok.com"].includes(t)?"tiktok":d||t.includes("pinterest")||t==="pin.it"?"pinterest":t.includes("google")?"google":!e||r===t?"direct":"other"}W();function Yr(e){let t={},r={};if(!e)return{assignments:t,views:r};let s=e.split("~");for(let i of s){let p=i.split("_");if(p.length>=2){let d=p[0],m=p[1],l=p[2]==="1";t[d]=m,r[d]=l}}return{assignments:t,views:r}}function Fe(){if(typeof window>"u")return{isPreview:!1,previewTestId:null,forcedAssignments:{},previewedViews:{}};let e=new URLSearchParams(window.location.search),r=(e.get("eabUserPreview")||O("eabUserPreview"))==="true",s=e.get("abtid");s||(s=Y("eabPreviewTestId"));let i=e.get("eab_tests")||"",{assignments:p,views:d}=Yr(i);return e.has("eabUserPreview")&&j("eabUserPreview","true"),e.has("abtid")&&s&&re("eabPreviewTestId",s),{isPreview:r,previewTestId:s,forcedAssignments:p,previewedViews:d}}function nr(e,t){if(!t)return!1;if(e===t)return!0;let r=e.slice(-5);return!!(r===t||t.endsWith(r)||e.endsWith(t))}function ir(e,t){if(!t.isPreview)return null;if(t.forcedAssignments[e])return t.forcedAssignments[e];let r=e.slice(-5);return t.forcedAssignments[r]?t.forcedAssignments[r]:null}function At(e,t){return Object.entries(e).map(([r,s])=>{let i=r.slice(-5),p=t[r]?"1":"0";return`${i}_${s}_${p}`}).join("~")}function ar(e,t,r){if(typeof window>"u")return;let s=new URL(window.location.href),i=At(e,t);i&&s.searchParams.set("eab_tests",i),r&&s.searchParams.set("eabUserId",r),window.history.replaceState({},"",s.toString())}function sr(){if(!(typeof document>"u")&&(document.cookie="eabUserPreview=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;",typeof sessionStorage<"u"&&sessionStorage.removeItem("eabPreviewTestId"),typeof window<"u")){let e=new URL(window.location.href);e.searchParams.delete("eabUserPreview"),e.searchParams.delete("abtid"),e.searchParams.delete("eab_tests"),window.history.replaceState({},"",e.toString())}}function cr(){return Fe().isPreview}W();var se={SHOPIFY_LOCALIZATION:"localization",EAB_COUNTRY:"eabCountryCode",EAB_GEO:"eabGeoLocation"};function ce(){if(typeof window>"u")return null;let t=new URLSearchParams(window.location.search).get("country");if(t)return j(se.EAB_COUNTRY,t.toUpperCase()),t.toUpperCase();let r=O(se.SHOPIFY_LOCALIZATION);if(r)return r.toUpperCase();let s=O(se.EAB_COUNTRY);if(s)return s.toUpperCase();if(typeof localStorage<"u"){let i=localStorage.getItem(se.EAB_COUNTRY);if(i)return i.toUpperCase()}return null}function ur(){let e=ce(),t=O(se.EAB_GEO);if(t)try{let r=JSON.parse(t);return{country:r.country||e,region:r.region,city:r.city}}catch{}return{country:e}}function Ct(e){let t=e.toUpperCase();j(se.EAB_COUNTRY,t),typeof localStorage<"u"&&localStorage.setItem(se.EAB_COUNTRY,t)}function dr(e){e.country&&Ct(e.country),j(se.EAB_GEO,JSON.stringify(e))}function Et(e,t){let r=t??ce();return r?e.map(i=>i.toUpperCase()).includes(r.toUpperCase()):!1}function St(e,t){let r=t??ce();return r?e.map(i=>i.toUpperCase()).includes(r.toUpperCase()):!1}function lr(e){let t=ce();return!e.includeCountries?.length&&!e.excludeCountries?.length?!0:!t||e.excludeCountries?.length&&St(e.excludeCountries,t)?!1:e.includeCountries?.length?Et(e.includeCountries,t):!0}var pr={US:"US",CA:"CA",GB:"GB",AU:"AU",DE:"DE",FR:"FR",JP:"JP",MX:"MX",BR:"BR",IN:"IN"},fr={NORTH_AMERICA:["US","CA","MX"],EUROPE:["GB","DE","FR","IT","ES","NL","BE","AT","CH","PL","SE","NO","DK","FI","IE","PT"],APAC:["AU","NZ","JP","KR","SG","HK","TW","TH","MY","PH","ID","VN","IN"],LATAM:["MX","BR","AR","CL","CO","PE"]};var Q="eab-prevent-flicker",ot="eab-flicker-styles";function It(e=3e3){if(typeof document>"u"||document.getElementById(ot))return;let t=document.createElement("style");t.id=ot,t.textContent=`
18
18
  /* Elevate AB - Flicker Prevention */
19
19
  .${Q} {
20
20
  opacity: 0 !important;
@@ -29,13 +29,13 @@
29
29
  .${Q} {
30
30
  animation: eab-reveal 0s ${e}ms forwards;
31
31
  }
32
- `;let r=document.head||document.getElementsByTagName("head")[0];r.insertBefore(t,r.firstChild)}function It(e="body"){if(typeof document>"u")return;let t=document.querySelector(e);t&&t.classList.add(Q)}function ot(e="body"){if(typeof document>"u")return;let t=document.querySelector(e);t&&t.classList.remove(Q)}function nt(e="body",t=3e3){if(typeof document>"u")return()=>{};St(t),It(e);let r=!1,s=setTimeout(()=>{r||(console.warn(`[ElevateAB] Flicker prevention timeout (${t}ms) reached. Revealing content. Check if test assignment is completing.`),ot(e),r=!0)},t);return()=>{r||(clearTimeout(s),ot(e),r=!0)}}function pr(){if(typeof document>"u")return;let e=document.getElementById(rt);e&&e.remove(),document.querySelectorAll(`.${Q}`).forEach(r=>r.classList.remove(Q))}function mr(){return typeof document>"u"?!1:document.querySelector(`.${Q}`)!==null}function it(e=3e3){return`
32
+ `;let r=document.head||document.getElementsByTagName("head")[0];r.insertBefore(t,r.firstChild)}function Ut(e="body"){if(typeof document>"u")return;let t=document.querySelector(e);t&&t.classList.add(Q)}function nt(e="body"){if(typeof document>"u")return;let t=document.querySelector(e);t&&t.classList.remove(Q)}function it(e="body",t=3e3){if(typeof document>"u")return()=>{};It(t),Ut(e);let r=!1,s=setTimeout(()=>{r||(console.warn(`[ElevateAB] Flicker prevention timeout (${t}ms) reached. Revealing content. Check if test assignment is completing.`),nt(e),r=!0)},t);return()=>{r||(clearTimeout(s),nt(e),r=!0)}}function mr(){if(typeof document>"u")return;let e=document.getElementById(ot);e&&e.remove(),document.querySelectorAll(`.${Q}`).forEach(r=>r.classList.remove(Q))}function gr(){return typeof document>"u"?!1:document.querySelector(`.${Q}`)!==null}function xe(e=3e3){return`
33
33
  (function() {
34
34
  var style = document.createElement('style');
35
- style.id = '${rt}';
35
+ style.id = '${ot}';
36
36
  style.textContent = '.${Q}{opacity:0!important;pointer-events:none!important}@keyframes eab-reveal{to{opacity:1;pointer-events:auto}}.${Q}{animation:eab-reveal 0s ${e}ms forwards}';
37
37
  document.head.insertBefore(style, document.head.firstChild);
38
38
  document.body && document.body.classList.add('${Q}');
39
39
  })();
40
- `.trim()}var Ut=Je(gr(),1),br={"facebook.com":"Facebook","fb.me":"Facebook","m.facebook.com":"Facebook","l.facebook.com":"Facebook","lm.facebook.com":"Facebook","instagram.com":"Instagram","l.instagram.com":"Instagram","youtube.com":"Youtube","youtu.be":"Youtube","m.youtube.com":"Youtube","bing.com":"Bing","www.bing.com":"Bing","msnbc.msn.com":"Bing","dizionario.it.msn.com":"Bing","cc.bingj.com":"Bing","m.bing.com":"Bing","twitter.com":"Twitter","t.co":"Twitter"};function T(e){return typeof e!="string"?String(e):e.replace(/[\\"'`\x00-\x1F\x7F]/g,"")}function v(e){if(e==null)return null;let t=typeof e=="string"?parseFloat(e):Number(e);return isNaN(t)?null:+(Math.round(+(t+"e2"))+"e-2")}function K(e){if(!e)return null;let t=/gid:\/\/shopify\/Product\/(\d+)/,r=e.match(t);return r?r[1]:null}function ue(e){if(!e)return null;let t=/gid:\/\/shopify\/ProductVariant\/(\d+)/,r=e.match(t);return r?r[1]:null}function xe(e){if(!e)return null;let t=/gid:\/\/shopify\/Cart\/([^?]+(\?.+)?)/,r=e.match(t);return r?r[1]:null}function Pe(e){try{return typeof e!="string"?null:decodeURIComponent(e).split("?")[0]}catch{return e||null}}function Qr(e){return/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i.test(e)}function Kr(e){return/(instagram)[\/ ]([-\w\.]+)/i.test(e)}function wr(e){return Qr(e)||Kr(e)}function Xr(e){if(!e)return"";switch(e){case"Mobile Safari":return"Safari";case"Chrome Mobile":case"Chrome Mobile iOS":return"Chrome";case"Firefox Mobile":case"Firefox Mobile iOS":return"Firefox";case"Opera Mobile":case"Opera Mini":case"Opera Mini iOS":return"Opera";case"Yandex Browser Lite":return"Yandex Browser";case"Chrome Webview":case"Mobile App":return"Mobile App";default:return e}}function Zr(e){let t={};return e.searchParams.forEach((r,s)=>{t[s]||(t[s]=r)}),t}function eo(e){return!!e.host&&["http:","https:"].includes(e.protocol)}function to(e){return e.replace(/^www\./,"")}function ro(e,t,r){if(t&&{Facebook:"Facebook",Instagram:"Instagram"}[t])return t;let i,f;try{if(e&&e.trim()!=="")i=new URL(e);else return"Direct";if(i?.hostname&&eo(i)){if(f=i.hostname,r&&r===f)return"Direct"}else return""}catch{}if(!f)return"";let d=to(f);return d?br[d]?br[d]:d?.includes("google")?"Google":d:""}function Te(e){let{referrer:t,entryPage:r,userAgent:s}=e,i={referrer_source:"",browser_info:"",os_info:"",device_type:"",page_entry_path:"",utm_medium:"",utm_source:"",utm_campaign:"",utm_content:"",utm_term:"",referrer_url:t||"",gclid:"",fbclid:"",pins_campaign_id:"",epik:""};try{let f;if(r&&r.trim()!==""&&r.startsWith("http"))try{let d=new URL(r),m=d?.pathname;f=d?.hostname,m&&(i.page_entry_path=m??"");let l=Zr(d);i.utm_medium=l.utm_medium??"",i.utm_source=l.utm_source??"",i.utm_campaign=l.utm_campaign??"",i.utm_content=l.utm_content??"",i.utm_term=l.utm_term??"",i.gclid=l.gclid??"",i.fbclid=l.fbclid??"",i.pins_campaign_id=l.pins_campaign_id??"",i.epik=l.epik??""}catch{}if(s){let d=(0,Ut.UAParser)(s),m=d?.browser?.name,l=Xr(m);i.browser_info=l??"",i.os_info=d?.os?.name??"",s&&(i.device_type=(d?.device?.type||"desktop")?.toUpperCase()??"")}return i.referrer_source=ro(t,i?.browser_info,f)??"",i}catch{return i}}function Ae(e,t){let r=e==="/"||e==="",i=t&&/^\/[a-z]{2}(-[a-z]{2})?\/?$/i.test(e);return r||i?"index":/\/products\//.test(e)?"product":/\/collections\//.test(e)?"collection":/\/pages\//.test(e)?"page":/\/search/.test(e)?"search":/\/cart/.test(e)?"cart":/\/checkouts\//.test(e)?"checkout":"unknown"}function hr(e){try{return e&&new URLSearchParams(e).get("eabUserId")||!1}catch{return!1}}function Ce(e){if(!e)return"";try{let t=(0,Ut.UAParser)(e),r=t?.os,s=t?.device,i="";return r?.name&&(i+=r.name,r.version&&(i+=` ${r.version}`)),s?.type&&(i+=i?` (${s.type})`:s.type),s?.vendor&&(i+=i?` ${s.vendor}`:s.vendor),s?.model&&(i+=i?` ${s.model}`:s.model),i||e}catch{return e}}function z(e){return e?e.includes("gid://")&&e.split("/").pop()||e:""}function yr(e){return!e||!e.includes("gid://")?null:e.split("/")[3]||null}function vr(e){return!!e&&e.startsWith("gid://shopify/")}function _r(){if(typeof window>"u")return;let e=window.Shopify;if(e?.currency?.active)return e.currency.active}ct();Rt();W();var we=require("react"),oo="https://bitter-river-9c62.support-67d.workers.dev",no="https://d339co84ntxcme.cloudfront.net/Prod/orders",D=null;function qe(e){D=e}function de(e){let t=e?.storeId||D?.storeId;return t||(console.warn("[ElevateAB] No storeId provided. Call initAnalytics() first or pass storeId to tracking function."),"")}function io(e){return Object.entries(e).filter(([,t])=>typeof t=="string").map(([t,r])=>({test_id:t,variant_id:r}))}function ao(e,t){return Object.entries(e).filter(([r])=>typeof t[r]=="string").map(([r])=>({test_id:r,variant_id:t[r]}))}function so(){return typeof window>"u"?!1:L("eabUserPreview")==="true"||new URLSearchParams(window.location.search).get("eabUserPreview")==="true"}function le(e,t,r){if(typeof window>"u"||so())return null;let s=navigator.userAgent,i=window.location.pathname,f=Ae(i,r),{referrer:d,entryPage:m}=_e(),l=Te({referrer:d,entryPage:m,userAgent:s}),w=F("ABTL")||{},o=F("ABAU")||{},c=io(w),n=ao(o,w),a=xe(localStorage.getItem("shopifyCartId")),u=new Date().toISOString(),k=sessionStorage.getItem("eabIsFirstVisit")==="true",x=L("localization")||"";return{pixel_event_id:`sh-${ae()}`,shop_name:e,timestamp:u,event_type:t,client_id:L("_shopify_y")||void 0,visitor_id:oe(),session_id:be(),cart_token:Pe(a||L("cart")),page_url:window.location.href,page_pathname:i,page_search:window.location.search,referrer_url:d,referrer_source:l?.referrer_source,previous_page:document.referrer,page_entry:m,page_entry_path:l?.page_entry_path,page_type:f,utm_medium:l?.utm_medium,utm_source:l?.utm_source,utm_campaign:l?.utm_campaign,utm_content:l?.utm_content,utm_term:l?.utm_term,gclid:l?.gclid,fbclid:l?.fbclid,pins_campaign_id:l?.pins_campaign_id,epik:l?.epik,browser_info:l?.browser_info,os_info:l?.os_info,device_type:l?.device_type,language:navigator.language,root_route:localStorage.getItem("eabRootRoute")||"",user_agent:s,user_agent_no_browser:Ce(s),is_first_visit:k,shopify_country:x,ab_test_assignments:c,ab_test_views:n,is_first_order:null}}async function fe(e,t=oo){try{let r=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),keepalive:!0});if(!r.ok)throw new Error(`Worker error: ${r.status}`)}catch(r){console.error("[ElevateAB] Error sending analytics:",r)}}async function Lt(e={}){let t=de(e);if(!t)return;let r=e.hasLocalizedPaths??D?.hasLocalizedPaths,s=e.workerUrl??D?.workerUrl,i=le(t,"page_viewed",r);if(!i)return;let f={...i,cart_currency:e.currency};await fe(f,s)}async function Pr(e){let t=de(e);if(!t)return;let{productId:r,productVendor:s,productPrice:i,productSku:f,currency:d}=e,m=e.hasLocalizedPaths??D?.hasLocalizedPaths,l=e.workerUrl??D?.workerUrl,w=le(t,"product_viewed",m);if(!w)return;let o={...w,cart_currency:d,product_id:z(r),product_vendor:T(s),product_price:v(i),product_sku:T(f)};await fe(o,l)}async function Tr(e){let t=de(e);if(!t)return;let{productId:r,variantId:s,productVendor:i,productPrice:f,productQuantity:d,productSku:m,currency:l,cartId:w}=e,o=e.hasLocalizedPaths??D?.hasLocalizedPaths,c=e.workerUrl??D?.workerUrl,n=e.storefrontAccessToken??D?.storefrontAccessToken,a=le(t,"product_added_to_cart",o);if(!a)return;let u={...a,cart_currency:l,product_id:z(r),variant_id:z(s),product_vendor:T(i),product_price:v(f),product_quantity:d,product_sku:T(m)};if(await fe(u,c),w&&n)try{let{updateCartAttributes:k}=await Promise.resolve().then(()=>(ct(),xr));await k(w,{storefrontAccessToken:n})}catch(k){console.error("[ElevateAB] Failed to update cart attributes:",k)}}async function Ar(e){let t=de(e);if(!t)return;let{productId:r,variantId:s,productVendor:i,productPrice:f,productQuantity:d,productSku:m,currency:l}=e,w=e.hasLocalizedPaths??D?.hasLocalizedPaths,o=e.workerUrl??D?.workerUrl,c=le(t,"product_removed_from_cart",w);if(!c)return;let n={...c,cart_currency:l,product_id:z(r),variant_id:z(s),product_vendor:T(i),product_price:v(f),product_quantity:d,product_sku:T(m)};await fe(n,o)}async function Cr(e){let t=de(e);if(!t)return;let{cartTotalPrice:r,cartTotalQuantity:s,cartItems:i,currency:f}=e,d=e.hasLocalizedPaths??D?.hasLocalizedPaths,m=e.workerUrl??D?.workerUrl,l=le(t,"cart_viewed",d);if(!l)return;let w={...l,cart_currency:f,cart_total_price:v(r),cart_total_quantity:s,cart_items:i?.map(o=>({product_id:z(o.productId),variant_id:z(o.variantId),product_vendor:T(o.productVendor)||"",product_price:v(o.productPrice),product_quantity:o.productQuantity??null,product_sku:T(o.productSku)||""}))};await fe(w,m)}async function Er(e){let t=de(e);if(!t)return;let{searchQuery:r,currency:s}=e,i=e.hasLocalizedPaths??D?.hasLocalizedPaths,f=e.workerUrl??D?.workerUrl,d=le(t,"search_submitted",i);if(!d)return;let m={...d,cart_currency:s,search_query:T(r)};await fe(m,f)}async function Sr(e){let t=de(e);if(!t)return;let{cartTotalPrice:r,cartSubtotalPrice:s,cartShippingPrice:i,cartTaxAmount:f,cartDiscountAmount:d,customerId:m,cartItems:l,currency:w}=e,o=e.hasLocalizedPaths??D?.hasLocalizedPaths,c=e.workerUrl??D?.workerUrl,n=le(t,"checkout_started",o);if(!n)return;let a=0,u=l?.map(x=>{let g=x.productQuantity??0;return a+=g,{product_id:z(x.productId),variant_id:z(x.variantId),product_vendor:T(x.productVendor)||"",vendor:T(x.productVendor)||"",product_price:v(x.productPrice),total_price:v(x.productPrice),product_quantity:g,quantity:g,product_sku:T(x.productSku)||"",sku:T(x.productSku)||"",total_discount:v(x.totalDiscount)}})||[],k={...n,cart_currency:w,cart_total_price:v(r),cart_subtotal_price:v(s),cart_total_quantity:a,cart_shipping_price:v(i),cart_tax_amount:v(f),cart_discount_amount:v(d),cart_items:u,customer_id:m};await fe(k,c)}async function Ir(e){let t=de(e);if(!t)return;let{orderId:r,cartTotalPrice:s,cartSubtotalPrice:i,cartShippingPrice:f,cartTaxAmount:d,cartDiscountAmount:m,customerId:l,isFirstOrder:w,noteAttributes:o,cartItems:c,currency:n}=e,a=e.hasLocalizedPaths??D?.hasLocalizedPaths,u=e.ordersWorkerUrl??D?.ordersWorkerUrl??no,k=le(t,"checkout_completed",a);if(!k)return;let x=0,g=c?.map(E=>{let B=E.productQuantity??0;return x+=B,{product_id:z(E.productId),variant_id:z(E.variantId),product_vendor:T(E.productVendor)||"",vendor:T(E.productVendor)||"",product_price:v(E.productPrice),total_price:v(E.productPrice),product_quantity:B,quantity:B,product_sku:T(E.productSku)||"",sku:T(E.productSku)||"",total_discount:v(E.totalDiscount)}})||[],h={...k,cart_currency:n,cart_total_price:v(s),cart_subtotal_price:v(i),cart_total_quantity:x,cart_shipping_price:v(f),cart_tax_amount:v(d),cart_discount_amount:v(m),cart_items:g,order_id:r,customer_id:l,is_first_order:w??null,note_attributes:o};await fe(h,u)}function Ur(e){let{storeId:t,hasLocalizedPaths:r,currency:s,workerUrl:i,enabled:f=!0,pathname:d}=e,m=(0,we.useRef)(null),[l,w]=(0,we.useState)(()=>d||(typeof window<"u"?window.location.pathname:""));(0,we.useEffect)(()=>{d&&w(d)},[d]),(0,we.useEffect)(()=>{typeof window>"u"||!f||m.current!==l&&(m.current=l,Lt({storeId:t,hasLocalizedPaths:r,currency:s,workerUrl:i}))},[l,t,r,s,i,f])}var Ee=Je(require("react"),1);var Bt=Je(require("react"),1),je=Bt.default.createContext(null);function ut(){let e=Bt.default.useContext(je);if(e===null)throw new Error("useElevateConfig must be used within ElevateProvider");return e}W();et();function Rr(e){let{config:t}=ut(),[r,s]=Ee.default.useState(null),[i,f]=Ee.default.useState(!0),d=Ee.default.useMemo(()=>t&&t.tests.find(l=>l.testId===e)||null,[t,e]),m=Ee.default.useRef(null);return Ee.default.useEffect(()=>{if(t===null)return;if(!d){m.current!==e&&(m.current=e,console.warn(`[ElevateAB] Test not found: ${e}`)),f(!1);return}if(!d.enabled){m.current!==`${e}-disabled`&&(m.current=`${e}-disabled`,console.warn(`[ElevateAB] Test disabled: ${e}`)),f(!1);return}if(!Ze(d)){f(!1);return}let l=oe(),w=Xe(e,d,l);w&&(s(w),tt(e)),f(!1)},[t,d,e]),{variant:r,isLoading:i,isControl:r?.isControl??!1,isA:r?.isA??!1,isB:r?.isB??!1,isC:r?.isC??!1,isD:r?.isD??!1}}var N=Je(require("react"),1);Ye();var Lr=require("react/jsx-runtime"),co=!1,uo={allTests:{"price-test-001":{8606:{variationName:"Control",trafficPercentage:50,isDone:!1,isControl:!0},8607:{variationName:"Sale Price",trafficPercentage:50,isDone:!1,prices:{"41883969519701":{main:"USD",price:{USD:"599.95"},compare:{USD:"699.95"}}}},data:{name:"Snowboard Price Test",isLive:!0,settings:{afterDiscounts:!0},type:"PRICE_PLUS",filters:[],isPersonalization:!1,currencies:["USD"],handles:["the-complete-snowboard"],productIds:["7240161067093"]}},"content-test-001":{"ctrl-001":{variationName:"Control",trafficPercentage:34,isDone:!1,isControl:!0,content:{headline:"Welcome to our store",subheadline:"Shop the best products"}},"var-a-001":{variationName:"Urgency Copy",trafficPercentage:33,isDone:!1,content:{headline:"Limited Time Offer!",subheadline:"Don't miss out - sale ends soon"}},"var-b-001":{variationName:"Value Copy",trafficPercentage:33,isDone:!1,content:{headline:"Premium Quality, Great Value",subheadline:"Free shipping on orders over $50"}},data:{name:"Homepage Headline Test",isLive:!0,settings:{afterDiscounts:!0},type:"CONTENT",filters:[],isPersonalization:!1,pathnames:["/"]}},"custom-code-test-001":{10150:{variationName:"Control",trafficPercentage:50,isDone:!1,customCode:{id:"c11a582c-6b27-4263-941c-8ed123437c6b",js:"console.log('[Elevate] Control variant active');",css:"",pathnames:["*"],excludePathnames:[]},isControl:!0},10151:{variationName:"Enhanced UI",trafficPercentage:50,isDone:!1,customCode:{id:"df71546a-0a5f-4ad0-8d0f-a1bdeab05e84",js:"console.log('[Elevate] Enhanced UI variant'); document.body.style.borderTop = '3px solid #10b981';",css:".hero-section { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }",pathnames:["*"],excludePathnames:[]}},data:{name:"Custom Code Enhancement",isLive:!0,settings:{afterDiscounts:!0},type:"CUSTOM_CODE",filters:[],isPersonalization:!1,pathnames:["*"],excludePathnames:[]}},"split-url-test-001":{"split-ctrl":{variationName:"Control",trafficPercentage:50,isDone:!1,isControl:!0,splitUrlTestLinks:{default:"/collections/all"}},"split-var-a":{variationName:"New Landing Page",trafficPercentage:50,isDone:!1,splitUrlTestLinks:{default:"/collections/featured"}},data:{name:"Landing Page Split Test",isLive:!0,settings:{afterDiscounts:!0},type:"SPLIT_URL",filters:[],isPersonalization:!1,pathnames:["/promo"]}}},selectors:{selectorsV2:[]}};function Or({storeId:e,storefrontAccessToken:t,preventFlickering:r=!1,flickerTimeout:s=3e3,children:i}){let[f,d]=N.default.useState(null),[m,l]=N.default.useState(null),[w,o]=N.default.useState(null),c=(0,N.useRef)(null);N.default.useEffect(()=>(r&&typeof window<"u"&&(c.current=nt("body",s)),()=>{c.current&&c.current()}),[r,s]),N.default.useEffect(()=>{typeof window>"u"||qe({storeId:e,storefrontAccessToken:t})},[e,t]),N.default.useEffect(()=>{if(typeof window>"u")return;let k=Ne();l(k);let x=ce();o(x)},[]);let n=(0,N.useCallback)(()=>{c.current&&(c.current(),c.current=null)},[]);N.default.useEffect(()=>{async function k(){try{if(!co){let X=gt(uo);d(X),n();return}let x=`https://configs.elevateab.com/config/${e}.json`,g=await fetch(x);if(g.status===404){d({tests:[],selectors:void 0}),n();return}if(!g.ok)throw new Error(`Failed to fetch config: ${g.status} ${g.statusText}`);let h=await g.json();if(h.subscriptionPaused){console.error(`[ElevateAB] Subscription is paused or stopped for store: ${e}. `+(h.subscriptionMessage||"A/B tests will not run. Please reactivate your subscription.")),d({tests:[],selectors:void 0}),n();return}if(!(Object.keys(h.allTests||{}).length>0)){d({tests:[],selectors:void 0}),n();return}let B=gt(h);d(B),n()}catch(x){console.error("[ElevateAB] Failed to load config:",x),d({tests:[],selectors:void 0}),n()}}k()},[e,n]);let a=N.default.useMemo(()=>({config:f,storeId:e,storefrontAccessToken:t,isPreviewMode:m?.isPreview??!1,previewTestId:m?.previewTestId??null,countryCode:w}),[f,e,t,m,w]);N.default.useEffect(()=>{qe({storeId:e,storefrontAccessToken:t})},[e,t]);let u=(0,N.useRef)(!1);return N.default.useEffect(()=>{!t&&!u.current&&(u.current=!0,console.warn("[ElevateAB] No storefrontAccessToken provided. A/B tests will work, but orders won't be attributed to test variants. Add storefrontAccessToken prop to enable order tracking."))},[t]),(0,Lr.jsx)(je.Provider,{value:a,children:i})}var Vr=require("react/jsx-runtime");function Br({timeout:e=3e3}){return(0,Vr.jsx)("script",{dangerouslySetInnerHTML:{__html:it(e)}})}var he=require("react");W();W();ct();var lo="https://bitter-river-9c62.support-67d.workers.dev",fo="https://d339co84ntxcme.cloudfront.net/Prod/orders";function pe(){return`sh-${ae()}`}function po(e){return Object.entries(e).filter(([,t])=>typeof t=="string").map(([t,r])=>({test_id:t,variant_id:r}))}function mo(e,t){return Object.entries(e).filter(([r])=>typeof t[r]=="string").map(([r])=>({test_id:r,variant_id:t[r]}))}function Dr({storeId:e,storefrontAccessToken:t,hasLocalizedPaths:r,workerUrl:s=lo,ordersWorkerUrl:i=fo,useAnalytics:f}){let d=(0,he.useContext)(je),m=e||d?.storeId||"",l=t||d?.storefrontAccessToken,w=(0,he.useRef)(!1);(0,he.useEffect)(()=>{!d&&!e&&!w.current&&(w.current=!0,console.error("[ElevateAB] ElevateAnalytics must be used inside ElevateProvider, or you must pass storeId as a prop."))},[d,e]);let{subscribe:o,register:c}=f(),{ready:n}=c("Elevate Analytics");return(0,he.useEffect)(()=>{if(typeof window>"u")return;if(oe(),be(),typeof document<"u"){let u=document.referrer||"",k=window.location.href;Qe(u,k)}(()=>{let u=p=>{let b=K(p.products?.[0]?.id);b&&typeof localStorage<"u"?localStorage.setItem("eabProductPageId",b):typeof window<"u"&&!window.location.pathname.includes("/products/")&&localStorage?.removeItem("eabProductPageId");let S=xe(typeof localStorage<"u"?localStorage.getItem("shopifyCartId"):null),{referrer:R,entryPage:O}=_e();return{visitorId:oe(),sessionId:be(),cartToken:S||L("cart")||"",referrer:R,entryPage:O,clientId:L("_shopify_y"),rootRoute:typeof localStorage<"u"&&localStorage.getItem("eabRootRoute")||"",productPageId:typeof localStorage<"u"&&localStorage.getItem("eabProductPageId")||""}},k=(p,b,S,R)=>{let O=typeof navigator<"u"?navigator.userAgent:"",M=S?.url?new URL(S.url).pathname:typeof window<"u"?window.location.pathname:"",$=Ae(M,r),I=Te({referrer:R.referrer,entryPage:R.entryPage,userAgent:O}),V=F("ABTL")||{},G=F("ABAU")||{},me=po(V),Z=mo(G,V),ee=new Date().toISOString(),ie=typeof sessionStorage<"u"?sessionStorage.getItem("eabIsFirstVisit")==="true":!1,ge=L("localization")||"";return{pixel_event_id:b,shop_name:m,timestamp:ee,event_type:p,client_id:R.clientId,visitor_id:R.visitorId,session_id:R.sessionId,cart_token:Pe(R.cartToken),page_url:S.context?.document?.location?.href||(typeof window<"u"?window.location.href:""),page_pathname:M,page_search:S.context?.document?.location?.search||(typeof window<"u"?window.location.search:""),referrer_url:R.referrer,referrer_source:I?.referrer_source,previous_page:typeof document<"u"?document.referrer:"",page_entry:R.entryPage,page_entry_path:I?.page_entry_path,page_type:$,utm_medium:I?.utm_medium,utm_source:I?.utm_source,utm_campaign:I?.utm_campaign,utm_content:I?.utm_content,utm_term:I?.utm_term,gclid:I?.gclid,fbclid:I?.fbclid,pins_campaign_id:I?.pins_campaign_id,epik:I?.epik,browser_info:I?.browser_info,os_info:I?.os_info,device_type:I?.device_type,language:S.context?.navigator?.language||(typeof navigator<"u"?navigator.language:""),root_route:R.rootRoute,user_agent:O,user_agent_no_browser:Ce(O),is_first_visit:ie,shopify_country:ge,cart_currency:S.shop?.currency,ab_test_assignments:me,ab_test_views:Z,is_first_order:null}},x=async p=>{if(!p.exclude)try{let b=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p),keepalive:!0});if(!b.ok)throw new Error(`Worker error: ${b.status}`);return b}catch(b){console.error("[ElevateAB] Error sending analytics:",b)}},g=async p=>{try{let b=u(p),S=pe(),R=k("page_viewed",S,p,b);await x(R)}catch(b){console.error("[ElevateAB] Error handling page_viewed:",b)}},h=async p=>{try{let b=u(p),S=pe(),O={...k("product_viewed",S,p,b),product_id:K(p?.products?.[0]?.id)||"",product_vendor:T(p?.products?.[0]?.vendor)??"",product_price:v(p?.products?.[0]?.price)??null,product_sku:T(p?.products?.[0]?.sku)??""};await x(O)}catch(b){console.error("[ElevateAB] Error handling product_viewed:",b)}},E=async p=>{try{let b=u(p),S=pe(),O={...k("product_added_to_cart",S,p,b),product_id:K(p?.currentLine?.merchandise?.product?.id)??"",variant_id:ue(p?.currentLine?.merchandise?.id)??"",product_vendor:T(p?.currentLine?.merchandise?.product?.vendor)??"",product_price:v(p?.currentLine?.cost?.totalAmount?.amount)??null,product_quantity:p?.currentLine?.quantity??null,product_sku:T(p?.currentLine?.merchandise?.sku)??""};await x(O);let M=p?.cart?.id;M&&l&&m&&ze(M,{storefrontAccessToken:l,storefrontApiUrl:`https://${m}/api/2025-01/graphql.json`}).catch($=>{console.error("[ElevateAB] Failed to update cart attributes:",$)})}catch(b){console.error("[ElevateAB] Error handling product_added_to_cart:",b)}},B=async p=>{try{let b=u(p),S=pe(),O={...k("product_removed_from_cart",S,p,b),product_id:K(p?.prevLine?.merchandise?.product?.id)??"",variant_id:ue(p?.prevLine?.merchandise?.id)??"",product_vendor:T(p?.prevLine?.merchandise?.product?.vendor)??"",product_price:v(p?.prevLine?.cost?.totalAmount?.amount)??null,product_quantity:p?.prevLine?.quantity??null,product_sku:T(p?.prevLine?.merchandise?.sku)??""};await x(O)}catch(b){console.error("[ElevateAB] Error handling product_removed_from_cart:",b)}},X=async p=>{try{let b=u(p),S=pe(),R=k("cart_viewed",S,p,b),M=(p?.data?.cart?.lines?.nodes||p?.data?.cart?.lines||[]).map(I=>({product_id:K(I?.merchandise?.product?.id)??"",variant_id:ue(I?.merchandise?.id)??"",vendor:T(I?.merchandise?.product?.vendor)??"",total_price:v(I?.cost?.totalAmount?.amount)??null,quantity:I?.quantity??null,sku:T(I?.merchandise?.sku)??""})),$={...R,cart_total_price:v(p?.cart?.cost?.totalAmount?.amount)??null,cart_total_quantity:p?.cart?.totalQuantity??null,cart_items:M};await x($)}catch(b){console.error("[ElevateAB] Error handling cart_viewed:",b)}},Se=async p=>{try{let b=u(p),S=pe(),O={...k("search_submitted",S,p,b),search_query:T(p?.data?.searchResult?.query)??""};await x(O)}catch(b){console.error("[ElevateAB] Error handling search_submitted:",b)}},ye=async p=>{try{let b=u(p),S=pe(),R=k("checkout_started",S,p,b),O=0,$=(p?.data?.checkout?.lineItems??[]).map(V=>{let G=V?.quantity??0;O+=G;let Z=(V?.discountAllocations??[])?.reduce((ee,ie)=>ee+(ie?.amount?.amount||0),0);return{product_id:K(V?.variant?.product?.id)??"",variant_id:ue(V?.variant?.id)??"",vendor:T(V?.variant?.product?.vendor)??"",total_price:v(V?.finalLinePrice?.amount)??null,quantity:G,sku:T(V?.variant?.sku)??"",total_discount:v(Z)??null}}),I={...R,cart_total_price:v(p?.data?.checkout?.totalPrice?.amount)??null,cart_subtotal_price:v(p?.data?.checkout?.subtotalPrice?.amount)??null,cart_total_quantity:O,cart_shipping_price:v(p?.data?.checkout?.shippingLine?.price?.amount)??null,cart_tax_amount:v(p?.data?.checkout?.totalTax?.amount)??null,cart_discount_amount:v(p?.data?.checkout?.discountsAmount?.amount)??null,cart_items:$,customer_id:p?.data?.checkout?.order?.customer?.id??""};await x(I)}catch(b){console.error("[ElevateAB] Error handling checkout_started:",b)}},ne=async p=>{try{let b=u(p),S=pe(),R=k("checkout_completed",S,p,b),O=0,$=(p?.data?.checkout?.lineItems??[]).map(V=>{let G=V?.quantity??0;O+=G;let Z=(V?.discountAllocations??[])?.reduce((ee,ie)=>ee+(ie?.amount?.amount||0),0);return{product_id:K(V?.variant?.product?.id)??"",variant_id:ue(V?.variant?.id)??"",vendor:T(V?.variant?.product?.vendor)??"",total_price:v(V?.finalLinePrice?.amount)??null,quantity:G,sku:T(V?.variant?.sku)??"",total_discount:v(Z)??null}}),I={...R,cart_total_price:v(p?.data?.checkout?.totalPrice?.amount)??null,cart_subtotal_price:v(p?.data?.checkout?.subtotalPrice?.amount)??null,cart_total_quantity:O,cart_shipping_price:v(p?.data?.checkout?.shippingLine?.price?.amount)??null,cart_tax_amount:v(p?.data?.checkout?.totalTax?.amount)??null,cart_discount_amount:v(p?.data?.checkout?.discountsAmount?.amount)??null,cart_items:$,order_id:p?.data?.checkout?.order?.id??"",customer_id:p?.data?.checkout?.order?.customer?.id??"",is_first_order:p?.data?.checkout?.order?.customer?.isFirstOrder??null,note_attributes:p?.data?.checkout?.attributes??[]};await $e(I)}catch(b){console.error("[ElevateAB] Error handling checkout_completed:",b)}},$e=async p=>{if(!p.exclude)try{let b=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(p),keepalive:!0});if(!b.ok)throw new Error(`Orders worker error: ${b.status}`);return b}catch(b){console.error("[ElevateAB] Error sending order analytics:",b)}};o("page_viewed",g),o("product_viewed",h),o("product_added_to_cart",E),o("product_removed_from_cart",B),o("cart_viewed",X),o("search_submitted",Se),o("checkout_started",ye),o("checkout_completed",ne)})(),n()},[o,n,m,r,l,s,i]),null}var go="1.1.2",bo={enabled:!0,trackingEndpoint:"https://analytics.elevateab.com/track",cacheDuration:3600};0&&(module.exports={AntiFlickerScript,CART_ATTRIBUTES_UPDATE_MUTATION,COUNTRIES,DEFAULT_CONFIG,ElevateAnalytics,ElevateProvider,REGIONS,VERSION,assignAndPersistVariant,assignVariant,buildEabTestsParam,calculateRevenueLift,checkFacebookBrowser,checkFacebookInstagramBrowser,checkInstagramBrowser,checkPinterestBrowser,checkTikTokBrowser,checkVisitorIdParams,cleanCartToken,cleanupCartAttributes,cleanupFlickerPrevention,clearPreviewMode,deleteCookie,detectShopifyCurrency,extractCartToken,extractProductId,extractProductVariantId,extractShopifyId,extractShopifyType,generateExperimentId,getAssignedVariant,getCartAttributesPayload,getCookie,getCountryCode,getDeviceType,getFlickerPreventionScript,getGeoLocation,getJsonCookie,getJsonSessionItem,getPageTypeFromPathname,getPreviewState,getPreviewVariation,getReferrerData,getSessionId,getSessionItem,getTestList,getTrafficSource,getUserAgentNoBrowser,getVisitorId,hasSessionView,hasUniqueView,hashString,hideForFlicker,initAnalytics,initializeSessionId,initializeVisitorId,injectFlickerStyles,isCountryExcluded,isCountryIncluded,isFlickerPreventionActive,isInPreviewMode,isPreviewTest,isShopifyGid,matchesGeoTargeting,parseAddViewData,revealAfterFlicker,roundToTwo,sanitizeString,saveTestList,setCookie,setCountryCode,setGeoLocation,setReferrerData,setSessionItem,setupFlickerPrevention,shouldShowTest,trackAddToCart,trackCartView,trackCheckoutCompleted,trackCheckoutStarted,trackPageView,trackProductView,trackRemoveFromCart,trackSearchSubmitted,trackSessionView,trackUniqueView,trackViews,updateCartAttributes,updateUrlWithTestParams,useElevateConfig,useExperiment,usePageViewTracking,uuidv4,validateConfig});
40
+ `.trim()}var Rt=Ye(br(),1),wr={"facebook.com":"Facebook","fb.me":"Facebook","m.facebook.com":"Facebook","l.facebook.com":"Facebook","lm.facebook.com":"Facebook","instagram.com":"Instagram","l.instagram.com":"Instagram","youtube.com":"Youtube","youtu.be":"Youtube","m.youtube.com":"Youtube","bing.com":"Bing","www.bing.com":"Bing","msnbc.msn.com":"Bing","dizionario.it.msn.com":"Bing","cc.bingj.com":"Bing","m.bing.com":"Bing","twitter.com":"Twitter","t.co":"Twitter"};function T(e){return typeof e!="string"?String(e):e.replace(/[\\"'`\x00-\x1F\x7F]/g,"")}function v(e){if(e==null)return null;let t=typeof e=="string"?parseFloat(e):Number(e);return isNaN(t)?null:+(Math.round(+(t+"e2"))+"e-2")}function K(e){if(!e)return null;let t=/gid:\/\/shopify\/Product\/(\d+)/,r=e.match(t);return r?r[1]:null}function ue(e){if(!e)return null;let t=/gid:\/\/shopify\/ProductVariant\/(\d+)/,r=e.match(t);return r?r[1]:null}function Pe(e){if(!e)return null;let t=/gid:\/\/shopify\/Cart\/([^?]+(\?.+)?)/,r=e.match(t);return r?r[1]:null}function Te(e){try{return typeof e!="string"?null:decodeURIComponent(e).split("?")[0]}catch{return e||null}}function Qr(e){return/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i.test(e)}function Kr(e){return/(instagram)[\/ ]([-\w\.]+)/i.test(e)}function hr(e){return Qr(e)||Kr(e)}function Xr(e){if(!e)return"";switch(e){case"Mobile Safari":return"Safari";case"Chrome Mobile":case"Chrome Mobile iOS":return"Chrome";case"Firefox Mobile":case"Firefox Mobile iOS":return"Firefox";case"Opera Mobile":case"Opera Mini":case"Opera Mini iOS":return"Opera";case"Yandex Browser Lite":return"Yandex Browser";case"Chrome Webview":case"Mobile App":return"Mobile App";default:return e}}function Zr(e){let t={};return e.searchParams.forEach((r,s)=>{t[s]||(t[s]=r)}),t}function eo(e){return!!e.host&&["http:","https:"].includes(e.protocol)}function to(e){return e.replace(/^www\./,"")}function ro(e,t,r){if(t&&{Facebook:"Facebook",Instagram:"Instagram"}[t])return t;let i,p;try{if(e&&e.trim()!=="")i=new URL(e);else return"Direct";if(i?.hostname&&eo(i)){if(p=i.hostname,r&&r===p)return"Direct"}else return""}catch{}if(!p)return"";let d=to(p);return d?wr[d]?wr[d]:d?.includes("google")?"Google":d:""}function Ae(e){let{referrer:t,entryPage:r,userAgent:s}=e,i={referrer_source:"",browser_info:"",os_info:"",device_type:"",page_entry_path:"",utm_medium:"",utm_source:"",utm_campaign:"",utm_content:"",utm_term:"",referrer_url:t||"",gclid:"",fbclid:"",pins_campaign_id:"",epik:""};try{let p;if(r&&r.trim()!==""&&r.startsWith("http"))try{let d=new URL(r),m=d?.pathname;p=d?.hostname,m&&(i.page_entry_path=m??"");let l=Zr(d);i.utm_medium=l.utm_medium??"",i.utm_source=l.utm_source??"",i.utm_campaign=l.utm_campaign??"",i.utm_content=l.utm_content??"",i.utm_term=l.utm_term??"",i.gclid=l.gclid??"",i.fbclid=l.fbclid??"",i.pins_campaign_id=l.pins_campaign_id??"",i.epik=l.epik??""}catch{}if(s){let d=(0,Rt.UAParser)(s),m=d?.browser?.name,l=Xr(m);i.browser_info=l??"",i.os_info=d?.os?.name??"",s&&(i.device_type=(d?.device?.type||"desktop")?.toUpperCase()??"")}return i.referrer_source=ro(t,i?.browser_info,p)??"",i}catch{return i}}function Ce(e,t){let r=e==="/"||e==="",i=t&&/^\/[a-z]{2}(-[a-z]{2})?\/?$/i.test(e);return r||i?"index":/\/products\//.test(e)?"product":/\/collections\//.test(e)?"collection":/\/pages\//.test(e)?"page":/\/search/.test(e)?"search":/\/cart/.test(e)?"cart":/\/checkouts\//.test(e)?"checkout":"unknown"}function yr(e){try{return e&&new URLSearchParams(e).get("eabUserId")||!1}catch{return!1}}function Ee(e){if(!e)return"";try{let t=(0,Rt.UAParser)(e),r=t?.os,s=t?.device,i="";return r?.name&&(i+=r.name,r.version&&(i+=` ${r.version}`)),s?.type&&(i+=i?` (${s.type})`:s.type),s?.vendor&&(i+=i?` ${s.vendor}`:s.vendor),s?.model&&(i+=i?` ${s.model}`:s.model),i||e}catch{return e}}function z(e){return e?e.includes("gid://")&&e.split("/").pop()||e:""}function vr(e){return!e||!e.includes("gid://")?null:e.split("/")[3]||null}function _r(e){return!!e&&e.startsWith("gid://shopify/")}function kr(){if(typeof window>"u")return;let e=window.Shopify;if(e?.currency?.active)return e.currency.active}ct();Lt();W();var we=require("react"),oo="https://bitter-river-9c62.support-67d.workers.dev",no="https://d339co84ntxcme.cloudfront.net/Prod/orders",D=null;function je(e){D=e}function de(e){let t=e?.storeId||D?.storeId;return t||(console.warn("[ElevateAB] No storeId provided. Call initAnalytics() first or pass storeId to tracking function."),"")}function io(e){return Object.entries(e).filter(([,t])=>typeof t=="string").map(([t,r])=>({test_id:t,variant_id:r}))}function ao(e,t){return Object.entries(e).filter(([r])=>typeof t[r]=="string").map(([r])=>({test_id:r,variant_id:t[r]}))}function so(){return typeof window>"u"?!1:O("eabUserPreview")==="true"||new URLSearchParams(window.location.search).get("eabUserPreview")==="true"}function le(e,t,r){if(typeof window>"u"||so())return null;let s=navigator.userAgent,i=window.location.pathname,p=Ce(i,r),{referrer:d,entryPage:m}=_e(),l=Ae({referrer:d,entryPage:m,userAgent:s}),w=F("ABTL")||{},o=F("ABAU")||{},c=io(w),n=ao(o,w),a=Pe(localStorage.getItem("shopifyCartId")),u=new Date().toISOString(),k=sessionStorage.getItem("eabIsFirstVisit")==="true",x=O("localization")||"";return{pixel_event_id:`sh-${ae()}`,shop_name:e,timestamp:u,event_type:t,client_id:O("_shopify_y")||void 0,visitor_id:oe(),session_id:be(),cart_token:Te(a||O("cart")),page_url:window.location.href,page_pathname:i,page_search:window.location.search,referrer_url:d,referrer_source:l?.referrer_source,previous_page:document.referrer,page_entry:m,page_entry_path:l?.page_entry_path,page_type:p,utm_medium:l?.utm_medium,utm_source:l?.utm_source,utm_campaign:l?.utm_campaign,utm_content:l?.utm_content,utm_term:l?.utm_term,gclid:l?.gclid,fbclid:l?.fbclid,pins_campaign_id:l?.pins_campaign_id,epik:l?.epik,browser_info:l?.browser_info,os_info:l?.os_info,device_type:l?.device_type,language:navigator.language,root_route:localStorage.getItem("eabRootRoute")||"",user_agent:s,user_agent_no_browser:Ee(s),is_first_visit:k,shopify_country:x,ab_test_assignments:c,ab_test_views:n,is_first_order:null}}async function pe(e,t=oo){try{let r=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),keepalive:!0});if(!r.ok)throw new Error(`Worker error: ${r.status}`)}catch(r){console.error("[ElevateAB] Error sending analytics:",r)}}async function Bt(e={}){let t=de(e);if(!t)return;let r=e.hasLocalizedPaths??D?.hasLocalizedPaths,s=e.workerUrl??D?.workerUrl,i=le(t,"page_viewed",r);if(!i)return;let p={...i,cart_currency:e.currency};await pe(p,s)}async function Tr(e){let t=de(e);if(!t)return;let{productId:r,productVendor:s,productPrice:i,productSku:p,currency:d}=e,m=e.hasLocalizedPaths??D?.hasLocalizedPaths,l=e.workerUrl??D?.workerUrl,w=le(t,"product_viewed",m);if(!w)return;let o={...w,cart_currency:d,product_id:z(r),product_vendor:T(s),product_price:v(i),product_sku:T(p)};await pe(o,l)}async function Ar(e){let t=de(e);if(!t)return;let{productId:r,variantId:s,productVendor:i,productPrice:p,productQuantity:d,productSku:m,currency:l,cartId:w}=e,o=e.hasLocalizedPaths??D?.hasLocalizedPaths,c=e.workerUrl??D?.workerUrl,n=e.storefrontAccessToken??D?.storefrontAccessToken,a=le(t,"product_added_to_cart",o);if(!a)return;let u={...a,cart_currency:l,product_id:z(r),variant_id:z(s),product_vendor:T(i),product_price:v(p),product_quantity:d,product_sku:T(m)};if(await pe(u,c),w&&n)try{let{updateCartAttributes:k}=await Promise.resolve().then(()=>(ct(),Pr));await k(w,{storefrontAccessToken:n})}catch(k){console.error("[ElevateAB] Failed to update cart attributes:",k)}}async function Cr(e){let t=de(e);if(!t)return;let{productId:r,variantId:s,productVendor:i,productPrice:p,productQuantity:d,productSku:m,currency:l}=e,w=e.hasLocalizedPaths??D?.hasLocalizedPaths,o=e.workerUrl??D?.workerUrl,c=le(t,"product_removed_from_cart",w);if(!c)return;let n={...c,cart_currency:l,product_id:z(r),variant_id:z(s),product_vendor:T(i),product_price:v(p),product_quantity:d,product_sku:T(m)};await pe(n,o)}async function Er(e){let t=de(e);if(!t)return;let{cartTotalPrice:r,cartTotalQuantity:s,cartItems:i,currency:p}=e,d=e.hasLocalizedPaths??D?.hasLocalizedPaths,m=e.workerUrl??D?.workerUrl,l=le(t,"cart_viewed",d);if(!l)return;let w={...l,cart_currency:p,cart_total_price:v(r),cart_total_quantity:s,cart_items:i?.map(o=>({product_id:z(o.productId),variant_id:z(o.variantId),product_vendor:T(o.productVendor)||"",product_price:v(o.productPrice),product_quantity:o.productQuantity??null,product_sku:T(o.productSku)||""}))};await pe(w,m)}async function Sr(e){let t=de(e);if(!t)return;let{searchQuery:r,currency:s}=e,i=e.hasLocalizedPaths??D?.hasLocalizedPaths,p=e.workerUrl??D?.workerUrl,d=le(t,"search_submitted",i);if(!d)return;let m={...d,cart_currency:s,search_query:T(r)};await pe(m,p)}async function Ir(e){let t=de(e);if(!t)return;let{cartTotalPrice:r,cartSubtotalPrice:s,cartShippingPrice:i,cartTaxAmount:p,cartDiscountAmount:d,customerId:m,cartItems:l,currency:w}=e,o=e.hasLocalizedPaths??D?.hasLocalizedPaths,c=e.workerUrl??D?.workerUrl,n=le(t,"checkout_started",o);if(!n)return;let a=0,u=l?.map(x=>{let g=x.productQuantity??0;return a+=g,{product_id:z(x.productId),variant_id:z(x.variantId),product_vendor:T(x.productVendor)||"",vendor:T(x.productVendor)||"",product_price:v(x.productPrice),total_price:v(x.productPrice),product_quantity:g,quantity:g,product_sku:T(x.productSku)||"",sku:T(x.productSku)||"",total_discount:v(x.totalDiscount)}})||[],k={...n,cart_currency:w,cart_total_price:v(r),cart_subtotal_price:v(s),cart_total_quantity:a,cart_shipping_price:v(i),cart_tax_amount:v(p),cart_discount_amount:v(d),cart_items:u,customer_id:m};await pe(k,c)}async function Ur(e){let t=de(e);if(!t)return;let{orderId:r,cartTotalPrice:s,cartSubtotalPrice:i,cartShippingPrice:p,cartTaxAmount:d,cartDiscountAmount:m,customerId:l,isFirstOrder:w,noteAttributes:o,cartItems:c,currency:n}=e,a=e.hasLocalizedPaths??D?.hasLocalizedPaths,u=e.ordersWorkerUrl??D?.ordersWorkerUrl??no,k=le(t,"checkout_completed",a);if(!k)return;let x=0,g=c?.map(E=>{let B=E.productQuantity??0;return x+=B,{product_id:z(E.productId),variant_id:z(E.variantId),product_vendor:T(E.productVendor)||"",vendor:T(E.productVendor)||"",product_price:v(E.productPrice),total_price:v(E.productPrice),product_quantity:B,quantity:B,product_sku:T(E.productSku)||"",sku:T(E.productSku)||"",total_discount:v(E.totalDiscount)}})||[],h={...k,cart_currency:n,cart_total_price:v(s),cart_subtotal_price:v(i),cart_total_quantity:x,cart_shipping_price:v(p),cart_tax_amount:v(d),cart_discount_amount:v(m),cart_items:g,order_id:r,customer_id:l,is_first_order:w??null,note_attributes:o};await pe(h,u)}function Rr(e){let{storeId:t,hasLocalizedPaths:r,currency:s,workerUrl:i,enabled:p=!0,pathname:d}=e,m=(0,we.useRef)(null),[l,w]=(0,we.useState)(()=>d||(typeof window<"u"?window.location.pathname:""));(0,we.useEffect)(()=>{d&&w(d)},[d]),(0,we.useEffect)(()=>{typeof window>"u"||!p||m.current!==l&&(m.current=l,Bt({storeId:t,hasLocalizedPaths:r,currency:s,workerUrl:i}))},[l,t,r,s,i,p])}var Se=Ye(require("react"),1);var Vt=Ye(require("react"),1),$e=Vt.default.createContext(null);function ut(){let e=Vt.default.useContext($e);if(e===null)throw new Error("useElevateConfig must be used within ElevateProvider");return e}W();tt();function Lr(e){let{config:t}=ut(),[r,s]=Se.default.useState(null),[i,p]=Se.default.useState(!0),d=Se.default.useMemo(()=>t&&t.tests.find(l=>l.testId===e)||null,[t,e]),m=Se.default.useRef(null);return Se.default.useEffect(()=>{if(t===null)return;if(!d){m.current!==e&&(m.current=e,console.warn(`[ElevateAB] Test not found: ${e}`)),p(!1);return}if(!d.enabled){m.current!==`${e}-disabled`&&(m.current=`${e}-disabled`,console.warn(`[ElevateAB] Test disabled: ${e}`)),p(!1);return}if(!et(d)){p(!1);return}let l=oe(),w=Ze(e,d,l);w&&(s(w),rt(e)),p(!1)},[t,d,e]),{variant:r,isLoading:i,isControl:r?.isControl??!1,isA:r?.isA??!1,isB:r?.isB??!1,isC:r?.isC??!1,isD:r?.isD??!1}}var N=Ye(require("react"),1);Qe();var dt=require("react/jsx-runtime"),co=!1,uo={allTests:{"price-test-001":{8606:{variationName:"Control",trafficPercentage:50,isDone:!1,isControl:!0},8607:{variationName:"Sale Price",trafficPercentage:50,isDone:!1,prices:{"41883969519701":{main:"USD",price:{USD:"599.95"},compare:{USD:"699.95"}}}},data:{name:"Snowboard Price Test",isLive:!0,settings:{afterDiscounts:!0},type:"PRICE_PLUS",filters:[],isPersonalization:!1,currencies:["USD"],handles:["the-complete-snowboard"],productIds:["7240161067093"]}},"content-test-001":{"ctrl-001":{variationName:"Control",trafficPercentage:34,isDone:!1,isControl:!0,content:{headline:"Welcome to our store",subheadline:"Shop the best products"}},"var-a-001":{variationName:"Urgency Copy",trafficPercentage:33,isDone:!1,content:{headline:"Limited Time Offer!",subheadline:"Don't miss out - sale ends soon"}},"var-b-001":{variationName:"Value Copy",trafficPercentage:33,isDone:!1,content:{headline:"Premium Quality, Great Value",subheadline:"Free shipping on orders over $50"}},data:{name:"Homepage Headline Test",isLive:!0,settings:{afterDiscounts:!0},type:"CONTENT",filters:[],isPersonalization:!1,pathnames:["/"]}},"custom-code-test-001":{10150:{variationName:"Control",trafficPercentage:50,isDone:!1,customCode:{id:"c11a582c-6b27-4263-941c-8ed123437c6b",js:"console.log('[Elevate] Control variant active');",css:"",pathnames:["*"],excludePathnames:[]},isControl:!0},10151:{variationName:"Enhanced UI",trafficPercentage:50,isDone:!1,customCode:{id:"df71546a-0a5f-4ad0-8d0f-a1bdeab05e84",js:"console.log('[Elevate] Enhanced UI variant'); document.body.style.borderTop = '3px solid #10b981';",css:".hero-section { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }",pathnames:["*"],excludePathnames:[]}},data:{name:"Custom Code Enhancement",isLive:!0,settings:{afterDiscounts:!0},type:"CUSTOM_CODE",filters:[],isPersonalization:!1,pathnames:["*"],excludePathnames:[]}},"split-url-test-001":{"split-ctrl":{variationName:"Control",trafficPercentage:50,isDone:!1,isControl:!0,splitUrlTestLinks:{default:"/collections/all"}},"split-var-a":{variationName:"New Landing Page",trafficPercentage:50,isDone:!1,splitUrlTestLinks:{default:"/collections/featured"}},data:{name:"Landing Page Split Test",isLive:!0,settings:{afterDiscounts:!0},type:"SPLIT_URL",filters:[],isPersonalization:!1,pathnames:["/promo"]}}},selectors:{selectorsV2:[]}};function Or({storeId:e,storefrontAccessToken:t,preventFlickering:r=!1,flickerTimeout:s=3e3,children:i}){let[p,d]=N.default.useState(null),[m,l]=N.default.useState(null),[w,o]=N.default.useState(null),c=(0,N.useRef)(null);N.default.useEffect(()=>(r&&typeof window<"u"&&(c.current=it("body",s)),()=>{c.current&&c.current()}),[r,s]),N.default.useEffect(()=>{typeof window>"u"||je({storeId:e,storefrontAccessToken:t})},[e,t]),N.default.useEffect(()=>{if(typeof window>"u")return;let k=Fe();l(k);let x=ce();o(x)},[]);let n=(0,N.useCallback)(()=>{c.current&&(c.current(),c.current=null)},[]);N.default.useEffect(()=>{async function k(){try{if(!co){let X=bt(uo);d(X),n();return}let x=`https://configs.elevateab.com/config/${e}.json`,g=await fetch(x);if(g.status===404){d({tests:[],selectors:void 0}),n();return}if(!g.ok)throw new Error(`Failed to fetch config: ${g.status} ${g.statusText}`);let h=await g.json();if(h.subscriptionPaused){console.error(`[ElevateAB] Subscription is paused or stopped for store: ${e}. `+(h.subscriptionMessage||"A/B tests will not run. Please reactivate your subscription.")),d({tests:[],selectors:void 0}),n();return}if(!(Object.keys(h.allTests||{}).length>0)){d({tests:[],selectors:void 0}),n();return}let B=bt(h);d(B),n()}catch(x){console.error("[ElevateAB] Failed to load config:",x),d({tests:[],selectors:void 0}),n()}}k()},[e,n]);let a=N.default.useMemo(()=>({config:p,storeId:e,storefrontAccessToken:t,isPreviewMode:m?.isPreview??!1,previewTestId:m?.previewTestId??null,countryCode:w}),[p,e,t,m,w]);N.default.useEffect(()=>{je({storeId:e,storefrontAccessToken:t})},[e,t]);let u=(0,N.useRef)(!1);return N.default.useEffect(()=>{!t&&!u.current&&(u.current=!0,console.warn("[ElevateAB] No storefrontAccessToken provided. A/B tests will work, but orders won't be attributed to test variants. Add storefrontAccessToken prop to enable order tracking."))},[t]),(0,dt.jsxs)($e.Provider,{value:a,children:[r&&(0,dt.jsx)("script",{dangerouslySetInnerHTML:{__html:xe(s)}}),i]})}var Vr=require("react/jsx-runtime");function Br({timeout:e=3e3}){return(0,Vr.jsx)("script",{dangerouslySetInnerHTML:{__html:xe(e)}})}var he=require("react");W();W();ct();var lo="https://bitter-river-9c62.support-67d.workers.dev",po="https://d339co84ntxcme.cloudfront.net/Prod/orders";function fe(){return`sh-${ae()}`}function fo(e){return Object.entries(e).filter(([,t])=>typeof t=="string").map(([t,r])=>({test_id:t,variant_id:r}))}function mo(e,t){return Object.entries(e).filter(([r])=>typeof t[r]=="string").map(([r])=>({test_id:r,variant_id:t[r]}))}function Dr({storeId:e,storefrontAccessToken:t,hasLocalizedPaths:r,workerUrl:s=lo,ordersWorkerUrl:i=po,useAnalytics:p}){let d=(0,he.useContext)($e),m=e||d?.storeId||"",l=t||d?.storefrontAccessToken,w=(0,he.useRef)(!1);(0,he.useEffect)(()=>{!d&&!e&&!w.current&&(w.current=!0,console.error("[ElevateAB] ElevateAnalytics must be used inside ElevateProvider, or you must pass storeId as a prop."))},[d,e]);let{subscribe:o,register:c}=p(),{ready:n}=c("Elevate Analytics");return(0,he.useEffect)(()=>{if(typeof window>"u")return;if(oe(),be(),typeof document<"u"){let u=document.referrer||"",k=window.location.href;Ke(u,k)}(()=>{let u=f=>{let b=K(f.products?.[0]?.id);b&&typeof localStorage<"u"?localStorage.setItem("eabProductPageId",b):typeof window<"u"&&!window.location.pathname.includes("/products/")&&localStorage?.removeItem("eabProductPageId");let S=Pe(typeof localStorage<"u"?localStorage.getItem("shopifyCartId"):null),{referrer:R,entryPage:L}=_e();return{visitorId:oe(),sessionId:be(),cartToken:S||O("cart")||"",referrer:R,entryPage:L,clientId:O("_shopify_y"),rootRoute:typeof localStorage<"u"&&localStorage.getItem("eabRootRoute")||"",productPageId:typeof localStorage<"u"&&localStorage.getItem("eabProductPageId")||""}},k=(f,b,S,R)=>{let L=typeof navigator<"u"?navigator.userAgent:"",M=S?.url?new URL(S.url).pathname:typeof window<"u"?window.location.pathname:"",$=Ce(M,r),I=Ae({referrer:R.referrer,entryPage:R.entryPage,userAgent:L}),V=F("ABTL")||{},G=F("ABAU")||{},me=fo(V),Z=mo(G,V),ee=new Date().toISOString(),ie=typeof sessionStorage<"u"?sessionStorage.getItem("eabIsFirstVisit")==="true":!1,ge=O("localization")||"";return{pixel_event_id:b,shop_name:m,timestamp:ee,event_type:f,client_id:R.clientId,visitor_id:R.visitorId,session_id:R.sessionId,cart_token:Te(R.cartToken),page_url:S.context?.document?.location?.href||(typeof window<"u"?window.location.href:""),page_pathname:M,page_search:S.context?.document?.location?.search||(typeof window<"u"?window.location.search:""),referrer_url:R.referrer,referrer_source:I?.referrer_source,previous_page:typeof document<"u"?document.referrer:"",page_entry:R.entryPage,page_entry_path:I?.page_entry_path,page_type:$,utm_medium:I?.utm_medium,utm_source:I?.utm_source,utm_campaign:I?.utm_campaign,utm_content:I?.utm_content,utm_term:I?.utm_term,gclid:I?.gclid,fbclid:I?.fbclid,pins_campaign_id:I?.pins_campaign_id,epik:I?.epik,browser_info:I?.browser_info,os_info:I?.os_info,device_type:I?.device_type,language:S.context?.navigator?.language||(typeof navigator<"u"?navigator.language:""),root_route:R.rootRoute,user_agent:L,user_agent_no_browser:Ee(L),is_first_visit:ie,shopify_country:ge,cart_currency:S.shop?.currency,ab_test_assignments:me,ab_test_views:Z,is_first_order:null}},x=async f=>{if(!f.exclude)try{let b=await fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f),keepalive:!0});if(!b.ok)throw new Error(`Worker error: ${b.status}`);return b}catch(b){console.error("[ElevateAB] Error sending analytics:",b)}},g=async f=>{try{let b=u(f),S=fe(),R=k("page_viewed",S,f,b);await x(R)}catch(b){console.error("[ElevateAB] Error handling page_viewed:",b)}},h=async f=>{try{let b=u(f),S=fe(),L={...k("product_viewed",S,f,b),product_id:K(f?.products?.[0]?.id)||"",product_vendor:T(f?.products?.[0]?.vendor)??"",product_price:v(f?.products?.[0]?.price)??null,product_sku:T(f?.products?.[0]?.sku)??""};await x(L)}catch(b){console.error("[ElevateAB] Error handling product_viewed:",b)}},E=async f=>{try{let b=u(f),S=fe(),L={...k("product_added_to_cart",S,f,b),product_id:K(f?.currentLine?.merchandise?.product?.id)??"",variant_id:ue(f?.currentLine?.merchandise?.id)??"",product_vendor:T(f?.currentLine?.merchandise?.product?.vendor)??"",product_price:v(f?.currentLine?.cost?.totalAmount?.amount)??null,product_quantity:f?.currentLine?.quantity??null,product_sku:T(f?.currentLine?.merchandise?.sku)??""};await x(L);let M=f?.cart?.id;M&&l&&m&&qe(M,{storefrontAccessToken:l,storefrontApiUrl:`https://${m}/api/2025-01/graphql.json`}).catch($=>{console.error("[ElevateAB] Failed to update cart attributes:",$)})}catch(b){console.error("[ElevateAB] Error handling product_added_to_cart:",b)}},B=async f=>{try{let b=u(f),S=fe(),L={...k("product_removed_from_cart",S,f,b),product_id:K(f?.prevLine?.merchandise?.product?.id)??"",variant_id:ue(f?.prevLine?.merchandise?.id)??"",product_vendor:T(f?.prevLine?.merchandise?.product?.vendor)??"",product_price:v(f?.prevLine?.cost?.totalAmount?.amount)??null,product_quantity:f?.prevLine?.quantity??null,product_sku:T(f?.prevLine?.merchandise?.sku)??""};await x(L)}catch(b){console.error("[ElevateAB] Error handling product_removed_from_cart:",b)}},X=async f=>{try{let b=u(f),S=fe(),R=k("cart_viewed",S,f,b),M=(f?.data?.cart?.lines?.nodes||f?.data?.cart?.lines||[]).map(I=>({product_id:K(I?.merchandise?.product?.id)??"",variant_id:ue(I?.merchandise?.id)??"",vendor:T(I?.merchandise?.product?.vendor)??"",total_price:v(I?.cost?.totalAmount?.amount)??null,quantity:I?.quantity??null,sku:T(I?.merchandise?.sku)??""})),$={...R,cart_total_price:v(f?.cart?.cost?.totalAmount?.amount)??null,cart_total_quantity:f?.cart?.totalQuantity??null,cart_items:M};await x($)}catch(b){console.error("[ElevateAB] Error handling cart_viewed:",b)}},Ie=async f=>{try{let b=u(f),S=fe(),L={...k("search_submitted",S,f,b),search_query:T(f?.data?.searchResult?.query)??""};await x(L)}catch(b){console.error("[ElevateAB] Error handling search_submitted:",b)}},ye=async f=>{try{let b=u(f),S=fe(),R=k("checkout_started",S,f,b),L=0,$=(f?.data?.checkout?.lineItems??[]).map(V=>{let G=V?.quantity??0;L+=G;let Z=(V?.discountAllocations??[])?.reduce((ee,ie)=>ee+(ie?.amount?.amount||0),0);return{product_id:K(V?.variant?.product?.id)??"",variant_id:ue(V?.variant?.id)??"",vendor:T(V?.variant?.product?.vendor)??"",total_price:v(V?.finalLinePrice?.amount)??null,quantity:G,sku:T(V?.variant?.sku)??"",total_discount:v(Z)??null}}),I={...R,cart_total_price:v(f?.data?.checkout?.totalPrice?.amount)??null,cart_subtotal_price:v(f?.data?.checkout?.subtotalPrice?.amount)??null,cart_total_quantity:L,cart_shipping_price:v(f?.data?.checkout?.shippingLine?.price?.amount)??null,cart_tax_amount:v(f?.data?.checkout?.totalTax?.amount)??null,cart_discount_amount:v(f?.data?.checkout?.discountsAmount?.amount)??null,cart_items:$,customer_id:f?.data?.checkout?.order?.customer?.id??""};await x(I)}catch(b){console.error("[ElevateAB] Error handling checkout_started:",b)}},ne=async f=>{try{let b=u(f),S=fe(),R=k("checkout_completed",S,f,b),L=0,$=(f?.data?.checkout?.lineItems??[]).map(V=>{let G=V?.quantity??0;L+=G;let Z=(V?.discountAllocations??[])?.reduce((ee,ie)=>ee+(ie?.amount?.amount||0),0);return{product_id:K(V?.variant?.product?.id)??"",variant_id:ue(V?.variant?.id)??"",vendor:T(V?.variant?.product?.vendor)??"",total_price:v(V?.finalLinePrice?.amount)??null,quantity:G,sku:T(V?.variant?.sku)??"",total_discount:v(Z)??null}}),I={...R,cart_total_price:v(f?.data?.checkout?.totalPrice?.amount)??null,cart_subtotal_price:v(f?.data?.checkout?.subtotalPrice?.amount)??null,cart_total_quantity:L,cart_shipping_price:v(f?.data?.checkout?.shippingLine?.price?.amount)??null,cart_tax_amount:v(f?.data?.checkout?.totalTax?.amount)??null,cart_discount_amount:v(f?.data?.checkout?.discountsAmount?.amount)??null,cart_items:$,order_id:f?.data?.checkout?.order?.id??"",customer_id:f?.data?.checkout?.order?.customer?.id??"",is_first_order:f?.data?.checkout?.order?.customer?.isFirstOrder??null,note_attributes:f?.data?.checkout?.attributes??[]};await Ge(I)}catch(b){console.error("[ElevateAB] Error handling checkout_completed:",b)}},Ge=async f=>{if(!f.exclude)try{let b=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(f),keepalive:!0});if(!b.ok)throw new Error(`Orders worker error: ${b.status}`);return b}catch(b){console.error("[ElevateAB] Error sending order analytics:",b)}};o("page_viewed",g),o("product_viewed",h),o("product_added_to_cart",E),o("product_removed_from_cart",B),o("cart_viewed",X),o("search_submitted",Ie),o("checkout_started",ye),o("checkout_completed",ne)})(),n()},[o,n,m,r,l,s,i]),null}var go="1.1.2",bo={enabled:!0,trackingEndpoint:"https://analytics.elevateab.com/track",cacheDuration:3600};0&&(module.exports={AntiFlickerScript,CART_ATTRIBUTES_UPDATE_MUTATION,COUNTRIES,DEFAULT_CONFIG,ElevateAnalytics,ElevateProvider,REGIONS,VERSION,assignAndPersistVariant,assignVariant,buildEabTestsParam,calculateRevenueLift,checkFacebookBrowser,checkFacebookInstagramBrowser,checkInstagramBrowser,checkPinterestBrowser,checkTikTokBrowser,checkVisitorIdParams,cleanCartToken,cleanupCartAttributes,cleanupFlickerPrevention,clearPreviewMode,deleteCookie,detectShopifyCurrency,extractCartToken,extractProductId,extractProductVariantId,extractShopifyId,extractShopifyType,generateExperimentId,getAssignedVariant,getCartAttributesPayload,getCookie,getCountryCode,getDeviceType,getFlickerPreventionScript,getGeoLocation,getJsonCookie,getJsonSessionItem,getPageTypeFromPathname,getPreviewState,getPreviewVariation,getReferrerData,getSessionId,getSessionItem,getTestList,getTrafficSource,getUserAgentNoBrowser,getVisitorId,hasSessionView,hasUniqueView,hashString,hideForFlicker,initAnalytics,initializeSessionId,initializeVisitorId,injectFlickerStyles,isCountryExcluded,isCountryIncluded,isFlickerPreventionActive,isInPreviewMode,isPreviewTest,isShopifyGid,matchesGeoTargeting,parseAddViewData,revealAfterFlicker,roundToTwo,sanitizeString,saveTestList,setCookie,setCountryCode,setGeoLocation,setReferrerData,setSessionItem,setupFlickerPrevention,shouldShowTest,trackAddToCart,trackCartView,trackCheckoutCompleted,trackCheckoutStarted,trackPageView,trackProductView,trackRemoveFromCart,trackSearchSubmitted,trackSessionView,trackUniqueView,trackViews,updateCartAttributes,updateUrlWithTestParams,useElevateConfig,useExperiment,usePageViewTracking,uuidv4,validateConfig});
41
41
  //# sourceMappingURL=index.cjs.map