@elevateab/sdk 1.4.5 → 1.4.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/dist/cartAttributes-DBBVZUFZ.js +2 -0
- package/dist/cartAttributes-V5XBJEGE.js +3 -0
- package/dist/chunk-5TU25234.js +18 -0
- package/dist/chunk-5TU25234.js.map +1 -0
- package/dist/{chunk-E3BNNKGR.js → chunk-7OUZ2CQ5.js} +2 -2
- package/dist/chunk-GGAESORE.js +19 -0
- package/dist/chunk-GGAESORE.js.map +1 -0
- package/dist/hydrogen.cjs +2 -2
- package/dist/hydrogen.cjs.map +1 -1
- package/dist/hydrogen.js +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/next.cjs +3 -3
- package/dist/next.cjs.map +1 -1
- package/dist/next.js +2 -2
- package/dist/next.js.map +1 -1
- package/package.json +1 -1
- package/dist/cartAttributes-UOPTEP2Q.js +0 -2
- package/dist/cartAttributes-YUZURH3L.js +0 -3
- package/dist/chunk-B2OIRKOZ.js +0 -18
- package/dist/chunk-B2OIRKOZ.js.map +0 -1
- package/dist/chunk-QIFYO7SY.js +0 -19
- package/dist/chunk-QIFYO7SY.js.map +0 -1
- /package/dist/{cartAttributes-UOPTEP2Q.js.map → cartAttributes-DBBVZUFZ.js.map} +0 -0
- /package/dist/{cartAttributes-YUZURH3L.js.map → cartAttributes-V5XBJEGE.js.map} +0 -0
- /package/dist/{chunk-E3BNNKGR.js.map → chunk-7OUZ2CQ5.js.map} +0 -0
package/dist/next.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as yr,b as vr,c as It,d as ke,e as Y,f as N,g as H,h as tt,i as rt,j as Ce,k as Pe,l as xe,m as J,n as Rt,o as Ot,p as z,q as ot}from"./chunk-QIFYO7SY.js";var Dt=yr((ue,Se)=>{"use strict";(function(e,t){"use strict";var o="1.0.41",i="",r="?",d="function",l="undefined",f="object",p="string",y="major",a="model",c="name",n="type",s="vendor",u="version",_="architecture",k="console",m="mobile",g="tablet",w="smarttv",T="wearable",R="embedded",O=500,W="Amazon",q="Apple",L="ASUS",re="BlackBerry",ge="Browser",we="Chrome",mr="Edge",he="Firefox",be="Google",yt="Honor",vt="Huawei",gr="Lenovo",ye="LG",We="Microsoft",Ye="Motorola",Je="Nvidia",_t="OnePlus",oe="Opera",Qe="OPPO",ne="Samsung",kt="Sharp",ie="Sony",Ke="Xiaomi",Xe="Zebra",Ct="Facebook",Pt="Chromium OS",xt="Mac OS",Et=" Browser",wr=function(v,C){var b={};for(var x in v)C[x]&&C[x].length%2===0?b[x]=C[x].concat(v[x]):b[x]=v[x];return b},ve=function(v){for(var C={},b=0;b<v.length;b++)C[v[b].toUpperCase()]=v[b];return C},Tt=function(v,C){return typeof v===p?ae(C).indexOf(ae(v))!==-1:!1},ae=function(v){return v.toLowerCase()},hr=function(v){return typeof v===p?v.replace(/[^\d\.]/g,i).split(".")[0]:t},Ze=function(v,C){if(typeof v===p)return v=v.replace(/^\s\s*/,i),typeof C===l?v:v.substring(0,O)},se=function(v,C){for(var b=0,x,M,B,P,h,D;b<C.length&&!h;){var et=C[b],Ut=C[b+1];for(x=M=0;x<et.length&&!h&&et[x];)if(h=et[x++].exec(v),h)for(B=0;B<Ut.length;B++)D=h[++M],P=Ut[B],typeof P===f&&P.length>0?P.length===2?typeof P[1]==d?this[P[0]]=P[1].call(this,D):this[P[0]]=P[1]:P.length===3?typeof P[1]===d&&!(P[1].exec&&P[1].test)?this[P[0]]=D?P[1].call(this,D,P[2]):t:this[P[0]]=D?D.replace(P[1],P[2]):t:P.length===4&&(this[P[0]]=D?P[3].call(this,D.replace(P[1],P[2])):t):this[P]=D||t;b+=2}},ce=function(v,C){for(var b in C)if(typeof C[b]===f&&C[b].length>0){for(var x=0;x<C[b].length;x++)if(Tt(C[b][x],v))return b===r?t:b}else if(Tt(C[b],v))return b===r?t:b;return C.hasOwnProperty("*")?C["*"]:v},br={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},St={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],[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,oe+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[u,[c,oe+" GX"]],[/\bopr\/([\w\.]+)/i],[u,[c,oe]],[/\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"+ge]],[/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 "+ge]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+ge],u],[/\bfocus\/([\w\.]+)/i],[u,[c,he+" Focus"]],[/\bopt\/([\w\.]+)/i],[u,[c,oe+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[u,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[u,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[u,[c,oe+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[u,[c,"MIUI"+Et]],[/fxios\/([\w\.-]+)/i],[u,[c,he]],[/\bqihoobrowser\/?([\w\.]*)/i],[u,[c,"360"]],[/\b(qq)\/([\w\.]+)/i],[[c,/(.+)/,"$1Browser"],u],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1"+Et],u],[/samsungbrowser\/([\w\.]+)/i],[u,[c,ne+" 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,Ct],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,we+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,we+" WebView"],u],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[u,[c,"Android "+ge]],[/(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,ce,br]],[/(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,he+" 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],[[_,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[_,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[_,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[_,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[_,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[_,/ower/,i,ae]],[/ sun4\w[;\)]/i],[[_,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[_,ae]]],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],[a,[s,ne],[n,g]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[a,[s,ne],[n,m]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[a,[s,q],[n,m]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[a,[s,q],[n,g]],[/(macintosh);/i],[a,[s,q]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[a,[s,kt],[n,m]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[a,[s,yt],[n,g]],[/honor([-\w ]+)[;\)]/i],[a,[s,yt],[n,m]],[/\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],[a,[s,vt],[n,g]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[a,[s,vt],[n,m]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[a,/_/g," "],[s,Ke],[n,g]],[/\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],[[a,/_/g," "],[s,Ke],[n,m]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[a,[s,Qe],[n,m]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[a,[s,ce,{OnePlus:["304","403","203"],"*":Qe}],[n,g]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[a,[s,"Vivo"],[n,m]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[a,[s,"Realme"],[n,m]],[/\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],[a,[s,Ye],[n,m]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[a,[s,Ye],[n,g]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[a,[s,ye],[n,g]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[a,[s,ye],[n,m]],[/(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],[a,[s,gr],[n,g]],[/(nokia) (t[12][01])/i],[s,a,[n,g]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[a,/_/g," "],[n,m],[s,"Nokia"]],[/(pixel (c|tablet))\b/i],[a,[s,be],[n,g]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[a,[s,be],[n,m]],[/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],[a,[s,ie],[n,m]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[a,"Xperia Tablet"],[s,ie],[n,g]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[a,[s,_t],[n,m]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[a,[s,W],[n,g]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[a,/(.+)/g,"Fire Phone $1"],[s,W],[n,m]],[/(playbook);[-\w\),; ]+(rim)/i],[a,s,[n,g]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[a,[s,re],[n,m]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[a,[s,L],[n,g]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[a,[s,L],[n,m]],[/(nexus 9)/i],[a,[s,"HTC"],[n,g]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[s,[a,/_/g," "],[n,m]],[/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],[a,[s,"TCL"],[n,g]],[/(itel) ((\w+))/i],[[s,ae],a,[n,ce,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[a,[s,"Acer"],[n,g]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[a,[s,"Meizu"],[n,m]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[a,[s,"Ulefone"],[n,m]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[a,[s,"Energizer"],[n,m]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[a,[s,"Cat"],[n,m]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[a,[s,"Smartfren"],[n,m]],[/droid.+; (a(?:015|06[35]|142p?))/i],[a,[s,"Nothing"],[n,m]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[a,[s,"Archos"],[n,g]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[a,[s,"Archos"],[n,m]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[s,a,[n,g]],[/(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],[s,a,[n,m]],[/(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],[s,a,[n,g]],[/(surface duo)/i],[a,[s,We],[n,g]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[a,[s,"Fairphone"],[n,m]],[/(u304aa)/i],[a,[s,"AT&T"],[n,m]],[/\bsie-(\w*)/i],[a,[s,"Siemens"],[n,m]],[/\b(rct\w+) b/i],[a,[s,"RCA"],[n,g]],[/\b(venue[\d ]{2,7}) b/i],[a,[s,"Dell"],[n,g]],[/\b(q(?:mv|ta)\w+) b/i],[a,[s,"Verizon"],[n,g]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[a,[s,"Barnes & Noble"],[n,g]],[/\b(tm\d{3}\w+) b/i],[a,[s,"NuVision"],[n,g]],[/\b(k88) b/i],[a,[s,"ZTE"],[n,g]],[/\b(nx\d{3}j) b/i],[a,[s,"ZTE"],[n,m]],[/\b(gen\d{3}) b.+49h/i],[a,[s,"Swiss"],[n,m]],[/\b(zur\d{3}) b/i],[a,[s,"Swiss"],[n,g]],[/\b((zeki)?tb.*\b) b/i],[a,[s,"Zeki"],[n,g]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[s,"Dragon Touch"],a,[n,g]],[/\b(ns-?\w{0,9}) b/i],[a,[s,"Insignia"],[n,g]],[/\b((nxa|next)-?\w{0,9}) b/i],[a,[s,"NextBook"],[n,g]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[s,"Voice"],a,[n,m]],[/\b(lvtel\-)?(v1[12]) b/i],[[s,"LvTel"],a,[n,m]],[/\b(ph-1) /i],[a,[s,"Essential"],[n,m]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[a,[s,"Envizen"],[n,g]],[/\b(trio[-\w\. ]+) b/i],[a,[s,"MachSpeed"],[n,g]],[/\btu_(1491) b/i],[a,[s,"Rotor"],[n,g]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[a,[s,Je],[n,g]],[/(sprint) (\w+)/i],[s,a,[n,m]],[/(kin\.[onetw]{3})/i],[[a,/\./g," "],[s,We],[n,m]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[a,[s,Xe],[n,g]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[a,[s,Xe],[n,m]],[/smart-tv.+(samsung)/i],[s,[n,w]],[/hbbtv.+maple;(\d+)/i],[[a,/^/,"SmartTV"],[s,ne],[n,w]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[s,ye],[n,w]],[/(apple) ?tv/i],[s,[a,q+" TV"],[n,w]],[/crkey/i],[[a,we+"cast"],[s,be],[n,w]],[/droid.+aft(\w+)( bui|\))/i],[a,[s,W],[n,w]],[/(shield \w+ tv)/i],[a,[s,Je],[n,w]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[a,[s,kt],[n,w]],[/(bravia[\w ]+)( bui|\))/i],[a,[s,ie],[n,w]],[/(mi(tv|box)-?\w+) bui/i],[a,[s,Ke],[n,w]],[/Hbbtv.*(technisat) (.*);/i],[s,a,[n,w]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[s,Ze],[a,Ze],[n,w]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[a,[n,w]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[n,w]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[s,a,[n,k]],[/droid.+; (shield)( bui|\))/i],[a,[s,Je],[n,k]],[/(playstation \w+)/i],[a,[s,ie],[n,k]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[a,[s,We],[n,k]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[a,[s,ne],[n,T]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[s,a,[n,T]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[a,[s,Qe],[n,T]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[a,[s,q],[n,T]],[/(opwwe\d{3})/i],[a,[s,_t],[n,T]],[/(moto 360)/i],[a,[s,Ye],[n,T]],[/(smartwatch 3)/i],[a,[s,ie],[n,T]],[/(g watch r)/i],[a,[s,ye],[n,T]],[/droid.+; (wt63?0{2,3})\)/i],[a,[s,Xe],[n,T]],[/droid.+; (glass) \d/i],[a,[s,be],[n,T]],[/(pico) (4|neo3(?: link|pro)?)/i],[s,a,[n,T]],[/; (quest( \d| pro)?)/i],[a,[s,Ct],[n,T]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[s,[n,R]],[/(aeobc)\b/i],[a,[s,W],[n,R]],[/(homepod).+mac os/i],[a,[s,q],[n,R]],[/windows iot/i],[[n,R]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[a,[n,m]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[a,[n,g]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[n,g]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[n,m]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[a,[s,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[u,[c,mr+"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,ce,St]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[u,ce,St],[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,xt],[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,re]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[u,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[u,[c,he+" 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,we+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,Pt],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]]},I=function(v,C){if(typeof v===f&&(C=v,v=t),!(this instanceof I))return new I(v,C).getResult();var b=typeof e!==l&&e.navigator?e.navigator:t,x=v||(b&&b.userAgent?b.userAgent:i),M=b&&b.userAgentData?b.userAgentData:t,B=C?wr(At,C):At,P=b&&b.userAgent==x;return this.getBrowser=function(){var h={};return h[c]=t,h[u]=t,se.call(h,x,B.browser),h[y]=hr(h[u]),P&&b&&b.brave&&typeof b.brave.isBrave==d&&(h[c]="Brave"),h},this.getCPU=function(){var h={};return h[_]=t,se.call(h,x,B.cpu),h},this.getDevice=function(){var h={};return h[s]=t,h[a]=t,h[n]=t,se.call(h,x,B.device),P&&!h[n]&&M&&M.mobile&&(h[n]=m),P&&h[a]=="Macintosh"&&b&&typeof b.standalone!==l&&b.maxTouchPoints&&b.maxTouchPoints>2&&(h[a]="iPad",h[n]=g),h},this.getEngine=function(){var h={};return h[c]=t,h[u]=t,se.call(h,x,B.engine),h},this.getOS=function(){var h={};return h[c]=t,h[u]=t,se.call(h,x,B.os),P&&!h[c]&&M&&M.platform&&M.platform!="Unknown"&&(h[c]=M.platform.replace(/chrome os/i,Pt).replace(/macos/i,xt)),h},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 x},this.setUA=function(h){return x=typeof h===p&&h.length>O?Ze(h,O):h,this},this.setUA(x),this};I.VERSION=o,I.BROWSER=ve([c,u,y]),I.CPU=ve([_]),I.DEVICE=ve([a,s,n,k,m,w,g,T,R]),I.ENGINE=I.OS=ve([c,u]),typeof ue!==l?(typeof Se!==l&&Se.exports&&(ue=Se.exports=I),ue.UAParser=I):typeof define===d&&define.amd?define(function(){return I}):typeof e!==l&&(e.UAParser=I);var Z=typeof e!==l&&(e.jQuery||e.Zepto);if(Z&&!Z.ua){var _e=new I;Z.ua=_e.getResult(),Z.ua.get=function(){return _e.getUA()},Z.ua.set=function(v){_e.setUA(v);var C=_e.getResult();for(var b in C)Z.ua[b]=C[b]}}})(typeof window=="object"?window:ue)});import{Suspense as Yr,useEffect as ur}from"react";import V,{useRef as zr,useCallback as Fr}from"react";import Vt from"react";var Ee=Vt.createContext(null);function Te(){let e=Vt.useContext(Ee);if(e===null)throw new Error("useElevateConfig must be used within ElevateProvider");return e}function U(e){return e?e.includes("gid://")&&e.split("/").pop()||e:""}function Lt(e){return!e||!e.includes("gid://")?null:e.split("/")[3]||null}function Bt(e){return!!e&&e.startsWith("gid://shopify/")}var nt=vr(Dt(),1),Nt={"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 S(e){return typeof e!="string"?String(e):e.replace(/[\\"'`\x00-\x1F\x7F]/g,"")}function E(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 Ae(e){if(!e)return null;let t=/gid:\/\/shopify\/Cart\/([^?]+(\?.+)?)/,o=e.match(t);return o?o[1]:null}function Ue(e){try{return typeof e!="string"?null:decodeURIComponent(e).split("?")[0]}catch{return e||null}}function _r(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 kr(e){let t={};return e.searchParams.forEach((o,i)=>{t[i]||(t[i]=o)}),t}function Cr(e){return!!e.host&&["http:","https:"].includes(e.protocol)}function Pr(e){return e.replace(/^www\./,"")}function xr(e,t,o){if(t&&{Facebook:"Facebook",Instagram:"Instagram"}[t])return t;let r,d;try{if(e&&e.trim()!=="")r=new URL(e);else return"Direct";if(r?.hostname&&Cr(r)){if(d=r.hostname,o&&o===d)return"Direct"}else return""}catch{}if(!d)return"";let l=Pr(d);return l?Nt[l]?Nt[l]:l?.includes("google")?"Google":l:""}function Ie(e){let{referrer:t,entryPage:o,userAgent:i}=e,r={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 d;if(o&&o.trim()!==""&&o.startsWith("http"))try{let l=new URL(o),f=l?.pathname;d=l?.hostname,f&&(r.page_entry_path=f??"");let p=kr(l);r.utm_medium=p.utm_medium??"",r.utm_source=p.utm_source??"",r.utm_campaign=p.utm_campaign??"",r.utm_content=p.utm_content??"",r.utm_term=p.utm_term??"",r.gclid=p.gclid??"",r.fbclid=p.fbclid??"",r.pins_campaign_id=p.pins_campaign_id??"",r.epik=p.epik??""}catch{}if(i){let l=(0,nt.UAParser)(i),f=l?.browser?.name,p=_r(f);r.browser_info=p??"",r.os_info=l?.os?.name??"",i&&(r.device_type=(l?.device?.type||"desktop")?.toUpperCase()??"")}return r.referrer_source=xr(t,r?.browser_info,d)??"",r}catch{return r}}function Re(e,t){let o=e==="/"||e==="",r=t&&/^\/[a-z]{2}(-[a-z]{2})?\/?$/i.test(e);return o||r?"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 Oe(e){if(!e)return"";try{let t=(0,nt.UAParser)(e),o=t?.os,i=t?.device,r="";return o?.name&&(r+=o.name,o.version&&(r+=` ${o.version}`)),i?.type&&(r+=r?` (${i.type})`:i.type),i?.vendor&&(r+=r?` ${i.vendor}`:i.vendor),i?.model&&(r+=r?` ${i.model}`:i.model),r||e}catch{return e}}import{useEffect as ko,useRef as Co,useState as Po}from"react";var Er="https://bitter-river-9c62.support-67d.workers.dev",Tr="https://d339co84ntxcme.cloudfront.net/Prod/orders",A=null;function le(e){A=e}function j(e){let t=e?.storeId||A?.storeId;return t||(console.warn("[ElevateAB] No storeId provided. Call initAnalytics() first or pass storeId to tracking function."),"")}function Sr(e){return Object.entries(e).filter(([,t])=>typeof t=="string").map(([t,o])=>({test_id:t,variant_id:o}))}function Ar(e,t){return Object.entries(e).filter(([o])=>typeof t[o]=="string").map(([o])=>({test_id:o,variant_id:t[o]}))}function Ur(){return typeof window>"u"?!1:N("eabUserPreview")==="true"||new URLSearchParams(window.location.search).get("eabUserPreview")==="true"}function $(e,t,o){if(typeof window>"u"||Ur())return null;let i=navigator.userAgent,r=window.location.pathname,d=Re(r,o),{referrer:l,entryPage:f}=xe(),p=Ie({referrer:l,entryPage:f,userAgent:i}),y=H("ABTL")||{},a=H("ABAU")||{},c=Sr(y),n=Ar(a,y),s=Ae(localStorage.getItem("shopifyCartId")),u=new Date().toISOString(),_=sessionStorage.getItem("eabIsFirstVisit")==="true",k=N("localization")||"";return{pixel_event_id:`sh-${ke()}`,shop_name:e,timestamp:u,event_type:t,client_id:N("_shopify_y")||void 0,visitor_id:Ce(),session_id:Pe(),cart_token:Ue(s||N("cart")),page_url:window.location.href,page_pathname:r,page_search:window.location.search,referrer_url:l,referrer_source:p?.referrer_source,previous_page:document.referrer,page_entry:f,page_entry_path:p?.page_entry_path,page_type:d,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:i,user_agent_no_browser:Oe(i),is_first_visit:_,shopify_country:k,ab_test_assignments:c,ab_test_views:n,is_first_order:null}}async function G(e,t=Er){try{let o=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),keepalive:!0});if(!o.ok)throw new Error(`Worker error: ${o.status}`)}catch(o){console.error("[ElevateAB] Error sending analytics:",o)}}async function Ve(e={}){let t=j(e);if(!t)return;let o=e.hasLocalizedPaths??A?.hasLocalizedPaths,i=e.workerUrl??A?.workerUrl,r=$(t,"page_viewed",o);if(!r)return;let d={...r,cart_currency:e.currency};await G(d,i)}async function Le(e){let t=j(e);if(!t)return;let{productId:o,productVendor:i,productPrice:r,productSku:d,currency:l}=e,f=e.hasLocalizedPaths??A?.hasLocalizedPaths,p=e.workerUrl??A?.workerUrl,y=$(t,"product_viewed",f);if(!y)return;let a={...y,cart_currency:l,product_id:U(o),product_vendor:S(i),product_price:E(r),product_sku:S(d)};await G(a,p)}async function Ht(e){let t=j(e);if(!t)return;let{productId:o,variantId:i,productVendor:r,productPrice:d,productQuantity:l,productSku:f,currency:p,cartId:y}=e,a=e.hasLocalizedPaths??A?.hasLocalizedPaths,c=e.workerUrl??A?.workerUrl,n=e.storefrontAccessToken??A?.storefrontAccessToken,s=$(t,"product_added_to_cart",a);if(!s)return;let u={...s,cart_currency:p,product_id:U(o),variant_id:U(i),product_vendor:S(r),product_price:E(d),product_quantity:l,product_sku:S(f)};if(await G(u,c),y&&n)try{let{updateCartAttributes:_}=await import("./cartAttributes-YUZURH3L.js");await _(y,{storefrontAccessToken:n})}catch(_){console.error("[ElevateAB] Failed to update cart attributes:",_)}}async function Mt(e){let t=j(e);if(!t)return;let{productId:o,variantId:i,productVendor:r,productPrice:d,productQuantity:l,productSku:f,currency:p}=e,y=e.hasLocalizedPaths??A?.hasLocalizedPaths,a=e.workerUrl??A?.workerUrl,c=$(t,"product_removed_from_cart",y);if(!c)return;let n={...c,cart_currency:p,product_id:U(o),variant_id:U(i),product_vendor:S(r),product_price:E(d),product_quantity:l,product_sku:S(f)};await G(n,a)}async function zt(e){let t=j(e);if(!t)return;let{cartTotalPrice:o,cartTotalQuantity:i,cartItems:r,currency:d}=e,l=e.hasLocalizedPaths??A?.hasLocalizedPaths,f=e.workerUrl??A?.workerUrl,p=$(t,"cart_viewed",l);if(!p)return;let y={...p,cart_currency:d,cart_total_price:E(o),cart_total_quantity:i,cart_items:r?.map(a=>({product_id:U(a.productId),variant_id:U(a.variantId),product_vendor:S(a.productVendor)||"",product_price:E(a.productPrice),product_quantity:a.productQuantity??null,product_sku:S(a.productSku)||""}))};await G(y,f)}async function Ft(e){let t=j(e);if(!t)return;let{searchQuery:o,currency:i}=e,r=e.hasLocalizedPaths??A?.hasLocalizedPaths,d=e.workerUrl??A?.workerUrl,l=$(t,"search_submitted",r);if(!l)return;let f={...l,cart_currency:i,search_query:S(o)};await G(f,d)}async function qt(e){let t=j(e);if(!t)return;let{cartTotalPrice:o,cartSubtotalPrice:i,cartShippingPrice:r,cartTaxAmount:d,cartDiscountAmount:l,customerId:f,cartItems:p,currency:y}=e,a=e.hasLocalizedPaths??A?.hasLocalizedPaths,c=e.workerUrl??A?.workerUrl,n=$(t,"checkout_started",a);if(!n)return;let s=0,u=p?.map(k=>{let m=k.productQuantity??0;return s+=m,{product_id:U(k.productId),variant_id:U(k.variantId),product_vendor:S(k.productVendor)||"",vendor:S(k.productVendor)||"",product_price:E(k.productPrice),total_price:E(k.productPrice),product_quantity:m,quantity:m,product_sku:S(k.productSku)||"",sku:S(k.productSku)||"",total_discount:E(k.totalDiscount)}})||[],_={...n,cart_currency:y,cart_total_price:E(o),cart_subtotal_price:E(i),cart_total_quantity:s,cart_shipping_price:E(r),cart_tax_amount:E(d),cart_discount_amount:E(l),cart_items:u,customer_id:f};await G(_,c)}async function jt(e){let t=j(e);if(!t)return;let{orderId:o,cartTotalPrice:i,cartSubtotalPrice:r,cartShippingPrice:d,cartTaxAmount:l,cartDiscountAmount:f,customerId:p,isFirstOrder:y,noteAttributes:a,cartItems:c,currency:n}=e,s=e.hasLocalizedPaths??A?.hasLocalizedPaths,u=e.ordersWorkerUrl??A?.ordersWorkerUrl??Tr,_=$(t,"checkout_completed",s);if(!_)return;let k=0,m=c?.map(w=>{let T=w.productQuantity??0;return k+=T,{product_id:U(w.productId),variant_id:U(w.variantId),product_vendor:S(w.productVendor)||"",vendor:S(w.productVendor)||"",product_price:E(w.productPrice),total_price:E(w.productPrice),product_quantity:T,quantity:T,product_sku:S(w.productSku)||"",sku:S(w.productSku)||"",total_discount:E(w.totalDiscount)}})||[],g={..._,cart_currency:n,cart_total_price:E(i),cart_subtotal_price:E(r),cart_total_quantity:k,cart_shipping_price:E(d),cart_tax_amount:E(l),cart_discount_amount:E(f),cart_items:m,order_id:o,customer_id:p,is_first_order:y??null,note_attributes:a};await G(g,u)}var Be={SHOPIFY_LOCALIZATION:"localization",EAB_COUNTRY:"eabCountryCode",EAB_GEO:"eabGeoLocation"};function Q(){if(typeof window>"u")return null;let t=new URLSearchParams(window.location.search).get("country");if(t)return Y(Be.EAB_COUNTRY,t.toUpperCase()),t.toUpperCase();let o=N(Be.SHOPIFY_LOCALIZATION);if(o)return o.toUpperCase();let i=N(Be.EAB_COUNTRY);if(i)return i.toUpperCase();if(typeof localStorage<"u"){let r=localStorage.getItem(Be.EAB_COUNTRY);if(r)return r.toUpperCase()}return null}function $t(e,t){let o=t??Q();return o?e.map(r=>r.toUpperCase()).includes(o.toUpperCase()):!1}function Gt(e,t){let o=t??Q();return o?e.map(r=>r.toUpperCase()).includes(o.toUpperCase()):!1}function Wt(e){let t=Q();return!e.includeCountries?.length&&!e.excludeCountries?.length?!0:!t||e.excludeCountries?.length&&Gt(e.excludeCountries,t)?!1:e.includeCountries?.length?$t(e.includeCountries,t):!0}var De="eab:navigate",Ne=!1,it=0,de=null,pe=null;function Ir(){typeof window>"u"||(it++,!Ne&&(Ne=!0,de=history.pushState.bind(history),pe=history.replaceState.bind(history),history.pushState=function(...e){de(...e),window.dispatchEvent(new Event(De))},history.replaceState=function(...e){pe(...e),window.dispatchEvent(new Event(De))}))}function Rr(){typeof window>"u"||(it--,!(it>0||!Ne)&&(de&&(history.pushState=de,de=null),pe&&(history.replaceState=pe,pe=null),Ne=!1))}function ee(e){if(typeof window>"u")return()=>{};let t=window.location.href,o=()=>{let i=window.location.href;i!==t&&(t=i,e())};return Ir(),window.addEventListener(De,o),window.addEventListener("popstate",o),()=>{window.removeEventListener(De,o),window.removeEventListener("popstate",o),Rr()}}function at(e){let{configUrl:t,timeout:o=2e3}=e;return`(function(){
|
|
2
|
+
import{a as gr,b as wr,c as At,d as xe,e as de,f as H,g as j,h as Te,i as Ee,j as Se,k as Y,l as It,m as Ut,n as tt,o as z,p as rt}from"./chunk-GGAESORE.js";var Vt=gr((pe,Ue)=>{"use strict";(function(e,t){"use strict";var o="1.0.41",i="",r="?",d="function",l="undefined",f="object",p="string",y="major",a="model",c="name",n="type",s="vendor",u="version",_="architecture",k="console",g="mobile",m="tablet",w="smarttv",T="wearable",R="embedded",V=500,O="Amazon",q="Apple",B="ASUS",ne="BlackBerry",be="Browser",ye="Chrome",ur="Edge",ve="Firefox",_e="Google",ht="Honor",bt="Huawei",dr="Lenovo",ke="LG",We="Microsoft",Ye="Motorola",Je="Nvidia",yt="OnePlus",ie="Opera",Qe="OPPO",ae="Samsung",vt="Sharp",se="Sony",Ke="Xiaomi",Xe="Zebra",_t="Facebook",kt="Chromium OS",Ct="Mac OS",Pt=" Browser",pr=function(v,C){var b={};for(var x in v)C[x]&&C[x].length%2===0?b[x]=C[x].concat(v[x]):b[x]=v[x];return b},Ce=function(v){for(var C={},b=0;b<v.length;b++)C[v[b].toUpperCase()]=v[b];return C},xt=function(v,C){return typeof v===p?ce(C).indexOf(ce(v))!==-1:!1},ce=function(v){return v.toLowerCase()},fr=function(v){return typeof v===p?v.replace(/[^\d\.]/g,i).split(".")[0]:t},Ze=function(v,C){if(typeof v===p)return v=v.replace(/^\s\s*/,i),typeof C===l?v:v.substring(0,V)},le=function(v,C){for(var b=0,x,M,D,P,h,N;b<C.length&&!h;){var et=C[b],St=C[b+1];for(x=M=0;x<et.length&&!h&&et[x];)if(h=et[x++].exec(v),h)for(D=0;D<St.length;D++)N=h[++M],P=St[D],typeof P===f&&P.length>0?P.length===2?typeof P[1]==d?this[P[0]]=P[1].call(this,N):this[P[0]]=P[1]:P.length===3?typeof P[1]===d&&!(P[1].exec&&P[1].test)?this[P[0]]=N?P[1].call(this,N,P[2]):t:this[P[0]]=N?N.replace(P[1],P[2]):t:P.length===4&&(this[P[0]]=N?P[3].call(this,N.replace(P[1],P[2])):t):this[P]=N||t;b+=2}},ue=function(v,C){for(var b in C)if(typeof C[b]===f&&C[b].length>0){for(var x=0;x<C[b].length;x++)if(xt(C[b][x],v))return b===r?t:b}else if(xt(C[b],v))return b===r?t:b;return C.hasOwnProperty("*")?C["*"]:v},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","?":"/"},Tt={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"},Et={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,ie+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[u,[c,ie+" GX"]],[/\bopr\/([\w\.]+)/i],[u,[c,ie]],[/\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"+be]],[/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 "+be]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)/,"$1 Secure "+be],u],[/\bfocus\/([\w\.]+)/i],[u,[c,ve+" Focus"]],[/\bopt\/([\w\.]+)/i],[u,[c,ie+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[u,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[u,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[u,[c,ie+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[u,[c,"MIUI"+Pt]],[/fxios\/([\w\.-]+)/i],[u,[c,ve]],[/\bqihoobrowser\/?([\w\.]*)/i],[u,[c,"360"]],[/\b(qq)\/([\w\.]+)/i],[[c,/(.+)/,"$1Browser"],u],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1"+Pt],u],[/samsungbrowser\/([\w\.]+)/i],[u,[c,ae+" 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,_t],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,ye+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,ye+" WebView"],u],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[u,[c,"Android "+be]],[/(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,ue,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,ve+" 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],[[_,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[_,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[_,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[_,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[_,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[_,/ower/,i,ce]],[/ sun4\w[;\)]/i],[[_,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[_,ce]]],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],[a,[s,ae],[n,m]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[a,[s,ae],[n,g]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[a,[s,q],[n,g]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[a,[s,q],[n,m]],[/(macintosh);/i],[a,[s,q]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[a,[s,vt],[n,g]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[a,[s,ht],[n,m]],[/honor([-\w ]+)[;\)]/i],[a,[s,ht],[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],[a,[s,bt],[n,m]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[a,[s,bt],[n,g]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[a,/_/g," "],[s,Ke],[n,m]],[/\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],[[a,/_/g," "],[s,Ke],[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],[a,[s,Qe],[n,g]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[a,[s,ue,{OnePlus:["304","403","203"],"*":Qe}],[n,m]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[a,[s,"Vivo"],[n,g]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[a,[s,"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],[a,[s,Ye],[n,g]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[a,[s,Ye],[n,m]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[a,[s,ke],[n,m]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[a,[s,ke],[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],[a,[s,dr],[n,m]],[/(nokia) (t[12][01])/i],[s,a,[n,m]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[a,/_/g," "],[n,g],[s,"Nokia"]],[/(pixel (c|tablet))\b/i],[a,[s,_e],[n,m]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[a,[s,_e],[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],[a,[s,se],[n,g]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[a,"Xperia Tablet"],[s,se],[n,m]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[a,[s,yt],[n,g]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[a,[s,O],[n,m]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[a,/(.+)/g,"Fire Phone $1"],[s,O],[n,g]],[/(playbook);[-\w\),; ]+(rim)/i],[a,s,[n,m]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[a,[s,ne],[n,g]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[a,[s,B],[n,m]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[a,[s,B],[n,g]],[/(nexus 9)/i],[a,[s,"HTC"],[n,m]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[s,[a,/_/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],[a,[s,"TCL"],[n,m]],[/(itel) ((\w+))/i],[[s,ce],a,[n,ue,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[a,[s,"Acer"],[n,m]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[a,[s,"Meizu"],[n,g]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[a,[s,"Ulefone"],[n,g]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[a,[s,"Energizer"],[n,g]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[a,[s,"Cat"],[n,g]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[a,[s,"Smartfren"],[n,g]],[/droid.+; (a(?:015|06[35]|142p?))/i],[a,[s,"Nothing"],[n,g]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[a,[s,"Archos"],[n,m]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[a,[s,"Archos"],[n,g]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[s,a,[n,m]],[/(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],[s,a,[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],[s,a,[n,m]],[/(surface duo)/i],[a,[s,We],[n,m]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[a,[s,"Fairphone"],[n,g]],[/(u304aa)/i],[a,[s,"AT&T"],[n,g]],[/\bsie-(\w*)/i],[a,[s,"Siemens"],[n,g]],[/\b(rct\w+) b/i],[a,[s,"RCA"],[n,m]],[/\b(venue[\d ]{2,7}) b/i],[a,[s,"Dell"],[n,m]],[/\b(q(?:mv|ta)\w+) b/i],[a,[s,"Verizon"],[n,m]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[a,[s,"Barnes & Noble"],[n,m]],[/\b(tm\d{3}\w+) b/i],[a,[s,"NuVision"],[n,m]],[/\b(k88) b/i],[a,[s,"ZTE"],[n,m]],[/\b(nx\d{3}j) b/i],[a,[s,"ZTE"],[n,g]],[/\b(gen\d{3}) b.+49h/i],[a,[s,"Swiss"],[n,g]],[/\b(zur\d{3}) b/i],[a,[s,"Swiss"],[n,m]],[/\b((zeki)?tb.*\b) b/i],[a,[s,"Zeki"],[n,m]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[s,"Dragon Touch"],a,[n,m]],[/\b(ns-?\w{0,9}) b/i],[a,[s,"Insignia"],[n,m]],[/\b((nxa|next)-?\w{0,9}) b/i],[a,[s,"NextBook"],[n,m]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[s,"Voice"],a,[n,g]],[/\b(lvtel\-)?(v1[12]) b/i],[[s,"LvTel"],a,[n,g]],[/\b(ph-1) /i],[a,[s,"Essential"],[n,g]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[a,[s,"Envizen"],[n,m]],[/\b(trio[-\w\. ]+) b/i],[a,[s,"MachSpeed"],[n,m]],[/\btu_(1491) b/i],[a,[s,"Rotor"],[n,m]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[a,[s,Je],[n,m]],[/(sprint) (\w+)/i],[s,a,[n,g]],[/(kin\.[onetw]{3})/i],[[a,/\./g," "],[s,We],[n,g]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[a,[s,Xe],[n,m]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[a,[s,Xe],[n,g]],[/smart-tv.+(samsung)/i],[s,[n,w]],[/hbbtv.+maple;(\d+)/i],[[a,/^/,"SmartTV"],[s,ae],[n,w]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[s,ke],[n,w]],[/(apple) ?tv/i],[s,[a,q+" TV"],[n,w]],[/crkey/i],[[a,ye+"cast"],[s,_e],[n,w]],[/droid.+aft(\w+)( bui|\))/i],[a,[s,O],[n,w]],[/(shield \w+ tv)/i],[a,[s,Je],[n,w]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[a,[s,vt],[n,w]],[/(bravia[\w ]+)( bui|\))/i],[a,[s,se],[n,w]],[/(mi(tv|box)-?\w+) bui/i],[a,[s,Ke],[n,w]],[/Hbbtv.*(technisat) (.*);/i],[s,a,[n,w]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[s,Ze],[a,Ze],[n,w]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[a,[n,w]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[n,w]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[s,a,[n,k]],[/droid.+; (shield)( bui|\))/i],[a,[s,Je],[n,k]],[/(playstation \w+)/i],[a,[s,se],[n,k]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[a,[s,We],[n,k]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[a,[s,ae],[n,T]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[s,a,[n,T]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[a,[s,Qe],[n,T]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[a,[s,q],[n,T]],[/(opwwe\d{3})/i],[a,[s,yt],[n,T]],[/(moto 360)/i],[a,[s,Ye],[n,T]],[/(smartwatch 3)/i],[a,[s,se],[n,T]],[/(g watch r)/i],[a,[s,ke],[n,T]],[/droid.+; (wt63?0{2,3})\)/i],[a,[s,Xe],[n,T]],[/droid.+; (glass) \d/i],[a,[s,_e],[n,T]],[/(pico) (4|neo3(?: link|pro)?)/i],[s,a,[n,T]],[/; (quest( \d| pro)?)/i],[a,[s,_t],[n,T]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[s,[n,R]],[/(aeobc)\b/i],[a,[s,O],[n,R]],[/(homepod).+mac os/i],[a,[s,q],[n,R]],[/windows iot/i],[[n,R]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[a,[n,g]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[a,[n,m]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[n,m]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[n,g]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[a,[s,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[u,[c,ur+"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,ue,Tt]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[u,ue,Tt],[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,Ct],[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,ne]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[u,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[u,[c,ve+" 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,ye+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,kt],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]]},U=function(v,C){if(typeof v===f&&(C=v,v=t),!(this instanceof U))return new U(v,C).getResult();var b=typeof e!==l&&e.navigator?e.navigator:t,x=v||(b&&b.userAgent?b.userAgent:i),M=b&&b.userAgentData?b.userAgentData:t,D=C?pr(Et,C):Et,P=b&&b.userAgent==x;return this.getBrowser=function(){var h={};return h[c]=t,h[u]=t,le.call(h,x,D.browser),h[y]=fr(h[u]),P&&b&&b.brave&&typeof b.brave.isBrave==d&&(h[c]="Brave"),h},this.getCPU=function(){var h={};return h[_]=t,le.call(h,x,D.cpu),h},this.getDevice=function(){var h={};return h[s]=t,h[a]=t,h[n]=t,le.call(h,x,D.device),P&&!h[n]&&M&&M.mobile&&(h[n]=g),P&&h[a]=="Macintosh"&&b&&typeof b.standalone!==l&&b.maxTouchPoints&&b.maxTouchPoints>2&&(h[a]="iPad",h[n]=m),h},this.getEngine=function(){var h={};return h[c]=t,h[u]=t,le.call(h,x,D.engine),h},this.getOS=function(){var h={};return h[c]=t,h[u]=t,le.call(h,x,D.os),P&&!h[c]&&M&&M.platform&&M.platform!="Unknown"&&(h[c]=M.platform.replace(/chrome os/i,kt).replace(/macos/i,Ct)),h},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 x},this.setUA=function(h){return x=typeof h===p&&h.length>V?Ze(h,V):h,this},this.setUA(x),this};U.VERSION=o,U.BROWSER=Ce([c,u,y]),U.CPU=Ce([_]),U.DEVICE=Ce([a,s,n,k,g,w,m,T,R]),U.ENGINE=U.OS=Ce([c,u]),typeof pe!==l?(typeof Ue!==l&&Ue.exports&&(pe=Ue.exports=U),pe.UAParser=U):typeof define===d&&define.amd?define(function(){return U}):typeof e!==l&&(e.UAParser=U);var X=typeof e!==l&&(e.jQuery||e.Zepto);if(X&&!X.ua){var Pe=new U;X.ua=Pe.getResult(),X.ua.get=function(){return Pe.getUA()},X.ua.set=function(v){Pe.setUA(v);var C=Pe.getResult();for(var b in C)X.ua[b]=C[b]}}})(typeof window=="object"?window:pe)});import{Suspense as jr,useEffect as sr}from"react";import L,{useRef as Dr,useCallback as Nr}from"react";import Rt from"react";var Ae=Rt.createContext(null);function Ie(){let e=Rt.useContext(Ae);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 Ot(e){return!e||!e.includes("gid://")?null:e.split("/")[3]||null}function Lt(e){return!!e&&e.startsWith("gid://shopify/")}var ot=wr(Vt(),1),Bt={"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 S(e){return typeof e!="string"?String(e):e.replace(/[\\"'`\x00-\x1F\x7F]/g,"")}function E(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 Re(e){if(!e)return null;let t=/gid:\/\/shopify\/Cart\/([^?]+(\?.+)?)/,o=e.match(t);return o?o[1]:null}function Oe(e){try{return typeof e!="string"?null:decodeURIComponent(e).split("?")[0]}catch{return e||null}}function hr(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 br(e){let t={};return e.searchParams.forEach((o,i)=>{t[i]||(t[i]=o)}),t}function yr(e){return!!e.host&&["http:","https:"].includes(e.protocol)}function vr(e){return e.replace(/^www\./,"")}function _r(e,t,o){if(t&&{Facebook:"Facebook",Instagram:"Instagram"}[t])return t;let r,d;try{if(e&&e.trim()!=="")r=new URL(e);else return"Direct";if(r?.hostname&&yr(r)){if(d=r.hostname,o&&o===d)return"Direct"}else return""}catch{}if(!d)return"";let l=vr(d);return l?Bt[l]?Bt[l]:l?.includes("google")?"Google":l:""}function Le(e){let{referrer:t,entryPage:o,userAgent:i}=e,r={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 d;if(o&&o.trim()!==""&&o.startsWith("http"))try{let l=new URL(o),f=l?.pathname;d=l?.hostname,f&&(r.page_entry_path=f??"");let p=br(l);r.utm_medium=p.utm_medium??"",r.utm_source=p.utm_source??"",r.utm_campaign=p.utm_campaign??"",r.utm_content=p.utm_content??"",r.utm_term=p.utm_term??"",r.gclid=p.gclid??"",r.fbclid=p.fbclid??"",r.pins_campaign_id=p.pins_campaign_id??"",r.epik=p.epik??""}catch{}if(i){let l=(0,ot.UAParser)(i),f=l?.browser?.name,p=hr(f);r.browser_info=p??"",r.os_info=l?.os?.name??"",i&&(r.device_type=(l?.device?.type||"desktop")?.toUpperCase()??"")}return r.referrer_source=_r(t,r?.browser_info,d)??"",r}catch{return r}}function Ve(e,t){let o=e==="/"||e==="",r=t&&/^\/[a-z]{2}(-[a-z]{2})?\/?$/i.test(e);return o||r?"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 Be(e){if(!e)return"";try{let t=(0,ot.UAParser)(e),o=t?.os,i=t?.device,r="";return o?.name&&(r+=o.name,o.version&&(r+=` ${o.version}`)),i?.type&&(r+=r?` (${i.type})`:i.type),i?.vendor&&(r+=r?` ${i.vendor}`:i.vendor),i?.model&&(r+=r?` ${i.model}`:i.model),r||e}catch{return e}}import{useEffect as bo,useRef as yo,useState as vo}from"react";var kr="https://bitter-river-9c62.support-67d.workers.dev",Cr="https://d339co84ntxcme.cloudfront.net/Prod/orders",A=null;function fe(e){A=e}function $(e){let t=e?.storeId||A?.storeId;return t||(console.warn("[ElevateAB] No storeId provided. Call initAnalytics() first or pass storeId to tracking function."),"")}function Pr(e){return Object.entries(e).filter(([,t])=>typeof t=="string").map(([t,o])=>({test_id:t,variant_id:o}))}function xr(e,t){return Object.entries(e).filter(([o])=>typeof t[o]=="string").map(([o])=>({test_id:o,variant_id:t[o]}))}function Tr(){return typeof window>"u"?!1:H("eabUserPreview")==="true"||new URLSearchParams(window.location.search).get("eabUserPreview")==="true"}function G(e,t,o){if(typeof window>"u"||Tr())return null;let i=navigator.userAgent,r=window.location.pathname,d=Ve(r,o),{referrer:l,entryPage:f}=Se(),p=Le({referrer:l,entryPage:f,userAgent:i}),y=j("ABTL")||{},a=j("ABAU")||{},c=Pr(y),n=xr(a,y),s=Re(localStorage.getItem("shopifyCartId")),u=new Date().toISOString(),_=sessionStorage.getItem("eabIsFirstVisit")==="true",k=H("localization")||"";return{pixel_event_id:`sh-${xe()}`,shop_name:e,timestamp:u,event_type:t,client_id:H("_shopify_y")||void 0,visitor_id:Te(),session_id:Ee(),cart_token:Oe(s||H("cart")),page_url:window.location.href,page_pathname:r,page_search:window.location.search,referrer_url:l,referrer_source:p?.referrer_source,previous_page:document.referrer,page_entry:f,page_entry_path:p?.page_entry_path,page_type:d,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:i,user_agent_no_browser:Be(i),is_first_visit:_,shopify_country:k,ab_test_assignments:c,ab_test_views:n,is_first_order:null}}async function W(e,t=kr){try{let o=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e),keepalive:!0});if(!o.ok)throw new Error(`Worker error: ${o.status}`)}catch(o){console.error("[ElevateAB] Error sending analytics:",o)}}async function De(e={}){let t=$(e);if(!t)return;let o=e.hasLocalizedPaths??A?.hasLocalizedPaths,i=e.workerUrl??A?.workerUrl,r=G(t,"page_viewed",o);if(!r)return;let d={...r,cart_currency:e.currency};await W(d,i)}async function Ne(e){let t=$(e);if(!t)return;let{productId:o,productVendor:i,productPrice:r,productSku:d,currency:l}=e,f=e.hasLocalizedPaths??A?.hasLocalizedPaths,p=e.workerUrl??A?.workerUrl,y=G(t,"product_viewed",f);if(!y)return;let a={...y,cart_currency:l,product_id:I(o),product_vendor:S(i),product_price:E(r),product_sku:S(d)};await W(a,p)}async function Dt(e){let t=$(e);if(!t)return;let{productId:o,variantId:i,productVendor:r,productPrice:d,productQuantity:l,productSku:f,currency:p,cartId:y}=e,a=e.hasLocalizedPaths??A?.hasLocalizedPaths,c=e.workerUrl??A?.workerUrl,n=e.storefrontAccessToken??A?.storefrontAccessToken,s=G(t,"product_added_to_cart",a);if(!s)return;let u={...s,cart_currency:p,product_id:I(o),variant_id:I(i),product_vendor:S(r),product_price:E(d),product_quantity:l,product_sku:S(f)};if(await W(u,c),y&&n)try{let{updateCartAttributes:_}=await import("./cartAttributes-V5XBJEGE.js");await _(y,{storefrontAccessToken:n})}catch(_){console.error("[ElevateAB] Failed to update cart attributes:",_)}}async function Nt(e){let t=$(e);if(!t)return;let{productId:o,variantId:i,productVendor:r,productPrice:d,productQuantity:l,productSku:f,currency:p}=e,y=e.hasLocalizedPaths??A?.hasLocalizedPaths,a=e.workerUrl??A?.workerUrl,c=G(t,"product_removed_from_cart",y);if(!c)return;let n={...c,cart_currency:p,product_id:I(o),variant_id:I(i),product_vendor:S(r),product_price:E(d),product_quantity:l,product_sku:S(f)};await W(n,a)}async function Ht(e){let t=$(e);if(!t)return;let{cartTotalPrice:o,cartTotalQuantity:i,cartItems:r,currency:d}=e,l=e.hasLocalizedPaths??A?.hasLocalizedPaths,f=e.workerUrl??A?.workerUrl,p=G(t,"cart_viewed",l);if(!p)return;let y={...p,cart_currency:d,cart_total_price:E(o),cart_total_quantity:i,cart_items:r?.map(a=>({product_id:I(a.productId),variant_id:I(a.variantId),product_vendor:S(a.productVendor)||"",product_price:E(a.productPrice),product_quantity:a.productQuantity??null,product_sku:S(a.productSku)||""}))};await W(y,f)}async function Mt(e){let t=$(e);if(!t)return;let{searchQuery:o,currency:i}=e,r=e.hasLocalizedPaths??A?.hasLocalizedPaths,d=e.workerUrl??A?.workerUrl,l=G(t,"search_submitted",r);if(!l)return;let f={...l,cart_currency:i,search_query:S(o)};await W(f,d)}async function zt(e){let t=$(e);if(!t)return;let{cartTotalPrice:o,cartSubtotalPrice:i,cartShippingPrice:r,cartTaxAmount:d,cartDiscountAmount:l,customerId:f,cartItems:p,currency:y}=e,a=e.hasLocalizedPaths??A?.hasLocalizedPaths,c=e.workerUrl??A?.workerUrl,n=G(t,"checkout_started",a);if(!n)return;let s=0,u=p?.map(k=>{let g=k.productQuantity??0;return s+=g,{product_id:I(k.productId),variant_id:I(k.variantId),product_vendor:S(k.productVendor)||"",vendor:S(k.productVendor)||"",product_price:E(k.productPrice),total_price:E(k.productPrice),product_quantity:g,quantity:g,product_sku:S(k.productSku)||"",sku:S(k.productSku)||"",total_discount:E(k.totalDiscount)}})||[],_={...n,cart_currency:y,cart_total_price:E(o),cart_subtotal_price:E(i),cart_total_quantity:s,cart_shipping_price:E(r),cart_tax_amount:E(d),cart_discount_amount:E(l),cart_items:u,customer_id:f};await W(_,c)}async function Ft(e){let t=$(e);if(!t)return;let{orderId:o,cartTotalPrice:i,cartSubtotalPrice:r,cartShippingPrice:d,cartTaxAmount:l,cartDiscountAmount:f,customerId:p,isFirstOrder:y,noteAttributes:a,cartItems:c,currency:n}=e,s=e.hasLocalizedPaths??A?.hasLocalizedPaths,u=e.ordersWorkerUrl??A?.ordersWorkerUrl??Cr,_=G(t,"checkout_completed",s);if(!_)return;let k=0,g=c?.map(w=>{let T=w.productQuantity??0;return k+=T,{product_id:I(w.productId),variant_id:I(w.variantId),product_vendor:S(w.productVendor)||"",vendor:S(w.productVendor)||"",product_price:E(w.productPrice),total_price:E(w.productPrice),product_quantity:T,quantity:T,product_sku:S(w.productSku)||"",sku:S(w.productSku)||"",total_discount:E(w.totalDiscount)}})||[],m={..._,cart_currency:n,cart_total_price:E(i),cart_subtotal_price:E(r),cart_total_quantity:k,cart_shipping_price:E(d),cart_tax_amount:E(l),cart_discount_amount:E(f),cart_items:g,order_id:o,customer_id:p,is_first_order:y??null,note_attributes:a};await W(m,u)}var He={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 de(He.EAB_COUNTRY,t.toUpperCase()),t.toUpperCase();let o=H(He.SHOPIFY_LOCALIZATION);if(o)return o.toUpperCase();let i=H(He.EAB_COUNTRY);if(i)return i.toUpperCase();if(typeof localStorage<"u"){let r=localStorage.getItem(He.EAB_COUNTRY);if(r)return r.toUpperCase()}return null}function qt(e,t){let o=t??J();return o?e.map(r=>r.toUpperCase()).includes(o.toUpperCase()):!1}function jt(e,t){let o=t??J();return o?e.map(r=>r.toUpperCase()).includes(o.toUpperCase()):!1}function $t(e){let t=J();return!e.includeCountries?.length&&!e.excludeCountries?.length?!0:!t||e.excludeCountries?.length&&jt(e.excludeCountries,t)?!1:e.includeCountries?.length?qt(e.includeCountries,t):!0}var Me="eab:navigate",ze=!1,nt=0,me=null,ge=null;function Er(){typeof window>"u"||(nt++,!ze&&(ze=!0,me=history.pushState.bind(history),ge=history.replaceState.bind(history),history.pushState=function(...e){me(...e),window.dispatchEvent(new Event(Me))},history.replaceState=function(...e){ge(...e),window.dispatchEvent(new Event(Me))}))}function Sr(){typeof window>"u"||(nt--,!(nt>0||!ze)&&(me&&(history.pushState=me,me=null),ge&&(history.replaceState=ge,ge=null),ze=!1))}function Z(e){if(typeof window>"u")return()=>{};let t=window.location.href,o=()=>{let i=window.location.href;i!==t&&(t=i,e())};return Er(),window.addEventListener(Me,o),window.addEventListener("popstate",o),()=>{window.removeEventListener(Me,o),window.removeEventListener("popstate",o),Sr()}}function it(e){let{configUrl:t,timeout:o=2e3}=e;return`(function(){
|
|
3
3
|
if(new URLSearchParams(location.search).get('abtr')==='true')return;
|
|
4
4
|
|
|
5
5
|
var style=document.createElement('style');
|
|
@@ -27,5 +27,5 @@ import{a as yr,b as vr,c as It,d as ke,e as Y,f as N,g as H,h as tt,i as rt,j as
|
|
|
27
27
|
if(window.__eab_reveal)window.__eab_reveal();
|
|
28
28
|
};
|
|
29
29
|
document.head.appendChild(script);
|
|
30
|
-
})();`}function Yt(e){if(!e?.trim())return"";try{let o=`https://${e.trim().replace(/^https?:\/\//,"")}`,i=new URL(o.replace(/\/+$/,""));return i.hostname.startsWith("www.")&&(i.hostname=i.hostname.substring(4)),i.toString().replace(/\/+$/,"")}catch{return e.trim().replace(/\/+$/,"")}}function st(e,t){let o=Yt(e.split("?")[0]);for(let i of t){let r=Yt(i.split("?")[0]);if(o===r)return!0;try{let d=new URL(e).pathname,l=new URL(i,e).pathname;if(d===l)return!0}catch{}}return!1}function Or(e){return e.data?.redirectBehavior||"redirectAll"}function Jt(e){return!!(H("eabRedirectedTests")||{})[e]}function Qt(e){let t=H("eabRedirectedTests")||{};t[e]=!0,Y("eabRedirectedTests",JSON.stringify(t))}function Vr(e,t){for(let o of e.tests)if(!(o.type!=="SPLIT_URL"||!o.enabled))for(let i of o.variations){let r=i.splitUrlTestLinks||[];if(r.length!==0&&st(t,r))return{test:o,matchedVariation:i,isControlUrl:!!i.isControl}}return null}function Lr(e){if(typeof window>"u")return;let t=new URL(e,window.location.origin);t.searchParams.set("abtr","true");let o=t.toString(),i=window.__remixRouter?.navigate??window.next?.router?.push??window.$nuxt?.$router?.push??window.__navigate;if(i&&typeof i=="function")try{let r=t.pathname+t.search;i(r);return}catch{}window.location.href=o}function fe(e,t){if(typeof window>"u")return!1;let o=window.location.href;if(new URLSearchParams(window.location.search).get("abtr")==="true")return!1;let r=Vr(e,o);if(!r)return!1;let{test:d,matchedVariation:l,isControlUrl:f}=r,p=d.testId,y=Or(d),a=z(p);if(!a)return!1;let c=d.variations.find(u=>u.id===a);if(!c)return!1;let n=c.splitUrlTestLinks||[];if(n.length===0||st(o,n))return!1;switch(y){case"redirectOnlyControlUrl":if(!f||c.isControl)return!1;break;case"redirectOnce":if(Jt(p))return!1;Qt(p);break;case"redirectOnceControlUrlOnly":if(!f||Jt(p)||c.isControl)return!1;Qt(p);break;default:break}let s=n[0];return Lr(s),!0}function Kt(e){return e.tests.some(t=>t.type==="SPLIT_URL"&&t.enabled)}var ct={type:"SPLIT_URL",shouldActivate(e,t){for(let o of e.variations){let i=o.splitUrlTestLinks||[];if(st(t.currentUrl,i))return!0}return!1},getVariantData(){return{handlerActivated:!0}}};var Xt="elv-el-",Zt={ELEMENT_NODE:1,TEXT_NODE:3},He=new Map,Me=new Map,ze=new Map,Fe=new Map,te=!1;function F(e,t){if(t==="*")return!0;if(t.startsWith("*")&&t.endsWith("*")){let o=t.slice(1,-1);return e.includes(o)}if(t.startsWith("*")){let o=t.slice(1);return e.endsWith(o)}return t===e}function pt(){return typeof window>"u"?!1:window.innerWidth<768}function Br(e){let t="";for(let o=0;o<e.length;o++){let i=e[o];i>="A"&&i<="Z"?(o!==0&&(t+="-"),t+=i.toLowerCase()):t+=i}return t}function Dr(e){return e.nodeType===Zt.TEXT_NODE}function ut(e){return e.nodeType===Zt.ELEMENT_NODE}function lt(e,t){He.has(e)||He.set(e,t.cloneNode(!0))}function er(e){let t=e;t=t.replace(/`/g,"`").replace(/$/g,"$");try{t=JSON.parse('"'+t+'"')}catch{}return t}function tr(e){if(typeof window>"u"||e.length===0)return;let t=window.location.pathname,o=e.filter(r=>r.pathnames?.length?r.pathnames.some(d=>F(t,d)):!0);te=pt();let i=o.map(r=>({...r,style:r.style?{...r.style.lg,...te&&r.style.sm}:void 0,content:r.content&&te&&r.content.sm?r.content.sm:r.content?.lg}));i.filter(r=>r.content!==void 0).forEach(r=>{(r.applyAll?Array.from(document.querySelectorAll(r.selector)):[document.querySelector(r.selector)].filter(Boolean)).forEach((l,f)=>{if(!l)return;let p=r.applyAll?`${r.selector}-${f}-${l.id||Math.random().toString(36).substr(2,9)}`:r.selector;lt(p,l),Dr(l)?l.nodeValue=r.content:ut(l)&&(l.innerHTML=r.content)})}),i.filter(r=>r.style!==void 0).forEach(r=>{let d=document.querySelector(r.selector);!d||!ut(d)||(lt(r.selector,d),Object.entries(r.style).forEach(([l,f])=>{let p=Br(l),y=f.toString().includes("!important"),a=f.toString().replace(/\s*!important\s*$/,"");d.style.setProperty(p,a,y?"important":void 0)}))}),i.filter(r=>r.attributes!==void 0).forEach(r=>{let d=document.querySelector(r.selector);!d||!ut(d)||(lt(r.selector,d),Object.entries(r.attributes).forEach(([l,f])=>{d.setAttribute(l,f)}))})}function rr(e){if(typeof window>"u"||e.length===0)return;let t=window.location.pathname;e.filter(i=>i.selector?.pathnames?.length?i.selector.pathnames.some(r=>F(t,r)):!0).forEach(i=>{let r=`${Xt}${i.id}`;if(Fe.has(r))return;let d=document.querySelector(i.selector.target);if(!d||d.parentElement?.querySelector(`#${r}`))return;let l=or(i);i.selector.placement==="after"?d.after(l):i.selector.placement==="before"&&d.before(l),Fe.set(r,l)})}function or(e){let t=document.createElement(e.tagName);return t.id=`${Xt}${e.id}`,e.style&&Object.assign(t.style,e.style),e.attributes&&Object.entries(e.attributes).forEach(([o,i])=>{t.setAttribute(o,i)}),e.kind==="text"&&e.content&&(t.innerText=e.content),e.kind==="container"&&e.childrens&&e.childrens.forEach(o=>{let i=or(o);t.appendChild(i)}),t}function qe(e,t){if(typeof window>"u"||e.length===0)return;let o=window.location.pathname;e.filter(r=>r.pathnames?.length?r.excludePathnames?.length&&r.excludePathnames.some(l=>F(o,l))?!1:r.pathnames.some(d=>F(o,d)):!0).forEach(r=>{r.id&&(r.css&&Nr(r.id,r.css),r.js&&Hr(r.id,r.js,t))})}function Nr(e,t){let o=`css-${e}`;if(Me.has(o)||document.getElementById(o))return;let i=document.createElement("style");i.id=o,i.textContent=er(t),document.head.appendChild(i),Me.set(o,i)}function Hr(e,t,o){let i=`js-${e}`;if(ze.has(i)||document.getElementById(i))return;let r=document.createElement("script");r.id=i,o&&r.setAttribute("nonce",o);let d=er(t);r.textContent="(function(){try{"+d+"}catch(e){console.error('[ElevateAB] Custom script error:', e)}})();",document.head.appendChild(r),ze.set(i,r)}function nr(){He.forEach((e,t)=>{let o=document.querySelector(t);o&&o.replaceWith(e.cloneNode(!0))})}function ir(){Me.forEach(e=>e.remove()),Me.clear(),ze.forEach(e=>e.remove()),ze.clear(),Fe.forEach(e=>e.remove()),Fe.clear(),He.clear()}function Mr(e,t){let o=[],i=[],r=[];return e.tests.filter(l=>l.type==="CONTENT"&&l.enabled).forEach(l=>{let f=z(l.testId);if(!f)return;let p=l.variations.find(y=>y.id===f);p?.content&&(p.content.changes?.length&&o.push(...p.content.changes),p.content.elements?.length&&i.push(...p.content.elements),p.content.customCodes?.length&&r.push(...p.content.customCodes))}),{changes:o,elements:i,blocks:[],customCodes:r}}function me(e){return e.tests.some(t=>t.type==="CONTENT"&&t.enabled)}function je(e,t,o){if(typeof window>"u"||!me(e))return;let i=Mr(e,t);(i.changes.length>0||i.elements.length>0||i.customCodes.length>0)&&(tr(i.changes),rr(i.elements),qe(i.customCodes,o))}function dt(e,t,o){if(typeof window>"u")return;let i=pt();i!==te&&(nr(),te=i),je(e,t,o)}function ft(e,t,o,i=!0){if(typeof window>"u")return()=>{};let r=()=>{pt()!==te&&dt(e,t,o)};window.addEventListener("resize",r);let d=()=>{};return i&&(d=ee(()=>{dt(e,t,o)})),()=>{window.removeEventListener("resize",r),d(),ir()}}function mt(e){return e.tests.some(t=>t.type==="CUSTOM_CODE"&&t.enabled)}function ar(e,t,o){if(typeof window>"u"||!mt(e))return;let i=e.tests.filter(d=>d.type==="CUSTOM_CODE"&&d.enabled),r=[];i.forEach(d=>{let l=z(d.testId);if(!l)return;let f=d.variations.find(p=>p.id===l);f?.customCode&&(f.customCode.js||f.customCode.css)&&r.push(f.customCode)}),r.length>0&&qe(r,o)}import{jsx as Gr,jsxs as Wr}from"react/jsx-runtime";var qr="https://ds0wlyksfn0sb.cloudfront.net/headless";function jr(e){return e.replace(/^https?:\/\//,"").replace(".myshopify.com","")}function sr(e){return`${qr}/${jr(e)}.js`}var $r=typeof window<"u"?V.useLayoutEffect:V.useEffect;function gt({storeId:e,storefrontAccessToken:t,preventFlickering:o=!1,flickerTimeout:i=3e3,nonce:r,children:d}){let[l,f]=V.useState(null),[p,y]=V.useState(null),[a,c]=V.useState(null);V.useEffect(()=>{if(typeof window>"u")return;le({storeId:e,storefrontAccessToken:t});let m=J();y(m);let g=Q();c(g)},[e,t]);let n=Fr(()=>{typeof window<"u"&&window.__eab_reveal&&window.__eab_reveal()},[]);V.useEffect(()=>{async function m(){try{let g=typeof window<"u"?J():null,w=null;if(typeof window<"u"&&window.eab_data)w=window.eab_data;else{let O=sr(e);w=await new Promise((W,q)=>{let L=document.createElement("script");L.src=O,L.async=!0,L.onload=()=>{let re=window.eab_data;L.remove(),re?W(re):q(new Error("Failed to load config: window.eab_data is undefined"))},L.onerror=()=>{L.remove(),W({allTests:{},selectors:{selectorsV2:[]}})},document.head.appendChild(L)})}if(!w||!w.allTests||Object.keys(w.allTests).length===0){f({tests:[],selectors:void 0}),n();return}if(w.subscriptionPaused){console.error(`[ElevateAB] Subscription is paused or stopped for store: ${e}. `+(w.subscriptionMessage||"A/B tests will not run. Please reactivate your subscription.")),f({tests:[],selectors:void 0}),n();return}if(!(Object.keys(w.allTests||{}).length>0)){f({tests:[],selectors:void 0}),n();return}let R=It(w);if(ot(R,g),R.tests.some(O=>O.type==="SPLIT_URL")&&fe(R,g))return;f(R),n()}catch(g){console.error("[ElevateAB] Failed to load config:",g),f({tests:[],selectors:void 0}),n()}}m()},[e,n]),$r(()=>{if(!l||typeof window>"u")return;let m=()=>Kt(l)?fe(l,p):!1,g=()=>{if(me(l))try{je(l,p,r)}catch(O){console.error("[ElevateAB] Failed to apply CONTENT tests:",O)}if(mt(l))try{ar(l,p,r)}catch(O){console.error("[ElevateAB] Failed to apply CUSTOM_CODE tests:",O)}};m()||g();let w=null,T=ee(()=>{m()||(g(),w!==null&&window.cancelAnimationFrame(w),w=window.requestAnimationFrame(()=>{g(),w=null}))}),R=me(l)?ft(l,p,r,!1):()=>{};return()=>{w!==null&&window.cancelAnimationFrame(w),T(),R()}},[l,p,r]);let s=V.useMemo(()=>({config:l,storeId:e,storefrontAccessToken:t,isPreviewMode:p?.isPreview??!1,previewTestId:p?.previewTestId??null,previewState:p,selectors:l?.selectors,countryCode:a}),[l,e,t,p,a]),u=zr(!1);V.useEffect(()=>{!t&&!u.current&&(u.current=!0,console.warn("[ElevateAB] No storefrontAccessToken provided. Orders won't be attributed to test variants."))},[t]);let _=V.useMemo(()=>sr(e),[e]),k=V.useMemo(()=>at({configUrl:_,timeout:o?i:2e3}),[_,o,i]);return Wr(Ee.Provider,{value:s,children:[Gr("script",{nonce:r,dangerouslySetInnerHTML:{__html:k}}),d]})}import{usePathname as Jr,useSearchParams as Qr}from"next/navigation";import{jsx as cr,jsxs as Zr}from"react/jsx-runtime";function Kr({currency:e}){let t=Jr(),o=Qr();return ur(()=>{o.get("eabUserPreview")!=="true"&&Ve({currency:e})},[t,o,e]),null}function Xr({storeId:e,storefrontAccessToken:t,preventFlickering:o=!1,flickerTimeout:i=3e3,currency:r,children:d}){return ur(()=>{le({storeId:e,storefrontAccessToken:t})},[e,t]),Zr(gt,{storeId:e,storefrontAccessToken:t,preventFlickering:o,flickerTimeout:i,children:[cr(Yr,{fallback:null,children:cr(Kr,{currency:r})}),d]})}import{useEffect as eo}from"react";function to({productId:e,productVendor:t,productPrice:o,productSku:i,currency:r}){return eo(()=>{e&&Le({productId:e,productVendor:t,productPrice:o,productSku:i,currency:r})},[e,t,o,i,r]),null}function lr(e){let t=H("ABAU")||{};t[e]||(t[e]=!0,Y("ABAU",JSON.stringify(t)))}function dr(e){let t=rt("ABAV")||{};t[e]||(t[e]=!0,tt("ABAV",t))}function wt(e){lr(e),dr(e)}import X from"react";var pr=new Map;function K(e){pr.set(e.type,e)}function $e(e){return pr.get(e)}function ro(e){try{let i=new URL(e,"https://example.com").pathname.match(/\/products\/([^\/\?]+)/);return i?i[1]:null}catch{return null}}function oo(e,t,o,i){if(typeof window>"u"||!e.prices||!t)return;let r=e.prices[t];if(!r)return;let d=r.price?.[o],l=r.compare?.[o],f=i;if(f?.selectorsV2?.length)for(let p of f.selectorsV2){if(p.price&&d){let y=p.price.replace("{{variant}}",t);document.querySelectorAll(y).forEach(c=>{let n=new Intl.NumberFormat("en-US",{style:"currency",currency:o}).format(parseFloat(d));c.textContent=n})}if(p.compareAt&&l){let y=p.compareAt.replace("{{variant}}",t);document.querySelectorAll(y).forEach(c=>{let n=new Intl.NumberFormat("en-US",{style:"currency",currency:o}).format(parseFloat(l));c.textContent=n})}if(p.saving&&d&&l)for(let y of p.saving){let a=y.selector.replace("{{variant}}",t);document.querySelectorAll(a).forEach(n=>{let s=parseFloat(d),u=parseFloat(l),_=u-s;if(y.isPercentage){let k=Math.round(_/u*100);n.textContent=`${k}%`}else{let k=new Intl.NumberFormat("en-US",{style:"currency",currency:o}).format(_);n.textContent=k}})}}}var ht={type:"PRICE_PLUS",shouldActivate(e,t){let o=e.data;if(!o)return!1;let{productId:i,productHandle:r}=t,d=r||ro(t.currentUrl),l=i&&o.productIds?.includes(i),f=d&&o.handles?.includes(d);return l||f},applyEffect(e,t,o){oo(t,o.variantId,o.currencyCode||"USD",o.selectors)},getVariantData(e,t,o){let i=e.data;return{prices:t.prices,matchedProductId:o.productId,productIds:i?.productIds,handles:i?.handles,handlerActivated:!0}}};function no(e,t){let i=e.data?.pathnames||[];if(!i.length)return!0;try{let d=new URL(t,"https://example.com").pathname;return i.some(l=>F(d,l))}catch{return!1}}var Ge={type:"CONTENT",shouldActivate(e,t){return no(e,t.currentUrl)},getVariantData(e,t,o){let i=e.data;return{content:t.content,pathnames:i?.pathnames,handlerActivated:!0}}};function io(e,t){let i=e.data?.pathnames||[];if(!i.length)return!0;try{let d=new URL(t,"https://example.com").pathname;return i.some(l=>F(d,l))}catch{return!1}}var bt={type:"CUSTOM_CODE",shouldActivate(e,t){return io(e,t.currentUrl)},getVariantData(e,t,o){let i=e.data;return{customCode:t.customCode,pathnames:i?.pathnames,excludePathnames:i?.excludePathnames,handlerActivated:!0}}};K(ht);K(ct);K(Ge);K(bt);function co(e){if(typeof window>"u")return{currentUrl:"",selectors:e};let t=window.location.href,o=window.location.pathname,i,r=o.match(/\/products\/([^\/\?]+)/);r&&(i=r[1]);let d,f=new URLSearchParams(window.location.search).get("variant");return f&&(d=f),{currentUrl:t,productHandle:i,variantId:d,selectors:e,currencyCode:"USD"}}function fr(e){let{config:t,previewState:o,selectors:i}=Te(),[r,d]=X.useState(null),[l,f]=X.useState(!0),p=X.useMemo(()=>t&&t.tests.find(n=>n.testId===e)||null,[t,e]),y=X.useMemo(()=>o||J(),[o]),a=X.useRef(null),c=X.useRef(null);return X.useEffect(()=>{let n=!0;if(t===null)return;if(!p){a.current!==e&&(a.current=e,console.warn(`[ElevateAB] Test not found: ${e}`)),n&&f(!1);return}if(!p.enabled&&!y?.isPreview){a.current!==`${e}-disabled`&&(a.current=`${e}-disabled`,console.warn(`[ElevateAB] Test disabled: ${e}`)),n&&f(!1);return}let s=z(e);if(!s){n&&f(!1);return}let u=p.variations.find(g=>g.id===s);if(!u){n&&f(!1);return}let _=$e(p.type),k=co(i),m={...u};if(_?.shouldActivate(p,k)){let g=`${e}-${u.id}`;_.applyEffect&&c.current!==g&&(c.current=g,_.applyEffect(p,u,k));let w=_.getVariantData(p,u,k);m={...m,...w}}return n&&d(m),y?.isPreview||wt(e),n&&f(!1),()=>{n=!1}},[t,p,e,y,i]),{variant:r,isLoading:l,isControl:r?.isControl??!1,isA:r?.isA??!1,isB:r?.isB??!1,isC:r?.isC??!1,isD:r?.isD??!1}}import{useEffect as Fn,useContext as qn,useRef as jn}from"react";export{Xr as ElevateNextProvider,to as ProductViewTracker,Rt as clearPreviewMode,U as extractShopifyId,Lt as extractShopifyType,Q as getCountryCode,J as getPreviewState,Ot as isInPreviewMode,Bt as isShopifyGid,Wt as matchesGeoTargeting,Ht as trackAddToCart,zt as trackCartView,jt as trackCheckoutCompleted,qt as trackCheckoutStarted,Ve as trackPageView,Le as trackProductView,Mt as trackRemoveFromCart,Ft as trackSearchSubmitted,Te as useElevateConfig,fr as useExperiment};
|
|
30
|
+
})();`}function Gt(e){if(!e?.trim())return"";try{let o=`https://${e.trim().replace(/^https?:\/\//,"")}`,i=new URL(o.replace(/\/+$/,""));return i.hostname.startsWith("www.")&&(i.hostname=i.hostname.substring(4)),i.toString().replace(/\/+$/,"")}catch{return e.trim().replace(/\/+$/,"")}}function at(e,t){let o=Gt(e.split("?")[0]);for(let i of t){let r=Gt(i.split("?")[0]);if(o===r)return!0;try{let d=new URL(e).pathname,l=new URL(i,e).pathname;if(d===l)return!0}catch{}}return!1}function Ar(e){return e.data?.redirectBehavior||"redirectAll"}function Wt(e){return!!(j("eabRedirectedTests")||{})[e]}function Yt(e){let t=j("eabRedirectedTests")||{};t[e]=!0,de("eabRedirectedTests",JSON.stringify(t))}function Ir(e,t){for(let o of e.tests)if(!(o.type!=="SPLIT_URL"||!o.enabled))for(let i of o.variations){let r=i.splitUrlTestLinks||[];if(r.length!==0&&at(t,r))return{test:o,matchedVariation:i,isControlUrl:!!i.isControl}}return null}function Ur(e){if(typeof window>"u")return;let t=new URL(e,window.location.origin);t.searchParams.set("abtr","true");let o=t.toString(),i=window.__remixRouter?.navigate??window.next?.router?.push??window.$nuxt?.$router?.push??window.__navigate;if(i&&typeof i=="function")try{let r=t.pathname+t.search;i(r);return}catch{}window.location.href=o}function we(e,t){if(typeof window>"u")return!1;let o=window.location.href;if(new URLSearchParams(window.location.search).get("abtr")==="true")return!1;let r=Ir(e,o);if(!r)return!1;let{test:d,matchedVariation:l,isControlUrl:f}=r,p=d.testId,y=Ar(d),a=z(p);if(!a)return!1;let c=d.variations.find(u=>u.id===a);if(!c)return!1;let n=c.splitUrlTestLinks||[];if(n.length===0||at(o,n))return!1;switch(y){case"redirectOnlyControlUrl":if(!f||c.isControl)return!1;break;case"redirectOnce":if(Wt(p))return!1;Yt(p);break;case"redirectOnceControlUrlOnly":if(!f||Wt(p)||c.isControl)return!1;Yt(p);break;default:break}let s=n[0];return Ur(s),!0}function Jt(e){return e.tests.some(t=>t.type==="SPLIT_URL"&&t.enabled)}var st={type:"SPLIT_URL",shouldActivate(e,t){for(let o of e.variations){let i=o.splitUrlTestLinks||[];if(at(t.currentUrl,i))return!0}return!1},getVariantData(){return{handlerActivated:!0}}};var Qt="elv-el-",Kt={ELEMENT_NODE:1,TEXT_NODE:3},Fe=new Map,ee=new Map,te=new Map,re=new Map,oe=!1;function F(e,t){if(t==="*")return!0;if(t.startsWith("*")&&t.endsWith("*")){let o=t.slice(1,-1);return e.includes(o)}if(t.startsWith("*")){let o=t.slice(1);return e.endsWith(o)}return t===e}function dt(){return typeof window>"u"?!1:window.innerWidth<768}function Rr(e){let t="";for(let o=0;o<e.length;o++){let i=e[o];i>="A"&&i<="Z"?(o!==0&&(t+="-"),t+=i.toLowerCase()):t+=i}return t}function Or(e){return e.nodeType===Kt.TEXT_NODE}function ct(e){return e.nodeType===Kt.ELEMENT_NODE}function lt(e,t){Fe.has(e)||Fe.set(e,t.cloneNode(!0))}function Xt(e){let t=e;t=t.replace(/`/g,"`").replace(/$/g,"$");try{t=JSON.parse('"'+t+'"')}catch{}return t}function Zt(e){if(typeof window>"u"||e.length===0)return;let t=window.location.pathname,o=e.filter(r=>r.pathnames?.length?r.pathnames.some(d=>F(t,d)):!0);oe=dt();let i=o.map(r=>({...r,style:r.style?{...r.style.lg,...oe&&r.style.sm}:void 0,content:r.content&&oe&&r.content.sm?r.content.sm:r.content?.lg}));i.filter(r=>r.content!==void 0).forEach(r=>{(r.applyAll?Array.from(document.querySelectorAll(r.selector)):[document.querySelector(r.selector)].filter(Boolean)).forEach((l,f)=>{if(!l)return;let p=r.applyAll?`${r.selector}-${f}-${l.id||Math.random().toString(36).substr(2,9)}`:r.selector;lt(p,l),Or(l)?l.nodeValue=r.content:ct(l)&&(l.innerHTML=r.content)})}),i.filter(r=>r.style!==void 0).forEach(r=>{let d=document.querySelector(r.selector);!d||!ct(d)||(lt(r.selector,d),Object.entries(r.style).forEach(([l,f])=>{let p=Rr(l),y=f.toString().includes("!important"),a=f.toString().replace(/\s*!important\s*$/,"");d.style.setProperty(p,a,y?"important":void 0)}))}),i.filter(r=>r.attributes!==void 0).forEach(r=>{let d=document.querySelector(r.selector);!d||!ct(d)||(lt(r.selector,d),Object.entries(r.attributes).forEach(([l,f])=>{d.setAttribute(l,f)}))})}function er(e){if(typeof window>"u"||e.length===0)return;let t=window.location.pathname;e.filter(i=>i.selector?.pathnames?.length?i.selector.pathnames.some(r=>F(t,r)):!0).forEach(i=>{let r=`${Qt}${i.id}`,d=re.get(r);if(d&&!document.contains(d)&&re.delete(r),re.has(r))return;let l=document.querySelector(i.selector.target);if(!l||l.parentElement?.querySelector(`#${r}`))return;let f=tr(i);i.selector.placement==="after"?l.after(f):i.selector.placement==="before"&&l.before(f),re.set(r,f)})}function tr(e){let t=document.createElement(e.tagName);return t.id=`${Qt}${e.id}`,e.style&&Object.assign(t.style,e.style),e.attributes&&Object.entries(e.attributes).forEach(([o,i])=>{t.setAttribute(o,i)}),e.kind==="text"&&e.content&&(t.innerText=e.content),e.kind==="container"&&e.childrens&&e.childrens.forEach(o=>{let i=tr(o);t.appendChild(i)}),t}function qe(e,t){if(typeof window>"u"||e.length===0)return;let o=window.location.pathname;e.filter(r=>r.pathnames?.length?r.excludePathnames?.length&&r.excludePathnames.some(l=>F(o,l))?!1:r.pathnames.some(d=>F(o,d)):!0).forEach(r=>{r.id&&(r.css&&Lr(r.id,r.css),r.js&&Vr(r.id,r.js,t))})}function Lr(e,t){let o=`css-${e}`,i=ee.get(o);if(i&&!document.contains(i)&&ee.delete(o),ee.has(o)||document.getElementById(o))return;let r=document.createElement("style");r.id=o,r.textContent=Xt(t),document.head.appendChild(r),ee.set(o,r)}function Vr(e,t,o){let i=`js-${e}`,r=te.get(i);if(r&&!document.contains(r)&&te.delete(i),te.has(i)||document.getElementById(i))return;let d=document.createElement("script");d.id=i,o&&d.setAttribute("nonce",o);let l=Xt(t);d.textContent="(function(){try{"+l+"}catch(e){console.error('[ElevateAB] Custom script error:', e)}})();",document.head.appendChild(d),te.set(i,d)}function rr(){Fe.forEach((e,t)=>{let o=document.querySelector(t);o&&o.replaceWith(e.cloneNode(!0))})}function or(){ee.forEach(e=>e.remove()),ee.clear(),te.forEach(e=>e.remove()),te.clear(),re.forEach(e=>e.remove()),re.clear(),Fe.clear()}function Br(e,t){let o=[],i=[],r=[];return e.tests.filter(l=>l.type==="CONTENT"&&l.enabled).forEach(l=>{let f=z(l.testId);if(!f)return;let p=l.variations.find(y=>y.id===f);p?.content&&(p.content.changes?.length&&o.push(...p.content.changes),p.content.elements?.length&&i.push(...p.content.elements),p.content.customCodes?.length&&r.push(...p.content.customCodes))}),{changes:o,elements:i,blocks:[],customCodes:r}}function he(e){return e.tests.some(t=>t.type==="CONTENT"&&t.enabled)}function je(e,t,o){if(typeof window>"u"||!he(e))return;let i=Br(e,t);(i.changes.length>0||i.elements.length>0||i.customCodes.length>0)&&(Zt(i.changes),er(i.elements),qe(i.customCodes,o))}function ut(e,t,o){if(typeof window>"u")return;let i=dt();i!==oe&&(rr(),oe=i),je(e,t,o)}function pt(e,t,o,i=!0){if(typeof window>"u")return()=>{};let r=()=>{dt()!==oe&&ut(e,t,o)};window.addEventListener("resize",r);let d=()=>{};return i&&(d=Z(()=>{ut(e,t,o)})),()=>{window.removeEventListener("resize",r),d(),or()}}function ft(e){return e.tests.some(t=>t.type==="CUSTOM_CODE"&&t.enabled)}function nr(e,t,o){if(typeof window>"u"||!ft(e))return;let i=e.tests.filter(d=>d.type==="CUSTOM_CODE"&&d.enabled),r=[];i.forEach(d=>{let l=z(d.testId);if(!l)return;let f=d.variations.find(p=>p.id===l);f?.customCode&&(f.customCode.js||f.customCode.css)&&r.push(f.customCode)}),r.length>0&&qe(r,o)}import{jsx as Fr,jsxs as qr}from"react/jsx-runtime";var Hr="https://ds0wlyksfn0sb.cloudfront.net/headless";function Mr(e){return e.replace(/^https?:\/\//,"").replace(".myshopify.com","")}function ir(e){return`${Hr}/${Mr(e)}.js`}var zr=typeof window<"u"?L.useLayoutEffect:L.useEffect;function mt({storeId:e,storefrontAccessToken:t,preventFlickering:o=!1,flickerTimeout:i=3e3,nonce:r,children:d}){let[l,f]=L.useState(null),[p,y]=L.useState(null),[a,c]=L.useState(null);L.useEffect(()=>{if(typeof window>"u")return;fe({storeId:e,storefrontAccessToken:t});let g=Y();y(g);let m=J();c(m)},[e,t]);let n=Nr(()=>{typeof window<"u"&&window.__eab_reveal&&window.__eab_reveal()},[]);L.useEffect(()=>{async function g(){try{let m=typeof window<"u"?Y():null,w=null;if(typeof window<"u"&&window.eab_data)w=window.eab_data;else{let V=ir(e);w=await new Promise((O,q)=>{let B=document.createElement("script");B.src=V,B.async=!0,B.onload=()=>{let ne=window.eab_data;B.remove(),ne?O(ne):q(new Error("Failed to load config: window.eab_data is undefined"))},B.onerror=()=>{B.remove(),O({allTests:{},selectors:{selectorsV2:[]}})},document.head.appendChild(B)})}if(!w||!w.allTests||Object.keys(w.allTests).length===0){f({tests:[],selectors:void 0}),n();return}if(w.subscriptionPaused){console.error(`[ElevateAB] Subscription is paused or stopped for store: ${e}. `+(w.subscriptionMessage||"A/B tests will not run. Please reactivate your subscription.")),f({tests:[],selectors:void 0}),n();return}if(!(Object.keys(w.allTests||{}).length>0)){f({tests:[],selectors:void 0}),n();return}let R=At(w);if(rt(R,m),R.tests.some(V=>V.type==="SPLIT_URL")&&we(R,m))return;f(R),n()}catch(m){console.error("[ElevateAB] Failed to load config:",m),f({tests:[],selectors:void 0}),n()}}g()},[e,n]),zr(()=>{if(!l||typeof window>"u")return;let g=()=>Jt(l)?we(l,p):!1,m=()=>{if(he(l))try{je(l,p,r)}catch(O){console.error("[ElevateAB] Failed to apply CONTENT tests:",O)}if(ft(l))try{nr(l,p,r)}catch(O){console.error("[ElevateAB] Failed to apply CUSTOM_CODE tests:",O)}};g()||m();let w=null,T=null,R=Z(()=>{g()||(m(),w!==null&&window.cancelAnimationFrame(w),T!==null&&window.clearTimeout(T),w=window.requestAnimationFrame(()=>{m(),T=window.setTimeout(()=>{m(),T=null},80),w=null}))}),V=he(l)?pt(l,p,r,!1):()=>{};return()=>{w!==null&&window.cancelAnimationFrame(w),T!==null&&window.clearTimeout(T),R(),V()}},[l,p,r]);let s=L.useMemo(()=>({config:l,storeId:e,storefrontAccessToken:t,isPreviewMode:p?.isPreview??!1,previewTestId:p?.previewTestId??null,previewState:p,selectors:l?.selectors,countryCode:a}),[l,e,t,p,a]),u=Dr(!1);L.useEffect(()=>{!t&&!u.current&&(u.current=!0,console.warn("[ElevateAB] No storefrontAccessToken provided. Orders won't be attributed to test variants."))},[t]);let _=L.useMemo(()=>ir(e),[e]),k=L.useMemo(()=>it({configUrl:_,timeout:o?i:2e3}),[_,o,i]);return qr(Ae.Provider,{value:s,children:[Fr("script",{nonce:r,dangerouslySetInnerHTML:{__html:k}}),d]})}import{usePathname as $r,useSearchParams as Gr}from"next/navigation";import{jsx as ar,jsxs as Jr}from"react/jsx-runtime";function Wr({currency:e}){let t=$r(),o=Gr();return sr(()=>{o.get("eabUserPreview")!=="true"&&De({currency:e})},[t,o,e]),null}function Yr({storeId:e,storefrontAccessToken:t,preventFlickering:o=!1,flickerTimeout:i=3e3,currency:r,children:d}){return sr(()=>{fe({storeId:e,storefrontAccessToken:t})},[e,t]),Jr(mt,{storeId:e,storefrontAccessToken:t,preventFlickering:o,flickerTimeout:i,children:[ar(jr,{fallback:null,children:ar(Wr,{currency:r})}),d]})}import{useEffect as Qr}from"react";function Kr({productId:e,productVendor:t,productPrice:o,productSku:i,currency:r}){return Qr(()=>{e&&Ne({productId:e,productVendor:t,productPrice:o,productSku:i,currency:r})},[e,t,o,i,r]),null}import K from"react";var cr=new Map;function Q(e){cr.set(e.type,e)}function $e(e){return cr.get(e)}function Xr(e){try{let i=new URL(e,"https://example.com").pathname.match(/\/products\/([^\/\?]+)/);return i?i[1]:null}catch{return null}}function Zr(e,t,o,i){if(typeof window>"u"||!e.prices||!t)return;let r=e.prices[t];if(!r)return;let d=r.price?.[o],l=r.compare?.[o],f=i;if(f?.selectorsV2?.length)for(let p of f.selectorsV2){if(p.price&&d){let y=p.price.replace("{{variant}}",t);document.querySelectorAll(y).forEach(c=>{let n=new Intl.NumberFormat("en-US",{style:"currency",currency:o}).format(parseFloat(d));c.textContent=n})}if(p.compareAt&&l){let y=p.compareAt.replace("{{variant}}",t);document.querySelectorAll(y).forEach(c=>{let n=new Intl.NumberFormat("en-US",{style:"currency",currency:o}).format(parseFloat(l));c.textContent=n})}if(p.saving&&d&&l)for(let y of p.saving){let a=y.selector.replace("{{variant}}",t);document.querySelectorAll(a).forEach(n=>{let s=parseFloat(d),u=parseFloat(l),_=u-s;if(y.isPercentage){let k=Math.round(_/u*100);n.textContent=`${k}%`}else{let k=new Intl.NumberFormat("en-US",{style:"currency",currency:o}).format(_);n.textContent=k}})}}}var gt={type:"PRICE_PLUS",shouldActivate(e,t){let o=e.data;if(!o)return!1;let{productId:i,productHandle:r}=t,d=r||Xr(t.currentUrl),l=i&&o.productIds?.includes(i),f=d&&o.handles?.includes(d);return l||f},applyEffect(e,t,o){Zr(t,o.variantId,o.currencyCode||"USD",o.selectors)},getVariantData(e,t,o){let i=e.data;return{prices:t.prices,matchedProductId:o.productId,productIds:i?.productIds,handles:i?.handles,handlerActivated:!0}}};function eo(e,t){let i=e.data?.pathnames||[];if(!i.length)return!0;try{let d=new URL(t,"https://example.com").pathname;return i.some(l=>F(d,l))}catch{return!1}}var Ge={type:"CONTENT",shouldActivate(e,t){return eo(e,t.currentUrl)},getVariantData(e,t,o){let i=e.data;return{content:t.content,pathnames:i?.pathnames,handlerActivated:!0}}};function to(e,t){let i=e.data?.pathnames||[];if(!i.length)return!0;try{let d=new URL(t,"https://example.com").pathname;return i.some(l=>F(d,l))}catch{return!1}}var wt={type:"CUSTOM_CODE",shouldActivate(e,t){return to(e,t.currentUrl)},getVariantData(e,t,o){let i=e.data;return{customCode:t.customCode,pathnames:i?.pathnames,excludePathnames:i?.excludePathnames,handlerActivated:!0}}};Q(gt);Q(st);Q(Ge);Q(wt);function no(e){if(typeof window>"u")return{currentUrl:"",selectors:e};let t=window.location.href,o=window.location.pathname,i,r=o.match(/\/products\/([^\/\?]+)/);r&&(i=r[1]);let d,f=new URLSearchParams(window.location.search).get("variant");return f&&(d=f),{currentUrl:t,productHandle:i,variantId:d,selectors:e,currencyCode:"USD"}}function lr(e){let{config:t,previewState:o,selectors:i}=Ie(),[r,d]=K.useState(null),[l,f]=K.useState(!0),p=K.useMemo(()=>t&&t.tests.find(n=>n.testId===e)||null,[t,e]),y=K.useMemo(()=>o||Y(),[o]),a=K.useRef(null),c=K.useRef(null);return K.useEffect(()=>{let n=!0;if(t===null)return;if(!p){a.current!==e&&(a.current=e,console.warn(`[ElevateAB] Test not found: ${e}`)),n&&f(!1);return}if(!p.enabled&&!y?.isPreview){a.current!==`${e}-disabled`&&(a.current=`${e}-disabled`,console.warn(`[ElevateAB] Test disabled: ${e}`)),n&&f(!1);return}let s=z(e);if(!s){n&&f(!1);return}let u=p.variations.find(m=>m.id===s);if(!u){n&&f(!1);return}let _=$e(p.type),k=no(i),g={...u};if(_?.shouldActivate(p,k)){let m=`${e}-${u.id}`;_.applyEffect&&c.current!==m&&(c.current=m,_.applyEffect(p,u,k));let w=_.getVariantData(p,u,k);g={...g,...w}}return n&&d(g),y?.isPreview||tt(e),n&&f(!1),()=>{n=!1}},[t,p,e,y,i]),{variant:r,isLoading:l,isControl:r?.isControl??!1,isA:r?.isA??!1,isB:r?.isB??!1,isC:r?.isC??!1,isD:r?.isD??!1}}import{useEffect as Bn,useContext as Dn,useRef as Nn}from"react";export{Yr as ElevateNextProvider,Kr as ProductViewTracker,It as clearPreviewMode,I as extractShopifyId,Ot as extractShopifyType,J as getCountryCode,Y as getPreviewState,Ut as isInPreviewMode,Lt as isShopifyGid,$t as matchesGeoTargeting,Dt as trackAddToCart,Ht as trackCartView,Ft as trackCheckoutCompleted,zt as trackCheckoutStarted,De as trackPageView,Ne as trackProductView,Nt as trackRemoveFromCart,Mt as trackSearchSubmitted,Ie as useElevateConfig,lr as useExperiment};
|
|
31
31
|
//# sourceMappingURL=next.js.map
|