@elevateab/sdk 1.2.3 → 1.2.5

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/dist/next.d.cts CHANGED
@@ -1,4 +1,5 @@
1
- import React, { ReactNode } from 'react';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
2
3
 
3
4
  interface ElevateNextProviderProps {
4
5
  /**
@@ -69,7 +70,7 @@ interface ElevateNextProviderProps {
69
70
  * </ElevateNextProvider>
70
71
  * ```
71
72
  */
72
- declare function ElevateNextProvider({ storeId, storefrontAccessToken, preventFlickering, flickerTimeout, currency, children, }: ElevateNextProviderProps): React.JSX.Element;
73
+ declare function ElevateNextProvider({ storeId, storefrontAccessToken, preventFlickering, flickerTimeout, currency, children, }: ElevateNextProviderProps): react_jsx_runtime.JSX.Element;
73
74
 
74
75
  interface ProductViewTrackerProps {
75
76
  /**
@@ -121,6 +122,42 @@ interface ProductViewTrackerProps {
121
122
  */
122
123
  declare function ProductViewTracker({ productId, productVendor, productPrice, productSku, currency, }: ProductViewTrackerProps): null;
123
124
 
125
+ interface AntiFlickerScriptProps {
126
+ /**
127
+ * Maximum time (ms) to wait before showing content anyway (failsafe)
128
+ * @default 3000
129
+ */
130
+ timeout?: number;
131
+ }
132
+ /**
133
+ * Anti-flicker script for Next.js
134
+ *
135
+ * Add this to your root layout's <head> to prevent content flash during A/B test loading.
136
+ * Uses next/script with beforeInteractive strategy to run before React hydrates.
137
+ *
138
+ * @example
139
+ * ```tsx
140
+ * // app/layout.tsx
141
+ * import { AntiFlickerScript, ElevateNextProvider } from "@elevateab/sdk/next";
142
+ *
143
+ * export default function RootLayout({ children }) {
144
+ * return (
145
+ * <html>
146
+ * <head>
147
+ * <AntiFlickerScript />
148
+ * </head>
149
+ * <body>
150
+ * <ElevateNextProvider storeId="..." preventFlickering={true}>
151
+ * {children}
152
+ * </ElevateNextProvider>
153
+ * </body>
154
+ * </html>
155
+ * );
156
+ * }
157
+ * ```
158
+ */
159
+ declare function AntiFlickerScript({ timeout }: AntiFlickerScriptProps): react_jsx_runtime.JSX.Element;
160
+
124
161
  interface Test {
125
162
  testId: string;
126
163
  name: string;
@@ -731,4 +768,4 @@ declare function useExperiment(testId: string): UseExperimentResult;
731
768
  */
732
769
  declare function useElevateConfig(): ElevateContextValue;
733
770
 
734
- export { type CartItemInput, type ElevateConfig, type ElevateContextValue, ElevateNextProvider, type PreviewState, ProductViewTracker, type TrackAddToCartParams, type TrackPageViewParams, type TrackProductViewParams, type UseExperimentResult, clearPreviewMode, extractShopifyId, extractShopifyType, getCountryCode, getFlickerPreventionScript, getPreviewState, isInPreviewMode, isShopifyGid, matchesGeoTargeting, trackAddToCart, trackCartView, trackCheckoutCompleted, trackCheckoutStarted, trackPageView, trackProductView, trackRemoveFromCart, trackSearchSubmitted, useElevateConfig, useExperiment };
771
+ export { AntiFlickerScript, type CartItemInput, type ElevateConfig, type ElevateContextValue, ElevateNextProvider, type PreviewState, ProductViewTracker, type TrackAddToCartParams, type TrackPageViewParams, type TrackProductViewParams, type UseExperimentResult, clearPreviewMode, extractShopifyId, extractShopifyType, getCountryCode, getFlickerPreventionScript, getPreviewState, isInPreviewMode, isShopifyGid, matchesGeoTargeting, trackAddToCart, trackCartView, trackCheckoutCompleted, trackCheckoutStarted, trackPageView, trackProductView, trackRemoveFromCart, trackSearchSubmitted, useElevateConfig, useExperiment };
package/dist/next.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import React, { ReactNode } from 'react';
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
2
3
 
3
4
  interface ElevateNextProviderProps {
4
5
  /**
@@ -69,7 +70,7 @@ interface ElevateNextProviderProps {
69
70
  * </ElevateNextProvider>
70
71
  * ```
71
72
  */
72
- declare function ElevateNextProvider({ storeId, storefrontAccessToken, preventFlickering, flickerTimeout, currency, children, }: ElevateNextProviderProps): React.JSX.Element;
73
+ declare function ElevateNextProvider({ storeId, storefrontAccessToken, preventFlickering, flickerTimeout, currency, children, }: ElevateNextProviderProps): react_jsx_runtime.JSX.Element;
73
74
 
74
75
  interface ProductViewTrackerProps {
75
76
  /**
@@ -121,6 +122,42 @@ interface ProductViewTrackerProps {
121
122
  */
122
123
  declare function ProductViewTracker({ productId, productVendor, productPrice, productSku, currency, }: ProductViewTrackerProps): null;
123
124
 
125
+ interface AntiFlickerScriptProps {
126
+ /**
127
+ * Maximum time (ms) to wait before showing content anyway (failsafe)
128
+ * @default 3000
129
+ */
130
+ timeout?: number;
131
+ }
132
+ /**
133
+ * Anti-flicker script for Next.js
134
+ *
135
+ * Add this to your root layout's <head> to prevent content flash during A/B test loading.
136
+ * Uses next/script with beforeInteractive strategy to run before React hydrates.
137
+ *
138
+ * @example
139
+ * ```tsx
140
+ * // app/layout.tsx
141
+ * import { AntiFlickerScript, ElevateNextProvider } from "@elevateab/sdk/next";
142
+ *
143
+ * export default function RootLayout({ children }) {
144
+ * return (
145
+ * <html>
146
+ * <head>
147
+ * <AntiFlickerScript />
148
+ * </head>
149
+ * <body>
150
+ * <ElevateNextProvider storeId="..." preventFlickering={true}>
151
+ * {children}
152
+ * </ElevateNextProvider>
153
+ * </body>
154
+ * </html>
155
+ * );
156
+ * }
157
+ * ```
158
+ */
159
+ declare function AntiFlickerScript({ timeout }: AntiFlickerScriptProps): react_jsx_runtime.JSX.Element;
160
+
124
161
  interface Test {
125
162
  testId: string;
126
163
  name: string;
@@ -731,4 +768,4 @@ declare function useExperiment(testId: string): UseExperimentResult;
731
768
  */
732
769
  declare function useElevateConfig(): ElevateContextValue;
733
770
 
734
- export { type CartItemInput, type ElevateConfig, type ElevateContextValue, ElevateNextProvider, type PreviewState, ProductViewTracker, type TrackAddToCartParams, type TrackPageViewParams, type TrackProductViewParams, type UseExperimentResult, clearPreviewMode, extractShopifyId, extractShopifyType, getCountryCode, getFlickerPreventionScript, getPreviewState, isInPreviewMode, isShopifyGid, matchesGeoTargeting, trackAddToCart, trackCartView, trackCheckoutCompleted, trackCheckoutStarted, trackPageView, trackProductView, trackRemoveFromCart, trackSearchSubmitted, useElevateConfig, useExperiment };
771
+ export { AntiFlickerScript, type CartItemInput, type ElevateConfig, type ElevateContextValue, ElevateNextProvider, type PreviewState, ProductViewTracker, type TrackAddToCartParams, type TrackPageViewParams, type TrackProductViewParams, type UseExperimentResult, clearPreviewMode, extractShopifyId, extractShopifyType, getCountryCode, getFlickerPreventionScript, getPreviewState, isInPreviewMode, isShopifyGid, matchesGeoTargeting, trackAddToCart, trackCartView, trackCheckoutCompleted, trackCheckoutStarted, trackPageView, trackProductView, trackRemoveFromCart, trackSearchSubmitted, useElevateConfig, useExperiment };
package/dist/next.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import{a as Dt,b as Nt,c as Ve,d as fe,e as M,f as U,g as q,h as te,i as De,j as Ne,k as H,l as me,m as ge,n as Fe,o as ze}from"./chunk-4D5I75NE.js";var lt=Dt((re,he)=>{"use strict";(function(e,t){"use strict";var a="1.0.41",u="",c="?",m="function",d="undefined",b="object",p="string",x="major",o="model",n="name",r="type",i="vendor",s="version",E="architecture",_="console",l="mobile",f="tablet",k="smarttv",A="wearable",z="embedded",Ce=500,ne="Amazon",$="Apple",Ye="ASUS",Je="BlackBerry",ae="Browser",se="Chrome",Ut="Edge",ce="Firefox",ue="Google",Qe="Honor",Ke="Huawei",Ot="Lenovo",de="LG",Ae="Microsoft",Se="Motorola",Ie="Nvidia",Xe="OnePlus",J="Opera",Re="OPPO",Q="Samsung",Ze="Sharp",K="Sony",Ue="Xiaomi",Oe="Zebra",et="Facebook",tt="Chromium OS",rt="Mac OS",ot=" Browser",Lt=function(h,v){var w={};for(var P in h)v[P]&&v[P].length%2===0?w[P]=v[P].concat(h[P]):w[P]=h[P];return w},le=function(h){for(var v={},w=0;w<h.length;w++)v[h[w].toUpperCase()]=h[w];return v},it=function(h,v){return typeof h===p?X(v).indexOf(X(h))!==-1:!1},X=function(h){return h.toLowerCase()},Bt=function(h){return typeof h===p?h.replace(/[^\d\.]/g,u).split(".")[0]:t},Le=function(h,v){if(typeof h===p)return h=h.replace(/^\s\s*/,u),typeof v===d?h:h.substring(0,Ce)},Z=function(h,v){for(var w=0,P,V,L,y,g,B;w<v.length&&!g;){var Be=v[w],st=v[w+1];for(P=V=0;P<Be.length&&!g&&Be[P];)if(g=Be[P++].exec(h),g)for(L=0;L<st.length;L++)B=g[++V],y=st[L],typeof y===b&&y.length>0?y.length===2?typeof y[1]==m?this[y[0]]=y[1].call(this,B):this[y[0]]=y[1]:y.length===3?typeof y[1]===m&&!(y[1].exec&&y[1].test)?this[y[0]]=B?y[1].call(this,B,y[2]):t:this[y[0]]=B?B.replace(y[1],y[2]):t:y.length===4&&(this[y[0]]=B?y[3].call(this,B.replace(y[1],y[2])):t):this[y]=B||t;w+=2}},ee=function(h,v){for(var w in v)if(typeof v[w]===b&&v[w].length>0){for(var P=0;P<v[w].length;P++)if(it(v[w][P],h))return w===c?t:w}else if(it(v[w],h))return w===c?t:w;return v.hasOwnProperty("*")?v["*"]:h},Vt={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},nt={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"},at={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[s,[n,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[s,[n,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[n,s],[/opios[\/ ]+([\w\.]+)/i],[s,[n,J+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[s,[n,J+" GX"]],[/\bopr\/([\w\.]+)/i],[s,[n,J]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[s,[n,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[s,[n,"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],[n,s],[/quark(?:pc)?\/([-\w\.]+)/i],[s,[n,"Quark"]],[/\bddg\/([\w\.]+)/i],[s,[n,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[s,[n,"UC"+ae]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[s,[n,"WeChat"]],[/konqueror\/([\w\.]+)/i],[s,[n,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[s,[n,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[s,[n,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[s,[n,"Smart Lenovo "+ae]],[/(avast|avg)\/([\w\.]+)/i],[[n,/(.+)/,"$1 Secure "+ae],s],[/\bfocus\/([\w\.]+)/i],[s,[n,ce+" Focus"]],[/\bopt\/([\w\.]+)/i],[s,[n,J+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[s,[n,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[s,[n,"Dolphin"]],[/coast\/([\w\.]+)/i],[s,[n,J+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[s,[n,"MIUI"+ot]],[/fxios\/([\w\.-]+)/i],[s,[n,ce]],[/\bqihoobrowser\/?([\w\.]*)/i],[s,[n,"360"]],[/\b(qq)\/([\w\.]+)/i],[[n,/(.+)/,"$1Browser"],s],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[n,/(.+)/,"$1"+ot],s],[/samsungbrowser\/([\w\.]+)/i],[s,[n,Q+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[s,[n,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[n,"Sogou Mobile"],s],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[n,s],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[n],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[s,n],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[n,et],s],[/(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],[n,s],[/\bgsa\/([\w\.]+) .*safari\//i],[s,[n,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[s,[n,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[s,[n,se+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[n,se+" WebView"],s],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[s,[n,"Android "+ae]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[n,s],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[s,[n,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[s,n],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[n,[s,ee,Vt]],[/(webkit|khtml)\/([\w\.]+)/i],[n,s],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[n,"Netscape"],s],[/(wolvic|librewolf)\/([\w\.]+)/i],[n,s],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[s,[n,ce+" 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],[n,[s,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[n,[s,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[E,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[E,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[E,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[E,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[E,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[E,/ower/,u,X]],[/ sun4\w[;\)]/i],[[E,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[E,X]]],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,[i,Q],[r,f]],[/\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,[i,Q],[r,l]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[o,[i,$],[r,l]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[o,[i,$],[r,f]],[/(macintosh);/i],[o,[i,$]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[o,[i,Ze],[r,l]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[o,[i,Qe],[r,f]],[/honor([-\w ]+)[;\)]/i],[o,[i,Qe],[r,l]],[/\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,[i,Ke],[r,f]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[o,[i,Ke],[r,l]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[o,/_/g," "],[i,Ue],[r,f]],[/\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," "],[i,Ue],[r,l]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[o,[i,Re],[r,l]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[o,[i,ee,{OnePlus:["304","403","203"],"*":Re}],[r,f]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[o,[i,"Vivo"],[r,l]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[o,[i,"Realme"],[r,l]],[/\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,[i,Se],[r,l]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[o,[i,Se],[r,f]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[i,de],[r,f]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[o,[i,de],[r,l]],[/(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,[i,Ot],[r,f]],[/(nokia) (t[12][01])/i],[i,o,[r,f]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[o,/_/g," "],[r,l],[i,"Nokia"]],[/(pixel (c|tablet))\b/i],[o,[i,ue],[r,f]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[o,[i,ue],[r,l]],[/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,[i,K],[r,l]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[o,"Xperia Tablet"],[i,K],[r,f]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[o,[i,Xe],[r,l]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[o,[i,ne],[r,f]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[o,/(.+)/g,"Fire Phone $1"],[i,ne],[r,l]],[/(playbook);[-\w\),; ]+(rim)/i],[o,i,[r,f]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[o,[i,Je],[r,l]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[o,[i,Ye],[r,f]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[o,[i,Ye],[r,l]],[/(nexus 9)/i],[o,[i,"HTC"],[r,f]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[i,[o,/_/g," "],[r,l]],[/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,[i,"TCL"],[r,f]],[/(itel) ((\w+))/i],[[i,X],o,[r,ee,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[o,[i,"Acer"],[r,f]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[o,[i,"Meizu"],[r,l]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[o,[i,"Ulefone"],[r,l]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[o,[i,"Energizer"],[r,l]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[o,[i,"Cat"],[r,l]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[o,[i,"Smartfren"],[r,l]],[/droid.+; (a(?:015|06[35]|142p?))/i],[o,[i,"Nothing"],[r,l]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[o,[i,"Archos"],[r,f]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[o,[i,"Archos"],[r,l]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[i,o,[r,f]],[/(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],[i,o,[r,l]],[/(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],[i,o,[r,f]],[/(surface duo)/i],[o,[i,Ae],[r,f]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[o,[i,"Fairphone"],[r,l]],[/(u304aa)/i],[o,[i,"AT&T"],[r,l]],[/\bsie-(\w*)/i],[o,[i,"Siemens"],[r,l]],[/\b(rct\w+) b/i],[o,[i,"RCA"],[r,f]],[/\b(venue[\d ]{2,7}) b/i],[o,[i,"Dell"],[r,f]],[/\b(q(?:mv|ta)\w+) b/i],[o,[i,"Verizon"],[r,f]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[o,[i,"Barnes & Noble"],[r,f]],[/\b(tm\d{3}\w+) b/i],[o,[i,"NuVision"],[r,f]],[/\b(k88) b/i],[o,[i,"ZTE"],[r,f]],[/\b(nx\d{3}j) b/i],[o,[i,"ZTE"],[r,l]],[/\b(gen\d{3}) b.+49h/i],[o,[i,"Swiss"],[r,l]],[/\b(zur\d{3}) b/i],[o,[i,"Swiss"],[r,f]],[/\b((zeki)?tb.*\b) b/i],[o,[i,"Zeki"],[r,f]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[i,"Dragon Touch"],o,[r,f]],[/\b(ns-?\w{0,9}) b/i],[o,[i,"Insignia"],[r,f]],[/\b((nxa|next)-?\w{0,9}) b/i],[o,[i,"NextBook"],[r,f]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[i,"Voice"],o,[r,l]],[/\b(lvtel\-)?(v1[12]) b/i],[[i,"LvTel"],o,[r,l]],[/\b(ph-1) /i],[o,[i,"Essential"],[r,l]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[o,[i,"Envizen"],[r,f]],[/\b(trio[-\w\. ]+) b/i],[o,[i,"MachSpeed"],[r,f]],[/\btu_(1491) b/i],[o,[i,"Rotor"],[r,f]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[o,[i,Ie],[r,f]],[/(sprint) (\w+)/i],[i,o,[r,l]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[i,Ae],[r,l]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[o,[i,Oe],[r,f]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[o,[i,Oe],[r,l]],[/smart-tv.+(samsung)/i],[i,[r,k]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[i,Q],[r,k]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[i,de],[r,k]],[/(apple) ?tv/i],[i,[o,$+" TV"],[r,k]],[/crkey/i],[[o,se+"cast"],[i,ue],[r,k]],[/droid.+aft(\w+)( bui|\))/i],[o,[i,ne],[r,k]],[/(shield \w+ tv)/i],[o,[i,Ie],[r,k]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[o,[i,Ze],[r,k]],[/(bravia[\w ]+)( bui|\))/i],[o,[i,K],[r,k]],[/(mi(tv|box)-?\w+) bui/i],[o,[i,Ue],[r,k]],[/Hbbtv.*(technisat) (.*);/i],[i,o,[r,k]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[i,Le],[o,Le],[r,k]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[o,[r,k]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[r,k]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[i,o,[r,_]],[/droid.+; (shield)( bui|\))/i],[o,[i,Ie],[r,_]],[/(playstation \w+)/i],[o,[i,K],[r,_]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[o,[i,Ae],[r,_]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[o,[i,Q],[r,A]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[i,o,[r,A]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[o,[i,Re],[r,A]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[o,[i,$],[r,A]],[/(opwwe\d{3})/i],[o,[i,Xe],[r,A]],[/(moto 360)/i],[o,[i,Se],[r,A]],[/(smartwatch 3)/i],[o,[i,K],[r,A]],[/(g watch r)/i],[o,[i,de],[r,A]],[/droid.+; (wt63?0{2,3})\)/i],[o,[i,Oe],[r,A]],[/droid.+; (glass) \d/i],[o,[i,ue],[r,A]],[/(pico) (4|neo3(?: link|pro)?)/i],[i,o,[r,A]],[/; (quest( \d| pro)?)/i],[o,[i,et],[r,A]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[i,[r,z]],[/(aeobc)\b/i],[o,[i,ne],[r,z]],[/(homepod).+mac os/i],[o,[i,$],[r,z]],[/windows iot/i],[[r,z]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[o,[r,l]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[o,[r,f]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[r,f]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[r,l]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[o,[i,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[s,[n,Ut+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[n,s],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[s,[n,"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],[n,s],[/ladybird\//i],[[n,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[s,n]],os:[[/microsoft (windows) (vista|xp)/i],[n,s],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[n,[s,ee,nt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[s,ee,nt],[n,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[s,/_/g,"."],[n,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[n,rt],[s,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[s,n],[/(ubuntu) ([\w\.]+) like android/i],[[n,/(.+)/,"$1 Touch"],s],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[n,s],[/\(bb(10);/i],[s,[n,Je]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[s,[n,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[s,[n,ce+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[s,[n,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[s,[n,"watchOS"]],[/crkey\/([\d\.]+)/i],[s,[n,se+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[n,tt],s],[/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],[n,s],[/(sunos) ?([\w\.\d]*)/i],[[n,"Solaris"],s],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[n,s]]},R=function(h,v){if(typeof h===b&&(v=h,h=t),!(this instanceof R))return new R(h,v).getResult();var w=typeof e!==d&&e.navigator?e.navigator:t,P=h||(w&&w.userAgent?w.userAgent:u),V=w&&w.userAgentData?w.userAgentData:t,L=v?Lt(at,v):at,y=w&&w.userAgent==P;return this.getBrowser=function(){var g={};return g[n]=t,g[s]=t,Z.call(g,P,L.browser),g[x]=Bt(g[s]),y&&w&&w.brave&&typeof w.brave.isBrave==m&&(g[n]="Brave"),g},this.getCPU=function(){var g={};return g[E]=t,Z.call(g,P,L.cpu),g},this.getDevice=function(){var g={};return g[i]=t,g[o]=t,g[r]=t,Z.call(g,P,L.device),y&&!g[r]&&V&&V.mobile&&(g[r]=l),y&&g[o]=="Macintosh"&&w&&typeof w.standalone!==d&&w.maxTouchPoints&&w.maxTouchPoints>2&&(g[o]="iPad",g[r]=f),g},this.getEngine=function(){var g={};return g[n]=t,g[s]=t,Z.call(g,P,L.engine),g},this.getOS=function(){var g={};return g[n]=t,g[s]=t,Z.call(g,P,L.os),y&&!g[n]&&V&&V.platform&&V.platform!="Unknown"&&(g[n]=V.platform.replace(/chrome os/i,tt).replace(/macos/i,rt)),g},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 P},this.setUA=function(g){return P=typeof g===p&&g.length>Ce?Le(g,Ce):g,this},this.setUA(P),this};R.VERSION=a,R.BROWSER=le([n,s,x]),R.CPU=le([E]),R.DEVICE=le([o,i,r,_,l,k,f,A,z]),R.ENGINE=R.OS=le([n,s]),typeof re!==d?(typeof he!==d&&he.exports&&(re=he.exports=R),re.UAParser=R):typeof define===m&&define.amd?define(function(){return R}):typeof e!==d&&(e.UAParser=R);var W=typeof e!==d&&(e.jQuery||e.Zepto);if(W&&!W.ua){var pe=new R;W.ua=pe.getResult(),W.ua.get=function(){return pe.getUA()},W.ua.set=function(h){pe.setUA(h);var v=pe.getResult();for(var w in v)W.ua[w]=v[w]}}})(typeof window=="object"?window:re)});import We,{Suspense as Zt,useEffect as At}from"react";import O,{useRef as Ct,useCallback as Qt}from"react";import ct from"react";var we=ct.createContext(null);function be(){let e=ct.useContext(we);if(e===null)throw new Error("useElevateConfig must be used within ElevateProvider");return e}function I(e){return e?e.includes("gid://")&&e.split("/").pop()||e:""}function ut(e){return!e||!e.includes("gid://")?null:e.split("/")[3]||null}function dt(e){return!!e&&e.startsWith("gid://shopify/")}var Me=Nt(lt(),1),pt={"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 C(e){return typeof e!="string"?String(e):e.replace(/[\\"'`\x00-\x1F\x7F]/g,"")}function T(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 ve(e){if(!e)return null;let t=/gid:\/\/shopify\/Cart\/([^?]+(\?.+)?)/,a=e.match(t);return a?a[1]:null}function ye(e){try{return typeof e!="string"?null:decodeURIComponent(e).split("?")[0]}catch{return e||null}}function Ft(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 zt(e){let t={};return e.searchParams.forEach((a,u)=>{t[u]||(t[u]=a)}),t}function Mt(e){return!!e.host&&["http:","https:"].includes(e.protocol)}function qt(e){return e.replace(/^www\./,"")}function jt(e,t,a){if(t&&{Facebook:"Facebook",Instagram:"Instagram"}[t])return t;let c,m;try{if(e&&e.trim()!=="")c=new URL(e);else return"Direct";if(c?.hostname&&Mt(c)){if(m=c.hostname,a&&a===m)return"Direct"}else return""}catch{}if(!m)return"";let d=qt(m);return d?pt[d]?pt[d]:d?.includes("google")?"Google":d:""}function _e(e){let{referrer:t,entryPage:a,userAgent:u}=e,c={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 m;if(a&&a.trim()!==""&&a.startsWith("http"))try{let d=new URL(a),b=d?.pathname;m=d?.hostname,b&&(c.page_entry_path=b??"");let p=zt(d);c.utm_medium=p.utm_medium??"",c.utm_source=p.utm_source??"",c.utm_campaign=p.utm_campaign??"",c.utm_content=p.utm_content??"",c.utm_term=p.utm_term??"",c.gclid=p.gclid??"",c.fbclid=p.fbclid??"",c.pins_campaign_id=p.pins_campaign_id??"",c.epik=p.epik??""}catch{}if(u){let d=(0,Me.UAParser)(u),b=d?.browser?.name,p=Ft(b);c.browser_info=p??"",c.os_info=d?.os?.name??"",u&&(c.device_type=(d?.device?.type||"desktop")?.toUpperCase()??"")}return c.referrer_source=jt(t,c?.browser_info,m)??"",c}catch{return c}}function ke(e,t){let a=e==="/"||e==="",c=t&&/^\/[a-z]{2}(-[a-z]{2})?\/?$/i.test(e);return a||c?"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 Pe(e){if(!e)return"";try{let t=(0,Me.UAParser)(e),a=t?.os,u=t?.device,c="";return a?.name&&(c+=a.name,a.version&&(c+=` ${a.version}`)),u?.type&&(c+=c?` (${u.type})`:u.type),u?.vendor&&(c+=c?` ${u.vendor}`:u.vendor),u?.model&&(c+=c?` ${u.model}`:u.model),c||e}catch{return e}}import{useEffect as hr,useRef as vr,useState as yr}from"react";var Gt="https://bitter-river-9c62.support-67d.workers.dev",$t="https://d339co84ntxcme.cloudfront.net/Prod/orders",S=null;function Y(e){S=e}function D(e){let t=e?.storeId||S?.storeId;return t||(console.warn("[ElevateAB] No storeId provided. Call initAnalytics() first or pass storeId to tracking function."),"")}function Wt(e){return Object.entries(e).filter(([,t])=>typeof t=="string").map(([t,a])=>({test_id:t,variant_id:a}))}function Ht(e,t){return Object.entries(e).filter(([a])=>typeof t[a]=="string").map(([a])=>({test_id:a,variant_id:t[a]}))}function Yt(){return typeof window>"u"?!1:U("eabUserPreview")==="true"||new URLSearchParams(window.location.search).get("eabUserPreview")==="true"}function N(e,t,a){if(typeof window>"u"||Yt())return null;let u=navigator.userAgent,c=window.location.pathname,m=ke(c,a),{referrer:d,entryPage:b}=ge(),p=_e({referrer:d,entryPage:b,userAgent:u}),x=q("ABTL")||{},o=q("ABAU")||{},n=Wt(x),r=Ht(o,x),i=ve(localStorage.getItem("shopifyCartId")),s=new Date().toISOString(),E=sessionStorage.getItem("eabIsFirstVisit")==="true",_=U("localization")||"";return{pixel_event_id:`sh-${fe()}`,shop_name:e,timestamp:s,event_type:t,client_id:U("_shopify_y")||void 0,visitor_id:H(),session_id:me(),cart_token:ye(i||U("cart")),page_url:window.location.href,page_pathname:c,page_search:window.location.search,referrer_url:d,referrer_source:p?.referrer_source,previous_page:document.referrer,page_entry:b,page_entry_path:p?.page_entry_path,page_type:m,utm_medium:p?.utm_medium,utm_source:p?.utm_source,utm_campaign:p?.utm_campaign,utm_content:p?.utm_content,utm_term:p?.utm_term,gclid:p?.gclid,fbclid:p?.fbclid,pins_campaign_id:p?.pins_campaign_id,epik:p?.epik,browser_info:p?.browser_info,os_info:p?.os_info,device_type:p?.device_type,language:navigator.language,root_route:localStorage.getItem("eabRootRoute")||"",user_agent:u,user_agent_no_browser:Pe(u),is_first_visit:E,shopify_country:_,ab_test_assignments:n,ab_test_views:r,is_first_order:null}}async function F(e,t=Gt){try{let a=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),keepalive:!0});if(!a.ok)throw new Error(`Worker error: ${a.status}`)}catch(a){console.error("[ElevateAB] Error sending analytics:",a)}}async function xe(e={}){let t=D(e);if(!t)return;let a=e.hasLocalizedPaths??S?.hasLocalizedPaths,u=e.workerUrl??S?.workerUrl,c=N(t,"page_viewed",a);if(!c)return;let m={...c,cart_currency:e.currency};await F(m,u)}async function Ee(e){let t=D(e);if(!t)return;let{productId:a,productVendor:u,productPrice:c,productSku:m,currency:d}=e,b=e.hasLocalizedPaths??S?.hasLocalizedPaths,p=e.workerUrl??S?.workerUrl,x=N(t,"product_viewed",b);if(!x)return;let o={...x,cart_currency:d,product_id:I(a),product_vendor:C(u),product_price:T(c),product_sku:C(m)};await F(o,p)}async function ft(e){let t=D(e);if(!t)return;let{productId:a,variantId:u,productVendor:c,productPrice:m,productQuantity:d,productSku:b,currency:p,cartId:x}=e,o=e.hasLocalizedPaths??S?.hasLocalizedPaths,n=e.workerUrl??S?.workerUrl,r=e.storefrontAccessToken??S?.storefrontAccessToken,i=N(t,"product_added_to_cart",o);if(!i)return;let s={...i,cart_currency:p,product_id:I(a),variant_id:I(u),product_vendor:C(c),product_price:T(m),product_quantity:d,product_sku:C(b)};if(await F(s,n),x&&r)try{let{updateCartAttributes:E}=await import("./cartAttributes-NW2TWOYC.js");await E(x,{storefrontAccessToken:r})}catch(E){console.error("[ElevateAB] Failed to update cart attributes:",E)}}async function mt(e){let t=D(e);if(!t)return;let{productId:a,variantId:u,productVendor:c,productPrice:m,productQuantity:d,productSku:b,currency:p}=e,x=e.hasLocalizedPaths??S?.hasLocalizedPaths,o=e.workerUrl??S?.workerUrl,n=N(t,"product_removed_from_cart",x);if(!n)return;let r={...n,cart_currency:p,product_id:I(a),variant_id:I(u),product_vendor:C(c),product_price:T(m),product_quantity:d,product_sku:C(b)};await F(r,o)}async function gt(e){let t=D(e);if(!t)return;let{cartTotalPrice:a,cartTotalQuantity:u,cartItems:c,currency:m}=e,d=e.hasLocalizedPaths??S?.hasLocalizedPaths,b=e.workerUrl??S?.workerUrl,p=N(t,"cart_viewed",d);if(!p)return;let x={...p,cart_currency:m,cart_total_price:T(a),cart_total_quantity:u,cart_items:c?.map(o=>({product_id:I(o.productId),variant_id:I(o.variantId),product_vendor:C(o.productVendor)||"",product_price:T(o.productPrice),product_quantity:o.productQuantity??null,product_sku:C(o.productSku)||""}))};await F(x,b)}async function wt(e){let t=D(e);if(!t)return;let{searchQuery:a,currency:u}=e,c=e.hasLocalizedPaths??S?.hasLocalizedPaths,m=e.workerUrl??S?.workerUrl,d=N(t,"search_submitted",c);if(!d)return;let b={...d,cart_currency:u,search_query:C(a)};await F(b,m)}async function bt(e){let t=D(e);if(!t)return;let{cartTotalPrice:a,cartSubtotalPrice:u,cartShippingPrice:c,cartTaxAmount:m,cartDiscountAmount:d,customerId:b,cartItems:p,currency:x}=e,o=e.hasLocalizedPaths??S?.hasLocalizedPaths,n=e.workerUrl??S?.workerUrl,r=N(t,"checkout_started",o);if(!r)return;let i=0,s=p?.map(_=>{let l=_.productQuantity??0;return i+=l,{product_id:I(_.productId),variant_id:I(_.variantId),product_vendor:C(_.productVendor)||"",vendor:C(_.productVendor)||"",product_price:T(_.productPrice),total_price:T(_.productPrice),product_quantity:l,quantity:l,product_sku:C(_.productSku)||"",sku:C(_.productSku)||"",total_discount:T(_.totalDiscount)}})||[],E={...r,cart_currency:x,cart_total_price:T(a),cart_subtotal_price:T(u),cart_total_quantity:i,cart_shipping_price:T(c),cart_tax_amount:T(m),cart_discount_amount:T(d),cart_items:s,customer_id:b};await F(E,n)}async function ht(e){let t=D(e);if(!t)return;let{orderId:a,cartTotalPrice:u,cartSubtotalPrice:c,cartShippingPrice:m,cartTaxAmount:d,cartDiscountAmount:b,customerId:p,isFirstOrder:x,noteAttributes:o,cartItems:n,currency:r}=e,i=e.hasLocalizedPaths??S?.hasLocalizedPaths,s=e.ordersWorkerUrl??S?.ordersWorkerUrl??$t,E=N(t,"checkout_completed",i);if(!E)return;let _=0,l=n?.map(k=>{let A=k.productQuantity??0;return _+=A,{product_id:I(k.productId),variant_id:I(k.variantId),product_vendor:C(k.productVendor)||"",vendor:C(k.productVendor)||"",product_price:T(k.productPrice),total_price:T(k.productPrice),product_quantity:A,quantity:A,product_sku:C(k.productSku)||"",sku:C(k.productSku)||"",total_discount:T(k.totalDiscount)}})||[],f={...E,cart_currency:r,cart_total_price:T(u),cart_subtotal_price:T(c),cart_total_quantity:_,cart_shipping_price:T(m),cart_tax_amount:T(d),cart_discount_amount:T(b),cart_items:l,order_id:a,customer_id:p,is_first_order:x??null,note_attributes:o};await F(f,s)}function Jt(e){let t={},a={};if(!e)return{assignments:t,views:a};let u=e.split("~");for(let c of u){let m=c.split("_");if(m.length>=2){let d=m[0],b=m[1],p=m[2]==="1";t[d]=b,a[d]=p}}return{assignments:t,views:a}}function oe(){if(typeof window>"u")return{isPreview:!1,previewTestId:null,forcedAssignments:{},previewedViews:{}};let e=new URLSearchParams(window.location.search),a=(e.get("eabUserPreview")||U("eabUserPreview"))==="true",u=e.get("abtid");u||(u=De("eabPreviewTestId"));let c=e.get("eab_tests")||"",{assignments:m,views:d}=Jt(c);return e.has("eabUserPreview")&&M("eabUserPreview","true"),e.has("abtid")&&u&&te("eabPreviewTestId",u),{isPreview:a,previewTestId:u,forcedAssignments:m,previewedViews:d}}function vt(){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 yt(){return oe().isPreview}var Te={SHOPIFY_LOCALIZATION:"localization",EAB_COUNTRY:"eabCountryCode",EAB_GEO:"eabGeoLocation"};function j(){if(typeof window>"u")return null;let t=new URLSearchParams(window.location.search).get("country");if(t)return M(Te.EAB_COUNTRY,t.toUpperCase()),t.toUpperCase();let a=U(Te.SHOPIFY_LOCALIZATION);if(a)return a.toUpperCase();let u=U(Te.EAB_COUNTRY);if(u)return u.toUpperCase();if(typeof localStorage<"u"){let c=localStorage.getItem(Te.EAB_COUNTRY);if(c)return c.toUpperCase()}return null}function _t(e,t){let a=t??j();return a?e.map(c=>c.toUpperCase()).includes(a.toUpperCase()):!1}function kt(e,t){let a=t??j();return a?e.map(c=>c.toUpperCase()).includes(a.toUpperCase()):!1}function Pt(e){let t=j();return!e.includeCountries?.length&&!e.excludeCountries?.length?!0:!t||e.excludeCountries?.length&&kt(e.excludeCountries,t)?!1:e.includeCountries?.length?_t(e.includeCountries,t):!0}var G="eab-prevent-flicker",qe="eab-flicker-styles";function xt(e=3e3){if(typeof document>"u"||document.getElementById(qe))return;let t=document.createElement("style");t.id=qe,t.textContent=`
2
+ import{a as Nt,b as Ft,c as Ve,d as fe,e as M,f as U,g as q,h as te,i as De,j as Ne,k as W,l as me,m as ge,n as Fe,o as ze}from"./chunk-4D5I75NE.js";var pt=Nt((re,he)=>{"use strict";(function(e,t){"use strict";var a="1.0.41",u="",c="?",m="function",d="undefined",b="object",p="string",x="major",o="model",n="name",r="type",i="vendor",s="version",E="architecture",_="console",l="mobile",f="tablet",k="smarttv",C="wearable",z="embedded",Ae=500,ne="Amazon",j="Apple",Je="ASUS",Qe="BlackBerry",ae="Browser",se="Chrome",Lt="Edge",ce="Firefox",ue="Google",Ke="Honor",Xe="Huawei",Ot="Lenovo",de="LG",Ce="Microsoft",Se="Motorola",Ie="Nvidia",Ze="OnePlus",J="Opera",Re="OPPO",Q="Samsung",et="Sharp",K="Sony",Ue="Xiaomi",Le="Zebra",tt="Facebook",rt="Chromium OS",ot="Mac OS",it=" Browser",Bt=function(h,v){var w={};for(var P in h)v[P]&&v[P].length%2===0?w[P]=v[P].concat(h[P]):w[P]=h[P];return w},le=function(h){for(var v={},w=0;w<h.length;w++)v[h[w].toUpperCase()]=h[w];return v},nt=function(h,v){return typeof h===p?X(v).indexOf(X(h))!==-1:!1},X=function(h){return h.toLowerCase()},Vt=function(h){return typeof h===p?h.replace(/[^\d\.]/g,u).split(".")[0]:t},Oe=function(h,v){if(typeof h===p)return h=h.replace(/^\s\s*/,u),typeof v===d?h:h.substring(0,Ae)},Z=function(h,v){for(var w=0,P,V,L,y,g,O;w<v.length&&!g;){var Be=v[w],ct=v[w+1];for(P=V=0;P<Be.length&&!g&&Be[P];)if(g=Be[P++].exec(h),g)for(L=0;L<ct.length;L++)O=g[++V],y=ct[L],typeof y===b&&y.length>0?y.length===2?typeof y[1]==m?this[y[0]]=y[1].call(this,O):this[y[0]]=y[1]:y.length===3?typeof y[1]===m&&!(y[1].exec&&y[1].test)?this[y[0]]=O?y[1].call(this,O,y[2]):t:this[y[0]]=O?O.replace(y[1],y[2]):t:y.length===4&&(this[y[0]]=O?y[3].call(this,O.replace(y[1],y[2])):t):this[y]=O||t;w+=2}},ee=function(h,v){for(var w in v)if(typeof v[w]===b&&v[w].length>0){for(var P=0;P<v[w].length;P++)if(nt(v[w][P],h))return w===c?t:w}else if(nt(v[w],h))return w===c?t:w;return v.hasOwnProperty("*")?v["*"]:h},Dt={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},at={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"},st={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[s,[n,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[s,[n,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[n,s],[/opios[\/ ]+([\w\.]+)/i],[s,[n,J+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[s,[n,J+" GX"]],[/\bopr\/([\w\.]+)/i],[s,[n,J]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[s,[n,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[s,[n,"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],[n,s],[/quark(?:pc)?\/([-\w\.]+)/i],[s,[n,"Quark"]],[/\bddg\/([\w\.]+)/i],[s,[n,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[s,[n,"UC"+ae]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[s,[n,"WeChat"]],[/konqueror\/([\w\.]+)/i],[s,[n,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[s,[n,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[s,[n,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[s,[n,"Smart Lenovo "+ae]],[/(avast|avg)\/([\w\.]+)/i],[[n,/(.+)/,"$1 Secure "+ae],s],[/\bfocus\/([\w\.]+)/i],[s,[n,ce+" Focus"]],[/\bopt\/([\w\.]+)/i],[s,[n,J+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[s,[n,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[s,[n,"Dolphin"]],[/coast\/([\w\.]+)/i],[s,[n,J+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[s,[n,"MIUI"+it]],[/fxios\/([\w\.-]+)/i],[s,[n,ce]],[/\bqihoobrowser\/?([\w\.]*)/i],[s,[n,"360"]],[/\b(qq)\/([\w\.]+)/i],[[n,/(.+)/,"$1Browser"],s],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[n,/(.+)/,"$1"+it],s],[/samsungbrowser\/([\w\.]+)/i],[s,[n,Q+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[s,[n,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[n,"Sogou Mobile"],s],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[n,s],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[n],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[s,n],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[n,tt],s],[/(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],[n,s],[/\bgsa\/([\w\.]+) .*safari\//i],[s,[n,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[s,[n,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[s,[n,se+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[n,se+" WebView"],s],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[s,[n,"Android "+ae]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[n,s],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[s,[n,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[s,n],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[n,[s,ee,Dt]],[/(webkit|khtml)\/([\w\.]+)/i],[n,s],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[n,"Netscape"],s],[/(wolvic|librewolf)\/([\w\.]+)/i],[n,s],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[s,[n,ce+" 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],[n,[s,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[n,[s,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[E,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[E,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[E,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[E,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[E,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[E,/ower/,u,X]],[/ sun4\w[;\)]/i],[[E,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[E,X]]],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,[i,Q],[r,f]],[/\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,[i,Q],[r,l]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[o,[i,j],[r,l]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[o,[i,j],[r,f]],[/(macintosh);/i],[o,[i,j]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[o,[i,et],[r,l]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[o,[i,Ke],[r,f]],[/honor([-\w ]+)[;\)]/i],[o,[i,Ke],[r,l]],[/\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,[i,Xe],[r,f]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[o,[i,Xe],[r,l]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[o,/_/g," "],[i,Ue],[r,f]],[/\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," "],[i,Ue],[r,l]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[o,[i,Re],[r,l]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[o,[i,ee,{OnePlus:["304","403","203"],"*":Re}],[r,f]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[o,[i,"Vivo"],[r,l]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[o,[i,"Realme"],[r,l]],[/\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,[i,Se],[r,l]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[o,[i,Se],[r,f]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[i,de],[r,f]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[o,[i,de],[r,l]],[/(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,[i,Ot],[r,f]],[/(nokia) (t[12][01])/i],[i,o,[r,f]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[o,/_/g," "],[r,l],[i,"Nokia"]],[/(pixel (c|tablet))\b/i],[o,[i,ue],[r,f]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[o,[i,ue],[r,l]],[/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,[i,K],[r,l]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[o,"Xperia Tablet"],[i,K],[r,f]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[o,[i,Ze],[r,l]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[o,[i,ne],[r,f]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[o,/(.+)/g,"Fire Phone $1"],[i,ne],[r,l]],[/(playbook);[-\w\),; ]+(rim)/i],[o,i,[r,f]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[o,[i,Qe],[r,l]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[o,[i,Je],[r,f]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[o,[i,Je],[r,l]],[/(nexus 9)/i],[o,[i,"HTC"],[r,f]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[i,[o,/_/g," "],[r,l]],[/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,[i,"TCL"],[r,f]],[/(itel) ((\w+))/i],[[i,X],o,[r,ee,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[o,[i,"Acer"],[r,f]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[o,[i,"Meizu"],[r,l]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[o,[i,"Ulefone"],[r,l]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[o,[i,"Energizer"],[r,l]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[o,[i,"Cat"],[r,l]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[o,[i,"Smartfren"],[r,l]],[/droid.+; (a(?:015|06[35]|142p?))/i],[o,[i,"Nothing"],[r,l]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[o,[i,"Archos"],[r,f]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[o,[i,"Archos"],[r,l]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[i,o,[r,f]],[/(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],[i,o,[r,l]],[/(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],[i,o,[r,f]],[/(surface duo)/i],[o,[i,Ce],[r,f]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[o,[i,"Fairphone"],[r,l]],[/(u304aa)/i],[o,[i,"AT&T"],[r,l]],[/\bsie-(\w*)/i],[o,[i,"Siemens"],[r,l]],[/\b(rct\w+) b/i],[o,[i,"RCA"],[r,f]],[/\b(venue[\d ]{2,7}) b/i],[o,[i,"Dell"],[r,f]],[/\b(q(?:mv|ta)\w+) b/i],[o,[i,"Verizon"],[r,f]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[o,[i,"Barnes & Noble"],[r,f]],[/\b(tm\d{3}\w+) b/i],[o,[i,"NuVision"],[r,f]],[/\b(k88) b/i],[o,[i,"ZTE"],[r,f]],[/\b(nx\d{3}j) b/i],[o,[i,"ZTE"],[r,l]],[/\b(gen\d{3}) b.+49h/i],[o,[i,"Swiss"],[r,l]],[/\b(zur\d{3}) b/i],[o,[i,"Swiss"],[r,f]],[/\b((zeki)?tb.*\b) b/i],[o,[i,"Zeki"],[r,f]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[i,"Dragon Touch"],o,[r,f]],[/\b(ns-?\w{0,9}) b/i],[o,[i,"Insignia"],[r,f]],[/\b((nxa|next)-?\w{0,9}) b/i],[o,[i,"NextBook"],[r,f]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[i,"Voice"],o,[r,l]],[/\b(lvtel\-)?(v1[12]) b/i],[[i,"LvTel"],o,[r,l]],[/\b(ph-1) /i],[o,[i,"Essential"],[r,l]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[o,[i,"Envizen"],[r,f]],[/\b(trio[-\w\. ]+) b/i],[o,[i,"MachSpeed"],[r,f]],[/\btu_(1491) b/i],[o,[i,"Rotor"],[r,f]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[o,[i,Ie],[r,f]],[/(sprint) (\w+)/i],[i,o,[r,l]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[i,Ce],[r,l]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[o,[i,Le],[r,f]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[o,[i,Le],[r,l]],[/smart-tv.+(samsung)/i],[i,[r,k]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[i,Q],[r,k]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[i,de],[r,k]],[/(apple) ?tv/i],[i,[o,j+" TV"],[r,k]],[/crkey/i],[[o,se+"cast"],[i,ue],[r,k]],[/droid.+aft(\w+)( bui|\))/i],[o,[i,ne],[r,k]],[/(shield \w+ tv)/i],[o,[i,Ie],[r,k]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[o,[i,et],[r,k]],[/(bravia[\w ]+)( bui|\))/i],[o,[i,K],[r,k]],[/(mi(tv|box)-?\w+) bui/i],[o,[i,Ue],[r,k]],[/Hbbtv.*(technisat) (.*);/i],[i,o,[r,k]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[i,Oe],[o,Oe],[r,k]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[o,[r,k]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[r,k]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[i,o,[r,_]],[/droid.+; (shield)( bui|\))/i],[o,[i,Ie],[r,_]],[/(playstation \w+)/i],[o,[i,K],[r,_]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[o,[i,Ce],[r,_]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[o,[i,Q],[r,C]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[i,o,[r,C]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[o,[i,Re],[r,C]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[o,[i,j],[r,C]],[/(opwwe\d{3})/i],[o,[i,Ze],[r,C]],[/(moto 360)/i],[o,[i,Se],[r,C]],[/(smartwatch 3)/i],[o,[i,K],[r,C]],[/(g watch r)/i],[o,[i,de],[r,C]],[/droid.+; (wt63?0{2,3})\)/i],[o,[i,Le],[r,C]],[/droid.+; (glass) \d/i],[o,[i,ue],[r,C]],[/(pico) (4|neo3(?: link|pro)?)/i],[i,o,[r,C]],[/; (quest( \d| pro)?)/i],[o,[i,tt],[r,C]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[i,[r,z]],[/(aeobc)\b/i],[o,[i,ne],[r,z]],[/(homepod).+mac os/i],[o,[i,j],[r,z]],[/windows iot/i],[[r,z]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[o,[r,l]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[o,[r,f]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[r,f]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[r,l]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[o,[i,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[s,[n,Lt+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[n,s],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[s,[n,"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],[n,s],[/ladybird\//i],[[n,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[s,n]],os:[[/microsoft (windows) (vista|xp)/i],[n,s],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[n,[s,ee,at]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[s,ee,at],[n,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[s,/_/g,"."],[n,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[n,ot],[s,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[s,n],[/(ubuntu) ([\w\.]+) like android/i],[[n,/(.+)/,"$1 Touch"],s],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[n,s],[/\(bb(10);/i],[s,[n,Qe]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[s,[n,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[s,[n,ce+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[s,[n,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[s,[n,"watchOS"]],[/crkey\/([\d\.]+)/i],[s,[n,se+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[n,rt],s],[/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],[n,s],[/(sunos) ?([\w\.\d]*)/i],[[n,"Solaris"],s],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[n,s]]},R=function(h,v){if(typeof h===b&&(v=h,h=t),!(this instanceof R))return new R(h,v).getResult();var w=typeof e!==d&&e.navigator?e.navigator:t,P=h||(w&&w.userAgent?w.userAgent:u),V=w&&w.userAgentData?w.userAgentData:t,L=v?Bt(st,v):st,y=w&&w.userAgent==P;return this.getBrowser=function(){var g={};return g[n]=t,g[s]=t,Z.call(g,P,L.browser),g[x]=Vt(g[s]),y&&w&&w.brave&&typeof w.brave.isBrave==m&&(g[n]="Brave"),g},this.getCPU=function(){var g={};return g[E]=t,Z.call(g,P,L.cpu),g},this.getDevice=function(){var g={};return g[i]=t,g[o]=t,g[r]=t,Z.call(g,P,L.device),y&&!g[r]&&V&&V.mobile&&(g[r]=l),y&&g[o]=="Macintosh"&&w&&typeof w.standalone!==d&&w.maxTouchPoints&&w.maxTouchPoints>2&&(g[o]="iPad",g[r]=f),g},this.getEngine=function(){var g={};return g[n]=t,g[s]=t,Z.call(g,P,L.engine),g},this.getOS=function(){var g={};return g[n]=t,g[s]=t,Z.call(g,P,L.os),y&&!g[n]&&V&&V.platform&&V.platform!="Unknown"&&(g[n]=V.platform.replace(/chrome os/i,rt).replace(/macos/i,ot)),g},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 P},this.setUA=function(g){return P=typeof g===p&&g.length>Ae?Oe(g,Ae):g,this},this.setUA(P),this};R.VERSION=a,R.BROWSER=le([n,s,x]),R.CPU=le([E]),R.DEVICE=le([o,i,r,_,l,k,f,C,z]),R.ENGINE=R.OS=le([n,s]),typeof re!==d?(typeof he!==d&&he.exports&&(re=he.exports=R),re.UAParser=R):typeof define===m&&define.amd?define(function(){return R}):typeof e!==d&&(e.UAParser=R);var H=typeof e!==d&&(e.jQuery||e.Zepto);if(H&&!H.ua){var pe=new R;H.ua=pe.getResult(),H.ua.get=function(){return pe.getUA()},H.ua.set=function(h){pe.setUA(h);var v=pe.getResult();for(var w in v)H.ua[w]=v[w]}}})(typeof window=="object"?window:re)});import{Suspense as tr,useEffect as St}from"react";import B,{useRef as At,useCallback as Kt}from"react";import ut from"react";var we=ut.createContext(null);function be(){let e=ut.useContext(we);if(e===null)throw new Error("useElevateConfig must be used within ElevateProvider");return e}function I(e){return e?e.includes("gid://")&&e.split("/").pop()||e:""}function dt(e){return!e||!e.includes("gid://")?null:e.split("/")[3]||null}function lt(e){return!!e&&e.startsWith("gid://shopify/")}var Me=Ft(pt(),1),ft={"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 A(e){return typeof e!="string"?String(e):e.replace(/[\\"'`\x00-\x1F\x7F]/g,"")}function T(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 ve(e){if(!e)return null;let t=/gid:\/\/shopify\/Cart\/([^?]+(\?.+)?)/,a=e.match(t);return a?a[1]:null}function ye(e){try{return typeof e!="string"?null:decodeURIComponent(e).split("?")[0]}catch{return e||null}}function zt(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 Mt(e){let t={};return e.searchParams.forEach((a,u)=>{t[u]||(t[u]=a)}),t}function qt(e){return!!e.host&&["http:","https:"].includes(e.protocol)}function $t(e){return e.replace(/^www\./,"")}function Gt(e,t,a){if(t&&{Facebook:"Facebook",Instagram:"Instagram"}[t])return t;let c,m;try{if(e&&e.trim()!=="")c=new URL(e);else return"Direct";if(c?.hostname&&qt(c)){if(m=c.hostname,a&&a===m)return"Direct"}else return""}catch{}if(!m)return"";let d=$t(m);return d?ft[d]?ft[d]:d?.includes("google")?"Google":d:""}function _e(e){let{referrer:t,entryPage:a,userAgent:u}=e,c={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 m;if(a&&a.trim()!==""&&a.startsWith("http"))try{let d=new URL(a),b=d?.pathname;m=d?.hostname,b&&(c.page_entry_path=b??"");let p=Mt(d);c.utm_medium=p.utm_medium??"",c.utm_source=p.utm_source??"",c.utm_campaign=p.utm_campaign??"",c.utm_content=p.utm_content??"",c.utm_term=p.utm_term??"",c.gclid=p.gclid??"",c.fbclid=p.fbclid??"",c.pins_campaign_id=p.pins_campaign_id??"",c.epik=p.epik??""}catch{}if(u){let d=(0,Me.UAParser)(u),b=d?.browser?.name,p=zt(b);c.browser_info=p??"",c.os_info=d?.os?.name??"",u&&(c.device_type=(d?.device?.type||"desktop")?.toUpperCase()??"")}return c.referrer_source=Gt(t,c?.browser_info,m)??"",c}catch{return c}}function ke(e,t){let a=e==="/"||e==="",c=t&&/^\/[a-z]{2}(-[a-z]{2})?\/?$/i.test(e);return a||c?"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 Pe(e){if(!e)return"";try{let t=(0,Me.UAParser)(e),a=t?.os,u=t?.device,c="";return a?.name&&(c+=a.name,a.version&&(c+=` ${a.version}`)),u?.type&&(c+=c?` (${u.type})`:u.type),u?.vendor&&(c+=c?` ${u.vendor}`:u.vendor),u?.model&&(c+=c?` ${u.model}`:u.model),c||e}catch{return e}}import{useEffect as Er,useRef as Tr,useState as Ar}from"react";var jt="https://bitter-river-9c62.support-67d.workers.dev",Ht="https://d339co84ntxcme.cloudfront.net/Prod/orders",S=null;function Y(e){S=e}function D(e){let t=e?.storeId||S?.storeId;return t||(console.warn("[ElevateAB] No storeId provided. Call initAnalytics() first or pass storeId to tracking function."),"")}function Wt(e){return Object.entries(e).filter(([,t])=>typeof t=="string").map(([t,a])=>({test_id:t,variant_id:a}))}function Yt(e,t){return Object.entries(e).filter(([a])=>typeof t[a]=="string").map(([a])=>({test_id:a,variant_id:t[a]}))}function Jt(){return typeof window>"u"?!1:U("eabUserPreview")==="true"||new URLSearchParams(window.location.search).get("eabUserPreview")==="true"}function N(e,t,a){if(typeof window>"u"||Jt())return null;let u=navigator.userAgent,c=window.location.pathname,m=ke(c,a),{referrer:d,entryPage:b}=ge(),p=_e({referrer:d,entryPage:b,userAgent:u}),x=q("ABTL")||{},o=q("ABAU")||{},n=Wt(x),r=Yt(o,x),i=ve(localStorage.getItem("shopifyCartId")),s=new Date().toISOString(),E=sessionStorage.getItem("eabIsFirstVisit")==="true",_=U("localization")||"";return{pixel_event_id:`sh-${fe()}`,shop_name:e,timestamp:s,event_type:t,client_id:U("_shopify_y")||void 0,visitor_id:W(),session_id:me(),cart_token:ye(i||U("cart")),page_url:window.location.href,page_pathname:c,page_search:window.location.search,referrer_url:d,referrer_source:p?.referrer_source,previous_page:document.referrer,page_entry:b,page_entry_path:p?.page_entry_path,page_type:m,utm_medium:p?.utm_medium,utm_source:p?.utm_source,utm_campaign:p?.utm_campaign,utm_content:p?.utm_content,utm_term:p?.utm_term,gclid:p?.gclid,fbclid:p?.fbclid,pins_campaign_id:p?.pins_campaign_id,epik:p?.epik,browser_info:p?.browser_info,os_info:p?.os_info,device_type:p?.device_type,language:navigator.language,root_route:localStorage.getItem("eabRootRoute")||"",user_agent:u,user_agent_no_browser:Pe(u),is_first_visit:E,shopify_country:_,ab_test_assignments:n,ab_test_views:r,is_first_order:null}}async function F(e,t=jt){try{let a=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),keepalive:!0});if(!a.ok)throw new Error(`Worker error: ${a.status}`)}catch(a){console.error("[ElevateAB] Error sending analytics:",a)}}async function xe(e={}){let t=D(e);if(!t)return;let a=e.hasLocalizedPaths??S?.hasLocalizedPaths,u=e.workerUrl??S?.workerUrl,c=N(t,"page_viewed",a);if(!c)return;let m={...c,cart_currency:e.currency};await F(m,u)}async function Ee(e){let t=D(e);if(!t)return;let{productId:a,productVendor:u,productPrice:c,productSku:m,currency:d}=e,b=e.hasLocalizedPaths??S?.hasLocalizedPaths,p=e.workerUrl??S?.workerUrl,x=N(t,"product_viewed",b);if(!x)return;let o={...x,cart_currency:d,product_id:I(a),product_vendor:A(u),product_price:T(c),product_sku:A(m)};await F(o,p)}async function mt(e){let t=D(e);if(!t)return;let{productId:a,variantId:u,productVendor:c,productPrice:m,productQuantity:d,productSku:b,currency:p,cartId:x}=e,o=e.hasLocalizedPaths??S?.hasLocalizedPaths,n=e.workerUrl??S?.workerUrl,r=e.storefrontAccessToken??S?.storefrontAccessToken,i=N(t,"product_added_to_cart",o);if(!i)return;let s={...i,cart_currency:p,product_id:I(a),variant_id:I(u),product_vendor:A(c),product_price:T(m),product_quantity:d,product_sku:A(b)};if(await F(s,n),x&&r)try{let{updateCartAttributes:E}=await import("./cartAttributes-NW2TWOYC.js");await E(x,{storefrontAccessToken:r})}catch(E){console.error("[ElevateAB] Failed to update cart attributes:",E)}}async function gt(e){let t=D(e);if(!t)return;let{productId:a,variantId:u,productVendor:c,productPrice:m,productQuantity:d,productSku:b,currency:p}=e,x=e.hasLocalizedPaths??S?.hasLocalizedPaths,o=e.workerUrl??S?.workerUrl,n=N(t,"product_removed_from_cart",x);if(!n)return;let r={...n,cart_currency:p,product_id:I(a),variant_id:I(u),product_vendor:A(c),product_price:T(m),product_quantity:d,product_sku:A(b)};await F(r,o)}async function wt(e){let t=D(e);if(!t)return;let{cartTotalPrice:a,cartTotalQuantity:u,cartItems:c,currency:m}=e,d=e.hasLocalizedPaths??S?.hasLocalizedPaths,b=e.workerUrl??S?.workerUrl,p=N(t,"cart_viewed",d);if(!p)return;let x={...p,cart_currency:m,cart_total_price:T(a),cart_total_quantity:u,cart_items:c?.map(o=>({product_id:I(o.productId),variant_id:I(o.variantId),product_vendor:A(o.productVendor)||"",product_price:T(o.productPrice),product_quantity:o.productQuantity??null,product_sku:A(o.productSku)||""}))};await F(x,b)}async function bt(e){let t=D(e);if(!t)return;let{searchQuery:a,currency:u}=e,c=e.hasLocalizedPaths??S?.hasLocalizedPaths,m=e.workerUrl??S?.workerUrl,d=N(t,"search_submitted",c);if(!d)return;let b={...d,cart_currency:u,search_query:A(a)};await F(b,m)}async function ht(e){let t=D(e);if(!t)return;let{cartTotalPrice:a,cartSubtotalPrice:u,cartShippingPrice:c,cartTaxAmount:m,cartDiscountAmount:d,customerId:b,cartItems:p,currency:x}=e,o=e.hasLocalizedPaths??S?.hasLocalizedPaths,n=e.workerUrl??S?.workerUrl,r=N(t,"checkout_started",o);if(!r)return;let i=0,s=p?.map(_=>{let l=_.productQuantity??0;return i+=l,{product_id:I(_.productId),variant_id:I(_.variantId),product_vendor:A(_.productVendor)||"",vendor:A(_.productVendor)||"",product_price:T(_.productPrice),total_price:T(_.productPrice),product_quantity:l,quantity:l,product_sku:A(_.productSku)||"",sku:A(_.productSku)||"",total_discount:T(_.totalDiscount)}})||[],E={...r,cart_currency:x,cart_total_price:T(a),cart_subtotal_price:T(u),cart_total_quantity:i,cart_shipping_price:T(c),cart_tax_amount:T(m),cart_discount_amount:T(d),cart_items:s,customer_id:b};await F(E,n)}async function vt(e){let t=D(e);if(!t)return;let{orderId:a,cartTotalPrice:u,cartSubtotalPrice:c,cartShippingPrice:m,cartTaxAmount:d,cartDiscountAmount:b,customerId:p,isFirstOrder:x,noteAttributes:o,cartItems:n,currency:r}=e,i=e.hasLocalizedPaths??S?.hasLocalizedPaths,s=e.ordersWorkerUrl??S?.ordersWorkerUrl??Ht,E=N(t,"checkout_completed",i);if(!E)return;let _=0,l=n?.map(k=>{let C=k.productQuantity??0;return _+=C,{product_id:I(k.productId),variant_id:I(k.variantId),product_vendor:A(k.productVendor)||"",vendor:A(k.productVendor)||"",product_price:T(k.productPrice),total_price:T(k.productPrice),product_quantity:C,quantity:C,product_sku:A(k.productSku)||"",sku:A(k.productSku)||"",total_discount:T(k.totalDiscount)}})||[],f={...E,cart_currency:r,cart_total_price:T(u),cart_subtotal_price:T(c),cart_total_quantity:_,cart_shipping_price:T(m),cart_tax_amount:T(d),cart_discount_amount:T(b),cart_items:l,order_id:a,customer_id:p,is_first_order:x??null,note_attributes:o};await F(f,s)}function Qt(e){let t={},a={};if(!e)return{assignments:t,views:a};let u=e.split("~");for(let c of u){let m=c.split("_");if(m.length>=2){let d=m[0],b=m[1],p=m[2]==="1";t[d]=b,a[d]=p}}return{assignments:t,views:a}}function oe(){if(typeof window>"u")return{isPreview:!1,previewTestId:null,forcedAssignments:{},previewedViews:{}};let e=new URLSearchParams(window.location.search),a=(e.get("eabUserPreview")||U("eabUserPreview"))==="true",u=e.get("abtid");u||(u=De("eabPreviewTestId"));let c=e.get("eab_tests")||"",{assignments:m,views:d}=Qt(c);return e.has("eabUserPreview")&&M("eabUserPreview","true"),e.has("abtid")&&u&&te("eabPreviewTestId",u),{isPreview:a,previewTestId:u,forcedAssignments:m,previewedViews:d}}function yt(){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 _t(){return oe().isPreview}var Te={SHOPIFY_LOCALIZATION:"localization",EAB_COUNTRY:"eabCountryCode",EAB_GEO:"eabGeoLocation"};function $(){if(typeof window>"u")return null;let t=new URLSearchParams(window.location.search).get("country");if(t)return M(Te.EAB_COUNTRY,t.toUpperCase()),t.toUpperCase();let a=U(Te.SHOPIFY_LOCALIZATION);if(a)return a.toUpperCase();let u=U(Te.EAB_COUNTRY);if(u)return u.toUpperCase();if(typeof localStorage<"u"){let c=localStorage.getItem(Te.EAB_COUNTRY);if(c)return c.toUpperCase()}return null}function kt(e,t){let a=t??$();return a?e.map(c=>c.toUpperCase()).includes(a.toUpperCase()):!1}function Pt(e,t){let a=t??$();return a?e.map(c=>c.toUpperCase()).includes(a.toUpperCase()):!1}function xt(e){let t=$();return!e.includeCountries?.length&&!e.excludeCountries?.length?!0:!t||e.excludeCountries?.length&&Pt(e.excludeCountries,t)?!1:e.includeCountries?.length?kt(e.includeCountries,t):!0}var G="eab-prevent-flicker",qe="eab-flicker-styles";function Et(e=3e3){if(typeof document>"u"||document.getElementById(qe))return;let t=document.createElement("style");t.id=qe,t.textContent=`
3
3
  /* Elevate AB - Flicker Prevention */
4
4
  .${G} {
5
5
  opacity: 0 !important;
@@ -14,7 +14,7 @@ import{a as Dt,b as Nt,c as Ve,d as fe,e as M,f as U,g as q,h as te,i as De,j as
14
14
  .${G} {
15
15
  animation: eab-reveal 0s ${e}ms forwards;
16
16
  }
17
- `;let a=document.head||document.getElementsByTagName("head")[0];a.insertBefore(t,a.firstChild)}function Et(e="body"){if(typeof document>"u")return;let t=document.querySelector(e);t&&t.classList.add(G)}function je(e="body"){if(typeof document>"u")return;let t=document.querySelector(e);t&&t.classList.remove(G)}function Ge(e="body",t=3e3){if(typeof document>"u")return()=>{};xt(t),Et(e);let a=!1,u=setTimeout(()=>{a||(console.warn(`[ElevateAB] Flicker prevention timeout (${t}ms) reached. Revealing content. Check if test assignment is completing.`),je(e),a=!0)},t);return()=>{a||(clearTimeout(u),je(e),a=!0)}}function Tt(e=3e3){return`
17
+ `;let a=document.head||document.getElementsByTagName("head")[0];a.insertBefore(t,a.firstChild)}function Tt(e="body"){if(typeof document>"u")return;let t=document.querySelector(e);t&&t.classList.add(G)}function $e(e="body"){if(typeof document>"u")return;let t=document.querySelector(e);t&&t.classList.remove(G)}function Ge(e="body",t=3e3){if(typeof document>"u")return()=>{};Et(t),Tt(e);let a=!1,u=setTimeout(()=>{a||(console.warn(`[ElevateAB] Flicker prevention timeout (${t}ms) reached. Revealing content. Check if test assignment is completing.`),$e(e),a=!0)},t);return()=>{a||(clearTimeout(u),$e(e),a=!0)}}function je(e=3e3){return`
18
18
  (function() {
19
19
  var style = document.createElement('style');
20
20
  style.id = '${qe}';
@@ -22,5 +22,13 @@ import{a as Dt,b as Nt,c as Ve,d as fe,e as M,f as U,g as q,h as te,i as De,j as
22
22
  document.head.insertBefore(style, document.head.firstChild);
23
23
  document.body && document.body.classList.add('${G}');
24
24
  })();
25
- `.trim()}var Kt=!1,Xt={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 $e({storeId:e,storefrontAccessToken:t,preventFlickering:a=!1,flickerTimeout:u=3e3,children:c}){let[m,d]=O.useState(null),[b,p]=O.useState(null),[x,o]=O.useState(null),n=Ct(null);O.useEffect(()=>(a&&typeof window<"u"&&(n.current=Ge("body",u)),()=>{n.current&&n.current()}),[a,u]),O.useEffect(()=>{typeof window>"u"||Y({storeId:e,storefrontAccessToken:t})},[e,t]),O.useEffect(()=>{if(typeof window>"u")return;let E=oe();p(E);let _=j();o(_)},[]);let r=Qt(()=>{n.current&&(n.current(),n.current=null)},[]);O.useEffect(()=>{async function E(){try{if(!Kt){let z=Ve(Xt);d(z),r();return}let _=`https://configs.elevateab.com/config/${e}.json`,l=await fetch(_);if(l.status===404){d({tests:[],selectors:void 0}),r();return}if(!l.ok)throw new Error(`Failed to fetch config: ${l.status} ${l.statusText}`);let f=await l.json();if(f.subscriptionPaused){console.error(`[ElevateAB] Subscription is paused or stopped for store: ${e}. `+(f.subscriptionMessage||"A/B tests will not run. Please reactivate your subscription.")),d({tests:[],selectors:void 0}),r();return}if(!(Object.keys(f.allTests||{}).length>0)){d({tests:[],selectors:void 0}),r();return}let A=Ve(f);d(A),r()}catch(_){console.error("[ElevateAB] Failed to load config:",_),d({tests:[],selectors:void 0}),r()}}E()},[e,r]);let i=O.useMemo(()=>({config:m,storeId:e,storefrontAccessToken:t,isPreviewMode:b?.isPreview??!1,previewTestId:b?.previewTestId??null,countryCode:x}),[m,e,t,b,x]);O.useEffect(()=>{Y({storeId:e,storefrontAccessToken:t})},[e,t]);let s=Ct(!1);return O.useEffect(()=>{!t&&!s.current&&(s.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]),O.createElement(we.Provider,{value:i},c)}import{usePathname as er,useSearchParams as tr}from"next/navigation";function rr({currency:e}){let t=er(),a=tr();return At(()=>{a.get("eabUserPreview")!=="true"&&xe({currency:e})},[t,a,e]),null}function or({storeId:e,storefrontAccessToken:t,preventFlickering:a=!1,flickerTimeout:u=3e3,currency:c,children:m}){return At(()=>{Y({storeId:e,storefrontAccessToken:t})},[e,t]),We.createElement($e,{storeId:e,storefrontAccessToken:t,preventFlickering:a,flickerTimeout:u},We.createElement(Zt,{fallback:null},We.createElement(rr,{currency:c})),m)}import{useEffect as ir}from"react";function nr({productId:e,productVendor:t,productPrice:a,productSku:u,currency:c}){return ir(()=>{e&&Ee({productId:e,productVendor:t,productPrice:a,productSku:u,currency:c})},[e,t,a,u,c]),null}function St(e){let t=q("ABAU")||{};t[e]||(t[e]=!0,M("ABAU",JSON.stringify(t)))}function It(e){let t=Ne("ABAV")||{};t[e]||(t[e]=!0,te("ABAV",t))}function He(e){St(e),It(e)}import ie from"react";function Rt(e){let{config:t}=be(),[a,u]=ie.useState(null),[c,m]=ie.useState(!0),d=ie.useMemo(()=>t&&t.tests.find(p=>p.testId===e)||null,[t,e]),b=ie.useRef(null);return ie.useEffect(()=>{if(t===null)return;if(!d){b.current!==e&&(b.current=e,console.warn(`[ElevateAB] Test not found: ${e}`)),m(!1);return}if(!d.enabled){b.current!==`${e}-disabled`&&(b.current=`${e}-disabled`,console.warn(`[ElevateAB] Test disabled: ${e}`)),m(!1);return}if(!ze(d)){m(!1);return}let p=H(),x=Fe(e,d,p);x&&(u(x),He(e)),m(!1)},[t,d,e]),{variant:a,isLoading:c,isControl:a?.isControl??!1,isA:a?.isA??!1,isB:a?.isB??!1,isC:a?.isC??!1,isD:a?.isD??!1}}import{useEffect as to,useContext as ro,useRef as oo}from"react";export{or as ElevateNextProvider,nr as ProductViewTracker,vt as clearPreviewMode,I as extractShopifyId,ut as extractShopifyType,j as getCountryCode,Tt as getFlickerPreventionScript,oe as getPreviewState,yt as isInPreviewMode,dt as isShopifyGid,Pt as matchesGeoTargeting,ft as trackAddToCart,gt as trackCartView,ht as trackCheckoutCompleted,bt as trackCheckoutStarted,xe as trackPageView,Ee as trackProductView,mt as trackRemoveFromCart,wt as trackSearchSubmitted,be as useElevateConfig,Rt as useExperiment};
25
+ `.trim()}import{jsx as er}from"react/jsx-runtime";var Xt=!1,Zt={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 He({storeId:e,storefrontAccessToken:t,preventFlickering:a=!1,flickerTimeout:u=3e3,children:c}){let[m,d]=B.useState(null),[b,p]=B.useState(null),[x,o]=B.useState(null),n=At(null);B.useEffect(()=>(a&&typeof window<"u"&&(n.current=Ge("body",u)),()=>{n.current&&n.current()}),[a,u]),B.useEffect(()=>{typeof window>"u"||Y({storeId:e,storefrontAccessToken:t})},[e,t]),B.useEffect(()=>{if(typeof window>"u")return;let E=oe();p(E);let _=$();o(_)},[]);let r=Kt(()=>{n.current&&(n.current(),n.current=null)},[]);B.useEffect(()=>{async function E(){try{if(!Xt){let z=Ve(Zt);d(z),r();return}let _=`https://configs.elevateab.com/config/${e}.json`,l=await fetch(_);if(l.status===404){d({tests:[],selectors:void 0}),r();return}if(!l.ok)throw new Error(`Failed to fetch config: ${l.status} ${l.statusText}`);let f=await l.json();if(f.subscriptionPaused){console.error(`[ElevateAB] Subscription is paused or stopped for store: ${e}. `+(f.subscriptionMessage||"A/B tests will not run. Please reactivate your subscription.")),d({tests:[],selectors:void 0}),r();return}if(!(Object.keys(f.allTests||{}).length>0)){d({tests:[],selectors:void 0}),r();return}let C=Ve(f);d(C),r()}catch(_){console.error("[ElevateAB] Failed to load config:",_),d({tests:[],selectors:void 0}),r()}}E()},[e,r]);let i=B.useMemo(()=>({config:m,storeId:e,storefrontAccessToken:t,isPreviewMode:b?.isPreview??!1,previewTestId:b?.previewTestId??null,countryCode:x}),[m,e,t,b,x]);B.useEffect(()=>{Y({storeId:e,storefrontAccessToken:t})},[e,t]);let s=At(!1);return B.useEffect(()=>{!t&&!s.current&&(s.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]),er(we.Provider,{value:i,children:c})}import{usePathname as rr,useSearchParams as or}from"next/navigation";import{jsx as Ct,jsxs as ar}from"react/jsx-runtime";function ir({currency:e}){let t=rr(),a=or();return St(()=>{a.get("eabUserPreview")!=="true"&&xe({currency:e})},[t,a,e]),null}function nr({storeId:e,storefrontAccessToken:t,preventFlickering:a=!1,flickerTimeout:u=3e3,currency:c,children:m}){return St(()=>{Y({storeId:e,storefrontAccessToken:t})},[e,t]),ar(He,{storeId:e,storefrontAccessToken:t,preventFlickering:a,flickerTimeout:u,children:[Ct(tr,{fallback:null,children:Ct(ir,{currency:c})}),m]})}import{useEffect as sr}from"react";function cr({productId:e,productVendor:t,productPrice:a,productSku:u,currency:c}){return sr(()=>{e&&Ee({productId:e,productVendor:t,productPrice:a,productSku:u,currency:c})},[e,t,a,u,c]),null}import ur from"next/script";import{jsx as pr}from"react/jsx-runtime";var dr="eab-flicker-styles",We="eab-prevent-flicker";function lr({timeout:e=3e3}){let t=`
26
+ (function() {
27
+ var style = document.createElement('style');
28
+ style.id = '${dr}';
29
+ style.textContent = '.${We}{opacity:0!important;pointer-events:none!important}@keyframes eab-reveal{to{opacity:1;pointer-events:auto}}.${We}{animation:eab-reveal 0s ${e}ms forwards}';
30
+ document.head.insertBefore(style, document.head.firstChild);
31
+ document.body && document.body.classList.add('${We}');
32
+ })();
33
+ `.trim();return pr(ur,{id:"elevate-anti-flicker",strategy:"beforeInteractive",children:t})}function It(e){let t=q("ABAU")||{};t[e]||(t[e]=!0,M("ABAU",JSON.stringify(t)))}function Rt(e){let t=Ne("ABAV")||{};t[e]||(t[e]=!0,te("ABAV",t))}function Ye(e){It(e),Rt(e)}import ie from"react";function Ut(e){let{config:t}=be(),[a,u]=ie.useState(null),[c,m]=ie.useState(!0),d=ie.useMemo(()=>t&&t.tests.find(p=>p.testId===e)||null,[t,e]),b=ie.useRef(null);return ie.useEffect(()=>{if(t===null)return;if(!d){b.current!==e&&(b.current=e,console.warn(`[ElevateAB] Test not found: ${e}`)),m(!1);return}if(!d.enabled){b.current!==`${e}-disabled`&&(b.current=`${e}-disabled`,console.warn(`[ElevateAB] Test disabled: ${e}`)),m(!1);return}if(!ze(d)){m(!1);return}let p=W(),x=Fe(e,d,p);x&&(u(x),Ye(e)),m(!1)},[t,d,e]),{variant:a,isLoading:c,isControl:a?.isControl??!1,isA:a?.isA??!1,isB:a?.isB??!1,isC:a?.isC??!1,isD:a?.isD??!1}}import{jsx as go}from"react/jsx-runtime";import{useEffect as vo,useContext as yo,useRef as _o}from"react";export{lr as AntiFlickerScript,nr as ElevateNextProvider,cr as ProductViewTracker,yt as clearPreviewMode,I as extractShopifyId,dt as extractShopifyType,$ as getCountryCode,je as getFlickerPreventionScript,oe as getPreviewState,_t as isInPreviewMode,lt as isShopifyGid,xt as matchesGeoTargeting,mt as trackAddToCart,wt as trackCartView,vt as trackCheckoutCompleted,ht as trackCheckoutStarted,xe as trackPageView,Ee as trackProductView,gt as trackRemoveFromCart,bt as trackSearchSubmitted,be as useElevateConfig,Ut as useExperiment};
26
34
  //# sourceMappingURL=next.js.map