@sesamy/sesamy-js 1.19.7 → 1.19.8
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/sesamy-js.cjs +1 -1
- package/dist/sesamy-js.d.ts +86 -44
- package/dist/sesamy-js.iife.js +2 -2
- package/dist/sesamy-js.mjs +36 -17
- package/package.json +1 -1
package/dist/sesamy-js.iife.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var sesamyJs=function(Ne){"use strict";var vP=Object.defineProperty;var hP=(Ne,le,K)=>le in Ne?vP(Ne,le,{enumerable:!0,configurable:!0,writable:!0,value:K}):Ne[le]=K;var be=(Ne,le,K)=>hP(Ne,typeof le!="symbol"?le+"":le,K);var le=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},K=function(e){try{return!!e()}catch{return!0}},pv=K,Dr=!pv(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),os=Dr,ss=Function.prototype,sa=ss.call,mv=os&&ss.bind.bind(sa,sa),G=os?mv:function(e){return function(){return sa.apply(e,arguments)}},cs=G,gv=cs({}.toString),yv=cs("".slice),Mr=function(e){return yv(gv(e),8,-1)},wv=G,bv=K,Sv=Mr,ca=Object,$v=wv("".split),us=bv(function(){return!ca("z").propertyIsEnumerable(0)})?function(e){return Sv(e)==="String"?$v(e,""):ca(e)}:ca,Fr=function(e){return e==null},Iv=Fr,Tv=TypeError,zr=function(e){if(Iv(e))throw new Tv("Can't call method on "+e);return e},Ev=us,Pv=zr,tr=function(e){return Ev(Pv(e))},rr=function(e){return e&&e.Math===Math&&e},H=rr(typeof globalThis=="object"&&globalThis)||rr(typeof window=="object"&&window)||rr(typeof self=="object"&&self)||rr(typeof le=="object"&&le)||rr(typeof le=="object"&&le)||function(){return this}()||Function("return this")(),ls={exports:{}},Ov=!1,fs=H,kv=Object.defineProperty,ua=function(e,t){try{kv(fs,e,{value:t,configurable:!0,writable:!0})}catch{fs[e]=t}return t},_v=H,Rv=ua,ds="__core-js_shared__",vs=ls.exports=_v[ds]||Rv(ds,{});(vs.versions||(vs.versions=[])).push({version:"3.38.0",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.0/LICENSE",source:"https://github.com/zloirock/core-js"});var la=ls.exports,hs=la,ps=function(e,t){return hs[e]||(hs[e]=t||{})},Cv=zr,Av=Object,Br=function(e){return Av(Cv(e))},jv=G,Lv=Br,Nv=jv({}.hasOwnProperty),fe=Object.hasOwn||function(t,r){return Nv(Lv(t),r)},Uv=G,xv=0,Dv=Math.random(),Mv=Uv(1 .toString),ms=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Mv(++xv+Dv,36)},Fv=H,gs=Fv.navigator,ys=gs&&gs.userAgent,nr=ys?String(ys):"",ws=H,fa=nr,bs=ws.process,Ss=ws.Deno,$s=bs&&bs.versions||Ss&&Ss.version,Is=$s&&$s.v8,Se,Hr;Is&&(Se=Is.split("."),Hr=Se[0]>0&&Se[0]<4?1:+(Se[0]+Se[1])),!Hr&&fa&&(Se=fa.match(/Edge\/(\d+)/),(!Se||Se[1]>=74)&&(Se=fa.match(/Chrome\/(\d+)/),Se&&(Hr=+Se[1])));var Ts=Hr,Es=Ts,zv=K,Bv=H,Hv=Bv.String,Ps=!!Object.getOwnPropertySymbols&&!zv(function(){var e=Symbol("symbol detection");return!Hv(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Es&&Es<41}),Kv=Ps,Os=Kv&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Gv=H,Wv=ps,ks=fe,Vv=ms,Zv=Ps,Jv=Os,wt=Gv.Symbol,da=Wv("wks"),Yv=Jv?wt.for||wt:wt&&wt.withoutSetter||Vv,q=function(e){return ks(da,e)||(da[e]=Zv&&ks(wt,e)?wt[e]:Yv("Symbol."+e)),da[e]},va=typeof document=="object"&&document.all,W=typeof va>"u"&&va!==void 0?function(e){return typeof e=="function"||e===va}:function(e){return typeof e=="function"},Xv=W,de=function(e){return typeof e=="object"?e!==null:Xv(e)},qv=de,Qv=String,eh=TypeError,$e=function(e){if(qv(e))return e;throw new eh(Qv(e)+" is not an object")},_s={},th=K,Q=!th(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),rh=Q,nh=K,Rs=rh&&nh(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),_e={},ah=H,Cs=de,ha=ah.document,ih=Cs(ha)&&Cs(ha.createElement),Kr=function(e){return ih?ha.createElement(e):{}},oh=Q,sh=K,ch=Kr,As=!oh&&!sh(function(){return Object.defineProperty(ch("div"),"a",{get:function(){return 7}}).a!==7}),uh=Dr,Gr=Function.prototype.call,te=uh?Gr.bind(Gr):function(){return Gr.apply(Gr,arguments)},pa=H,lh=W,fh=function(e){return lh(e)?e:void 0},Ie=function(e,t){return arguments.length<2?fh(pa[e]):pa[e]&&pa[e][t]},dh=G,Wr=dh({}.isPrototypeOf),vh=Ie,hh=W,ph=Wr,mh=Os,gh=Object,js=mh?function(e){return typeof e=="symbol"}:function(e){var t=vh("Symbol");return hh(t)&&ph(t.prototype,gh(e))},yh=String,Vr=function(e){try{return yh(e)}catch{return"Object"}},wh=W,bh=Vr,Sh=TypeError,Te=function(e){if(wh(e))return e;throw new Sh(bh(e)+" is not a function")},$h=Te,Ih=Fr,ma=function(e,t){var r=e[t];return Ih(r)?void 0:$h(r)},ga=te,ya=W,wa=de,Th=TypeError,Eh=function(e,t){var r,n;if(t==="string"&&ya(r=e.toString)&&!wa(n=ga(r,e))||ya(r=e.valueOf)&&!wa(n=ga(r,e))||t!=="string"&&ya(r=e.toString)&&!wa(n=ga(r,e)))return n;throw new Th("Can't convert object to primitive value")},Ph=te,Ls=de,Ns=js,Oh=ma,kh=Eh,_h=q,Rh=TypeError,Ch=_h("toPrimitive"),Ah=function(e,t){if(!Ls(e)||Ns(e))return e;var r=Oh(e,Ch),n;if(r){if(t===void 0&&(t="default"),n=Ph(r,e,t),!Ls(n)||Ns(n))return n;throw new Rh("Can't convert object to primitive value")}return t===void 0&&(t="number"),kh(e,t)},jh=Ah,Lh=js,Us=function(e){var t=jh(e,"string");return Lh(t)?t:t+""},Nh=Q,Uh=As,xh=Rs,Zr=$e,xs=Us,Dh=TypeError,ba=Object.defineProperty,Mh=Object.getOwnPropertyDescriptor,Sa="enumerable",$a="configurable",Ia="writable";_e.f=Nh?xh?function(t,r,n){if(Zr(t),r=xs(r),Zr(n),typeof t=="function"&&r==="prototype"&&"value"in n&&Ia in n&&!n[Ia]){var a=Mh(t,r);a&&a[Ia]&&(t[r]=n.value,n={configurable:$a in n?n[$a]:a[$a],enumerable:Sa in n?n[Sa]:a[Sa],writable:!1})}return ba(t,r,n)}:ba:function(t,r,n){if(Zr(t),r=xs(r),Zr(n),Uh)try{return ba(t,r,n)}catch{}if("get"in n||"set"in n)throw new Dh("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var Fh=Math.ceil,zh=Math.floor,Bh=Math.trunc||function(t){var r=+t;return(r>0?zh:Fh)(r)},Hh=Bh,Ta=function(e){var t=+e;return t!==t||t===0?0:Hh(t)},Kh=Ta,Gh=Math.max,Wh=Math.min,Vh=function(e,t){var r=Kh(e);return r<0?Gh(r+t,0):Wh(r,t)},Zh=Ta,Jh=Math.min,Yh=function(e){var t=Zh(e);return t>0?Jh(t,9007199254740991):0},Xh=Yh,Ea=function(e){return Xh(e.length)},qh=tr,Qh=Vh,ep=Ea,Ds=function(e){return function(t,r,n){var a=qh(t),i=ep(a);if(i===0)return!e&&-1;var o=Qh(n,i),s;if(e&&r!==r){for(;i>o;)if(s=a[o++],s!==s)return!0}else for(;i>o;o++)if((e||o in a)&&a[o]===r)return e||o||0;return!e&&-1}},tp={includes:Ds(!0),indexOf:Ds(!1)},Pa={},rp=G,Oa=fe,np=tr,ap=tp.indexOf,ip=Pa,Ms=rp([].push),Fs=function(e,t){var r=np(e),n=0,a=[],i;for(i in r)!Oa(ip,i)&&Oa(r,i)&&Ms(a,i);for(;t.length>n;)Oa(r,i=t[n++])&&(~ap(a,i)||Ms(a,i));return a},ka=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],op=Fs,sp=ka,zs=Object.keys||function(t){return op(t,sp)},cp=Q,up=Rs,lp=_e,fp=$e,dp=tr,vp=zs;_s.f=cp&&!up?Object.defineProperties:function(t,r){fp(t);for(var n=dp(r),a=vp(r),i=a.length,o=0,s;i>o;)lp.f(t,s=a[o++],n[s]);return t};var hp=Ie,Bs=hp("document","documentElement"),pp=ps,mp=ms,Hs=pp("keys"),_a=function(e){return Hs[e]||(Hs[e]=mp(e))},gp=$e,yp=_s,Ks=ka,wp=Pa,bp=Bs,Sp=Kr,$p=_a,Gs=">",Ws="<",Ra="prototype",Ca="script",Vs=$p("IE_PROTO"),Aa=function(){},Zs=function(e){return Ws+Ca+Gs+e+Ws+"/"+Ca+Gs},Js=function(e){e.write(Zs("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ip=function(){var e=Sp("iframe"),t="java"+Ca+":",r;return e.style.display="none",bp.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(Zs("document.F=Object")),r.close(),r.F},Jr,Yr=function(){try{Jr=new ActiveXObject("htmlfile")}catch{}Yr=typeof document<"u"?document.domain&&Jr?Js(Jr):Ip():Js(Jr);for(var e=Ks.length;e--;)delete Yr[Ra][Ks[e]];return Yr()};wp[Vs]=!0;var Xr=Object.create||function(t,r){var n;return t!==null?(Aa[Ra]=gp(t),n=new Aa,Aa[Ra]=null,n[Vs]=t):n=Yr(),r===void 0?n:yp.f(n,r)},Tp=q,Ep=Xr,Pp=_e.f,ja=Tp("unscopables"),La=Array.prototype;La[ja]===void 0&&Pp(La,ja,{configurable:!0,value:Ep(null)});var Op=function(e){La[ja][e]=!0},ar={},kp=H,_p=W,Ys=kp.WeakMap,Rp=_p(Ys)&&/native code/.test(String(Ys)),Qe=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},Cp=Q,Ap=_e,jp=Qe,et=Cp?function(e,t,r){return Ap.f(e,t,jp(1,r))}:function(e,t,r){return e[t]=r,e},Lp=Rp,Xs=H,Np=de,Up=et,Na=fe,Ua=la,xp=_a,Dp=Pa,qs="Object already initialized",xa=Xs.TypeError,Mp=Xs.WeakMap,qr,ir,Qr,Fp=function(e){return Qr(e)?ir(e):qr(e,{})},zp=function(e){return function(t){var r;if(!Np(t)||(r=ir(t)).type!==e)throw new xa("Incompatible receiver, "+e+" required");return r}};if(Lp||Ua.state){var Re=Ua.state||(Ua.state=new Mp);Re.get=Re.get,Re.has=Re.has,Re.set=Re.set,qr=function(e,t){if(Re.has(e))throw new xa(qs);return t.facade=e,Re.set(e,t),t},ir=function(e){return Re.get(e)||{}},Qr=function(e){return Re.has(e)}}else{var bt=xp("state");Dp[bt]=!0,qr=function(e,t){if(Na(e,bt))throw new xa(qs);return t.facade=e,Up(e,bt,t),t},ir=function(e){return Na(e,bt)?e[bt]:{}},Qr=function(e){return Na(e,bt)}}var St={set:qr,get:ir,has:Qr,enforce:Fp,getterFor:zp},Da={},Ma={},Qs={}.propertyIsEnumerable,ec=Object.getOwnPropertyDescriptor,Bp=ec&&!Qs.call({1:2},1);Ma.f=Bp?function(t){var r=ec(this,t);return!!r&&r.enumerable}:Qs;var Hp=Q,Kp=te,Gp=Ma,Wp=Qe,Vp=tr,Zp=Us,Jp=fe,Yp=As,tc=Object.getOwnPropertyDescriptor;Da.f=Hp?tc:function(t,r){if(t=Vp(t),r=Zp(r),Yp)try{return tc(t,r)}catch{}if(Jp(t,r))return Wp(!Kp(Gp.f,t,r),t[r])};var rc={exports:{}},Fa=Q,Xp=fe,nc=Function.prototype,qp=Fa&&Object.getOwnPropertyDescriptor,za=Xp(nc,"name"),Qp=za&&(function(){}).name==="something",em=za&&(!Fa||Fa&&qp(nc,"name").configurable),ac={EXISTS:za,PROPER:Qp,CONFIGURABLE:em},tm=G,rm=W,Ba=la,nm=tm(Function.toString);rm(Ba.inspectSource)||(Ba.inspectSource=function(e){return nm(e)});var Ha=Ba.inspectSource,Ka=G,am=K,im=W,en=fe,Ga=Q,om=ac.CONFIGURABLE,sm=Ha,ic=St,cm=ic.enforce,um=ic.get,oc=String,tn=Object.defineProperty,lm=Ka("".slice),fm=Ka("".replace),dm=Ka([].join),vm=Ga&&!am(function(){return tn(function(){},"length",{value:8}).length!==8}),hm=String(String).split("String"),pm=rc.exports=function(e,t,r){lm(oc(t),0,7)==="Symbol("&&(t="["+fm(oc(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!en(e,"name")||om&&e.name!==t)&&(Ga?tn(e,"name",{value:t,configurable:!0}):e.name=t),vm&&r&&en(r,"arity")&&e.length!==r.arity&&tn(e,"length",{value:r.arity});try{r&&en(r,"constructor")&&r.constructor?Ga&&tn(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch{}var n=cm(e);return en(n,"source")||(n.source=dm(hm,typeof t=="string"?t:"")),e};Function.prototype.toString=pm(function(){return im(this)&&um(this).source||sm(this)},"toString");var sc=rc.exports,mm=W,gm=_e,ym=sc,wm=ua,ve=function(e,t,r,n){n||(n={});var a=n.enumerable,i=n.name!==void 0?n.name:t;if(mm(r)&&ym(r,i,n),n.global)a?e[t]=r:wm(t,r);else{try{n.unsafe?e[t]&&(a=!0):delete e[t]}catch{}a?e[t]=r:gm.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},cc={},bm=Fs,Sm=ka,$m=Sm.concat("length","prototype");cc.f=Object.getOwnPropertyNames||function(t){return bm(t,$m)};var Wa={};Wa.f=Object.getOwnPropertySymbols;var Im=Ie,Tm=G,Em=cc,Pm=Wa,Om=$e,km=Tm([].concat),_m=Im("Reflect","ownKeys")||function(t){var r=Em.f(Om(t)),n=Pm.f;return n?km(r,n(t)):r},uc=fe,Rm=_m,Cm=Da,Am=_e,lc=function(e,t,r){for(var n=Rm(t),a=Am.f,i=Cm.f,o=0;o<n.length;o++){var s=n[o];!uc(e,s)&&!(r&&uc(r,s))&&a(e,s,i(t,s))}},jm=K,Lm=W,Nm=/#|\.prototype\./,or=function(e,t){var r=xm[Um(e)];return r===Mm?!0:r===Dm?!1:Lm(t)?jm(t):!!t},Um=or.normalize=function(e){return String(e).replace(Nm,".").toLowerCase()},xm=or.data={},Dm=or.NATIVE="N",Mm=or.POLYFILL="P",fc=or,rn=H,Fm=Da.f,zm=et,Bm=ve,Hm=ua,Km=lc,Gm=fc,Y=function(e,t){var r=e.target,n=e.global,a=e.stat,i,o,s,u,f,l;if(n?o=rn:a?o=rn[r]||Hm(r,{}):o=rn[r]&&rn[r].prototype,o)for(s in t){if(f=t[s],e.dontCallGetSet?(l=Fm(o,s),u=l&&l.value):u=o[s],i=Gm(n?s:r+(a?".":"#")+s,e.forced),!i&&u!==void 0){if(typeof f==typeof u)continue;Km(f,u)}(e.sham||u&&u.sham)&&zm(f,"sham",!0),Bm(o,s,f,e)}},Wm=K,Vm=!Wm(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Zm=fe,Jm=W,Ym=Br,Xm=_a,qm=Vm,dc=Xm("IE_PROTO"),Va=Object,Qm=Va.prototype,Za=qm?Va.getPrototypeOf:function(e){var t=Ym(e);if(Zm(t,dc))return t[dc];var r=t.constructor;return Jm(r)&&t instanceof r?r.prototype:t instanceof Va?Qm:null},eg=K,tg=W,rg=de,vc=Za,ng=ve,ag=q,Ja=ag("iterator"),hc=!1,tt,Ya,Xa;[].keys&&(Xa=[].keys(),"next"in Xa?(Ya=vc(vc(Xa)),Ya!==Object.prototype&&(tt=Ya)):hc=!0);var ig=!rg(tt)||eg(function(){var e={};return tt[Ja].call(e)!==e});ig&&(tt={}),tg(tt[Ja])||ng(tt,Ja,function(){return this});var pc={IteratorPrototype:tt,BUGGY_SAFARI_ITERATORS:hc},og=_e.f,sg=fe,cg=q,mc=cg("toStringTag"),$t=function(e,t,r){e&&!r&&(e=e.prototype),e&&!sg(e,mc)&&og(e,mc,{configurable:!0,value:t})},ug=pc.IteratorPrototype,lg=Xr,fg=Qe,dg=$t,vg=ar,hg=function(){return this},gc=function(e,t,r,n){var a=t+" Iterator";return e.prototype=lg(ug,{next:fg(+!n,r)}),dg(e,a,!1),vg[a]=hg,e},pg=G,mg=Te,gg=function(e,t,r){try{return pg(mg(Object.getOwnPropertyDescriptor(e,t)[r]))}catch{}},yg=de,wg=function(e){return yg(e)||e===null},bg=wg,Sg=String,$g=TypeError,Ig=function(e){if(bg(e))return e;throw new $g("Can't set "+Sg(e)+" as a prototype")},Tg=gg,Eg=de,Pg=zr,Og=Ig,qa=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,t={},r;try{r=Tg(Object.prototype,"__proto__","set"),r(t,[]),e=t instanceof Array}catch{}return function(a,i){return Pg(a),Og(i),Eg(a)&&(e?r(a,i):a.__proto__=i),a}}():void 0),kg=Y,_g=te,yc=ac,Rg=W,Cg=gc,wc=Za,bc=qa,Ag=$t,jg=et,Qa=ve,Lg=q,Ng=ar,Sc=pc,Ug=yc.PROPER,xg=yc.CONFIGURABLE,$c=Sc.IteratorPrototype,nn=Sc.BUGGY_SAFARI_ITERATORS,sr=Lg("iterator"),Ic="keys",cr="values",Tc="entries",Dg=function(){return this},Ec=function(e,t,r,n,a,i,o){Cg(r,t,n);var s=function(T){if(T===a&&d)return d;if(!nn&&T&&T in l)return l[T];switch(T){case Ic:return function(){return new r(this,T)};case cr:return function(){return new r(this,T)};case Tc:return function(){return new r(this,T)}}return function(){return new r(this)}},u=t+" Iterator",f=!1,l=e.prototype,c=l[sr]||l["@@iterator"]||a&&l[a],d=!nn&&c||s(a),v=t==="Array"&&l.entries||c,p,S,g;if(v&&(p=wc(v.call(new e)),p!==Object.prototype&&p.next&&(wc(p)!==$c&&(bc?bc(p,$c):Rg(p[sr])||Qa(p,sr,Dg)),Ag(p,u,!0))),Ug&&a===cr&&c&&c.name!==cr&&(xg?jg(l,"name",cr):(f=!0,d=function(){return _g(c,this)})),a)if(S={values:s(cr),keys:i?d:s(Ic),entries:s(Tc)},o)for(g in S)(nn||f||!(g in l))&&Qa(l,g,S[g]);else kg({target:t,proto:!0,forced:nn||f},S);return l[sr]!==d&&Qa(l,sr,d,{name:a}),Ng[t]=d,S},ei=function(e,t){return{value:e,done:t}},Mg=tr,ti=Op,Pc=ar,Oc=St,Fg=_e.f,zg=Ec,an=ei,Bg=Q,kc="Array Iterator",Hg=Oc.set,Kg=Oc.getterFor(kc),Gg=zg(Array,"Array",function(e,t){Hg(this,{type:kc,target:Mg(e),index:0,kind:t})},function(){var e=Kg(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=void 0,an(void 0,!0);switch(e.kind){case"keys":return an(r,!1);case"values":return an(t[r],!1)}return an([r,t[r]],!1)},"values"),_c=Pc.Arguments=Pc.Array;if(ti("keys"),ti("values"),ti("entries"),Bg&&_c.name!=="values")try{Fg(_c,"name",{value:"values"})}catch{}var Rc=H,Wg=Q,Vg=Object.getOwnPropertyDescriptor,Cc=function(e){if(!Wg)return Rc[e];var t=Vg(Rc,e);return t&&t.value},Zg=K,Jg=q,Yg=Q,Ac=Ov,Xg=Jg("iterator"),on=!Zg(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach(function(a,i){t.delete("b"),n+=i+a}),r.delete("a",2),r.delete("b",void 0),Ac&&(!e.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!t.size&&(Ac||!Yg)||!t.sort||e.href!=="https://a/c%20d?a=1&c=3"||t.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!t[Xg]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||n!=="a1c3"||new URL("https://x",void 0).host!=="x"}),jc=sc,qg=_e,sn=function(e,t,r){return r.get&&jc(r.get,t,{getter:!0}),r.set&&jc(r.set,t,{setter:!0}),qg.f(e,t,r)},Qg=ve,ey=function(e,t,r){for(var n in t)Qg(e,n,t[n],r);return e},ty=Wr,ry=TypeError,ri=function(e,t){if(ty(t,e))return e;throw new ry("Incorrect invocation")},ny=Mr,ay=G,iy=function(e){if(ny(e)==="Function")return ay(e)},Lc=iy,oy=Te,sy=Dr,cy=Lc(Lc.bind),It=function(e,t){return oy(e),t===void 0?e:sy?cy(e,t):function(){return e.apply(t,arguments)}},uy=q,ly=uy("toStringTag"),Nc={};Nc[ly]="z";var ni=String(Nc)==="[object z]",fy=ni,dy=W,cn=Mr,vy=q,hy=vy("toStringTag"),py=Object,my=cn(function(){return arguments}())==="Arguments",gy=function(e,t){try{return e[t]}catch{}},ur=fy?cn:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=gy(t=py(e),hy))=="string"?r:my?cn(t):(n=cn(t))==="Object"&&dy(t.callee)?"Arguments":n},yy=ur,wy=String,Ue=function(e){if(yy(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return wy(e)},by=ur,Uc=ma,Sy=Fr,$y=ar,Iy=q,Ty=Iy("iterator"),un=function(e){if(!Sy(e))return Uc(e,Ty)||Uc(e,"@@iterator")||$y[by(e)]},Ey=te,Py=Te,Oy=$e,ky=Vr,_y=un,Ry=TypeError,ai=function(e,t){var r=arguments.length<2?_y(e):t;if(Py(r))return Oy(Ey(r,e));throw new Ry(ky(e)+" is not iterable")},Cy=TypeError,rt=function(e,t){if(e<t)throw new Cy("Not enough arguments");return e},Ay=G,ln=Ay([].slice),xc=ln,jy=Math.floor,ii=function(e,t){var r=e.length;if(r<8)for(var n=1,a,i;n<r;){for(i=n,a=e[n];i&&t(e[i-1],a)>0;)e[i]=e[--i];i!==n++&&(e[i]=a)}else for(var o=jy(r/2),s=ii(xc(e,0,o),t),u=ii(xc(e,o),t),f=s.length,l=u.length,c=0,d=0;c<f||d<l;)e[c+d]=c<f&&d<l?t(s[c],u[d])<=0?s[c++]:u[d++]:c<f?s[c++]:u[d++];return e},Ly=ii,oi=Y,fn=H,si=Cc,dn=te,Ce=G,lr=Q,Dc=on,Mc=ve,Ny=sn,Uy=ey,xy=$t,Dy=gc,ci=St,Fc=ri,ui=W,My=fe,Fy=It,zy=ur,By=$e,zc=de,re=Ue,Hy=Xr,Bc=Qe,Hc=ai,Ky=un,vn=ei,Tt=rt,Gy=q,Wy=Ly,Vy=Gy("iterator"),Et="URLSearchParams",Kc=Et+"Iterator",Gc=ci.set,he=ci.getterFor(Et),Zy=ci.getterFor(Kc),Wc=si("fetch"),hn=si("Request"),fr=si("Headers"),li=hn&&hn.prototype,Vc=fr&&fr.prototype,Jy=fn.RegExp,Yy=fn.TypeError,Zc=fn.decodeURIComponent,Xy=fn.encodeURIComponent,qy=Ce("".charAt),Jc=Ce([].join),nt=Ce([].push),fi=Ce("".replace),Qy=Ce([].shift),Yc=Ce([].splice),Xc=Ce("".split),ew=Ce("".slice),tw=/\+/g,qc=Array(4),rw=function(e){return qc[e-1]||(qc[e-1]=Jy("((?:%[\\da-f]{2}){"+e+"})","gi"))},nw=function(e){try{return Zc(e)}catch{return e}},Qc=function(e){var t=fi(e,tw," "),r=4;try{return Zc(t)}catch{for(;r;)t=fi(t,rw(r--),nw);return t}},aw=/[!'()~]|%20/g,iw={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ow=function(e){return iw[e]},eu=function(e){return fi(Xy(e),aw,ow)},di=Dy(function(t,r){Gc(this,{type:Kc,target:he(t).entries,index:0,kind:r})},Et,function(){var t=Zy(this),r=t.target,n=t.index++;if(!r||n>=r.length)return t.target=void 0,vn(void 0,!0);var a=r[n];switch(t.kind){case"keys":return vn(a.key,!1);case"values":return vn(a.value,!1)}return vn([a.key,a.value],!1)},!0),tu=function(e){this.entries=[],this.url=null,e!==void 0&&(zc(e)?this.parseObject(e):this.parseQuery(typeof e=="string"?qy(e,0)==="?"?ew(e,1):e:re(e)))};tu.prototype={type:Et,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t=this.entries,r=Ky(e),n,a,i,o,s,u,f;if(r)for(n=Hc(e,r),a=n.next;!(i=dn(a,n)).done;){if(o=Hc(By(i.value)),s=o.next,(u=dn(s,o)).done||(f=dn(s,o)).done||!dn(s,o).done)throw new Yy("Expected sequence with length 2");nt(t,{key:re(u.value),value:re(f.value)})}else for(var l in e)My(e,l)&&nt(t,{key:l,value:re(e[l])})},parseQuery:function(e){if(e)for(var t=this.entries,r=Xc(e,"&"),n=0,a,i;n<r.length;)a=r[n++],a.length&&(i=Xc(a,"="),nt(t,{key:Qc(Qy(i)),value:Qc(Jc(i,"="))}))},serialize:function(){for(var e=this.entries,t=[],r=0,n;r<e.length;)n=e[r++],nt(t,eu(n.key)+"="+eu(n.value));return Jc(t,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var pn=function(){Fc(this,Pt);var t=arguments.length>0?arguments[0]:void 0,r=Gc(this,new tu(t));lr||(this.size=r.entries.length)},Pt=pn.prototype;if(Uy(Pt,{append:function(t,r){var n=he(this);Tt(arguments.length,2),nt(n.entries,{key:re(t),value:re(r)}),lr||this.length++,n.updateURL()},delete:function(e){for(var t=he(this),r=Tt(arguments.length,1),n=t.entries,a=re(e),i=r<2?void 0:arguments[1],o=i===void 0?i:re(i),s=0;s<n.length;){var u=n[s];if(u.key===a&&(o===void 0||u.value===o)){if(Yc(n,s,1),o!==void 0)break}else s++}lr||(this.size=n.length),t.updateURL()},get:function(t){var r=he(this).entries;Tt(arguments.length,1);for(var n=re(t),a=0;a<r.length;a++)if(r[a].key===n)return r[a].value;return null},getAll:function(t){var r=he(this).entries;Tt(arguments.length,1);for(var n=re(t),a=[],i=0;i<r.length;i++)r[i].key===n&&nt(a,r[i].value);return a},has:function(t){for(var r=he(this).entries,n=Tt(arguments.length,1),a=re(t),i=n<2?void 0:arguments[1],o=i===void 0?i:re(i),s=0;s<r.length;){var u=r[s++];if(u.key===a&&(o===void 0||u.value===o))return!0}return!1},set:function(t,r){var n=he(this);Tt(arguments.length,1);for(var a=n.entries,i=!1,o=re(t),s=re(r),u=0,f;u<a.length;u++)f=a[u],f.key===o&&(i?Yc(a,u--,1):(i=!0,f.value=s));i||nt(a,{key:o,value:s}),lr||(this.size=a.length),n.updateURL()},sort:function(){var t=he(this);Wy(t.entries,function(r,n){return r.key>n.key?1:-1}),t.updateURL()},forEach:function(t){for(var r=he(this).entries,n=Fy(t,arguments.length>1?arguments[1]:void 0),a=0,i;a<r.length;)i=r[a++],n(i.value,i.key,this)},keys:function(){return new di(this,"keys")},values:function(){return new di(this,"values")},entries:function(){return new di(this,"entries")}},{enumerable:!0}),Mc(Pt,Vy,Pt.entries,{name:"entries"}),Mc(Pt,"toString",function(){return he(this).serialize()},{enumerable:!0}),lr&&Ny(Pt,"size",{get:function(){return he(this).entries.length},configurable:!0,enumerable:!0}),xy(pn,Et),oi({global:!0,constructor:!0,forced:!Dc},{URLSearchParams:pn}),!Dc&&ui(fr)){var sw=Ce(Vc.has),cw=Ce(Vc.set),ru=function(e){if(zc(e)){var t=e.body,r;if(zy(t)===Et)return r=e.headers?new fr(e.headers):new fr,sw(r,"content-type")||cw(r,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Hy(e,{body:Bc(0,re(t)),headers:Bc(0,r)})}return e};if(ui(Wc)&&oi({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return Wc(t,arguments.length>1?ru(arguments[1]):{})}}),ui(hn)){var vi=function(t){return Fc(this,li),new hn(t,arguments.length>1?ru(arguments[1]):{})};li.constructor=vi,vi.prototype=li,oi({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:vi})}}var uw={URLSearchParams:pn,getState:he},lw=ve,mn=G,nu=Ue,fw=rt,au=URLSearchParams,gn=au.prototype,dw=mn(gn.append),iu=mn(gn.delete),vw=mn(gn.forEach),hw=mn([].push),hi=new au("a=1&a=2&b=3");hi.delete("a",1),hi.delete("b",void 0),hi+""!="a=2"&&lw(gn,"delete",function(e){var t=arguments.length,r=t<2?void 0:arguments[1];if(t&&r===void 0)return iu(this,e);var n=[];vw(this,function(c,d){hw(n,{key:d,value:c})}),fw(t,1);for(var a=nu(e),i=nu(r),o=0,s=0,u=!1,f=n.length,l;o<f;)l=n[o++],u||l.key===a?(u=!0,iu(this,l.key)):s++;for(;s<f;)l=n[s++],l.key===a&&l.value===i||dw(this,l.key,l.value)},{enumerable:!0,unsafe:!0});var pw=ve,ou=G,mw=Ue,gw=rt,su=URLSearchParams,pi=su.prototype,yw=ou(pi.getAll),ww=ou(pi.has),cu=new su("a=1");(cu.has("a",2)||!cu.has("a",void 0))&&pw(pi,"has",function(t){var r=arguments.length,n=r<2?void 0:arguments[1];if(r&&n===void 0)return ww(this,t);var a=yw(this,t);gw(r,1);for(var i=mw(n),o=0;o<a.length;)if(a[o++]===i)return!0;return!1},{enumerable:!0,unsafe:!0});var bw=Q,Sw=G,$w=sn,mi=URLSearchParams.prototype,Iw=Sw(mi.forEach);bw&&!("size"in mi)&&$w(mi,"size",{get:function(){var t=0;return Iw(this,function(){t++}),t},configurable:!0,enumerable:!0});var Tw=H,gi=Tw,Ew=gi;Ew.URLSearchParams;var yi=G,Pw=Ta,Ow=Ue,kw=zr,_w=yi("".charAt),uu=yi("".charCodeAt),Rw=yi("".slice),lu=function(e){return function(t,r){var n=Ow(kw(t)),a=Pw(r),i=n.length,o,s;return a<0||a>=i?e?"":void 0:(o=uu(n,a),o<55296||o>56319||a+1===i||(s=uu(n,a+1))<56320||s>57343?e?_w(n,a):o:e?Rw(n,a,a+2):(o-55296<<10)+(s-56320)+65536)}},fu={codeAt:lu(!1),charAt:lu(!0)},Cw=fu.charAt,Aw=Ue,du=St,jw=Ec,vu=ei,hu="String Iterator",Lw=du.set,Nw=du.getterFor(hu);jw(String,"String",function(e){Lw(this,{type:hu,string:Aw(e),index:0})},function(){var t=Nw(this),r=t.string,n=t.index,a;return n>=r.length?vu(void 0,!0):(a=Cw(r,n),t.index+=a.length,vu(a,!1))});var pu=Q,Uw=G,xw=te,Dw=K,wi=zs,Mw=Wa,Fw=Ma,zw=Br,Bw=us,Ot=Object.assign,mu=Object.defineProperty,Hw=Uw([].concat),Kw=!Ot||Dw(function(){if(pu&&Ot({b:1},Ot(mu({},"a",{enumerable:!0,get:function(){mu(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(a){t[a]=a}),Ot({},e)[r]!==7||wi(Ot({},t)).join("")!==n})?function(t,r){for(var n=zw(t),a=arguments.length,i=1,o=Mw.f,s=Fw.f;a>i;)for(var u=Bw(arguments[i++]),f=o?Hw(wi(u),o(u)):wi(u),l=f.length,c=0,d;l>c;)d=f[c++],(!pu||xw(s,u,d))&&(n[d]=u[d]);return n}:Ot,Gw=te,gu=$e,Ww=ma,yu=function(e,t,r){var n,a;gu(e);try{if(n=Ww(e,"return"),!n){if(t==="throw")throw r;return r}n=Gw(n,e)}catch(i){a=!0,n=i}if(t==="throw")throw r;if(a)throw n;return gu(n),r},Vw=$e,Zw=yu,Jw=function(e,t,r,n){try{return n?t(Vw(r)[0],r[1]):t(r)}catch(a){Zw(e,"throw",a)}},Yw=q,Xw=ar,qw=Yw("iterator"),Qw=Array.prototype,wu=function(e){return e!==void 0&&(Xw.Array===e||Qw[qw]===e)},eb=G,tb=K,bu=W,rb=ur,nb=Ie,ab=Ha,Su=function(){},$u=nb("Reflect","construct"),bi=/^\s*(?:class|function)\b/,ib=eb(bi.exec),ob=!bi.test(Su),dr=function(t){if(!bu(t))return!1;try{return $u(Su,[],t),!0}catch{return!1}},Iu=function(t){if(!bu(t))return!1;switch(rb(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ob||!!ib(bi,ab(t))}catch{return!0}};Iu.sham=!0;var Tu=!$u||tb(function(){var e;return dr(dr.call)||!dr(Object)||!dr(function(){e=!0})||e})?Iu:dr,sb=Q,cb=_e,ub=Qe,lb=function(e,t,r){sb?cb.f(e,t,ub(0,r)):e[t]=r},fb=It,db=te,vb=Br,hb=Jw,pb=wu,mb=Tu,gb=Ea,Eu=lb,yb=ai,wb=un,Pu=Array,bb=function(t){var r=vb(t),n=mb(this),a=arguments.length,i=a>1?arguments[1]:void 0,o=i!==void 0;o&&(i=fb(i,a>2?arguments[2]:void 0));var s=wb(r),u=0,f,l,c,d,v,p;if(s&&!(this===Pu&&pb(s)))for(l=n?new this:[],d=yb(r,s),v=d.next;!(c=db(v,d)).done;u++)p=o?hb(d,i,[c.value,u],!0):c.value,Eu(l,u,p);else for(f=gb(r),l=n?new this(f):Pu(f);f>u;u++)p=o?i(r[u],u):r[u],Eu(l,u,p);return l.length=u,l},at=G,Si=2147483647,vr=36,Ou=1,$i=26,Sb=38,$b=700,Ib=72,Tb=128,Eb="-",Pb=/[^\0-\u007E]/,ku=/[.\u3002\uFF0E\uFF61]/g,_u="Overflow: input needs wider integers to process",Ii=vr-Ou,Ru=RangeError,Ob=at(ku.exec),kt=Math.floor,Ti=String.fromCharCode,Cu=at("".charCodeAt),Au=at([].join),He=at([].push),kb=at("".replace),_b=at("".split),Rb=at("".toLowerCase),Cb=function(e){for(var t=[],r=0,n=e.length;r<n;){var a=Cu(e,r++);if(a>=55296&&a<=56319&&r<n){var i=Cu(e,r++);(i&64512)===56320?He(t,((a&1023)<<10)+(i&1023)+65536):(He(t,a),r--)}else He(t,a)}return t},ju=function(e){return e+22+75*(e<26)},Ab=function(e,t,r){var n=0;for(e=r?kt(e/$b):e>>1,e+=kt(e/t);e>Ii*$i>>1;)e=kt(e/Ii),n+=vr;return kt(n+(Ii+1)*e/(e+Sb))},jb=function(e){var t=[];e=Cb(e);var r=e.length,n=Tb,a=0,i=Ib,o,s;for(o=0;o<e.length;o++)s=e[o],s<128&&He(t,Ti(s));var u=t.length,f=u;for(u&&He(t,Eb);f<r;){var l=Si;for(o=0;o<e.length;o++)s=e[o],s>=n&&s<l&&(l=s);var c=f+1;if(l-n>kt((Si-a)/c))throw new Ru(_u);for(a+=(l-n)*c,n=l,o=0;o<e.length;o++){if(s=e[o],s<n&&++a>Si)throw new Ru(_u);if(s===n){for(var d=a,v=vr;;){var p=v<=i?Ou:v>=i+$i?$i:v-i;if(d<p)break;var S=d-p,g=vr-p;He(t,Ti(ju(p+S%g))),d=kt(S/g),v+=vr}He(t,Ti(ju(d))),i=Ab(a,c,f===u),a=0,f++}}a++,n++}return Au(t,"")},Lb=function(e){var t=[],r=_b(kb(Rb(e),ku,"."),"."),n,a;for(n=0;n<r.length;n++)a=r[n],He(t,Ob(Pb,a)?"xn--"+jb(a):a);return Au(t,".")},Nb=Y,Ei=Q,Ub=on,Pi=H,Lu=It,pe=G,yn=ve,me=sn,xb=ri,Oi=fe,ki=Kw,_t=bb,Ee=ln,Db=fu.codeAt,Mb=Lb,xe=Ue,Fb=$t,zb=rt,Nu=uw,Uu=St,Bb=Uu.set,wn=Uu.getterFor("URL"),Hb=Nu.URLSearchParams,Kb=Nu.getState,hr=Pi.URL,_i=Pi.TypeError,bn=Pi.parseInt,Gb=Math.floor,xu=Math.pow,ge=pe("".charAt),Pe=pe(/./.exec),pr=pe([].join),Wb=pe(1 .toString),Vb=pe([].pop),Rt=pe([].push),Ri=pe("".replace),Zb=pe([].shift),Jb=pe("".split),mr=pe("".slice),Sn=pe("".toLowerCase),Yb=pe([].unshift),Xb="Invalid authority",Ci="Invalid scheme",it="Invalid host",Du="Invalid port",Mu=/[a-z]/i,qb=/[\d+-.a-z]/i,Ai=/\d/,Qb=/^0x/i,eS=/^[0-7]+$/,tS=/^\d+$/,Fu=/^[\da-f]+$/i,rS=/[\0\t\n\r #%/:<>?@[\\\]^|]/,nS=/[\0\t\n\r #/:<>?@[\\\]^|]/,aS=/^[\u0000-\u0020]+/,iS=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,oS=/[\t\n\r]/g,ye,sS=function(e){var t=Jb(e,"."),r,n,a,i,o,s,u;if(t.length&&t[t.length-1]===""&&t.length--,r=t.length,r>4)return e;for(n=[],a=0;a<r;a++){if(i=t[a],i==="")return e;if(o=10,i.length>1&&ge(i,0)==="0"&&(o=Pe(Qb,i)?16:8,i=mr(i,o===8?1:2)),i==="")s=0;else{if(!Pe(o===10?tS:o===8?eS:Fu,i))return e;s=bn(i,o)}Rt(n,s)}for(a=0;a<r;a++)if(s=n[a],a===r-1){if(s>=xu(256,5-r))return null}else if(s>255)return null;for(u=Vb(n),a=0;a<n.length;a++)u+=n[a]*xu(256,3-a);return u},cS=function(e){var t=[0,0,0,0,0,0,0,0],r=0,n=null,a=0,i,o,s,u,f,l,c,d=function(){return ge(e,a)};if(d()===":"){if(ge(e,1)!==":")return;a+=2,r++,n=r}for(;d();){if(r===8)return;if(d()===":"){if(n!==null)return;a++,r++,n=r;continue}for(i=o=0;o<4&&Pe(Fu,d());)i=i*16+bn(d(),16),a++,o++;if(d()==="."){if(o===0||(a-=o,r>6))return;for(s=0;d();){if(u=null,s>0)if(d()==="."&&s<4)a++;else return;if(!Pe(Ai,d()))return;for(;Pe(Ai,d());){if(f=bn(d(),10),u===null)u=f;else{if(u===0)return;u=u*10+f}if(u>255)return;a++}t[r]=t[r]*256+u,s++,(s===2||s===4)&&r++}if(s!==4)return;break}else if(d()===":"){if(a++,!d())return}else if(d())return;t[r++]=i}if(n!==null)for(l=r-n,r=7;r!==0&&l>0;)c=t[r],t[r--]=t[n+l-1],t[n+--l]=c;else if(r!==8)return;return t},uS=function(e){for(var t=null,r=1,n=null,a=0,i=0;i<8;i++)e[i]!==0?(a>r&&(t=n,r=a),n=null,a=0):(n===null&&(n=i),++a);return a>r?n:t},gr=function(e){var t,r,n,a;if(typeof e=="number"){for(t=[],r=0;r<4;r++)Yb(t,e%256),e=Gb(e/256);return pr(t,".")}if(typeof e=="object"){for(t="",n=uS(e),r=0;r<8;r++)a&&e[r]===0||(a&&(a=!1),n===r?(t+=r?":":"::",a=!0):(t+=Wb(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},$n={},zu=ki({},$n,{" ":1,'"':1,"<":1,">":1,"`":1}),Bu=ki({},zu,{"#":1,"?":1,"{":1,"}":1}),ji=ki({},Bu,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Ke=function(e,t){var r=Db(e,0);return r>32&&r<127&&!Oi(t,e)?e:encodeURIComponent(e)},In={ftp:21,file:null,http:80,https:443,ws:80,wss:443},yr=function(e,t){var r;return e.length===2&&Pe(Mu,ge(e,0))&&((r=ge(e,1))===":"||!t&&r==="|")},Hu=function(e){var t;return e.length>1&&yr(mr(e,0,2))&&(e.length===2||(t=ge(e,2))==="/"||t==="\\"||t==="?"||t==="#")},lS=function(e){return e==="."||Sn(e)==="%2e"},fS=function(e){return e=Sn(e),e===".."||e==="%2e."||e===".%2e"||e==="%2e%2e"},Li={},Ku={},Ni={},Gu={},Wu={},Ui={},Vu={},Zu={},Tn={},En={},xi={},Di={},Mi={},Fi={},Ju={},zi={},Ct={},Ae={},Yu={},ot={},De={},Bi=function(e,t,r){var n=xe(e),a,i,o;if(t){if(i=this.parse(n),i)throw new _i(i);this.searchParams=null}else{if(r!==void 0&&(a=new Bi(r,!0)),i=this.parse(n,null,a),i)throw new _i(i);o=Kb(new Hb),o.bindURL(this),this.searchParams=o}};Bi.prototype={type:"URL",parse:function(e,t,r){var n=this,a=t||Li,i=0,o="",s=!1,u=!1,f=!1,l,c,d,v;for(e=xe(e),t||(n.scheme="",n.username="",n.password="",n.host=null,n.port=null,n.path=[],n.query=null,n.fragment=null,n.cannotBeABaseURL=!1,e=Ri(e,aS,""),e=Ri(e,iS,"$1")),e=Ri(e,oS,""),l=_t(e);i<=l.length;){switch(c=l[i],a){case Li:if(c&&Pe(Mu,c))o+=Sn(c),a=Ku;else{if(t)return Ci;a=Ni;continue}break;case Ku:if(c&&(Pe(qb,c)||c==="+"||c==="-"||c==="."))o+=Sn(c);else if(c===":"){if(t&&(n.isSpecial()!==Oi(In,o)||o==="file"&&(n.includesCredentials()||n.port!==null)||n.scheme==="file"&&!n.host))return;if(n.scheme=o,t){n.isSpecial()&&In[n.scheme]===n.port&&(n.port=null);return}o="",n.scheme==="file"?a=Fi:n.isSpecial()&&r&&r.scheme===n.scheme?a=Gu:n.isSpecial()?a=Zu:l[i+1]==="/"?(a=Wu,i++):(n.cannotBeABaseURL=!0,Rt(n.path,""),a=Yu)}else{if(t)return Ci;o="",a=Ni,i=0;continue}break;case Ni:if(!r||r.cannotBeABaseURL&&c!=="#")return Ci;if(r.cannotBeABaseURL&&c==="#"){n.scheme=r.scheme,n.path=Ee(r.path),n.query=r.query,n.fragment="",n.cannotBeABaseURL=!0,a=De;break}a=r.scheme==="file"?Fi:Ui;continue;case Gu:if(c==="/"&&l[i+1]==="/")a=Tn,i++;else{a=Ui;continue}break;case Wu:if(c==="/"){a=En;break}else{a=Ae;continue}case Ui:if(n.scheme=r.scheme,c===ye)n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Ee(r.path),n.query=r.query;else if(c==="/"||c==="\\"&&n.isSpecial())a=Vu;else if(c==="?")n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Ee(r.path),n.query="",a=ot;else if(c==="#")n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Ee(r.path),n.query=r.query,n.fragment="",a=De;else{n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Ee(r.path),n.path.length--,a=Ae;continue}break;case Vu:if(n.isSpecial()&&(c==="/"||c==="\\"))a=Tn;else if(c==="/")a=En;else{n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,a=Ae;continue}break;case Zu:if(a=Tn,c!=="/"||ge(o,i+1)!=="/")continue;i++;break;case Tn:if(c!=="/"&&c!=="\\"){a=En;continue}break;case En:if(c==="@"){s&&(o="%40"+o),s=!0,d=_t(o);for(var p=0;p<d.length;p++){var S=d[p];if(S===":"&&!f){f=!0;continue}var g=Ke(S,ji);f?n.password+=g:n.username+=g}o=""}else if(c===ye||c==="/"||c==="?"||c==="#"||c==="\\"&&n.isSpecial()){if(s&&o==="")return Xb;i-=_t(o).length+1,o="",a=xi}else o+=c;break;case xi:case Di:if(t&&n.scheme==="file"){a=zi;continue}else if(c===":"&&!u){if(o==="")return it;if(v=n.parseHost(o),v)return v;if(o="",a=Mi,t===Di)return}else if(c===ye||c==="/"||c==="?"||c==="#"||c==="\\"&&n.isSpecial()){if(n.isSpecial()&&o==="")return it;if(t&&o===""&&(n.includesCredentials()||n.port!==null))return;if(v=n.parseHost(o),v)return v;if(o="",a=Ct,t)return;continue}else c==="["?u=!0:c==="]"&&(u=!1),o+=c;break;case Mi:if(Pe(Ai,c))o+=c;else if(c===ye||c==="/"||c==="?"||c==="#"||c==="\\"&&n.isSpecial()||t){if(o!==""){var T=bn(o,10);if(T>65535)return Du;n.port=n.isSpecial()&&T===In[n.scheme]?null:T,o=""}if(t)return;a=Ct;continue}else return Du;break;case Fi:if(n.scheme="file",c==="/"||c==="\\")a=Ju;else if(r&&r.scheme==="file")switch(c){case ye:n.host=r.host,n.path=Ee(r.path),n.query=r.query;break;case"?":n.host=r.host,n.path=Ee(r.path),n.query="",a=ot;break;case"#":n.host=r.host,n.path=Ee(r.path),n.query=r.query,n.fragment="",a=De;break;default:Hu(pr(Ee(l,i),""))||(n.host=r.host,n.path=Ee(r.path),n.shortenPath()),a=Ae;continue}else{a=Ae;continue}break;case Ju:if(c==="/"||c==="\\"){a=zi;break}r&&r.scheme==="file"&&!Hu(pr(Ee(l,i),""))&&(yr(r.path[0],!0)?Rt(n.path,r.path[0]):n.host=r.host),a=Ae;continue;case zi:if(c===ye||c==="/"||c==="\\"||c==="?"||c==="#"){if(!t&&yr(o))a=Ae;else if(o===""){if(n.host="",t)return;a=Ct}else{if(v=n.parseHost(o),v)return v;if(n.host==="localhost"&&(n.host=""),t)return;o="",a=Ct}continue}else o+=c;break;case Ct:if(n.isSpecial()){if(a=Ae,c!=="/"&&c!=="\\")continue}else if(!t&&c==="?")n.query="",a=ot;else if(!t&&c==="#")n.fragment="",a=De;else if(c!==ye&&(a=Ae,c!=="/"))continue;break;case Ae:if(c===ye||c==="/"||c==="\\"&&n.isSpecial()||!t&&(c==="?"||c==="#")){if(fS(o)?(n.shortenPath(),c!=="/"&&!(c==="\\"&&n.isSpecial())&&Rt(n.path,"")):lS(o)?c!=="/"&&!(c==="\\"&&n.isSpecial())&&Rt(n.path,""):(n.scheme==="file"&&!n.path.length&&yr(o)&&(n.host&&(n.host=""),o=ge(o,0)+":"),Rt(n.path,o)),o="",n.scheme==="file"&&(c===ye||c==="?"||c==="#"))for(;n.path.length>1&&n.path[0]==="";)Zb(n.path);c==="?"?(n.query="",a=ot):c==="#"&&(n.fragment="",a=De)}else o+=Ke(c,Bu);break;case Yu:c==="?"?(n.query="",a=ot):c==="#"?(n.fragment="",a=De):c!==ye&&(n.path[0]+=Ke(c,$n));break;case ot:!t&&c==="#"?(n.fragment="",a=De):c!==ye&&(c==="'"&&n.isSpecial()?n.query+="%27":c==="#"?n.query+="%23":n.query+=Ke(c,$n));break;case De:c!==ye&&(n.fragment+=Ke(c,zu));break}i++}},parseHost:function(e){var t,r,n;if(ge(e,0)==="["){if(ge(e,e.length-1)!=="]"||(t=cS(mr(e,1,-1)),!t))return it;this.host=t}else if(this.isSpecial()){if(e=Mb(e),Pe(rS,e)||(t=sS(e),t===null))return it;this.host=t}else{if(Pe(nS,e))return it;for(t="",r=_t(e),n=0;n<r.length;n++)t+=Ke(r[n],$n);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return Oi(In,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;t&&(this.scheme!=="file"||t!==1||!yr(e[0],!0))&&e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,a=e.host,i=e.port,o=e.path,s=e.query,u=e.fragment,f=t+":";return a!==null?(f+="//",e.includesCredentials()&&(f+=r+(n?":"+n:"")+"@"),f+=gr(a),i!==null&&(f+=":"+i)):t==="file"&&(f+="//"),f+=e.cannotBeABaseURL?o[0]:o.length?"/"+pr(o,"/"):"",s!==null&&(f+="?"+s),u!==null&&(f+="#"+u),f},setHref:function(e){var t=this.parse(e);if(t)throw new _i(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if(e==="blob")try{return new At(e.path[0]).origin}catch{return"null"}return e==="file"||!this.isSpecial()?"null":e+"://"+gr(this.host)+(t!==null?":"+t:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(xe(e)+":",Li)},getUsername:function(){return this.username},setUsername:function(e){var t=_t(xe(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=Ke(t[r],ji)}},getPassword:function(){return this.password},setPassword:function(e){var t=_t(xe(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=Ke(t[r],ji)}},getHost:function(){var e=this.host,t=this.port;return e===null?"":t===null?gr(e):gr(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,xi)},getHostname:function(){var e=this.host;return e===null?"":gr(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Di)},getPort:function(){var e=this.port;return e===null?"":xe(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(e=xe(e),e===""?this.port=null:this.parse(e,Mi))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+pr(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Ct))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){e=xe(e),e===""?this.query=null:(ge(e,0)==="?"&&(e=mr(e,1)),this.query="",this.parse(e,ot)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){if(e=xe(e),e===""){this.fragment=null;return}ge(e,0)==="#"&&(e=mr(e,1)),this.fragment="",this.parse(e,De)},update:function(){this.query=this.searchParams.serialize()||null}};var At=function(t){var r=xb(this,ne),n=zb(arguments.length,1)>1?arguments[1]:void 0,a=Bb(r,new Bi(t,!1,n));Ei||(r.href=a.serialize(),r.origin=a.getOrigin(),r.protocol=a.getProtocol(),r.username=a.getUsername(),r.password=a.getPassword(),r.host=a.getHost(),r.hostname=a.getHostname(),r.port=a.getPort(),r.pathname=a.getPathname(),r.search=a.getSearch(),r.searchParams=a.getSearchParams(),r.hash=a.getHash())},ne=At.prototype,we=function(e,t){return{get:function(){return wn(this)[e]()},set:t&&function(r){return wn(this)[t](r)},configurable:!0,enumerable:!0}};if(Ei&&(me(ne,"href",we("serialize","setHref")),me(ne,"origin",we("getOrigin")),me(ne,"protocol",we("getProtocol","setProtocol")),me(ne,"username",we("getUsername","setUsername")),me(ne,"password",we("getPassword","setPassword")),me(ne,"host",we("getHost","setHost")),me(ne,"hostname",we("getHostname","setHostname")),me(ne,"port",we("getPort","setPort")),me(ne,"pathname",we("getPathname","setPathname")),me(ne,"search",we("getSearch","setSearch")),me(ne,"searchParams",we("getSearchParams")),me(ne,"hash",we("getHash","setHash"))),yn(ne,"toJSON",function(){return wn(this).serialize()},{enumerable:!0}),yn(ne,"toString",function(){return wn(this).serialize()},{enumerable:!0}),hr){var Xu=hr.createObjectURL,qu=hr.revokeObjectURL;Xu&&yn(At,"createObjectURL",Lu(Xu,hr)),qu&&yn(At,"revokeObjectURL",Lu(qu,hr))}Fb(At,"URL"),Nb({global:!0,constructor:!0,forced:!Ub,sham:!Ei},{URL:At});var dS=Y,vS=Ie,Qu=K,hS=rt,el=Ue,pS=on,Hi=vS("URL"),mS=pS&&Qu(function(){Hi.canParse()}),gS=Qu(function(){return Hi.canParse.length!==1});dS({target:"URL",stat:!0,forced:!mS||gS},{canParse:function(t){var r=hS(arguments.length,1),n=el(t),a=r<2||arguments[1]===void 0?void 0:el(arguments[1]);try{return!!new Hi(n,a)}catch{return!1}}});var yS=Y,wS=Ie,bS=rt,tl=Ue,SS=on,$S=wS("URL");yS({target:"URL",stat:!0,forced:!SS},{parse:function(t){var r=bS(arguments.length,1),n=tl(t),a=r<2||arguments[1]===void 0?void 0:tl(arguments[1]);try{return new $S(n,a)}catch{return null}}});var IS=Y,TS=te;IS({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return TS(URL.prototype.toString,this)}});var ES=gi;ES.URL;var PS={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},OS=Kr,Ki=OS("span").classList,rl=Ki&&Ki.constructor&&Ki.constructor.prototype,kS=rl===Object.prototype?void 0:rl,nl=H,al=PS,_S=kS,wr=Gg,il=et,RS=$t,CS=q,Gi=CS("iterator"),Wi=wr.values,ol=function(e,t){if(e){if(e[Gi]!==Wi)try{il(e,Gi,Wi)}catch{e[Gi]=Wi}if(RS(e,t,!0),al[t]){for(var r in wr)if(e[r]!==wr[r])try{il(e,r,wr[r])}catch{e[r]=wr[r]}}}};for(var Vi in al)ol(nl[Vi]&&nl[Vi].prototype,Vi);ol(_S,"DOMTokenList");var AS=de,jS=et,LS=function(e,t){AS(t)&&"cause"in t&&jS(e,"cause",t.cause)},NS=G,sl=Error,US=NS("".replace),xS=function(e){return String(new sl(e).stack)}("zxcasd"),cl=/\n\s*at [^:]*:[^\n]*/,DS=cl.test(xS),MS=function(e,t){if(DS&&typeof e=="string"&&!sl.prepareStackTrace)for(;t--;)e=US(e,cl,"");return e},FS=K,zS=Qe,BS=!FS(function(){var e=new Error("a");return"stack"in e?(Object.defineProperty(e,"stack",zS(1,7)),e.stack!==7):!0}),HS=et,KS=MS,GS=BS,ul=Error.captureStackTrace,WS=function(e,t,r,n){GS&&(ul?ul(e,t):HS(e,"stack",KS(r,n)))},VS=It,ZS=te,JS=$e,YS=Vr,XS=wu,qS=Ea,ll=Wr,QS=ai,e$=un,fl=yu,t$=TypeError,Pn=function(e,t){this.stopped=e,this.result=t},dl=Pn.prototype,br=function(e,t,r){var n=r&&r.that,a=!!(r&&r.AS_ENTRIES),i=!!(r&&r.IS_RECORD),o=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),u=VS(t,n),f,l,c,d,v,p,S,g=function(I){return f&&fl(f,"normal",I),new Pn(!0,I)},T=function(I){return a?(JS(I),s?u(I[0],I[1],g):u(I[0],I[1])):s?u(I,g):u(I)};if(i)f=e.iterator;else if(o)f=e;else{if(l=e$(e),!l)throw new t$(YS(e)+" is not iterable");if(XS(l)){for(c=0,d=qS(e);d>c;c++)if(v=T(e[c]),v&&ll(dl,v))return v;return new Pn(!1)}f=QS(e,l)}for(p=i?e.next:f.next;!(S=ZS(p,f)).done;){try{v=T(S.value)}catch(I){fl(f,"throw",I)}if(typeof v=="object"&&v&&ll(dl,v))return v}return new Pn(!1)},r$=Ue,n$=function(e,t){return e===void 0?arguments.length<2?"":t:r$(e)},a$=Y,i$=Wr,o$=Za,On=qa,s$=lc,vl=Xr,Zi=et,Ji=Qe,c$=LS,u$=WS,l$=br,f$=n$,d$=q,v$=d$("toStringTag"),kn=Error,h$=[].push,jt=function(t,r){var n=i$(Yi,this),a;On?a=On(new kn,n?o$(this):Yi):(a=n?this:vl(Yi),Zi(a,v$,"Error")),r!==void 0&&Zi(a,"message",f$(r)),u$(a,jt,a.stack,1),arguments.length>2&&c$(a,arguments[2]);var i=[];return l$(t,h$,{that:i}),Zi(a,"errors",i),a};On?On(jt,kn):s$(jt,kn,{name:!0});var Yi=jt.prototype=vl(kn.prototype,{constructor:Ji(1,jt),message:Ji(1,""),name:Ji(1,"AggregateError")});a$({global:!0,constructor:!0,arity:2},{AggregateError:jt});var p$=ni,m$=ur,g$=p$?{}.toString:function(){return"[object "+m$(this)+"]"},y$=ni,w$=ve,b$=g$;y$||w$(Object.prototype,"toString",b$,{unsafe:!0});var Sr=H,S$=nr,$$=Mr,_n=function(e){return S$.slice(0,e.length)===e},hl=function(){return _n("Bun/")?"BUN":_n("Cloudflare-Workers")?"CLOUDFLARE":_n("Deno/")?"DENO":_n("Node.js/")?"NODE":Sr.Bun&&typeof Bun.version=="string"?"BUN":Sr.Deno&&typeof Deno.version=="object"?"DENO":$$(Sr.process)==="process"?"NODE":Sr.window&&Sr.document?"BROWSER":"REST"}(),I$=hl,Xi=I$==="NODE",T$=Ie,E$=sn,P$=q,O$=Q,pl=P$("species"),k$=function(e){var t=T$(e);O$&&t&&!t[pl]&&E$(t,pl,{configurable:!0,get:function(){return this}})},_$=Tu,R$=Vr,C$=TypeError,A$=function(e){if(_$(e))return e;throw new C$(R$(e)+" is not a constructor")},ml=$e,j$=A$,L$=Fr,N$=q,U$=N$("species"),gl=function(e,t){var r=ml(e).constructor,n;return r===void 0||L$(n=ml(r)[U$])?t:j$(n)},x$=Dr,yl=Function.prototype,wl=yl.apply,bl=yl.call,Sl=typeof Reflect=="object"&&Reflect.apply||(x$?bl.bind(wl):function(){return bl.apply(wl,arguments)}),D$=nr,$l=/(?:ipad|iphone|ipod).*applewebkit/i.test(D$),se=H,M$=Sl,F$=It,Il=W,z$=fe,Tl=K,El=Bs,B$=ln,Pl=Kr,H$=rt,K$=$l,G$=Xi,qi=se.setImmediate,Qi=se.clearImmediate,W$=se.process,eo=se.Dispatch,V$=se.Function,Ol=se.MessageChannel,Z$=se.String,to=0,$r={},kl="onreadystatechange",Ir,st,ro,no;Tl(function(){Ir=se.location});var ao=function(e){if(z$($r,e)){var t=$r[e];delete $r[e],t()}},io=function(e){return function(){ao(e)}},_l=function(e){ao(e.data)},Rl=function(e){se.postMessage(Z$(e),Ir.protocol+"//"+Ir.host)};(!qi||!Qi)&&(qi=function(t){H$(arguments.length,1);var r=Il(t)?t:V$(t),n=B$(arguments,1);return $r[++to]=function(){M$(r,void 0,n)},st(to),to},Qi=function(t){delete $r[t]},G$?st=function(e){W$.nextTick(io(e))}:eo&&eo.now?st=function(e){eo.now(io(e))}:Ol&&!K$?(ro=new Ol,no=ro.port2,ro.port1.onmessage=_l,st=F$(no.postMessage,no)):se.addEventListener&&Il(se.postMessage)&&!se.importScripts&&Ir&&Ir.protocol!=="file:"&&!Tl(Rl)?(st=Rl,se.addEventListener("message",_l,!1)):kl in Pl("script")?st=function(e){El.appendChild(Pl("script"))[kl]=function(){El.removeChild(this),ao(e)}}:st=function(e){setTimeout(io(e),0)});var Cl={set:qi,clear:Qi},Al=function(){this.head=null,this.tail=null};Al.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e){var t=this.head=e.next;return t===null&&(this.tail=null),e.item}}};var jl=Al,J$=nr,Y$=/ipad|iphone|ipod/i.test(J$)&&typeof Pebble<"u",X$=nr,q$=/web0s(?!.*chrome)/i.test(X$),Lt=H,Q$=Cc,Ll=It,oo=Cl.set,eI=jl,tI=$l,rI=Y$,nI=q$,so=Xi,Nl=Lt.MutationObserver||Lt.WebKitMutationObserver,Ul=Lt.document,xl=Lt.process,Rn=Lt.Promise,co=Q$("queueMicrotask"),Nt,uo,lo,Cn,Dl;if(!co){var An=new eI,jn=function(){var e,t;for(so&&(e=xl.domain)&&e.exit();t=An.get();)try{t()}catch(r){throw An.head&&Nt(),r}e&&e.enter()};!tI&&!so&&!nI&&Nl&&Ul?(uo=!0,lo=Ul.createTextNode(""),new Nl(jn).observe(lo,{characterData:!0}),Nt=function(){lo.data=uo=!uo}):!rI&&Rn&&Rn.resolve?(Cn=Rn.resolve(void 0),Cn.constructor=Rn,Dl=Ll(Cn.then,Cn),Nt=function(){Dl(jn)}):so?Nt=function(){xl.nextTick(jn)}:(oo=Ll(oo,Lt),Nt=function(){oo(jn)}),co=function(e){An.head||Nt(),An.add(e)}}var aI=co,iI=function(e,t){try{arguments.length===1?console.error(e):console.error(e,t)}catch{}},Ut=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},oI=H,Tr=oI.Promise,sI=H,Er=Tr,cI=W,uI=fc,lI=Ha,fI=q,Ml=hl,fo=Ts;Er&&Er.prototype;var dI=fI("species"),vo=!1,Fl=cI(sI.PromiseRejectionEvent),vI=uI("Promise",function(){var e=lI(Er),t=e!==String(Er);if(!t&&fo===66)return!0;if(!fo||fo<51||!/native code/.test(e)){var r=new Er(function(i){i(1)}),n=function(i){i(function(){},function(){})},a=r.constructor={};if(a[dI]=n,vo=r.then(function(){})instanceof n,!vo)return!0}return!t&&(Ml==="BROWSER"||Ml==="DENO")&&!Fl}),Pr={CONSTRUCTOR:vI,REJECTION_EVENT:Fl,SUBCLASSING:vo},je={},zl=Te,hI=TypeError,pI=function(e){var t,r;this.promise=new e(function(n,a){if(t!==void 0||r!==void 0)throw new hI("Bad Promise constructor");t=n,r=a}),this.resolve=zl(t),this.reject=zl(r)};je.f=function(e){return new pI(e)};var mI=Y,Ln=Xi,Ge=H,xt=te,Bl=ve,Hl=qa,gI=$t,yI=k$,wI=Te,Nn=W,bI=de,SI=ri,$I=gl,Kl=Cl.set,ho=aI,II=iI,TI=Ut,EI=jl,Gl=St,Un=Tr,po=Pr,Wl=je,xn="Promise",Vl=po.CONSTRUCTOR,PI=po.REJECTION_EVENT,OI=po.SUBCLASSING,mo=Gl.getterFor(xn),kI=Gl.set,Dt=Un&&Un.prototype,ct=Un,Dn=Dt,Zl=Ge.TypeError,go=Ge.document,yo=Ge.process,wo=Wl.f,_I=wo,RI=!!(go&&go.createEvent&&Ge.dispatchEvent),Jl="unhandledrejection",CI="rejectionhandled",Yl=0,Xl=1,AI=2,bo=1,ql=2,Mn,Ql,jI,ef,tf=function(e){var t;return bI(e)&&Nn(t=e.then)?t:!1},rf=function(e,t){var r=t.value,n=t.state===Xl,a=n?e.ok:e.fail,i=e.resolve,o=e.reject,s=e.domain,u,f,l;try{a?(n||(t.rejection===ql&&NI(t),t.rejection=bo),a===!0?u=r:(s&&s.enter(),u=a(r),s&&(s.exit(),l=!0)),u===e.promise?o(new Zl("Promise-chain cycle")):(f=tf(u))?xt(f,u,i,o):i(u)):o(r)}catch(c){s&&!l&&s.exit(),o(c)}},nf=function(e,t){e.notified||(e.notified=!0,ho(function(){for(var r=e.reactions,n;n=r.get();)rf(n,e);e.notified=!1,t&&!e.rejection&&LI(e)}))},af=function(e,t,r){var n,a;RI?(n=go.createEvent("Event"),n.promise=t,n.reason=r,n.initEvent(e,!1,!0),Ge.dispatchEvent(n)):n={promise:t,reason:r},!PI&&(a=Ge["on"+e])?a(n):e===Jl&&II("Unhandled promise rejection",r)},LI=function(e){xt(Kl,Ge,function(){var t=e.facade,r=e.value,n=of(e),a;if(n&&(a=TI(function(){Ln?yo.emit("unhandledRejection",r,t):af(Jl,t,r)}),e.rejection=Ln||of(e)?ql:bo,a.error))throw a.value})},of=function(e){return e.rejection!==bo&&!e.parent},NI=function(e){xt(Kl,Ge,function(){var t=e.facade;Ln?yo.emit("rejectionHandled",t):af(CI,t,e.value)})},Mt=function(e,t,r){return function(n){e(t,n,r)}},Ft=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=AI,nf(e,!0))},So=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new Zl("Promise can't be resolved itself");var n=tf(t);n?ho(function(){var a={done:!1};try{xt(n,t,Mt(So,a,e),Mt(Ft,a,e))}catch(i){Ft(a,i,e)}}):(e.value=t,e.state=Xl,nf(e,!1))}catch(a){Ft({done:!1},a,e)}}};if(Vl&&(ct=function(t){SI(this,Dn),wI(t),xt(Mn,this);var r=mo(this);try{t(Mt(So,r),Mt(Ft,r))}catch(n){Ft(r,n)}},Dn=ct.prototype,Mn=function(t){kI(this,{type:xn,done:!1,notified:!1,parent:!1,reactions:new EI,rejection:!1,state:Yl,value:void 0})},Mn.prototype=Bl(Dn,"then",function(t,r){var n=mo(this),a=wo($I(this,ct));return n.parent=!0,a.ok=Nn(t)?t:!0,a.fail=Nn(r)&&r,a.domain=Ln?yo.domain:void 0,n.state===Yl?n.reactions.add(a):ho(function(){rf(a,n)}),a.promise}),Ql=function(){var e=new Mn,t=mo(e);this.promise=e,this.resolve=Mt(So,t),this.reject=Mt(Ft,t)},Wl.f=wo=function(e){return e===ct||e===jI?new Ql(e):_I(e)},Nn(Un)&&Dt!==Object.prototype)){ef=Dt.then,OI||Bl(Dt,"then",function(t,r){var n=this;return new ct(function(a,i){xt(ef,n,a,i)}).then(t,r)},{unsafe:!0});try{delete Dt.constructor}catch{}Hl&&Hl(Dt,Dn)}mI({global:!0,constructor:!0,wrap:!0,forced:Vl},{Promise:ct}),gI(ct,xn,!1),yI(xn);var UI=q,sf=UI("iterator"),cf=!1;try{var xI=0,uf={next:function(){return{done:!!xI++}},return:function(){cf=!0}};uf[sf]=function(){return this},Array.from(uf,function(){throw 2})}catch{}var DI=function(e,t){try{if(!t&&!cf)return!1}catch{return!1}var r=!1;try{var n={};n[sf]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r},MI=Tr,FI=DI,zI=Pr.CONSTRUCTOR,Fn=zI||!FI(function(e){MI.all(e).then(void 0,function(){})}),BI=Y,HI=te,KI=Te,GI=je,WI=Ut,VI=br,ZI=Fn;BI({target:"Promise",stat:!0,forced:ZI},{all:function(t){var r=this,n=GI.f(r),a=n.resolve,i=n.reject,o=WI(function(){var s=KI(r.resolve),u=[],f=0,l=1;VI(t,function(c){var d=f++,v=!1;l++,HI(s,r,c).then(function(p){v||(v=!0,u[d]=p,--l||a(u))},i)}),--l||a(u)});return o.error&&i(o.value),n.promise}});var JI=Y,YI=Pr.CONSTRUCTOR,$o=Tr,XI=Ie,qI=W,QI=ve,lf=$o&&$o.prototype;if(JI({target:"Promise",proto:!0,forced:YI,real:!0},{catch:function(e){return this.then(void 0,e)}}),qI($o)){var ff=XI("Promise").prototype.catch;lf.catch!==ff&&QI(lf,"catch",ff,{unsafe:!0})}var e0=Y,t0=te,r0=Te,n0=je,a0=Ut,i0=br,o0=Fn;e0({target:"Promise",stat:!0,forced:o0},{race:function(t){var r=this,n=n0.f(r),a=n.reject,i=a0(function(){var o=r0(r.resolve);i0(t,function(s){t0(o,r,s).then(n.resolve,a)})});return i.error&&a(i.value),n.promise}});var s0=Y,c0=je,u0=Pr.CONSTRUCTOR;s0({target:"Promise",stat:!0,forced:u0},{reject:function(t){var r=c0.f(this),n=r.reject;return n(t),r.promise}});var l0=$e,f0=de,d0=je,df=function(e,t){if(l0(e),f0(t)&&t.constructor===e)return t;var r=d0.f(e),n=r.resolve;return n(t),r.promise},v0=Y,h0=Ie,p0=Pr.CONSTRUCTOR,m0=df;h0("Promise"),v0({target:"Promise",stat:!0,forced:p0},{resolve:function(t){return m0(this,t)}});var g0=Y,y0=te,w0=Te,b0=je,S0=Ut,$0=br,I0=Fn;g0({target:"Promise",stat:!0,forced:I0},{allSettled:function(t){var r=this,n=b0.f(r),a=n.resolve,i=n.reject,o=S0(function(){var s=w0(r.resolve),u=[],f=0,l=1;$0(t,function(c){var d=f++,v=!1;l++,y0(s,r,c).then(function(p){v||(v=!0,u[d]={status:"fulfilled",value:p},--l||a(u))},function(p){v||(v=!0,u[d]={status:"rejected",reason:p},--l||a(u))})}),--l||a(u)});return o.error&&i(o.value),n.promise}});var T0=Y,E0=te,P0=Te,O0=Ie,k0=je,_0=Ut,R0=br,C0=Fn,vf="No one promise resolved";T0({target:"Promise",stat:!0,forced:C0},{any:function(t){var r=this,n=O0("AggregateError"),a=k0.f(r),i=a.resolve,o=a.reject,s=_0(function(){var u=P0(r.resolve),f=[],l=0,c=1,d=!1;R0(t,function(v){var p=l++,S=!1;c++,E0(u,r,v).then(function(g){S||d||(d=!0,i(g))},function(g){S||d||(S=!0,f[p]=g,--c||o(new n(f,vf)))})}),--c||o(new n(f,vf))});return s.error&&o(s.value),a.promise}});var A0=Y,j0=je;A0({target:"Promise",stat:!0},{withResolvers:function(){var t=j0.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}});var L0=Y,zn=Tr,N0=K,hf=Ie,pf=W,U0=gl,mf=df,x0=ve,Io=zn&&zn.prototype,D0=!!zn&&N0(function(){Io.finally.call({then:function(){}},function(){})});if(L0({target:"Promise",proto:!0,real:!0,forced:D0},{finally:function(e){var t=U0(this,hf("Promise")),r=pf(e);return this.then(r?function(n){return mf(t,e()).then(function(){return n})}:e,r?function(n){return mf(t,e()).then(function(){throw n})}:e)}}),pf(zn)){var gf=hf("Promise").prototype.finally;Io.finally!==gf&&x0(Io,"finally",gf,{unsafe:!0})}var M0=gi;M0.Promise;var F0=Y,z0=H,B0=Sl,H0=ln,K0=je,G0=Te,yf=Ut,To=z0.Promise,wf=!1,W0=!To||!To.try||yf(function(){To.try(function(e){wf=e===8},8)}).error||!wf;F0({target:"Promise",stat:!0,forced:W0},{try:function(e){var t=arguments.length>1?H0(arguments,1):[],r=K0.f(this),n=yf(function(){return B0(G0(e),void 0,t)});return(n.error?r.reject:r.resolve)(n.value),r.promise}});function We(e,t){if(typeof window>"u")return;const r=new CustomEvent(e,{detail:t,bubbles:!0,composed:!0});dispatchEvent(r)}function Le(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r}typeof SuppressedError=="function"&&SuppressedError;var ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Eo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Po(e,t){return e(t={exports:{}},t.exports),t.exports}var lt=Po(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(){var a=this;this.locked=new Map,this.addToLocked=function(i,o){var s=a.locked.get(i);s===void 0?o===void 0?a.locked.set(i,[]):a.locked.set(i,[o]):o!==void 0&&(s.unshift(o),a.locked.set(i,s))},this.isLocked=function(i){return a.locked.has(i)},this.lock=function(i){return new Promise(function(o,s){a.isLocked(i)?a.addToLocked(i,o):(a.addToLocked(i),o())})},this.unlock=function(i){var o=a.locked.get(i);if(o!==void 0&&o.length!==0){var s=o.pop();a.locked.set(i,o),s!==void 0&&setTimeout(s,0)}else a.locked.delete(i)}}return n.getInstance=function(){return n.instance===void 0&&(n.instance=new n),n.instance},n}();t.default=function(){return r.getInstance()}});Eo(lt);var V0=Eo(Po(function(e,t){var r=ut&&ut.__awaiter||function(l,c,d,v){return new(d||(d=Promise))(function(p,S){function g(b){try{I(v.next(b))}catch(h){S(h)}}function T(b){try{I(v.throw(b))}catch(h){S(h)}}function I(b){b.done?p(b.value):new d(function(h){h(b.value)}).then(g,T)}I((v=v.apply(l,c||[])).next())})},n=ut&&ut.__generator||function(l,c){var d,v,p,S,g={label:0,sent:function(){if(1&p[0])throw p[1];return p[1]},trys:[],ops:[]};return S={next:T(0),throw:T(1),return:T(2)},typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function T(I){return function(b){return function(h){if(d)throw new TypeError("Generator is already executing.");for(;g;)try{if(d=1,v&&(p=2&h[0]?v.return:h[0]?v.throw||((p=v.return)&&p.call(v),0):v.next)&&!(p=p.call(v,h[1])).done)return p;switch(v=0,p&&(h=[2&h[0],p.value]),h[0]){case 0:case 1:p=h;break;case 4:return g.label++,{value:h[1],done:!1};case 5:g.label++,v=h[1],h=[0];continue;case 7:h=g.ops.pop(),g.trys.pop();continue;default:if(p=g.trys,!((p=p.length>0&&p[p.length-1])||h[0]!==6&&h[0]!==2)){g=0;continue}if(h[0]===3&&(!p||h[1]>p[0]&&h[1]<p[3])){g.label=h[1];break}if(h[0]===6&&g.label<p[1]){g.label=p[1],p=h;break}if(p&&g.label<p[2]){g.label=p[2],g.ops.push(h);break}p[2]&&g.ops.pop(),g.trys.pop();continue}h=c.call(l,g)}catch($){h=[6,$],v=0}finally{d=p=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([I,b])}}},a=ut;Object.defineProperty(t,"__esModule",{value:!0});var i="browser-tabs-lock-key",o={key:function(l){return r(a,void 0,void 0,function(){return n(this,function(c){throw new Error("Unsupported")})})},getItem:function(l){return r(a,void 0,void 0,function(){return n(this,function(c){throw new Error("Unsupported")})})},clear:function(){return r(a,void 0,void 0,function(){return n(this,function(l){return[2,window.localStorage.clear()]})})},removeItem:function(l){return r(a,void 0,void 0,function(){return n(this,function(c){throw new Error("Unsupported")})})},setItem:function(l,c){return r(a,void 0,void 0,function(){return n(this,function(d){throw new Error("Unsupported")})})},keySync:function(l){return window.localStorage.key(l)},getItemSync:function(l){return window.localStorage.getItem(l)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(l){return window.localStorage.removeItem(l)},setItemSync:function(l,c){return window.localStorage.setItem(l,c)}};function s(l){return new Promise(function(c){return setTimeout(c,l)})}function u(l){for(var c="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",d="",v=0;v<l;v++)d+=c[Math.floor(Math.random()*c.length)];return d}var f=function(){function l(c){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+u(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=c,l.waiters===void 0&&(l.waiters=[])}return l.prototype.acquireLock=function(c,d){return d===void 0&&(d=5e3),r(this,void 0,void 0,function(){var v,p,S,g,T,I,b;return n(this,function(h){switch(h.label){case 0:v=Date.now()+u(4),p=Date.now()+d,S=i+"-"+c,g=this.storageHandler===void 0?o:this.storageHandler,h.label=1;case 1:return Date.now()<p?[4,s(30)]:[3,8];case 2:return h.sent(),g.getItemSync(S)!==null?[3,5]:(T=this.id+"-"+c+"-"+v,[4,s(Math.floor(25*Math.random()))]);case 3:return h.sent(),g.setItemSync(S,JSON.stringify({id:this.id,iat:v,timeoutKey:T,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,s(30)];case 4:return h.sent(),(I=g.getItemSync(S))!==null&&(b=JSON.parse(I)).id===this.id&&b.iat===v?(this.acquiredIatSet.add(v),this.refreshLockWhileAcquired(S,v),[2,!0]):[3,7];case 5:return l.lockCorrector(this.storageHandler===void 0?o:this.storageHandler),[4,this.waitForSomethingToChange(p)];case 6:h.sent(),h.label=7;case 7:return v=Date.now()+u(4),[3,1];case 8:return[2,!1]}})})},l.prototype.refreshLockWhileAcquired=function(c,d){return r(this,void 0,void 0,function(){var v=this;return n(this,function(p){return setTimeout(function(){return r(v,void 0,void 0,function(){var S,g,T;return n(this,function(I){switch(I.label){case 0:return[4,lt.default().lock(d)];case 1:return I.sent(),this.acquiredIatSet.has(d)?(S=this.storageHandler===void 0?o:this.storageHandler,(g=S.getItemSync(c))===null?(lt.default().unlock(d),[2]):((T=JSON.parse(g)).timeRefreshed=Date.now(),S.setItemSync(c,JSON.stringify(T)),lt.default().unlock(d),this.refreshLockWhileAcquired(c,d),[2])):(lt.default().unlock(d),[2])}})})},1e3),[2]})})},l.prototype.waitForSomethingToChange=function(c){return r(this,void 0,void 0,function(){return n(this,function(d){switch(d.label){case 0:return[4,new Promise(function(v){var p=!1,S=Date.now(),g=!1;function T(){if(g||(window.removeEventListener("storage",T),l.removeFromWaiting(T),clearTimeout(I),g=!0),!p){p=!0;var b=50-(Date.now()-S);b>0?setTimeout(v,b):v(null)}}window.addEventListener("storage",T),l.addToWaiting(T);var I=setTimeout(T,Math.max(0,c-Date.now()))})];case 1:return d.sent(),[2]}})})},l.addToWaiting=function(c){this.removeFromWaiting(c),l.waiters!==void 0&&l.waiters.push(c)},l.removeFromWaiting=function(c){l.waiters!==void 0&&(l.waiters=l.waiters.filter(function(d){return d!==c}))},l.notifyWaiters=function(){l.waiters!==void 0&&l.waiters.slice().forEach(function(c){return c()})},l.prototype.releaseLock=function(c){return r(this,void 0,void 0,function(){return n(this,function(d){switch(d.label){case 0:return[4,this.releaseLock__private__(c)];case 1:return[2,d.sent()]}})})},l.prototype.releaseLock__private__=function(c){return r(this,void 0,void 0,function(){var d,v,p,S;return n(this,function(g){switch(g.label){case 0:return d=this.storageHandler===void 0?o:this.storageHandler,v=i+"-"+c,(p=d.getItemSync(v))===null?[2]:(S=JSON.parse(p)).id!==this.id?[3,2]:[4,lt.default().lock(S.iat)];case 1:g.sent(),this.acquiredIatSet.delete(S.iat),d.removeItemSync(v),lt.default().unlock(S.iat),l.notifyWaiters(),g.label=2;case 2:return[2]}})})},l.lockCorrector=function(c){for(var d=Date.now()-5e3,v=c,p=[],S=0;;){var g=v.keySync(S);if(g===null)break;p.push(g),S++}for(var T=!1,I=0;I<p.length;I++){var b=p[I];if(b.includes(i)){var h=v.getItemSync(b);if(h!==null){var $=JSON.parse(h);($.timeRefreshed===void 0&&$.timeAcquired<d||$.timeRefreshed!==void 0&&$.timeRefreshed<d)&&(v.removeItemSync(b),T=!0)}}}T&&l.notifyWaiters()},l.waiters=void 0,l}();t.default=f}));const Z0={timeoutInSeconds:60},bf={name:"auth0-spa-js",version:"2.1.3"},Sf=()=>Date.now();let ce=class as extends Error{constructor(t,r){super(r),this.error=t,this.error_description=r,Object.setPrototypeOf(this,as.prototype)}static fromPayload({error:t,error_description:r}){return new as(t,r)}},J0=class uv extends ce{constructor(t,r,n,a=null){super(t,r),this.state=n,this.appState=a,Object.setPrototypeOf(this,uv.prototype)}},Oo=class lv extends ce{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,lv.prototype)}},Y0=class fv extends Oo{constructor(t){super(),this.popup=t,Object.setPrototypeOf(this,fv.prototype)}},X0=class dv extends ce{constructor(t){super("cancelled","Popup closed"),this.popup=t,Object.setPrototypeOf(this,dv.prototype)}},q0=class vv extends ce{constructor(t,r,n){super(t,r),this.mfa_token=n,Object.setPrototypeOf(this,vv.prototype)}},$f=class hv extends ce{constructor(t,r){super("missing_refresh_token",`Missing Refresh Token (audience: '${If(t,["default"])}', scope: '${If(r)}')`),this.audience=t,this.scope=r,Object.setPrototypeOf(this,hv.prototype)}};function If(e,t=[]){return e&&!t.includes(e)?e:""}const Bn=()=>window.crypto,ko=()=>{const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let t="";return Array.from(Bn().getRandomValues(new Uint8Array(43))).forEach(r=>t+=e[r%e.length]),t},Tf=e=>btoa(e),_o=e=>{var{clientId:t}=e,r=Le(e,["clientId"]);return new URLSearchParams((n=>Object.keys(n).filter(a=>n[a]!==void 0).reduce((a,i)=>Object.assign(Object.assign({},a),{[i]:n[i]}),{}))(Object.assign({client_id:t},r))).toString()},Ef=e=>(t=>decodeURIComponent(atob(t).split("").map(r=>"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),Q0=async(e,t)=>{const r=await fetch(e,t);return{ok:r.ok,json:await r.json()}},eT=async(e,t,r)=>{const n=new AbortController;let a;return t.signal=n.signal,Promise.race([Q0(e,t),new Promise((i,o)=>{a=setTimeout(()=>{n.abort(),o(new Error("Timeout when executing 'fetch'"))},r)})]).finally(()=>{clearTimeout(a)})},tT=async(e,t,r,n,a,i,o)=>{return s={auth:{audience:t,scope:r},timeout:a,fetchUrl:e,fetchOptions:n,useFormData:o},u=i,new Promise(function(f,l){const c=new MessageChannel;c.port1.onmessage=function(d){d.data.error?l(new Error(d.data.error)):f(d.data),c.port1.close()},u.postMessage(s,[c.port2])});var s,u},rT=async(e,t,r,n,a,i,o=1e4)=>a?tT(e,t,r,n,o,a,i):eT(e,n,o);async function nT(e,t){var{baseUrl:r,timeout:n,audience:a,scope:i,auth0Client:o,useFormData:s}=e,u=Le(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);const f=s?_o(u):JSON.stringify(u);return await async function(l,c,d,v,p,S,g){let T,I=null;for(let j=0;j<3;j++)try{T=await rT(l,d,v,p,S,g,c),I=null;break}catch(M){I=M}if(I)throw I;const b=T.json,{error:h,error_description:$}=b,k=Le(b,["error","error_description"]),{ok:_}=T;if(!_){const j=$||`HTTP error. Unable to fetch ${l}`;throw h==="mfa_required"?new q0(h,j,k.mfa_token):h==="missing_refresh_token"?new $f(d,v):new ce(h||"request_error",j)}return k}(`${r}/oauth/token`,n,a||"default",i,{method:"POST",body:f,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(o||bf))}},t,s)}const Hn=(...e)=>{return(t=e.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(t))).join(" ");var t};let ft=class is{constructor(t,r="@@auth0spajs@@",n){this.prefix=r,this.suffix=n,this.clientId=t.clientId,this.scope=t.scope,this.audience=t.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(t){const[r,n,a,i]=t.split("::");return new is({clientId:n,scope:i,audience:a},r)}static fromCacheEntry(t){const{scope:r,audience:n,client_id:a}=t;return new is({scope:r,audience:n,clientId:a})}},aT=class{set(t,r){localStorage.setItem(t,JSON.stringify(r))}get(t){const r=window.localStorage.getItem(t);if(r)try{return JSON.parse(r)}catch{return}}remove(t){localStorage.removeItem(t)}allKeys(){return Object.keys(window.localStorage).filter(t=>t.startsWith("@@auth0spajs@@"))}},Pf=class{constructor(){this.enclosedCache=function(){let t={};return{set(r,n){t[r]=n},get(r){const n=t[r];if(n)return n},remove(r){delete t[r]},allKeys:()=>Object.keys(t)}}()}},iT=class{constructor(t,r,n){this.cache=t,this.keyManifest=r,this.nowProvider=n||Sf}async setIdToken(t,r,n){var a;const i=this.getIdTokenCacheKey(t);await this.cache.set(i,{id_token:r,decodedToken:n}),await((a=this.keyManifest)===null||a===void 0?void 0:a.add(i))}async getIdToken(t){const r=await this.cache.get(this.getIdTokenCacheKey(t.clientId));if(!r&&t.scope&&t.audience){const n=await this.get(t);return!n||!n.id_token||!n.decodedToken?void 0:{id_token:n.id_token,decodedToken:n.decodedToken}}if(r)return{id_token:r.id_token,decodedToken:r.decodedToken}}async get(t,r=0){var n;let a=await this.cache.get(t.toKey());if(!a){const s=await this.getCacheKeys();if(!s)return;const u=this.matchExistingCacheKey(t,s);u&&(a=await this.cache.get(u))}if(!a)return;const i=await this.nowProvider(),o=Math.floor(i/1e3);return a.expiresAt-r<o?a.body.refresh_token?(a.body={refresh_token:a.body.refresh_token},await this.cache.set(t.toKey(),a),a.body):(await this.cache.remove(t.toKey()),void await((n=this.keyManifest)===null||n===void 0?void 0:n.remove(t.toKey()))):a.body}async set(t){var r;const n=new ft({clientId:t.client_id,scope:t.scope,audience:t.audience}),a=await this.wrapCacheEntry(t);await this.cache.set(n.toKey(),a),await((r=this.keyManifest)===null||r===void 0?void 0:r.add(n.toKey()))}async clear(t){var r;const n=await this.getCacheKeys();n&&(await n.filter(a=>!t||a.includes(t)).reduce(async(a,i)=>{await a,await this.cache.remove(i)},Promise.resolve()),await((r=this.keyManifest)===null||r===void 0?void 0:r.clear()))}async wrapCacheEntry(t){const r=await this.nowProvider();return{body:t,expiresAt:Math.floor(r/1e3)+t.expires_in}}async getCacheKeys(){var t;return this.keyManifest?(t=await this.keyManifest.get())===null||t===void 0?void 0:t.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(t){return new ft({clientId:t},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(t,r){return r.filter(n=>{var a;const i=ft.fromKey(n),o=new Set(i.scope&&i.scope.split(" ")),s=((a=t.scope)===null||a===void 0?void 0:a.split(" "))||[],u=i.scope&&s.reduce((f,l)=>f&&o.has(l),!0);return i.prefix==="@@auth0spajs@@"&&i.clientId===t.clientId&&i.audience===t.audience&&u})[0]}},oT=class{constructor(t,r,n){this.storage=t,this.clientId=r,this.cookieDomain=n,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(t){this.storage.save(this.storageKey,t,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}};const Or=e=>typeof e=="number",sT=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],cT=e=>{if(!e.id_token)throw new Error("ID token is required but missing");const t=(i=>{const o=i.split("."),[s,u,f]=o;if(o.length!==3||!s||!u||!f)throw new Error("ID token could not be decoded");const l=JSON.parse(Ef(u)),c={__raw:i},d={};return Object.keys(l).forEach(v=>{c[v]=l[v],sT.includes(v)||(d[v]=l[v])}),{encoded:{header:s,payload:u,signature:f},header:JSON.parse(Ef(s)),claims:c,user:d}})(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${e.iss}", found "${t.claims.iss}"`);if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(t.header.alg!=="RS256")throw new Error(`Signature algorithm of "${t.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!t.claims.aud||typeof t.claims.aud!="string"&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but was not one of "${t.claims.aud.join(", ")}"`);if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${e.aud}", found "${t.claims.azp}"`)}}else if(t.claims.aud!==e.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but found "${t.claims.aud}"`);if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${e.nonce}", found "${t.claims.nonce}"`)}if(e.max_age&&!Or(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(t.claims.exp==null||!Or(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Or(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const r=e.leeway||60,n=new Date(e.now||Date.now()),a=new Date(0);if(a.setUTCSeconds(t.claims.exp+r),n>a)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${n}) is after expiration time (${a})`);if(t.claims.nbf!=null&&Or(t.claims.nbf)){const i=new Date(0);if(i.setUTCSeconds(t.claims.nbf-r),n<i)throw new Error(`Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (${n}) is before ${i}`)}if(t.claims.auth_time!=null&&Or(t.claims.auth_time)){const i=new Date(0);if(i.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+r),n>i)throw new Error(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (${n}) is after last auth at ${i}`)}if(e.organization){const i=e.organization.trim();if(i.startsWith("org_")){const o=i;if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(o!==t.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${o}", found "${t.claims.org_id}"`)}else{const o=i.toLowerCase();if(!t.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(o!==t.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${o}", found "${t.claims.org_name}"`)}}return t};var dt=Po(function(e,t){var r=ut&&ut.__assign||function(){return r=Object.assign||function(u){for(var f,l=1,c=arguments.length;l<c;l++)for(var d in f=arguments[l])Object.prototype.hasOwnProperty.call(f,d)&&(u[d]=f[d]);return u},r.apply(this,arguments)};function n(u,f){if(!f)return"";var l="; "+u;return f===!0?l:l+"="+f}function a(u,f,l){return encodeURIComponent(u).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(f).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(c){if(typeof c.expires=="number"){var d=new Date;d.setMilliseconds(d.getMilliseconds()+864e5*c.expires),c.expires=d}return n("Expires",c.expires?c.expires.toUTCString():"")+n("Domain",c.domain)+n("Path",c.path)+n("Secure",c.secure)+n("SameSite",c.sameSite)}(l)}function i(u){for(var f={},l=u?u.split("; "):[],c=/(%[\dA-F]{2})+/gi,d=0;d<l.length;d++){var v=l[d].split("="),p=v.slice(1).join("=");p.charAt(0)==='"'&&(p=p.slice(1,-1));try{f[v[0].replace(c,decodeURIComponent)]=p.replace(c,decodeURIComponent)}catch{}}return f}function o(){return i(document.cookie)}function s(u,f,l){document.cookie=a(u,f,r({path:"/"},l))}t.__esModule=!0,t.encode=a,t.parse=i,t.getAll=o,t.get=function(u){return o()[u]},t.set=s,t.remove=function(u,f){s(u,"",r(r({},f),{expires:-1}))}});Eo(dt),dt.encode,dt.parse,dt.getAll;var uT=dt.get,Of=dt.set,kf=dt.remove;const zt={get(e){const t=uT(e);if(t!==void 0)return JSON.parse(t)},save(e,t,r){let n={};window.location.protocol==="https:"&&(n={secure:!0,sameSite:"none"}),r!=null&&r.daysUntilExpire&&(n.expires=r.daysUntilExpire),r!=null&&r.cookieDomain&&(n.domain=r.cookieDomain),Of(e,JSON.stringify(t),n)},remove(e,t){let r={};t!=null&&t.cookieDomain&&(r.domain=t.cookieDomain),kf(e,r)}},lT={get(e){return zt.get(e)||zt.get(`_legacy_${e}`)},save(e,t,r){let n={};window.location.protocol==="https:"&&(n={secure:!0}),r!=null&&r.daysUntilExpire&&(n.expires=r.daysUntilExpire),r!=null&&r.cookieDomain&&(n.domain=r.cookieDomain),Of(`_legacy_${e}`,JSON.stringify(t),n),zt.save(e,t,r)},remove(e,t){let r={};t!=null&&t.cookieDomain&&(r.domain=t.cookieDomain),kf(e,r),zt.remove(e,t),zt.remove(`_legacy_${e}`,t)}},fT={get(e){if(typeof sessionStorage>"u")return;const t=sessionStorage.getItem(e);return t!=null?JSON.parse(t):void 0},save(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove(e){sessionStorage.removeItem(e)}};function dT(e,t,r){var n=t===void 0?null:t,a=function(u,f){var l=atob(u);if(f){for(var c=new Uint8Array(l.length),d=0,v=l.length;d<v;++d)c[d]=l.charCodeAt(d);return String.fromCharCode.apply(null,new Uint16Array(c.buffer))}return l}(e,r!==void 0&&r),i=a.indexOf(`
|
|
1
|
+
var sesamyJs=function(Ne){"use strict";var pP=Object.defineProperty;var mP=(Ne,le,K)=>le in Ne?pP(Ne,le,{enumerable:!0,configurable:!0,writable:!0,value:K}):Ne[le]=K;var be=(Ne,le,K)=>mP(Ne,typeof le!="symbol"?le+"":le,K);var le=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},K=function(e){try{return!!e()}catch{return!0}},pv=K,Dr=!pv(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),os=Dr,ss=Function.prototype,sa=ss.call,mv=os&&ss.bind.bind(sa,sa),G=os?mv:function(e){return function(){return sa.apply(e,arguments)}},cs=G,gv=cs({}.toString),yv=cs("".slice),Mr=function(e){return yv(gv(e),8,-1)},wv=G,bv=K,Sv=Mr,ca=Object,$v=wv("".split),us=bv(function(){return!ca("z").propertyIsEnumerable(0)})?function(e){return Sv(e)==="String"?$v(e,""):ca(e)}:ca,Fr=function(e){return e==null},Iv=Fr,Tv=TypeError,zr=function(e){if(Iv(e))throw new Tv("Can't call method on "+e);return e},Ev=us,Pv=zr,tr=function(e){return Ev(Pv(e))},rr=function(e){return e&&e.Math===Math&&e},H=rr(typeof globalThis=="object"&&globalThis)||rr(typeof window=="object"&&window)||rr(typeof self=="object"&&self)||rr(typeof le=="object"&&le)||rr(typeof le=="object"&&le)||function(){return this}()||Function("return this")(),ls={exports:{}},Ov=!1,fs=H,kv=Object.defineProperty,ua=function(e,t){try{kv(fs,e,{value:t,configurable:!0,writable:!0})}catch{fs[e]=t}return t},_v=H,Rv=ua,ds="__core-js_shared__",vs=ls.exports=_v[ds]||Rv(ds,{});(vs.versions||(vs.versions=[])).push({version:"3.38.0",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.0/LICENSE",source:"https://github.com/zloirock/core-js"});var la=ls.exports,hs=la,ps=function(e,t){return hs[e]||(hs[e]=t||{})},Cv=zr,Av=Object,Br=function(e){return Av(Cv(e))},jv=G,Lv=Br,Nv=jv({}.hasOwnProperty),fe=Object.hasOwn||function(t,r){return Nv(Lv(t),r)},Uv=G,xv=0,Dv=Math.random(),Mv=Uv(1 .toString),ms=function(e){return"Symbol("+(e===void 0?"":e)+")_"+Mv(++xv+Dv,36)},Fv=H,gs=Fv.navigator,ys=gs&&gs.userAgent,nr=ys?String(ys):"",ws=H,fa=nr,bs=ws.process,Ss=ws.Deno,$s=bs&&bs.versions||Ss&&Ss.version,Is=$s&&$s.v8,Se,Hr;Is&&(Se=Is.split("."),Hr=Se[0]>0&&Se[0]<4?1:+(Se[0]+Se[1])),!Hr&&fa&&(Se=fa.match(/Edge\/(\d+)/),(!Se||Se[1]>=74)&&(Se=fa.match(/Chrome\/(\d+)/),Se&&(Hr=+Se[1])));var Ts=Hr,Es=Ts,zv=K,Bv=H,Hv=Bv.String,Ps=!!Object.getOwnPropertySymbols&&!zv(function(){var e=Symbol("symbol detection");return!Hv(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Es&&Es<41}),Kv=Ps,Os=Kv&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Gv=H,Wv=ps,ks=fe,Vv=ms,Zv=Ps,Jv=Os,wt=Gv.Symbol,da=Wv("wks"),Yv=Jv?wt.for||wt:wt&&wt.withoutSetter||Vv,q=function(e){return ks(da,e)||(da[e]=Zv&&ks(wt,e)?wt[e]:Yv("Symbol."+e)),da[e]},va=typeof document=="object"&&document.all,W=typeof va>"u"&&va!==void 0?function(e){return typeof e=="function"||e===va}:function(e){return typeof e=="function"},Xv=W,de=function(e){return typeof e=="object"?e!==null:Xv(e)},qv=de,Qv=String,eh=TypeError,$e=function(e){if(qv(e))return e;throw new eh(Qv(e)+" is not an object")},_s={},th=K,Q=!th(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),rh=Q,nh=K,Rs=rh&&nh(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),_e={},ah=H,Cs=de,ha=ah.document,ih=Cs(ha)&&Cs(ha.createElement),Kr=function(e){return ih?ha.createElement(e):{}},oh=Q,sh=K,ch=Kr,As=!oh&&!sh(function(){return Object.defineProperty(ch("div"),"a",{get:function(){return 7}}).a!==7}),uh=Dr,Gr=Function.prototype.call,te=uh?Gr.bind(Gr):function(){return Gr.apply(Gr,arguments)},pa=H,lh=W,fh=function(e){return lh(e)?e:void 0},Ie=function(e,t){return arguments.length<2?fh(pa[e]):pa[e]&&pa[e][t]},dh=G,Wr=dh({}.isPrototypeOf),vh=Ie,hh=W,ph=Wr,mh=Os,gh=Object,js=mh?function(e){return typeof e=="symbol"}:function(e){var t=vh("Symbol");return hh(t)&&ph(t.prototype,gh(e))},yh=String,Vr=function(e){try{return yh(e)}catch{return"Object"}},wh=W,bh=Vr,Sh=TypeError,Te=function(e){if(wh(e))return e;throw new Sh(bh(e)+" is not a function")},$h=Te,Ih=Fr,ma=function(e,t){var r=e[t];return Ih(r)?void 0:$h(r)},ga=te,ya=W,wa=de,Th=TypeError,Eh=function(e,t){var r,n;if(t==="string"&&ya(r=e.toString)&&!wa(n=ga(r,e))||ya(r=e.valueOf)&&!wa(n=ga(r,e))||t!=="string"&&ya(r=e.toString)&&!wa(n=ga(r,e)))return n;throw new Th("Can't convert object to primitive value")},Ph=te,Ls=de,Ns=js,Oh=ma,kh=Eh,_h=q,Rh=TypeError,Ch=_h("toPrimitive"),Ah=function(e,t){if(!Ls(e)||Ns(e))return e;var r=Oh(e,Ch),n;if(r){if(t===void 0&&(t="default"),n=Ph(r,e,t),!Ls(n)||Ns(n))return n;throw new Rh("Can't convert object to primitive value")}return t===void 0&&(t="number"),kh(e,t)},jh=Ah,Lh=js,Us=function(e){var t=jh(e,"string");return Lh(t)?t:t+""},Nh=Q,Uh=As,xh=Rs,Zr=$e,xs=Us,Dh=TypeError,ba=Object.defineProperty,Mh=Object.getOwnPropertyDescriptor,Sa="enumerable",$a="configurable",Ia="writable";_e.f=Nh?xh?function(t,r,n){if(Zr(t),r=xs(r),Zr(n),typeof t=="function"&&r==="prototype"&&"value"in n&&Ia in n&&!n[Ia]){var a=Mh(t,r);a&&a[Ia]&&(t[r]=n.value,n={configurable:$a in n?n[$a]:a[$a],enumerable:Sa in n?n[Sa]:a[Sa],writable:!1})}return ba(t,r,n)}:ba:function(t,r,n){if(Zr(t),r=xs(r),Zr(n),Uh)try{return ba(t,r,n)}catch{}if("get"in n||"set"in n)throw new Dh("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var Fh=Math.ceil,zh=Math.floor,Bh=Math.trunc||function(t){var r=+t;return(r>0?zh:Fh)(r)},Hh=Bh,Ta=function(e){var t=+e;return t!==t||t===0?0:Hh(t)},Kh=Ta,Gh=Math.max,Wh=Math.min,Vh=function(e,t){var r=Kh(e);return r<0?Gh(r+t,0):Wh(r,t)},Zh=Ta,Jh=Math.min,Yh=function(e){var t=Zh(e);return t>0?Jh(t,9007199254740991):0},Xh=Yh,Ea=function(e){return Xh(e.length)},qh=tr,Qh=Vh,ep=Ea,Ds=function(e){return function(t,r,n){var a=qh(t),i=ep(a);if(i===0)return!e&&-1;var o=Qh(n,i),s;if(e&&r!==r){for(;i>o;)if(s=a[o++],s!==s)return!0}else for(;i>o;o++)if((e||o in a)&&a[o]===r)return e||o||0;return!e&&-1}},tp={includes:Ds(!0),indexOf:Ds(!1)},Pa={},rp=G,Oa=fe,np=tr,ap=tp.indexOf,ip=Pa,Ms=rp([].push),Fs=function(e,t){var r=np(e),n=0,a=[],i;for(i in r)!Oa(ip,i)&&Oa(r,i)&&Ms(a,i);for(;t.length>n;)Oa(r,i=t[n++])&&(~ap(a,i)||Ms(a,i));return a},ka=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],op=Fs,sp=ka,zs=Object.keys||function(t){return op(t,sp)},cp=Q,up=Rs,lp=_e,fp=$e,dp=tr,vp=zs;_s.f=cp&&!up?Object.defineProperties:function(t,r){fp(t);for(var n=dp(r),a=vp(r),i=a.length,o=0,s;i>o;)lp.f(t,s=a[o++],n[s]);return t};var hp=Ie,Bs=hp("document","documentElement"),pp=ps,mp=ms,Hs=pp("keys"),_a=function(e){return Hs[e]||(Hs[e]=mp(e))},gp=$e,yp=_s,Ks=ka,wp=Pa,bp=Bs,Sp=Kr,$p=_a,Gs=">",Ws="<",Ra="prototype",Ca="script",Vs=$p("IE_PROTO"),Aa=function(){},Zs=function(e){return Ws+Ca+Gs+e+Ws+"/"+Ca+Gs},Js=function(e){e.write(Zs("")),e.close();var t=e.parentWindow.Object;return e=null,t},Ip=function(){var e=Sp("iframe"),t="java"+Ca+":",r;return e.style.display="none",bp.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(Zs("document.F=Object")),r.close(),r.F},Jr,Yr=function(){try{Jr=new ActiveXObject("htmlfile")}catch{}Yr=typeof document<"u"?document.domain&&Jr?Js(Jr):Ip():Js(Jr);for(var e=Ks.length;e--;)delete Yr[Ra][Ks[e]];return Yr()};wp[Vs]=!0;var Xr=Object.create||function(t,r){var n;return t!==null?(Aa[Ra]=gp(t),n=new Aa,Aa[Ra]=null,n[Vs]=t):n=Yr(),r===void 0?n:yp.f(n,r)},Tp=q,Ep=Xr,Pp=_e.f,ja=Tp("unscopables"),La=Array.prototype;La[ja]===void 0&&Pp(La,ja,{configurable:!0,value:Ep(null)});var Op=function(e){La[ja][e]=!0},ar={},kp=H,_p=W,Ys=kp.WeakMap,Rp=_p(Ys)&&/native code/.test(String(Ys)),Qe=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},Cp=Q,Ap=_e,jp=Qe,et=Cp?function(e,t,r){return Ap.f(e,t,jp(1,r))}:function(e,t,r){return e[t]=r,e},Lp=Rp,Xs=H,Np=de,Up=et,Na=fe,Ua=la,xp=_a,Dp=Pa,qs="Object already initialized",xa=Xs.TypeError,Mp=Xs.WeakMap,qr,ir,Qr,Fp=function(e){return Qr(e)?ir(e):qr(e,{})},zp=function(e){return function(t){var r;if(!Np(t)||(r=ir(t)).type!==e)throw new xa("Incompatible receiver, "+e+" required");return r}};if(Lp||Ua.state){var Re=Ua.state||(Ua.state=new Mp);Re.get=Re.get,Re.has=Re.has,Re.set=Re.set,qr=function(e,t){if(Re.has(e))throw new xa(qs);return t.facade=e,Re.set(e,t),t},ir=function(e){return Re.get(e)||{}},Qr=function(e){return Re.has(e)}}else{var bt=xp("state");Dp[bt]=!0,qr=function(e,t){if(Na(e,bt))throw new xa(qs);return t.facade=e,Up(e,bt,t),t},ir=function(e){return Na(e,bt)?e[bt]:{}},Qr=function(e){return Na(e,bt)}}var St={set:qr,get:ir,has:Qr,enforce:Fp,getterFor:zp},Da={},Ma={},Qs={}.propertyIsEnumerable,ec=Object.getOwnPropertyDescriptor,Bp=ec&&!Qs.call({1:2},1);Ma.f=Bp?function(t){var r=ec(this,t);return!!r&&r.enumerable}:Qs;var Hp=Q,Kp=te,Gp=Ma,Wp=Qe,Vp=tr,Zp=Us,Jp=fe,Yp=As,tc=Object.getOwnPropertyDescriptor;Da.f=Hp?tc:function(t,r){if(t=Vp(t),r=Zp(r),Yp)try{return tc(t,r)}catch{}if(Jp(t,r))return Wp(!Kp(Gp.f,t,r),t[r])};var rc={exports:{}},Fa=Q,Xp=fe,nc=Function.prototype,qp=Fa&&Object.getOwnPropertyDescriptor,za=Xp(nc,"name"),Qp=za&&(function(){}).name==="something",em=za&&(!Fa||Fa&&qp(nc,"name").configurable),ac={EXISTS:za,PROPER:Qp,CONFIGURABLE:em},tm=G,rm=W,Ba=la,nm=tm(Function.toString);rm(Ba.inspectSource)||(Ba.inspectSource=function(e){return nm(e)});var Ha=Ba.inspectSource,Ka=G,am=K,im=W,en=fe,Ga=Q,om=ac.CONFIGURABLE,sm=Ha,ic=St,cm=ic.enforce,um=ic.get,oc=String,tn=Object.defineProperty,lm=Ka("".slice),fm=Ka("".replace),dm=Ka([].join),vm=Ga&&!am(function(){return tn(function(){},"length",{value:8}).length!==8}),hm=String(String).split("String"),pm=rc.exports=function(e,t,r){lm(oc(t),0,7)==="Symbol("&&(t="["+fm(oc(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!en(e,"name")||om&&e.name!==t)&&(Ga?tn(e,"name",{value:t,configurable:!0}):e.name=t),vm&&r&&en(r,"arity")&&e.length!==r.arity&&tn(e,"length",{value:r.arity});try{r&&en(r,"constructor")&&r.constructor?Ga&&tn(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch{}var n=cm(e);return en(n,"source")||(n.source=dm(hm,typeof t=="string"?t:"")),e};Function.prototype.toString=pm(function(){return im(this)&&um(this).source||sm(this)},"toString");var sc=rc.exports,mm=W,gm=_e,ym=sc,wm=ua,ve=function(e,t,r,n){n||(n={});var a=n.enumerable,i=n.name!==void 0?n.name:t;if(mm(r)&&ym(r,i,n),n.global)a?e[t]=r:wm(t,r);else{try{n.unsafe?e[t]&&(a=!0):delete e[t]}catch{}a?e[t]=r:gm.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},cc={},bm=Fs,Sm=ka,$m=Sm.concat("length","prototype");cc.f=Object.getOwnPropertyNames||function(t){return bm(t,$m)};var Wa={};Wa.f=Object.getOwnPropertySymbols;var Im=Ie,Tm=G,Em=cc,Pm=Wa,Om=$e,km=Tm([].concat),_m=Im("Reflect","ownKeys")||function(t){var r=Em.f(Om(t)),n=Pm.f;return n?km(r,n(t)):r},uc=fe,Rm=_m,Cm=Da,Am=_e,lc=function(e,t,r){for(var n=Rm(t),a=Am.f,i=Cm.f,o=0;o<n.length;o++){var s=n[o];!uc(e,s)&&!(r&&uc(r,s))&&a(e,s,i(t,s))}},jm=K,Lm=W,Nm=/#|\.prototype\./,or=function(e,t){var r=xm[Um(e)];return r===Mm?!0:r===Dm?!1:Lm(t)?jm(t):!!t},Um=or.normalize=function(e){return String(e).replace(Nm,".").toLowerCase()},xm=or.data={},Dm=or.NATIVE="N",Mm=or.POLYFILL="P",fc=or,rn=H,Fm=Da.f,zm=et,Bm=ve,Hm=ua,Km=lc,Gm=fc,Y=function(e,t){var r=e.target,n=e.global,a=e.stat,i,o,s,u,f,l;if(n?o=rn:a?o=rn[r]||Hm(r,{}):o=rn[r]&&rn[r].prototype,o)for(s in t){if(f=t[s],e.dontCallGetSet?(l=Fm(o,s),u=l&&l.value):u=o[s],i=Gm(n?s:r+(a?".":"#")+s,e.forced),!i&&u!==void 0){if(typeof f==typeof u)continue;Km(f,u)}(e.sham||u&&u.sham)&&zm(f,"sham",!0),Bm(o,s,f,e)}},Wm=K,Vm=!Wm(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Zm=fe,Jm=W,Ym=Br,Xm=_a,qm=Vm,dc=Xm("IE_PROTO"),Va=Object,Qm=Va.prototype,Za=qm?Va.getPrototypeOf:function(e){var t=Ym(e);if(Zm(t,dc))return t[dc];var r=t.constructor;return Jm(r)&&t instanceof r?r.prototype:t instanceof Va?Qm:null},eg=K,tg=W,rg=de,vc=Za,ng=ve,ag=q,Ja=ag("iterator"),hc=!1,tt,Ya,Xa;[].keys&&(Xa=[].keys(),"next"in Xa?(Ya=vc(vc(Xa)),Ya!==Object.prototype&&(tt=Ya)):hc=!0);var ig=!rg(tt)||eg(function(){var e={};return tt[Ja].call(e)!==e});ig&&(tt={}),tg(tt[Ja])||ng(tt,Ja,function(){return this});var pc={IteratorPrototype:tt,BUGGY_SAFARI_ITERATORS:hc},og=_e.f,sg=fe,cg=q,mc=cg("toStringTag"),$t=function(e,t,r){e&&!r&&(e=e.prototype),e&&!sg(e,mc)&&og(e,mc,{configurable:!0,value:t})},ug=pc.IteratorPrototype,lg=Xr,fg=Qe,dg=$t,vg=ar,hg=function(){return this},gc=function(e,t,r,n){var a=t+" Iterator";return e.prototype=lg(ug,{next:fg(+!n,r)}),dg(e,a,!1),vg[a]=hg,e},pg=G,mg=Te,gg=function(e,t,r){try{return pg(mg(Object.getOwnPropertyDescriptor(e,t)[r]))}catch{}},yg=de,wg=function(e){return yg(e)||e===null},bg=wg,Sg=String,$g=TypeError,Ig=function(e){if(bg(e))return e;throw new $g("Can't set "+Sg(e)+" as a prototype")},Tg=gg,Eg=de,Pg=zr,Og=Ig,qa=Object.setPrototypeOf||("__proto__"in{}?function(){var e=!1,t={},r;try{r=Tg(Object.prototype,"__proto__","set"),r(t,[]),e=t instanceof Array}catch{}return function(a,i){return Pg(a),Og(i),Eg(a)&&(e?r(a,i):a.__proto__=i),a}}():void 0),kg=Y,_g=te,yc=ac,Rg=W,Cg=gc,wc=Za,bc=qa,Ag=$t,jg=et,Qa=ve,Lg=q,Ng=ar,Sc=pc,Ug=yc.PROPER,xg=yc.CONFIGURABLE,$c=Sc.IteratorPrototype,nn=Sc.BUGGY_SAFARI_ITERATORS,sr=Lg("iterator"),Ic="keys",cr="values",Tc="entries",Dg=function(){return this},Ec=function(e,t,r,n,a,i,o){Cg(r,t,n);var s=function(T){if(T===a&&d)return d;if(!nn&&T&&T in l)return l[T];switch(T){case Ic:return function(){return new r(this,T)};case cr:return function(){return new r(this,T)};case Tc:return function(){return new r(this,T)}}return function(){return new r(this)}},u=t+" Iterator",f=!1,l=e.prototype,c=l[sr]||l["@@iterator"]||a&&l[a],d=!nn&&c||s(a),v=t==="Array"&&l.entries||c,p,S,g;if(v&&(p=wc(v.call(new e)),p!==Object.prototype&&p.next&&(wc(p)!==$c&&(bc?bc(p,$c):Rg(p[sr])||Qa(p,sr,Dg)),Ag(p,u,!0))),Ug&&a===cr&&c&&c.name!==cr&&(xg?jg(l,"name",cr):(f=!0,d=function(){return _g(c,this)})),a)if(S={values:s(cr),keys:i?d:s(Ic),entries:s(Tc)},o)for(g in S)(nn||f||!(g in l))&&Qa(l,g,S[g]);else kg({target:t,proto:!0,forced:nn||f},S);return l[sr]!==d&&Qa(l,sr,d,{name:a}),Ng[t]=d,S},ei=function(e,t){return{value:e,done:t}},Mg=tr,ti=Op,Pc=ar,Oc=St,Fg=_e.f,zg=Ec,an=ei,Bg=Q,kc="Array Iterator",Hg=Oc.set,Kg=Oc.getterFor(kc),Gg=zg(Array,"Array",function(e,t){Hg(this,{type:kc,target:Mg(e),index:0,kind:t})},function(){var e=Kg(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=void 0,an(void 0,!0);switch(e.kind){case"keys":return an(r,!1);case"values":return an(t[r],!1)}return an([r,t[r]],!1)},"values"),_c=Pc.Arguments=Pc.Array;if(ti("keys"),ti("values"),ti("entries"),Bg&&_c.name!=="values")try{Fg(_c,"name",{value:"values"})}catch{}var Rc=H,Wg=Q,Vg=Object.getOwnPropertyDescriptor,Cc=function(e){if(!Wg)return Rc[e];var t=Vg(Rc,e);return t&&t.value},Zg=K,Jg=q,Yg=Q,Ac=Ov,Xg=Jg("iterator"),on=!Zg(function(){var e=new URL("b?a=1&b=2&c=3","https://a"),t=e.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return e.pathname="c%20d",t.forEach(function(a,i){t.delete("b"),n+=i+a}),r.delete("a",2),r.delete("b",void 0),Ac&&(!e.toJSON||!r.has("a",1)||r.has("a",2)||!r.has("a",void 0)||r.has("b"))||!t.size&&(Ac||!Yg)||!t.sort||e.href!=="https://a/c%20d?a=1&c=3"||t.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!t[Xg]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://тест").host!=="xn--e1aybc"||new URL("https://a#б").hash!=="#%D0%B1"||n!=="a1c3"||new URL("https://x",void 0).host!=="x"}),jc=sc,qg=_e,sn=function(e,t,r){return r.get&&jc(r.get,t,{getter:!0}),r.set&&jc(r.set,t,{setter:!0}),qg.f(e,t,r)},Qg=ve,ey=function(e,t,r){for(var n in t)Qg(e,n,t[n],r);return e},ty=Wr,ry=TypeError,ri=function(e,t){if(ty(t,e))return e;throw new ry("Incorrect invocation")},ny=Mr,ay=G,iy=function(e){if(ny(e)==="Function")return ay(e)},Lc=iy,oy=Te,sy=Dr,cy=Lc(Lc.bind),It=function(e,t){return oy(e),t===void 0?e:sy?cy(e,t):function(){return e.apply(t,arguments)}},uy=q,ly=uy("toStringTag"),Nc={};Nc[ly]="z";var ni=String(Nc)==="[object z]",fy=ni,dy=W,cn=Mr,vy=q,hy=vy("toStringTag"),py=Object,my=cn(function(){return arguments}())==="Arguments",gy=function(e,t){try{return e[t]}catch{}},ur=fy?cn:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=gy(t=py(e),hy))=="string"?r:my?cn(t):(n=cn(t))==="Object"&&dy(t.callee)?"Arguments":n},yy=ur,wy=String,Ue=function(e){if(yy(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return wy(e)},by=ur,Uc=ma,Sy=Fr,$y=ar,Iy=q,Ty=Iy("iterator"),un=function(e){if(!Sy(e))return Uc(e,Ty)||Uc(e,"@@iterator")||$y[by(e)]},Ey=te,Py=Te,Oy=$e,ky=Vr,_y=un,Ry=TypeError,ai=function(e,t){var r=arguments.length<2?_y(e):t;if(Py(r))return Oy(Ey(r,e));throw new Ry(ky(e)+" is not iterable")},Cy=TypeError,rt=function(e,t){if(e<t)throw new Cy("Not enough arguments");return e},Ay=G,ln=Ay([].slice),xc=ln,jy=Math.floor,ii=function(e,t){var r=e.length;if(r<8)for(var n=1,a,i;n<r;){for(i=n,a=e[n];i&&t(e[i-1],a)>0;)e[i]=e[--i];i!==n++&&(e[i]=a)}else for(var o=jy(r/2),s=ii(xc(e,0,o),t),u=ii(xc(e,o),t),f=s.length,l=u.length,c=0,d=0;c<f||d<l;)e[c+d]=c<f&&d<l?t(s[c],u[d])<=0?s[c++]:u[d++]:c<f?s[c++]:u[d++];return e},Ly=ii,oi=Y,fn=H,si=Cc,dn=te,Ce=G,lr=Q,Dc=on,Mc=ve,Ny=sn,Uy=ey,xy=$t,Dy=gc,ci=St,Fc=ri,ui=W,My=fe,Fy=It,zy=ur,By=$e,zc=de,re=Ue,Hy=Xr,Bc=Qe,Hc=ai,Ky=un,vn=ei,Tt=rt,Gy=q,Wy=Ly,Vy=Gy("iterator"),Et="URLSearchParams",Kc=Et+"Iterator",Gc=ci.set,he=ci.getterFor(Et),Zy=ci.getterFor(Kc),Wc=si("fetch"),hn=si("Request"),fr=si("Headers"),li=hn&&hn.prototype,Vc=fr&&fr.prototype,Jy=fn.RegExp,Yy=fn.TypeError,Zc=fn.decodeURIComponent,Xy=fn.encodeURIComponent,qy=Ce("".charAt),Jc=Ce([].join),nt=Ce([].push),fi=Ce("".replace),Qy=Ce([].shift),Yc=Ce([].splice),Xc=Ce("".split),ew=Ce("".slice),tw=/\+/g,qc=Array(4),rw=function(e){return qc[e-1]||(qc[e-1]=Jy("((?:%[\\da-f]{2}){"+e+"})","gi"))},nw=function(e){try{return Zc(e)}catch{return e}},Qc=function(e){var t=fi(e,tw," "),r=4;try{return Zc(t)}catch{for(;r;)t=fi(t,rw(r--),nw);return t}},aw=/[!'()~]|%20/g,iw={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ow=function(e){return iw[e]},eu=function(e){return fi(Xy(e),aw,ow)},di=Dy(function(t,r){Gc(this,{type:Kc,target:he(t).entries,index:0,kind:r})},Et,function(){var t=Zy(this),r=t.target,n=t.index++;if(!r||n>=r.length)return t.target=void 0,vn(void 0,!0);var a=r[n];switch(t.kind){case"keys":return vn(a.key,!1);case"values":return vn(a.value,!1)}return vn([a.key,a.value],!1)},!0),tu=function(e){this.entries=[],this.url=null,e!==void 0&&(zc(e)?this.parseObject(e):this.parseQuery(typeof e=="string"?qy(e,0)==="?"?ew(e,1):e:re(e)))};tu.prototype={type:Et,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t=this.entries,r=Ky(e),n,a,i,o,s,u,f;if(r)for(n=Hc(e,r),a=n.next;!(i=dn(a,n)).done;){if(o=Hc(By(i.value)),s=o.next,(u=dn(s,o)).done||(f=dn(s,o)).done||!dn(s,o).done)throw new Yy("Expected sequence with length 2");nt(t,{key:re(u.value),value:re(f.value)})}else for(var l in e)My(e,l)&&nt(t,{key:l,value:re(e[l])})},parseQuery:function(e){if(e)for(var t=this.entries,r=Xc(e,"&"),n=0,a,i;n<r.length;)a=r[n++],a.length&&(i=Xc(a,"="),nt(t,{key:Qc(Qy(i)),value:Qc(Jc(i,"="))}))},serialize:function(){for(var e=this.entries,t=[],r=0,n;r<e.length;)n=e[r++],nt(t,eu(n.key)+"="+eu(n.value));return Jc(t,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var pn=function(){Fc(this,Pt);var t=arguments.length>0?arguments[0]:void 0,r=Gc(this,new tu(t));lr||(this.size=r.entries.length)},Pt=pn.prototype;if(Uy(Pt,{append:function(t,r){var n=he(this);Tt(arguments.length,2),nt(n.entries,{key:re(t),value:re(r)}),lr||this.length++,n.updateURL()},delete:function(e){for(var t=he(this),r=Tt(arguments.length,1),n=t.entries,a=re(e),i=r<2?void 0:arguments[1],o=i===void 0?i:re(i),s=0;s<n.length;){var u=n[s];if(u.key===a&&(o===void 0||u.value===o)){if(Yc(n,s,1),o!==void 0)break}else s++}lr||(this.size=n.length),t.updateURL()},get:function(t){var r=he(this).entries;Tt(arguments.length,1);for(var n=re(t),a=0;a<r.length;a++)if(r[a].key===n)return r[a].value;return null},getAll:function(t){var r=he(this).entries;Tt(arguments.length,1);for(var n=re(t),a=[],i=0;i<r.length;i++)r[i].key===n&&nt(a,r[i].value);return a},has:function(t){for(var r=he(this).entries,n=Tt(arguments.length,1),a=re(t),i=n<2?void 0:arguments[1],o=i===void 0?i:re(i),s=0;s<r.length;){var u=r[s++];if(u.key===a&&(o===void 0||u.value===o))return!0}return!1},set:function(t,r){var n=he(this);Tt(arguments.length,1);for(var a=n.entries,i=!1,o=re(t),s=re(r),u=0,f;u<a.length;u++)f=a[u],f.key===o&&(i?Yc(a,u--,1):(i=!0,f.value=s));i||nt(a,{key:o,value:s}),lr||(this.size=a.length),n.updateURL()},sort:function(){var t=he(this);Wy(t.entries,function(r,n){return r.key>n.key?1:-1}),t.updateURL()},forEach:function(t){for(var r=he(this).entries,n=Fy(t,arguments.length>1?arguments[1]:void 0),a=0,i;a<r.length;)i=r[a++],n(i.value,i.key,this)},keys:function(){return new di(this,"keys")},values:function(){return new di(this,"values")},entries:function(){return new di(this,"entries")}},{enumerable:!0}),Mc(Pt,Vy,Pt.entries,{name:"entries"}),Mc(Pt,"toString",function(){return he(this).serialize()},{enumerable:!0}),lr&&Ny(Pt,"size",{get:function(){return he(this).entries.length},configurable:!0,enumerable:!0}),xy(pn,Et),oi({global:!0,constructor:!0,forced:!Dc},{URLSearchParams:pn}),!Dc&&ui(fr)){var sw=Ce(Vc.has),cw=Ce(Vc.set),ru=function(e){if(zc(e)){var t=e.body,r;if(zy(t)===Et)return r=e.headers?new fr(e.headers):new fr,sw(r,"content-type")||cw(r,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Hy(e,{body:Bc(0,re(t)),headers:Bc(0,r)})}return e};if(ui(Wc)&&oi({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(t){return Wc(t,arguments.length>1?ru(arguments[1]):{})}}),ui(hn)){var vi=function(t){return Fc(this,li),new hn(t,arguments.length>1?ru(arguments[1]):{})};li.constructor=vi,vi.prototype=li,oi({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:vi})}}var uw={URLSearchParams:pn,getState:he},lw=ve,mn=G,nu=Ue,fw=rt,au=URLSearchParams,gn=au.prototype,dw=mn(gn.append),iu=mn(gn.delete),vw=mn(gn.forEach),hw=mn([].push),hi=new au("a=1&a=2&b=3");hi.delete("a",1),hi.delete("b",void 0),hi+""!="a=2"&&lw(gn,"delete",function(e){var t=arguments.length,r=t<2?void 0:arguments[1];if(t&&r===void 0)return iu(this,e);var n=[];vw(this,function(c,d){hw(n,{key:d,value:c})}),fw(t,1);for(var a=nu(e),i=nu(r),o=0,s=0,u=!1,f=n.length,l;o<f;)l=n[o++],u||l.key===a?(u=!0,iu(this,l.key)):s++;for(;s<f;)l=n[s++],l.key===a&&l.value===i||dw(this,l.key,l.value)},{enumerable:!0,unsafe:!0});var pw=ve,ou=G,mw=Ue,gw=rt,su=URLSearchParams,pi=su.prototype,yw=ou(pi.getAll),ww=ou(pi.has),cu=new su("a=1");(cu.has("a",2)||!cu.has("a",void 0))&&pw(pi,"has",function(t){var r=arguments.length,n=r<2?void 0:arguments[1];if(r&&n===void 0)return ww(this,t);var a=yw(this,t);gw(r,1);for(var i=mw(n),o=0;o<a.length;)if(a[o++]===i)return!0;return!1},{enumerable:!0,unsafe:!0});var bw=Q,Sw=G,$w=sn,mi=URLSearchParams.prototype,Iw=Sw(mi.forEach);bw&&!("size"in mi)&&$w(mi,"size",{get:function(){var t=0;return Iw(this,function(){t++}),t},configurable:!0,enumerable:!0});var Tw=H,gi=Tw,Ew=gi;Ew.URLSearchParams;var yi=G,Pw=Ta,Ow=Ue,kw=zr,_w=yi("".charAt),uu=yi("".charCodeAt),Rw=yi("".slice),lu=function(e){return function(t,r){var n=Ow(kw(t)),a=Pw(r),i=n.length,o,s;return a<0||a>=i?e?"":void 0:(o=uu(n,a),o<55296||o>56319||a+1===i||(s=uu(n,a+1))<56320||s>57343?e?_w(n,a):o:e?Rw(n,a,a+2):(o-55296<<10)+(s-56320)+65536)}},fu={codeAt:lu(!1),charAt:lu(!0)},Cw=fu.charAt,Aw=Ue,du=St,jw=Ec,vu=ei,hu="String Iterator",Lw=du.set,Nw=du.getterFor(hu);jw(String,"String",function(e){Lw(this,{type:hu,string:Aw(e),index:0})},function(){var t=Nw(this),r=t.string,n=t.index,a;return n>=r.length?vu(void 0,!0):(a=Cw(r,n),t.index+=a.length,vu(a,!1))});var pu=Q,Uw=G,xw=te,Dw=K,wi=zs,Mw=Wa,Fw=Ma,zw=Br,Bw=us,Ot=Object.assign,mu=Object.defineProperty,Hw=Uw([].concat),Kw=!Ot||Dw(function(){if(pu&&Ot({b:1},Ot(mu({},"a",{enumerable:!0,get:function(){mu(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(a){t[a]=a}),Ot({},e)[r]!==7||wi(Ot({},t)).join("")!==n})?function(t,r){for(var n=zw(t),a=arguments.length,i=1,o=Mw.f,s=Fw.f;a>i;)for(var u=Bw(arguments[i++]),f=o?Hw(wi(u),o(u)):wi(u),l=f.length,c=0,d;l>c;)d=f[c++],(!pu||xw(s,u,d))&&(n[d]=u[d]);return n}:Ot,Gw=te,gu=$e,Ww=ma,yu=function(e,t,r){var n,a;gu(e);try{if(n=Ww(e,"return"),!n){if(t==="throw")throw r;return r}n=Gw(n,e)}catch(i){a=!0,n=i}if(t==="throw")throw r;if(a)throw n;return gu(n),r},Vw=$e,Zw=yu,Jw=function(e,t,r,n){try{return n?t(Vw(r)[0],r[1]):t(r)}catch(a){Zw(e,"throw",a)}},Yw=q,Xw=ar,qw=Yw("iterator"),Qw=Array.prototype,wu=function(e){return e!==void 0&&(Xw.Array===e||Qw[qw]===e)},eb=G,tb=K,bu=W,rb=ur,nb=Ie,ab=Ha,Su=function(){},$u=nb("Reflect","construct"),bi=/^\s*(?:class|function)\b/,ib=eb(bi.exec),ob=!bi.test(Su),dr=function(t){if(!bu(t))return!1;try{return $u(Su,[],t),!0}catch{return!1}},Iu=function(t){if(!bu(t))return!1;switch(rb(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ob||!!ib(bi,ab(t))}catch{return!0}};Iu.sham=!0;var Tu=!$u||tb(function(){var e;return dr(dr.call)||!dr(Object)||!dr(function(){e=!0})||e})?Iu:dr,sb=Q,cb=_e,ub=Qe,lb=function(e,t,r){sb?cb.f(e,t,ub(0,r)):e[t]=r},fb=It,db=te,vb=Br,hb=Jw,pb=wu,mb=Tu,gb=Ea,Eu=lb,yb=ai,wb=un,Pu=Array,bb=function(t){var r=vb(t),n=mb(this),a=arguments.length,i=a>1?arguments[1]:void 0,o=i!==void 0;o&&(i=fb(i,a>2?arguments[2]:void 0));var s=wb(r),u=0,f,l,c,d,v,p;if(s&&!(this===Pu&&pb(s)))for(l=n?new this:[],d=yb(r,s),v=d.next;!(c=db(v,d)).done;u++)p=o?hb(d,i,[c.value,u],!0):c.value,Eu(l,u,p);else for(f=gb(r),l=n?new this(f):Pu(f);f>u;u++)p=o?i(r[u],u):r[u],Eu(l,u,p);return l.length=u,l},at=G,Si=2147483647,vr=36,Ou=1,$i=26,Sb=38,$b=700,Ib=72,Tb=128,Eb="-",Pb=/[^\0-\u007E]/,ku=/[.\u3002\uFF0E\uFF61]/g,_u="Overflow: input needs wider integers to process",Ii=vr-Ou,Ru=RangeError,Ob=at(ku.exec),kt=Math.floor,Ti=String.fromCharCode,Cu=at("".charCodeAt),Au=at([].join),He=at([].push),kb=at("".replace),_b=at("".split),Rb=at("".toLowerCase),Cb=function(e){for(var t=[],r=0,n=e.length;r<n;){var a=Cu(e,r++);if(a>=55296&&a<=56319&&r<n){var i=Cu(e,r++);(i&64512)===56320?He(t,((a&1023)<<10)+(i&1023)+65536):(He(t,a),r--)}else He(t,a)}return t},ju=function(e){return e+22+75*(e<26)},Ab=function(e,t,r){var n=0;for(e=r?kt(e/$b):e>>1,e+=kt(e/t);e>Ii*$i>>1;)e=kt(e/Ii),n+=vr;return kt(n+(Ii+1)*e/(e+Sb))},jb=function(e){var t=[];e=Cb(e);var r=e.length,n=Tb,a=0,i=Ib,o,s;for(o=0;o<e.length;o++)s=e[o],s<128&&He(t,Ti(s));var u=t.length,f=u;for(u&&He(t,Eb);f<r;){var l=Si;for(o=0;o<e.length;o++)s=e[o],s>=n&&s<l&&(l=s);var c=f+1;if(l-n>kt((Si-a)/c))throw new Ru(_u);for(a+=(l-n)*c,n=l,o=0;o<e.length;o++){if(s=e[o],s<n&&++a>Si)throw new Ru(_u);if(s===n){for(var d=a,v=vr;;){var p=v<=i?Ou:v>=i+$i?$i:v-i;if(d<p)break;var S=d-p,g=vr-p;He(t,Ti(ju(p+S%g))),d=kt(S/g),v+=vr}He(t,Ti(ju(d))),i=Ab(a,c,f===u),a=0,f++}}a++,n++}return Au(t,"")},Lb=function(e){var t=[],r=_b(kb(Rb(e),ku,"."),"."),n,a;for(n=0;n<r.length;n++)a=r[n],He(t,Ob(Pb,a)?"xn--"+jb(a):a);return Au(t,".")},Nb=Y,Ei=Q,Ub=on,Pi=H,Lu=It,pe=G,yn=ve,me=sn,xb=ri,Oi=fe,ki=Kw,_t=bb,Ee=ln,Db=fu.codeAt,Mb=Lb,xe=Ue,Fb=$t,zb=rt,Nu=uw,Uu=St,Bb=Uu.set,wn=Uu.getterFor("URL"),Hb=Nu.URLSearchParams,Kb=Nu.getState,hr=Pi.URL,_i=Pi.TypeError,bn=Pi.parseInt,Gb=Math.floor,xu=Math.pow,ge=pe("".charAt),Pe=pe(/./.exec),pr=pe([].join),Wb=pe(1 .toString),Vb=pe([].pop),Rt=pe([].push),Ri=pe("".replace),Zb=pe([].shift),Jb=pe("".split),mr=pe("".slice),Sn=pe("".toLowerCase),Yb=pe([].unshift),Xb="Invalid authority",Ci="Invalid scheme",it="Invalid host",Du="Invalid port",Mu=/[a-z]/i,qb=/[\d+-.a-z]/i,Ai=/\d/,Qb=/^0x/i,eS=/^[0-7]+$/,tS=/^\d+$/,Fu=/^[\da-f]+$/i,rS=/[\0\t\n\r #%/:<>?@[\\\]^|]/,nS=/[\0\t\n\r #/:<>?@[\\\]^|]/,aS=/^[\u0000-\u0020]+/,iS=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,oS=/[\t\n\r]/g,ye,sS=function(e){var t=Jb(e,"."),r,n,a,i,o,s,u;if(t.length&&t[t.length-1]===""&&t.length--,r=t.length,r>4)return e;for(n=[],a=0;a<r;a++){if(i=t[a],i==="")return e;if(o=10,i.length>1&&ge(i,0)==="0"&&(o=Pe(Qb,i)?16:8,i=mr(i,o===8?1:2)),i==="")s=0;else{if(!Pe(o===10?tS:o===8?eS:Fu,i))return e;s=bn(i,o)}Rt(n,s)}for(a=0;a<r;a++)if(s=n[a],a===r-1){if(s>=xu(256,5-r))return null}else if(s>255)return null;for(u=Vb(n),a=0;a<n.length;a++)u+=n[a]*xu(256,3-a);return u},cS=function(e){var t=[0,0,0,0,0,0,0,0],r=0,n=null,a=0,i,o,s,u,f,l,c,d=function(){return ge(e,a)};if(d()===":"){if(ge(e,1)!==":")return;a+=2,r++,n=r}for(;d();){if(r===8)return;if(d()===":"){if(n!==null)return;a++,r++,n=r;continue}for(i=o=0;o<4&&Pe(Fu,d());)i=i*16+bn(d(),16),a++,o++;if(d()==="."){if(o===0||(a-=o,r>6))return;for(s=0;d();){if(u=null,s>0)if(d()==="."&&s<4)a++;else return;if(!Pe(Ai,d()))return;for(;Pe(Ai,d());){if(f=bn(d(),10),u===null)u=f;else{if(u===0)return;u=u*10+f}if(u>255)return;a++}t[r]=t[r]*256+u,s++,(s===2||s===4)&&r++}if(s!==4)return;break}else if(d()===":"){if(a++,!d())return}else if(d())return;t[r++]=i}if(n!==null)for(l=r-n,r=7;r!==0&&l>0;)c=t[r],t[r--]=t[n+l-1],t[n+--l]=c;else if(r!==8)return;return t},uS=function(e){for(var t=null,r=1,n=null,a=0,i=0;i<8;i++)e[i]!==0?(a>r&&(t=n,r=a),n=null,a=0):(n===null&&(n=i),++a);return a>r?n:t},gr=function(e){var t,r,n,a;if(typeof e=="number"){for(t=[],r=0;r<4;r++)Yb(t,e%256),e=Gb(e/256);return pr(t,".")}if(typeof e=="object"){for(t="",n=uS(e),r=0;r<8;r++)a&&e[r]===0||(a&&(a=!1),n===r?(t+=r?":":"::",a=!0):(t+=Wb(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},$n={},zu=ki({},$n,{" ":1,'"':1,"<":1,">":1,"`":1}),Bu=ki({},zu,{"#":1,"?":1,"{":1,"}":1}),ji=ki({},Bu,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Ke=function(e,t){var r=Db(e,0);return r>32&&r<127&&!Oi(t,e)?e:encodeURIComponent(e)},In={ftp:21,file:null,http:80,https:443,ws:80,wss:443},yr=function(e,t){var r;return e.length===2&&Pe(Mu,ge(e,0))&&((r=ge(e,1))===":"||!t&&r==="|")},Hu=function(e){var t;return e.length>1&&yr(mr(e,0,2))&&(e.length===2||(t=ge(e,2))==="/"||t==="\\"||t==="?"||t==="#")},lS=function(e){return e==="."||Sn(e)==="%2e"},fS=function(e){return e=Sn(e),e===".."||e==="%2e."||e===".%2e"||e==="%2e%2e"},Li={},Ku={},Ni={},Gu={},Wu={},Ui={},Vu={},Zu={},Tn={},En={},xi={},Di={},Mi={},Fi={},Ju={},zi={},Ct={},Ae={},Yu={},ot={},De={},Bi=function(e,t,r){var n=xe(e),a,i,o;if(t){if(i=this.parse(n),i)throw new _i(i);this.searchParams=null}else{if(r!==void 0&&(a=new Bi(r,!0)),i=this.parse(n,null,a),i)throw new _i(i);o=Kb(new Hb),o.bindURL(this),this.searchParams=o}};Bi.prototype={type:"URL",parse:function(e,t,r){var n=this,a=t||Li,i=0,o="",s=!1,u=!1,f=!1,l,c,d,v;for(e=xe(e),t||(n.scheme="",n.username="",n.password="",n.host=null,n.port=null,n.path=[],n.query=null,n.fragment=null,n.cannotBeABaseURL=!1,e=Ri(e,aS,""),e=Ri(e,iS,"$1")),e=Ri(e,oS,""),l=_t(e);i<=l.length;){switch(c=l[i],a){case Li:if(c&&Pe(Mu,c))o+=Sn(c),a=Ku;else{if(t)return Ci;a=Ni;continue}break;case Ku:if(c&&(Pe(qb,c)||c==="+"||c==="-"||c==="."))o+=Sn(c);else if(c===":"){if(t&&(n.isSpecial()!==Oi(In,o)||o==="file"&&(n.includesCredentials()||n.port!==null)||n.scheme==="file"&&!n.host))return;if(n.scheme=o,t){n.isSpecial()&&In[n.scheme]===n.port&&(n.port=null);return}o="",n.scheme==="file"?a=Fi:n.isSpecial()&&r&&r.scheme===n.scheme?a=Gu:n.isSpecial()?a=Zu:l[i+1]==="/"?(a=Wu,i++):(n.cannotBeABaseURL=!0,Rt(n.path,""),a=Yu)}else{if(t)return Ci;o="",a=Ni,i=0;continue}break;case Ni:if(!r||r.cannotBeABaseURL&&c!=="#")return Ci;if(r.cannotBeABaseURL&&c==="#"){n.scheme=r.scheme,n.path=Ee(r.path),n.query=r.query,n.fragment="",n.cannotBeABaseURL=!0,a=De;break}a=r.scheme==="file"?Fi:Ui;continue;case Gu:if(c==="/"&&l[i+1]==="/")a=Tn,i++;else{a=Ui;continue}break;case Wu:if(c==="/"){a=En;break}else{a=Ae;continue}case Ui:if(n.scheme=r.scheme,c===ye)n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Ee(r.path),n.query=r.query;else if(c==="/"||c==="\\"&&n.isSpecial())a=Vu;else if(c==="?")n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Ee(r.path),n.query="",a=ot;else if(c==="#")n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Ee(r.path),n.query=r.query,n.fragment="",a=De;else{n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,n.path=Ee(r.path),n.path.length--,a=Ae;continue}break;case Vu:if(n.isSpecial()&&(c==="/"||c==="\\"))a=Tn;else if(c==="/")a=En;else{n.username=r.username,n.password=r.password,n.host=r.host,n.port=r.port,a=Ae;continue}break;case Zu:if(a=Tn,c!=="/"||ge(o,i+1)!=="/")continue;i++;break;case Tn:if(c!=="/"&&c!=="\\"){a=En;continue}break;case En:if(c==="@"){s&&(o="%40"+o),s=!0,d=_t(o);for(var p=0;p<d.length;p++){var S=d[p];if(S===":"&&!f){f=!0;continue}var g=Ke(S,ji);f?n.password+=g:n.username+=g}o=""}else if(c===ye||c==="/"||c==="?"||c==="#"||c==="\\"&&n.isSpecial()){if(s&&o==="")return Xb;i-=_t(o).length+1,o="",a=xi}else o+=c;break;case xi:case Di:if(t&&n.scheme==="file"){a=zi;continue}else if(c===":"&&!u){if(o==="")return it;if(v=n.parseHost(o),v)return v;if(o="",a=Mi,t===Di)return}else if(c===ye||c==="/"||c==="?"||c==="#"||c==="\\"&&n.isSpecial()){if(n.isSpecial()&&o==="")return it;if(t&&o===""&&(n.includesCredentials()||n.port!==null))return;if(v=n.parseHost(o),v)return v;if(o="",a=Ct,t)return;continue}else c==="["?u=!0:c==="]"&&(u=!1),o+=c;break;case Mi:if(Pe(Ai,c))o+=c;else if(c===ye||c==="/"||c==="?"||c==="#"||c==="\\"&&n.isSpecial()||t){if(o!==""){var T=bn(o,10);if(T>65535)return Du;n.port=n.isSpecial()&&T===In[n.scheme]?null:T,o=""}if(t)return;a=Ct;continue}else return Du;break;case Fi:if(n.scheme="file",c==="/"||c==="\\")a=Ju;else if(r&&r.scheme==="file")switch(c){case ye:n.host=r.host,n.path=Ee(r.path),n.query=r.query;break;case"?":n.host=r.host,n.path=Ee(r.path),n.query="",a=ot;break;case"#":n.host=r.host,n.path=Ee(r.path),n.query=r.query,n.fragment="",a=De;break;default:Hu(pr(Ee(l,i),""))||(n.host=r.host,n.path=Ee(r.path),n.shortenPath()),a=Ae;continue}else{a=Ae;continue}break;case Ju:if(c==="/"||c==="\\"){a=zi;break}r&&r.scheme==="file"&&!Hu(pr(Ee(l,i),""))&&(yr(r.path[0],!0)?Rt(n.path,r.path[0]):n.host=r.host),a=Ae;continue;case zi:if(c===ye||c==="/"||c==="\\"||c==="?"||c==="#"){if(!t&&yr(o))a=Ae;else if(o===""){if(n.host="",t)return;a=Ct}else{if(v=n.parseHost(o),v)return v;if(n.host==="localhost"&&(n.host=""),t)return;o="",a=Ct}continue}else o+=c;break;case Ct:if(n.isSpecial()){if(a=Ae,c!=="/"&&c!=="\\")continue}else if(!t&&c==="?")n.query="",a=ot;else if(!t&&c==="#")n.fragment="",a=De;else if(c!==ye&&(a=Ae,c!=="/"))continue;break;case Ae:if(c===ye||c==="/"||c==="\\"&&n.isSpecial()||!t&&(c==="?"||c==="#")){if(fS(o)?(n.shortenPath(),c!=="/"&&!(c==="\\"&&n.isSpecial())&&Rt(n.path,"")):lS(o)?c!=="/"&&!(c==="\\"&&n.isSpecial())&&Rt(n.path,""):(n.scheme==="file"&&!n.path.length&&yr(o)&&(n.host&&(n.host=""),o=ge(o,0)+":"),Rt(n.path,o)),o="",n.scheme==="file"&&(c===ye||c==="?"||c==="#"))for(;n.path.length>1&&n.path[0]==="";)Zb(n.path);c==="?"?(n.query="",a=ot):c==="#"&&(n.fragment="",a=De)}else o+=Ke(c,Bu);break;case Yu:c==="?"?(n.query="",a=ot):c==="#"?(n.fragment="",a=De):c!==ye&&(n.path[0]+=Ke(c,$n));break;case ot:!t&&c==="#"?(n.fragment="",a=De):c!==ye&&(c==="'"&&n.isSpecial()?n.query+="%27":c==="#"?n.query+="%23":n.query+=Ke(c,$n));break;case De:c!==ye&&(n.fragment+=Ke(c,zu));break}i++}},parseHost:function(e){var t,r,n;if(ge(e,0)==="["){if(ge(e,e.length-1)!=="]"||(t=cS(mr(e,1,-1)),!t))return it;this.host=t}else if(this.isSpecial()){if(e=Mb(e),Pe(rS,e)||(t=sS(e),t===null))return it;this.host=t}else{if(Pe(nS,e))return it;for(t="",r=_t(e),n=0;n<r.length;n++)t+=Ke(r[n],$n);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return Oi(In,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;t&&(this.scheme!=="file"||t!==1||!yr(e[0],!0))&&e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,a=e.host,i=e.port,o=e.path,s=e.query,u=e.fragment,f=t+":";return a!==null?(f+="//",e.includesCredentials()&&(f+=r+(n?":"+n:"")+"@"),f+=gr(a),i!==null&&(f+=":"+i)):t==="file"&&(f+="//"),f+=e.cannotBeABaseURL?o[0]:o.length?"/"+pr(o,"/"):"",s!==null&&(f+="?"+s),u!==null&&(f+="#"+u),f},setHref:function(e){var t=this.parse(e);if(t)throw new _i(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if(e==="blob")try{return new At(e.path[0]).origin}catch{return"null"}return e==="file"||!this.isSpecial()?"null":e+"://"+gr(this.host)+(t!==null?":"+t:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(xe(e)+":",Li)},getUsername:function(){return this.username},setUsername:function(e){var t=_t(xe(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=Ke(t[r],ji)}},getPassword:function(){return this.password},setPassword:function(e){var t=_t(xe(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=Ke(t[r],ji)}},getHost:function(){var e=this.host,t=this.port;return e===null?"":t===null?gr(e):gr(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,xi)},getHostname:function(){var e=this.host;return e===null?"":gr(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Di)},getPort:function(){var e=this.port;return e===null?"":xe(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(e=xe(e),e===""?this.port=null:this.parse(e,Mi))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+pr(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Ct))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){e=xe(e),e===""?this.query=null:(ge(e,0)==="?"&&(e=mr(e,1)),this.query="",this.parse(e,ot)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){if(e=xe(e),e===""){this.fragment=null;return}ge(e,0)==="#"&&(e=mr(e,1)),this.fragment="",this.parse(e,De)},update:function(){this.query=this.searchParams.serialize()||null}};var At=function(t){var r=xb(this,ne),n=zb(arguments.length,1)>1?arguments[1]:void 0,a=Bb(r,new Bi(t,!1,n));Ei||(r.href=a.serialize(),r.origin=a.getOrigin(),r.protocol=a.getProtocol(),r.username=a.getUsername(),r.password=a.getPassword(),r.host=a.getHost(),r.hostname=a.getHostname(),r.port=a.getPort(),r.pathname=a.getPathname(),r.search=a.getSearch(),r.searchParams=a.getSearchParams(),r.hash=a.getHash())},ne=At.prototype,we=function(e,t){return{get:function(){return wn(this)[e]()},set:t&&function(r){return wn(this)[t](r)},configurable:!0,enumerable:!0}};if(Ei&&(me(ne,"href",we("serialize","setHref")),me(ne,"origin",we("getOrigin")),me(ne,"protocol",we("getProtocol","setProtocol")),me(ne,"username",we("getUsername","setUsername")),me(ne,"password",we("getPassword","setPassword")),me(ne,"host",we("getHost","setHost")),me(ne,"hostname",we("getHostname","setHostname")),me(ne,"port",we("getPort","setPort")),me(ne,"pathname",we("getPathname","setPathname")),me(ne,"search",we("getSearch","setSearch")),me(ne,"searchParams",we("getSearchParams")),me(ne,"hash",we("getHash","setHash"))),yn(ne,"toJSON",function(){return wn(this).serialize()},{enumerable:!0}),yn(ne,"toString",function(){return wn(this).serialize()},{enumerable:!0}),hr){var Xu=hr.createObjectURL,qu=hr.revokeObjectURL;Xu&&yn(At,"createObjectURL",Lu(Xu,hr)),qu&&yn(At,"revokeObjectURL",Lu(qu,hr))}Fb(At,"URL"),Nb({global:!0,constructor:!0,forced:!Ub,sham:!Ei},{URL:At});var dS=Y,vS=Ie,Qu=K,hS=rt,el=Ue,pS=on,Hi=vS("URL"),mS=pS&&Qu(function(){Hi.canParse()}),gS=Qu(function(){return Hi.canParse.length!==1});dS({target:"URL",stat:!0,forced:!mS||gS},{canParse:function(t){var r=hS(arguments.length,1),n=el(t),a=r<2||arguments[1]===void 0?void 0:el(arguments[1]);try{return!!new Hi(n,a)}catch{return!1}}});var yS=Y,wS=Ie,bS=rt,tl=Ue,SS=on,$S=wS("URL");yS({target:"URL",stat:!0,forced:!SS},{parse:function(t){var r=bS(arguments.length,1),n=tl(t),a=r<2||arguments[1]===void 0?void 0:tl(arguments[1]);try{return new $S(n,a)}catch{return null}}});var IS=Y,TS=te;IS({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return TS(URL.prototype.toString,this)}});var ES=gi;ES.URL;var PS={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},OS=Kr,Ki=OS("span").classList,rl=Ki&&Ki.constructor&&Ki.constructor.prototype,kS=rl===Object.prototype?void 0:rl,nl=H,al=PS,_S=kS,wr=Gg,il=et,RS=$t,CS=q,Gi=CS("iterator"),Wi=wr.values,ol=function(e,t){if(e){if(e[Gi]!==Wi)try{il(e,Gi,Wi)}catch{e[Gi]=Wi}if(RS(e,t,!0),al[t]){for(var r in wr)if(e[r]!==wr[r])try{il(e,r,wr[r])}catch{e[r]=wr[r]}}}};for(var Vi in al)ol(nl[Vi]&&nl[Vi].prototype,Vi);ol(_S,"DOMTokenList");var AS=de,jS=et,LS=function(e,t){AS(t)&&"cause"in t&&jS(e,"cause",t.cause)},NS=G,sl=Error,US=NS("".replace),xS=function(e){return String(new sl(e).stack)}("zxcasd"),cl=/\n\s*at [^:]*:[^\n]*/,DS=cl.test(xS),MS=function(e,t){if(DS&&typeof e=="string"&&!sl.prepareStackTrace)for(;t--;)e=US(e,cl,"");return e},FS=K,zS=Qe,BS=!FS(function(){var e=new Error("a");return"stack"in e?(Object.defineProperty(e,"stack",zS(1,7)),e.stack!==7):!0}),HS=et,KS=MS,GS=BS,ul=Error.captureStackTrace,WS=function(e,t,r,n){GS&&(ul?ul(e,t):HS(e,"stack",KS(r,n)))},VS=It,ZS=te,JS=$e,YS=Vr,XS=wu,qS=Ea,ll=Wr,QS=ai,e$=un,fl=yu,t$=TypeError,Pn=function(e,t){this.stopped=e,this.result=t},dl=Pn.prototype,br=function(e,t,r){var n=r&&r.that,a=!!(r&&r.AS_ENTRIES),i=!!(r&&r.IS_RECORD),o=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),u=VS(t,n),f,l,c,d,v,p,S,g=function(I){return f&&fl(f,"normal",I),new Pn(!0,I)},T=function(I){return a?(JS(I),s?u(I[0],I[1],g):u(I[0],I[1])):s?u(I,g):u(I)};if(i)f=e.iterator;else if(o)f=e;else{if(l=e$(e),!l)throw new t$(YS(e)+" is not iterable");if(XS(l)){for(c=0,d=qS(e);d>c;c++)if(v=T(e[c]),v&&ll(dl,v))return v;return new Pn(!1)}f=QS(e,l)}for(p=i?e.next:f.next;!(S=ZS(p,f)).done;){try{v=T(S.value)}catch(I){fl(f,"throw",I)}if(typeof v=="object"&&v&&ll(dl,v))return v}return new Pn(!1)},r$=Ue,n$=function(e,t){return e===void 0?arguments.length<2?"":t:r$(e)},a$=Y,i$=Wr,o$=Za,On=qa,s$=lc,vl=Xr,Zi=et,Ji=Qe,c$=LS,u$=WS,l$=br,f$=n$,d$=q,v$=d$("toStringTag"),kn=Error,h$=[].push,jt=function(t,r){var n=i$(Yi,this),a;On?a=On(new kn,n?o$(this):Yi):(a=n?this:vl(Yi),Zi(a,v$,"Error")),r!==void 0&&Zi(a,"message",f$(r)),u$(a,jt,a.stack,1),arguments.length>2&&c$(a,arguments[2]);var i=[];return l$(t,h$,{that:i}),Zi(a,"errors",i),a};On?On(jt,kn):s$(jt,kn,{name:!0});var Yi=jt.prototype=vl(kn.prototype,{constructor:Ji(1,jt),message:Ji(1,""),name:Ji(1,"AggregateError")});a$({global:!0,constructor:!0,arity:2},{AggregateError:jt});var p$=ni,m$=ur,g$=p$?{}.toString:function(){return"[object "+m$(this)+"]"},y$=ni,w$=ve,b$=g$;y$||w$(Object.prototype,"toString",b$,{unsafe:!0});var Sr=H,S$=nr,$$=Mr,_n=function(e){return S$.slice(0,e.length)===e},hl=function(){return _n("Bun/")?"BUN":_n("Cloudflare-Workers")?"CLOUDFLARE":_n("Deno/")?"DENO":_n("Node.js/")?"NODE":Sr.Bun&&typeof Bun.version=="string"?"BUN":Sr.Deno&&typeof Deno.version=="object"?"DENO":$$(Sr.process)==="process"?"NODE":Sr.window&&Sr.document?"BROWSER":"REST"}(),I$=hl,Xi=I$==="NODE",T$=Ie,E$=sn,P$=q,O$=Q,pl=P$("species"),k$=function(e){var t=T$(e);O$&&t&&!t[pl]&&E$(t,pl,{configurable:!0,get:function(){return this}})},_$=Tu,R$=Vr,C$=TypeError,A$=function(e){if(_$(e))return e;throw new C$(R$(e)+" is not a constructor")},ml=$e,j$=A$,L$=Fr,N$=q,U$=N$("species"),gl=function(e,t){var r=ml(e).constructor,n;return r===void 0||L$(n=ml(r)[U$])?t:j$(n)},x$=Dr,yl=Function.prototype,wl=yl.apply,bl=yl.call,Sl=typeof Reflect=="object"&&Reflect.apply||(x$?bl.bind(wl):function(){return bl.apply(wl,arguments)}),D$=nr,$l=/(?:ipad|iphone|ipod).*applewebkit/i.test(D$),se=H,M$=Sl,F$=It,Il=W,z$=fe,Tl=K,El=Bs,B$=ln,Pl=Kr,H$=rt,K$=$l,G$=Xi,qi=se.setImmediate,Qi=se.clearImmediate,W$=se.process,eo=se.Dispatch,V$=se.Function,Ol=se.MessageChannel,Z$=se.String,to=0,$r={},kl="onreadystatechange",Ir,st,ro,no;Tl(function(){Ir=se.location});var ao=function(e){if(z$($r,e)){var t=$r[e];delete $r[e],t()}},io=function(e){return function(){ao(e)}},_l=function(e){ao(e.data)},Rl=function(e){se.postMessage(Z$(e),Ir.protocol+"//"+Ir.host)};(!qi||!Qi)&&(qi=function(t){H$(arguments.length,1);var r=Il(t)?t:V$(t),n=B$(arguments,1);return $r[++to]=function(){M$(r,void 0,n)},st(to),to},Qi=function(t){delete $r[t]},G$?st=function(e){W$.nextTick(io(e))}:eo&&eo.now?st=function(e){eo.now(io(e))}:Ol&&!K$?(ro=new Ol,no=ro.port2,ro.port1.onmessage=_l,st=F$(no.postMessage,no)):se.addEventListener&&Il(se.postMessage)&&!se.importScripts&&Ir&&Ir.protocol!=="file:"&&!Tl(Rl)?(st=Rl,se.addEventListener("message",_l,!1)):kl in Pl("script")?st=function(e){El.appendChild(Pl("script"))[kl]=function(){El.removeChild(this),ao(e)}}:st=function(e){setTimeout(io(e),0)});var Cl={set:qi,clear:Qi},Al=function(){this.head=null,this.tail=null};Al.prototype={add:function(e){var t={item:e,next:null},r=this.tail;r?r.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e){var t=this.head=e.next;return t===null&&(this.tail=null),e.item}}};var jl=Al,J$=nr,Y$=/ipad|iphone|ipod/i.test(J$)&&typeof Pebble<"u",X$=nr,q$=/web0s(?!.*chrome)/i.test(X$),Lt=H,Q$=Cc,Ll=It,oo=Cl.set,eI=jl,tI=$l,rI=Y$,nI=q$,so=Xi,Nl=Lt.MutationObserver||Lt.WebKitMutationObserver,Ul=Lt.document,xl=Lt.process,Rn=Lt.Promise,co=Q$("queueMicrotask"),Nt,uo,lo,Cn,Dl;if(!co){var An=new eI,jn=function(){var e,t;for(so&&(e=xl.domain)&&e.exit();t=An.get();)try{t()}catch(r){throw An.head&&Nt(),r}e&&e.enter()};!tI&&!so&&!nI&&Nl&&Ul?(uo=!0,lo=Ul.createTextNode(""),new Nl(jn).observe(lo,{characterData:!0}),Nt=function(){lo.data=uo=!uo}):!rI&&Rn&&Rn.resolve?(Cn=Rn.resolve(void 0),Cn.constructor=Rn,Dl=Ll(Cn.then,Cn),Nt=function(){Dl(jn)}):so?Nt=function(){xl.nextTick(jn)}:(oo=Ll(oo,Lt),Nt=function(){oo(jn)}),co=function(e){An.head||Nt(),An.add(e)}}var aI=co,iI=function(e,t){try{arguments.length===1?console.error(e):console.error(e,t)}catch{}},Ut=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}},oI=H,Tr=oI.Promise,sI=H,Er=Tr,cI=W,uI=fc,lI=Ha,fI=q,Ml=hl,fo=Ts;Er&&Er.prototype;var dI=fI("species"),vo=!1,Fl=cI(sI.PromiseRejectionEvent),vI=uI("Promise",function(){var e=lI(Er),t=e!==String(Er);if(!t&&fo===66)return!0;if(!fo||fo<51||!/native code/.test(e)){var r=new Er(function(i){i(1)}),n=function(i){i(function(){},function(){})},a=r.constructor={};if(a[dI]=n,vo=r.then(function(){})instanceof n,!vo)return!0}return!t&&(Ml==="BROWSER"||Ml==="DENO")&&!Fl}),Pr={CONSTRUCTOR:vI,REJECTION_EVENT:Fl,SUBCLASSING:vo},je={},zl=Te,hI=TypeError,pI=function(e){var t,r;this.promise=new e(function(n,a){if(t!==void 0||r!==void 0)throw new hI("Bad Promise constructor");t=n,r=a}),this.resolve=zl(t),this.reject=zl(r)};je.f=function(e){return new pI(e)};var mI=Y,Ln=Xi,Ge=H,xt=te,Bl=ve,Hl=qa,gI=$t,yI=k$,wI=Te,Nn=W,bI=de,SI=ri,$I=gl,Kl=Cl.set,ho=aI,II=iI,TI=Ut,EI=jl,Gl=St,Un=Tr,po=Pr,Wl=je,xn="Promise",Vl=po.CONSTRUCTOR,PI=po.REJECTION_EVENT,OI=po.SUBCLASSING,mo=Gl.getterFor(xn),kI=Gl.set,Dt=Un&&Un.prototype,ct=Un,Dn=Dt,Zl=Ge.TypeError,go=Ge.document,yo=Ge.process,wo=Wl.f,_I=wo,RI=!!(go&&go.createEvent&&Ge.dispatchEvent),Jl="unhandledrejection",CI="rejectionhandled",Yl=0,Xl=1,AI=2,bo=1,ql=2,Mn,Ql,jI,ef,tf=function(e){var t;return bI(e)&&Nn(t=e.then)?t:!1},rf=function(e,t){var r=t.value,n=t.state===Xl,a=n?e.ok:e.fail,i=e.resolve,o=e.reject,s=e.domain,u,f,l;try{a?(n||(t.rejection===ql&&NI(t),t.rejection=bo),a===!0?u=r:(s&&s.enter(),u=a(r),s&&(s.exit(),l=!0)),u===e.promise?o(new Zl("Promise-chain cycle")):(f=tf(u))?xt(f,u,i,o):i(u)):o(r)}catch(c){s&&!l&&s.exit(),o(c)}},nf=function(e,t){e.notified||(e.notified=!0,ho(function(){for(var r=e.reactions,n;n=r.get();)rf(n,e);e.notified=!1,t&&!e.rejection&&LI(e)}))},af=function(e,t,r){var n,a;RI?(n=go.createEvent("Event"),n.promise=t,n.reason=r,n.initEvent(e,!1,!0),Ge.dispatchEvent(n)):n={promise:t,reason:r},!PI&&(a=Ge["on"+e])?a(n):e===Jl&&II("Unhandled promise rejection",r)},LI=function(e){xt(Kl,Ge,function(){var t=e.facade,r=e.value,n=of(e),a;if(n&&(a=TI(function(){Ln?yo.emit("unhandledRejection",r,t):af(Jl,t,r)}),e.rejection=Ln||of(e)?ql:bo,a.error))throw a.value})},of=function(e){return e.rejection!==bo&&!e.parent},NI=function(e){xt(Kl,Ge,function(){var t=e.facade;Ln?yo.emit("rejectionHandled",t):af(CI,t,e.value)})},Mt=function(e,t,r){return function(n){e(t,n,r)}},Ft=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=AI,nf(e,!0))},So=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw new Zl("Promise can't be resolved itself");var n=tf(t);n?ho(function(){var a={done:!1};try{xt(n,t,Mt(So,a,e),Mt(Ft,a,e))}catch(i){Ft(a,i,e)}}):(e.value=t,e.state=Xl,nf(e,!1))}catch(a){Ft({done:!1},a,e)}}};if(Vl&&(ct=function(t){SI(this,Dn),wI(t),xt(Mn,this);var r=mo(this);try{t(Mt(So,r),Mt(Ft,r))}catch(n){Ft(r,n)}},Dn=ct.prototype,Mn=function(t){kI(this,{type:xn,done:!1,notified:!1,parent:!1,reactions:new EI,rejection:!1,state:Yl,value:void 0})},Mn.prototype=Bl(Dn,"then",function(t,r){var n=mo(this),a=wo($I(this,ct));return n.parent=!0,a.ok=Nn(t)?t:!0,a.fail=Nn(r)&&r,a.domain=Ln?yo.domain:void 0,n.state===Yl?n.reactions.add(a):ho(function(){rf(a,n)}),a.promise}),Ql=function(){var e=new Mn,t=mo(e);this.promise=e,this.resolve=Mt(So,t),this.reject=Mt(Ft,t)},Wl.f=wo=function(e){return e===ct||e===jI?new Ql(e):_I(e)},Nn(Un)&&Dt!==Object.prototype)){ef=Dt.then,OI||Bl(Dt,"then",function(t,r){var n=this;return new ct(function(a,i){xt(ef,n,a,i)}).then(t,r)},{unsafe:!0});try{delete Dt.constructor}catch{}Hl&&Hl(Dt,Dn)}mI({global:!0,constructor:!0,wrap:!0,forced:Vl},{Promise:ct}),gI(ct,xn,!1),yI(xn);var UI=q,sf=UI("iterator"),cf=!1;try{var xI=0,uf={next:function(){return{done:!!xI++}},return:function(){cf=!0}};uf[sf]=function(){return this},Array.from(uf,function(){throw 2})}catch{}var DI=function(e,t){try{if(!t&&!cf)return!1}catch{return!1}var r=!1;try{var n={};n[sf]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r},MI=Tr,FI=DI,zI=Pr.CONSTRUCTOR,Fn=zI||!FI(function(e){MI.all(e).then(void 0,function(){})}),BI=Y,HI=te,KI=Te,GI=je,WI=Ut,VI=br,ZI=Fn;BI({target:"Promise",stat:!0,forced:ZI},{all:function(t){var r=this,n=GI.f(r),a=n.resolve,i=n.reject,o=WI(function(){var s=KI(r.resolve),u=[],f=0,l=1;VI(t,function(c){var d=f++,v=!1;l++,HI(s,r,c).then(function(p){v||(v=!0,u[d]=p,--l||a(u))},i)}),--l||a(u)});return o.error&&i(o.value),n.promise}});var JI=Y,YI=Pr.CONSTRUCTOR,$o=Tr,XI=Ie,qI=W,QI=ve,lf=$o&&$o.prototype;if(JI({target:"Promise",proto:!0,forced:YI,real:!0},{catch:function(e){return this.then(void 0,e)}}),qI($o)){var ff=XI("Promise").prototype.catch;lf.catch!==ff&&QI(lf,"catch",ff,{unsafe:!0})}var e0=Y,t0=te,r0=Te,n0=je,a0=Ut,i0=br,o0=Fn;e0({target:"Promise",stat:!0,forced:o0},{race:function(t){var r=this,n=n0.f(r),a=n.reject,i=a0(function(){var o=r0(r.resolve);i0(t,function(s){t0(o,r,s).then(n.resolve,a)})});return i.error&&a(i.value),n.promise}});var s0=Y,c0=je,u0=Pr.CONSTRUCTOR;s0({target:"Promise",stat:!0,forced:u0},{reject:function(t){var r=c0.f(this),n=r.reject;return n(t),r.promise}});var l0=$e,f0=de,d0=je,df=function(e,t){if(l0(e),f0(t)&&t.constructor===e)return t;var r=d0.f(e),n=r.resolve;return n(t),r.promise},v0=Y,h0=Ie,p0=Pr.CONSTRUCTOR,m0=df;h0("Promise"),v0({target:"Promise",stat:!0,forced:p0},{resolve:function(t){return m0(this,t)}});var g0=Y,y0=te,w0=Te,b0=je,S0=Ut,$0=br,I0=Fn;g0({target:"Promise",stat:!0,forced:I0},{allSettled:function(t){var r=this,n=b0.f(r),a=n.resolve,i=n.reject,o=S0(function(){var s=w0(r.resolve),u=[],f=0,l=1;$0(t,function(c){var d=f++,v=!1;l++,y0(s,r,c).then(function(p){v||(v=!0,u[d]={status:"fulfilled",value:p},--l||a(u))},function(p){v||(v=!0,u[d]={status:"rejected",reason:p},--l||a(u))})}),--l||a(u)});return o.error&&i(o.value),n.promise}});var T0=Y,E0=te,P0=Te,O0=Ie,k0=je,_0=Ut,R0=br,C0=Fn,vf="No one promise resolved";T0({target:"Promise",stat:!0,forced:C0},{any:function(t){var r=this,n=O0("AggregateError"),a=k0.f(r),i=a.resolve,o=a.reject,s=_0(function(){var u=P0(r.resolve),f=[],l=0,c=1,d=!1;R0(t,function(v){var p=l++,S=!1;c++,E0(u,r,v).then(function(g){S||d||(d=!0,i(g))},function(g){S||d||(S=!0,f[p]=g,--c||o(new n(f,vf)))})}),--c||o(new n(f,vf))});return s.error&&o(s.value),a.promise}});var A0=Y,j0=je;A0({target:"Promise",stat:!0},{withResolvers:function(){var t=j0.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}});var L0=Y,zn=Tr,N0=K,hf=Ie,pf=W,U0=gl,mf=df,x0=ve,Io=zn&&zn.prototype,D0=!!zn&&N0(function(){Io.finally.call({then:function(){}},function(){})});if(L0({target:"Promise",proto:!0,real:!0,forced:D0},{finally:function(e){var t=U0(this,hf("Promise")),r=pf(e);return this.then(r?function(n){return mf(t,e()).then(function(){return n})}:e,r?function(n){return mf(t,e()).then(function(){throw n})}:e)}}),pf(zn)){var gf=hf("Promise").prototype.finally;Io.finally!==gf&&x0(Io,"finally",gf,{unsafe:!0})}var M0=gi;M0.Promise;var F0=Y,z0=H,B0=Sl,H0=ln,K0=je,G0=Te,yf=Ut,To=z0.Promise,wf=!1,W0=!To||!To.try||yf(function(){To.try(function(e){wf=e===8},8)}).error||!wf;F0({target:"Promise",stat:!0,forced:W0},{try:function(e){var t=arguments.length>1?H0(arguments,1):[],r=K0.f(this),n=yf(function(){return B0(G0(e),void 0,t)});return(n.error?r.reject:r.resolve)(n.value),r.promise}});function We(e,t){if(typeof window>"u")return;const r=new CustomEvent(e,{detail:t,bubbles:!0,composed:!0});dispatchEvent(r)}function Le(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function"){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]])}return r}typeof SuppressedError=="function"&&SuppressedError;var ut=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Eo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Po(e,t){return e(t={exports:{}},t.exports),t.exports}var lt=Po(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function n(){var a=this;this.locked=new Map,this.addToLocked=function(i,o){var s=a.locked.get(i);s===void 0?o===void 0?a.locked.set(i,[]):a.locked.set(i,[o]):o!==void 0&&(s.unshift(o),a.locked.set(i,s))},this.isLocked=function(i){return a.locked.has(i)},this.lock=function(i){return new Promise(function(o,s){a.isLocked(i)?a.addToLocked(i,o):(a.addToLocked(i),o())})},this.unlock=function(i){var o=a.locked.get(i);if(o!==void 0&&o.length!==0){var s=o.pop();a.locked.set(i,o),s!==void 0&&setTimeout(s,0)}else a.locked.delete(i)}}return n.getInstance=function(){return n.instance===void 0&&(n.instance=new n),n.instance},n}();t.default=function(){return r.getInstance()}});Eo(lt);var V0=Eo(Po(function(e,t){var r=ut&&ut.__awaiter||function(l,c,d,v){return new(d||(d=Promise))(function(p,S){function g(b){try{I(v.next(b))}catch(h){S(h)}}function T(b){try{I(v.throw(b))}catch(h){S(h)}}function I(b){b.done?p(b.value):new d(function(h){h(b.value)}).then(g,T)}I((v=v.apply(l,c||[])).next())})},n=ut&&ut.__generator||function(l,c){var d,v,p,S,g={label:0,sent:function(){if(1&p[0])throw p[1];return p[1]},trys:[],ops:[]};return S={next:T(0),throw:T(1),return:T(2)},typeof Symbol=="function"&&(S[Symbol.iterator]=function(){return this}),S;function T(I){return function(b){return function(h){if(d)throw new TypeError("Generator is already executing.");for(;g;)try{if(d=1,v&&(p=2&h[0]?v.return:h[0]?v.throw||((p=v.return)&&p.call(v),0):v.next)&&!(p=p.call(v,h[1])).done)return p;switch(v=0,p&&(h=[2&h[0],p.value]),h[0]){case 0:case 1:p=h;break;case 4:return g.label++,{value:h[1],done:!1};case 5:g.label++,v=h[1],h=[0];continue;case 7:h=g.ops.pop(),g.trys.pop();continue;default:if(p=g.trys,!((p=p.length>0&&p[p.length-1])||h[0]!==6&&h[0]!==2)){g=0;continue}if(h[0]===3&&(!p||h[1]>p[0]&&h[1]<p[3])){g.label=h[1];break}if(h[0]===6&&g.label<p[1]){g.label=p[1],p=h;break}if(p&&g.label<p[2]){g.label=p[2],g.ops.push(h);break}p[2]&&g.ops.pop(),g.trys.pop();continue}h=c.call(l,g)}catch($){h=[6,$],v=0}finally{d=p=0}if(5&h[0])throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}([I,b])}}},a=ut;Object.defineProperty(t,"__esModule",{value:!0});var i="browser-tabs-lock-key",o={key:function(l){return r(a,void 0,void 0,function(){return n(this,function(c){throw new Error("Unsupported")})})},getItem:function(l){return r(a,void 0,void 0,function(){return n(this,function(c){throw new Error("Unsupported")})})},clear:function(){return r(a,void 0,void 0,function(){return n(this,function(l){return[2,window.localStorage.clear()]})})},removeItem:function(l){return r(a,void 0,void 0,function(){return n(this,function(c){throw new Error("Unsupported")})})},setItem:function(l,c){return r(a,void 0,void 0,function(){return n(this,function(d){throw new Error("Unsupported")})})},keySync:function(l){return window.localStorage.key(l)},getItemSync:function(l){return window.localStorage.getItem(l)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(l){return window.localStorage.removeItem(l)},setItemSync:function(l,c){return window.localStorage.setItem(l,c)}};function s(l){return new Promise(function(c){return setTimeout(c,l)})}function u(l){for(var c="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz",d="",v=0;v<l;v++)d+=c[Math.floor(Math.random()*c.length)];return d}var f=function(){function l(c){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+u(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=c,l.waiters===void 0&&(l.waiters=[])}return l.prototype.acquireLock=function(c,d){return d===void 0&&(d=5e3),r(this,void 0,void 0,function(){var v,p,S,g,T,I,b;return n(this,function(h){switch(h.label){case 0:v=Date.now()+u(4),p=Date.now()+d,S=i+"-"+c,g=this.storageHandler===void 0?o:this.storageHandler,h.label=1;case 1:return Date.now()<p?[4,s(30)]:[3,8];case 2:return h.sent(),g.getItemSync(S)!==null?[3,5]:(T=this.id+"-"+c+"-"+v,[4,s(Math.floor(25*Math.random()))]);case 3:return h.sent(),g.setItemSync(S,JSON.stringify({id:this.id,iat:v,timeoutKey:T,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,s(30)];case 4:return h.sent(),(I=g.getItemSync(S))!==null&&(b=JSON.parse(I)).id===this.id&&b.iat===v?(this.acquiredIatSet.add(v),this.refreshLockWhileAcquired(S,v),[2,!0]):[3,7];case 5:return l.lockCorrector(this.storageHandler===void 0?o:this.storageHandler),[4,this.waitForSomethingToChange(p)];case 6:h.sent(),h.label=7;case 7:return v=Date.now()+u(4),[3,1];case 8:return[2,!1]}})})},l.prototype.refreshLockWhileAcquired=function(c,d){return r(this,void 0,void 0,function(){var v=this;return n(this,function(p){return setTimeout(function(){return r(v,void 0,void 0,function(){var S,g,T;return n(this,function(I){switch(I.label){case 0:return[4,lt.default().lock(d)];case 1:return I.sent(),this.acquiredIatSet.has(d)?(S=this.storageHandler===void 0?o:this.storageHandler,(g=S.getItemSync(c))===null?(lt.default().unlock(d),[2]):((T=JSON.parse(g)).timeRefreshed=Date.now(),S.setItemSync(c,JSON.stringify(T)),lt.default().unlock(d),this.refreshLockWhileAcquired(c,d),[2])):(lt.default().unlock(d),[2])}})})},1e3),[2]})})},l.prototype.waitForSomethingToChange=function(c){return r(this,void 0,void 0,function(){return n(this,function(d){switch(d.label){case 0:return[4,new Promise(function(v){var p=!1,S=Date.now(),g=!1;function T(){if(g||(window.removeEventListener("storage",T),l.removeFromWaiting(T),clearTimeout(I),g=!0),!p){p=!0;var b=50-(Date.now()-S);b>0?setTimeout(v,b):v(null)}}window.addEventListener("storage",T),l.addToWaiting(T);var I=setTimeout(T,Math.max(0,c-Date.now()))})];case 1:return d.sent(),[2]}})})},l.addToWaiting=function(c){this.removeFromWaiting(c),l.waiters!==void 0&&l.waiters.push(c)},l.removeFromWaiting=function(c){l.waiters!==void 0&&(l.waiters=l.waiters.filter(function(d){return d!==c}))},l.notifyWaiters=function(){l.waiters!==void 0&&l.waiters.slice().forEach(function(c){return c()})},l.prototype.releaseLock=function(c){return r(this,void 0,void 0,function(){return n(this,function(d){switch(d.label){case 0:return[4,this.releaseLock__private__(c)];case 1:return[2,d.sent()]}})})},l.prototype.releaseLock__private__=function(c){return r(this,void 0,void 0,function(){var d,v,p,S;return n(this,function(g){switch(g.label){case 0:return d=this.storageHandler===void 0?o:this.storageHandler,v=i+"-"+c,(p=d.getItemSync(v))===null?[2]:(S=JSON.parse(p)).id!==this.id?[3,2]:[4,lt.default().lock(S.iat)];case 1:g.sent(),this.acquiredIatSet.delete(S.iat),d.removeItemSync(v),lt.default().unlock(S.iat),l.notifyWaiters(),g.label=2;case 2:return[2]}})})},l.lockCorrector=function(c){for(var d=Date.now()-5e3,v=c,p=[],S=0;;){var g=v.keySync(S);if(g===null)break;p.push(g),S++}for(var T=!1,I=0;I<p.length;I++){var b=p[I];if(b.includes(i)){var h=v.getItemSync(b);if(h!==null){var $=JSON.parse(h);($.timeRefreshed===void 0&&$.timeAcquired<d||$.timeRefreshed!==void 0&&$.timeRefreshed<d)&&(v.removeItemSync(b),T=!0)}}}T&&l.notifyWaiters()},l.waiters=void 0,l}();t.default=f}));const Z0={timeoutInSeconds:60},bf={name:"auth0-spa-js",version:"2.1.3"},Sf=()=>Date.now();let ce=class as extends Error{constructor(t,r){super(r),this.error=t,this.error_description=r,Object.setPrototypeOf(this,as.prototype)}static fromPayload({error:t,error_description:r}){return new as(t,r)}},J0=class uv extends ce{constructor(t,r,n,a=null){super(t,r),this.state=n,this.appState=a,Object.setPrototypeOf(this,uv.prototype)}},Oo=class lv extends ce{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,lv.prototype)}},Y0=class fv extends Oo{constructor(t){super(),this.popup=t,Object.setPrototypeOf(this,fv.prototype)}},X0=class dv extends ce{constructor(t){super("cancelled","Popup closed"),this.popup=t,Object.setPrototypeOf(this,dv.prototype)}},q0=class vv extends ce{constructor(t,r,n){super(t,r),this.mfa_token=n,Object.setPrototypeOf(this,vv.prototype)}},$f=class hv extends ce{constructor(t,r){super("missing_refresh_token",`Missing Refresh Token (audience: '${If(t,["default"])}', scope: '${If(r)}')`),this.audience=t,this.scope=r,Object.setPrototypeOf(this,hv.prototype)}};function If(e,t=[]){return e&&!t.includes(e)?e:""}const Bn=()=>window.crypto,ko=()=>{const e="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";let t="";return Array.from(Bn().getRandomValues(new Uint8Array(43))).forEach(r=>t+=e[r%e.length]),t},Tf=e=>btoa(e),_o=e=>{var{clientId:t}=e,r=Le(e,["clientId"]);return new URLSearchParams((n=>Object.keys(n).filter(a=>n[a]!==void 0).reduce((a,i)=>Object.assign(Object.assign({},a),{[i]:n[i]}),{}))(Object.assign({client_id:t},r))).toString()},Ef=e=>(t=>decodeURIComponent(atob(t).split("").map(r=>"%"+("00"+r.charCodeAt(0).toString(16)).slice(-2)).join("")))(e.replace(/_/g,"/").replace(/-/g,"+")),Q0=async(e,t)=>{const r=await fetch(e,t);return{ok:r.ok,json:await r.json()}},eT=async(e,t,r)=>{const n=new AbortController;let a;return t.signal=n.signal,Promise.race([Q0(e,t),new Promise((i,o)=>{a=setTimeout(()=>{n.abort(),o(new Error("Timeout when executing 'fetch'"))},r)})]).finally(()=>{clearTimeout(a)})},tT=async(e,t,r,n,a,i,o)=>{return s={auth:{audience:t,scope:r},timeout:a,fetchUrl:e,fetchOptions:n,useFormData:o},u=i,new Promise(function(f,l){const c=new MessageChannel;c.port1.onmessage=function(d){d.data.error?l(new Error(d.data.error)):f(d.data),c.port1.close()},u.postMessage(s,[c.port2])});var s,u},rT=async(e,t,r,n,a,i,o=1e4)=>a?tT(e,t,r,n,o,a,i):eT(e,n,o);async function nT(e,t){var{baseUrl:r,timeout:n,audience:a,scope:i,auth0Client:o,useFormData:s}=e,u=Le(e,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);const f=s?_o(u):JSON.stringify(u);return await async function(l,c,d,v,p,S,g){let T,I=null;for(let j=0;j<3;j++)try{T=await rT(l,d,v,p,S,g,c),I=null;break}catch(M){I=M}if(I)throw I;const b=T.json,{error:h,error_description:$}=b,k=Le(b,["error","error_description"]),{ok:_}=T;if(!_){const j=$||`HTTP error. Unable to fetch ${l}`;throw h==="mfa_required"?new q0(h,j,k.mfa_token):h==="missing_refresh_token"?new $f(d,v):new ce(h||"request_error",j)}return k}(`${r}/oauth/token`,n,a||"default",i,{method:"POST",body:f,headers:{"Content-Type":s?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(o||bf))}},t,s)}const Hn=(...e)=>{return(t=e.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(t))).join(" ");var t};let ft=class is{constructor(t,r="@@auth0spajs@@",n){this.prefix=r,this.suffix=n,this.clientId=t.clientId,this.scope=t.scope,this.audience=t.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(t){const[r,n,a,i]=t.split("::");return new is({clientId:n,scope:i,audience:a},r)}static fromCacheEntry(t){const{scope:r,audience:n,client_id:a}=t;return new is({scope:r,audience:n,clientId:a})}},aT=class{set(t,r){localStorage.setItem(t,JSON.stringify(r))}get(t){const r=window.localStorage.getItem(t);if(r)try{return JSON.parse(r)}catch{return}}remove(t){localStorage.removeItem(t)}allKeys(){return Object.keys(window.localStorage).filter(t=>t.startsWith("@@auth0spajs@@"))}},Pf=class{constructor(){this.enclosedCache=function(){let t={};return{set(r,n){t[r]=n},get(r){const n=t[r];if(n)return n},remove(r){delete t[r]},allKeys:()=>Object.keys(t)}}()}},iT=class{constructor(t,r,n){this.cache=t,this.keyManifest=r,this.nowProvider=n||Sf}async setIdToken(t,r,n){var a;const i=this.getIdTokenCacheKey(t);await this.cache.set(i,{id_token:r,decodedToken:n}),await((a=this.keyManifest)===null||a===void 0?void 0:a.add(i))}async getIdToken(t){const r=await this.cache.get(this.getIdTokenCacheKey(t.clientId));if(!r&&t.scope&&t.audience){const n=await this.get(t);return!n||!n.id_token||!n.decodedToken?void 0:{id_token:n.id_token,decodedToken:n.decodedToken}}if(r)return{id_token:r.id_token,decodedToken:r.decodedToken}}async get(t,r=0){var n;let a=await this.cache.get(t.toKey());if(!a){const s=await this.getCacheKeys();if(!s)return;const u=this.matchExistingCacheKey(t,s);u&&(a=await this.cache.get(u))}if(!a)return;const i=await this.nowProvider(),o=Math.floor(i/1e3);return a.expiresAt-r<o?a.body.refresh_token?(a.body={refresh_token:a.body.refresh_token},await this.cache.set(t.toKey(),a),a.body):(await this.cache.remove(t.toKey()),void await((n=this.keyManifest)===null||n===void 0?void 0:n.remove(t.toKey()))):a.body}async set(t){var r;const n=new ft({clientId:t.client_id,scope:t.scope,audience:t.audience}),a=await this.wrapCacheEntry(t);await this.cache.set(n.toKey(),a),await((r=this.keyManifest)===null||r===void 0?void 0:r.add(n.toKey()))}async clear(t){var r;const n=await this.getCacheKeys();n&&(await n.filter(a=>!t||a.includes(t)).reduce(async(a,i)=>{await a,await this.cache.remove(i)},Promise.resolve()),await((r=this.keyManifest)===null||r===void 0?void 0:r.clear()))}async wrapCacheEntry(t){const r=await this.nowProvider();return{body:t,expiresAt:Math.floor(r/1e3)+t.expires_in}}async getCacheKeys(){var t;return this.keyManifest?(t=await this.keyManifest.get())===null||t===void 0?void 0:t.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(t){return new ft({clientId:t},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(t,r){return r.filter(n=>{var a;const i=ft.fromKey(n),o=new Set(i.scope&&i.scope.split(" ")),s=((a=t.scope)===null||a===void 0?void 0:a.split(" "))||[],u=i.scope&&s.reduce((f,l)=>f&&o.has(l),!0);return i.prefix==="@@auth0spajs@@"&&i.clientId===t.clientId&&i.audience===t.audience&&u})[0]}},oT=class{constructor(t,r,n){this.storage=t,this.clientId=r,this.cookieDomain=n,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(t){this.storage.save(this.storageKey,t,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}};const Or=e=>typeof e=="number",sT=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"],cT=e=>{if(!e.id_token)throw new Error("ID token is required but missing");const t=(i=>{const o=i.split("."),[s,u,f]=o;if(o.length!==3||!s||!u||!f)throw new Error("ID token could not be decoded");const l=JSON.parse(Ef(u)),c={__raw:i},d={};return Object.keys(l).forEach(v=>{c[v]=l[v],sT.includes(v)||(d[v]=l[v])}),{encoded:{header:s,payload:u,signature:f},header:JSON.parse(Ef(s)),claims:c,user:d}})(e.id_token);if(!t.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(t.claims.iss!==e.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${e.iss}", found "${t.claims.iss}"`);if(!t.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if(t.header.alg!=="RS256")throw new Error(`Signature algorithm of "${t.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!t.claims.aud||typeof t.claims.aud!="string"&&!Array.isArray(t.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but was not one of "${t.claims.aud.join(", ")}"`);if(t.claims.aud.length>1){if(!t.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(t.claims.azp!==e.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${e.aud}", found "${t.claims.azp}"`)}}else if(t.claims.aud!==e.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${e.aud}" but found "${t.claims.aud}"`);if(e.nonce){if(!t.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(t.claims.nonce!==e.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${e.nonce}", found "${t.claims.nonce}"`)}if(e.max_age&&!Or(t.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(t.claims.exp==null||!Or(t.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!Or(t.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const r=e.leeway||60,n=new Date(e.now||Date.now()),a=new Date(0);if(a.setUTCSeconds(t.claims.exp+r),n>a)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${n}) is after expiration time (${a})`);if(t.claims.nbf!=null&&Or(t.claims.nbf)){const i=new Date(0);if(i.setUTCSeconds(t.claims.nbf-r),n<i)throw new Error(`Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (${n}) is before ${i}`)}if(t.claims.auth_time!=null&&Or(t.claims.auth_time)){const i=new Date(0);if(i.setUTCSeconds(parseInt(t.claims.auth_time)+e.max_age+r),n>i)throw new Error(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (${n}) is after last auth at ${i}`)}if(e.organization){const i=e.organization.trim();if(i.startsWith("org_")){const o=i;if(!t.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(o!==t.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${o}", found "${t.claims.org_id}"`)}else{const o=i.toLowerCase();if(!t.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(o!==t.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${o}", found "${t.claims.org_name}"`)}}return t};var dt=Po(function(e,t){var r=ut&&ut.__assign||function(){return r=Object.assign||function(u){for(var f,l=1,c=arguments.length;l<c;l++)for(var d in f=arguments[l])Object.prototype.hasOwnProperty.call(f,d)&&(u[d]=f[d]);return u},r.apply(this,arguments)};function n(u,f){if(!f)return"";var l="; "+u;return f===!0?l:l+"="+f}function a(u,f,l){return encodeURIComponent(u).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(f).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(c){if(typeof c.expires=="number"){var d=new Date;d.setMilliseconds(d.getMilliseconds()+864e5*c.expires),c.expires=d}return n("Expires",c.expires?c.expires.toUTCString():"")+n("Domain",c.domain)+n("Path",c.path)+n("Secure",c.secure)+n("SameSite",c.sameSite)}(l)}function i(u){for(var f={},l=u?u.split("; "):[],c=/(%[\dA-F]{2})+/gi,d=0;d<l.length;d++){var v=l[d].split("="),p=v.slice(1).join("=");p.charAt(0)==='"'&&(p=p.slice(1,-1));try{f[v[0].replace(c,decodeURIComponent)]=p.replace(c,decodeURIComponent)}catch{}}return f}function o(){return i(document.cookie)}function s(u,f,l){document.cookie=a(u,f,r({path:"/"},l))}t.__esModule=!0,t.encode=a,t.parse=i,t.getAll=o,t.get=function(u){return o()[u]},t.set=s,t.remove=function(u,f){s(u,"",r(r({},f),{expires:-1}))}});Eo(dt),dt.encode,dt.parse,dt.getAll;var uT=dt.get,Of=dt.set,kf=dt.remove;const zt={get(e){const t=uT(e);if(t!==void 0)return JSON.parse(t)},save(e,t,r){let n={};window.location.protocol==="https:"&&(n={secure:!0,sameSite:"none"}),r!=null&&r.daysUntilExpire&&(n.expires=r.daysUntilExpire),r!=null&&r.cookieDomain&&(n.domain=r.cookieDomain),Of(e,JSON.stringify(t),n)},remove(e,t){let r={};t!=null&&t.cookieDomain&&(r.domain=t.cookieDomain),kf(e,r)}},lT={get(e){return zt.get(e)||zt.get(`_legacy_${e}`)},save(e,t,r){let n={};window.location.protocol==="https:"&&(n={secure:!0}),r!=null&&r.daysUntilExpire&&(n.expires=r.daysUntilExpire),r!=null&&r.cookieDomain&&(n.domain=r.cookieDomain),Of(`_legacy_${e}`,JSON.stringify(t),n),zt.save(e,t,r)},remove(e,t){let r={};t!=null&&t.cookieDomain&&(r.domain=t.cookieDomain),kf(e,r),zt.remove(e,t),zt.remove(`_legacy_${e}`,t)}},fT={get(e){if(typeof sessionStorage>"u")return;const t=sessionStorage.getItem(e);return t!=null?JSON.parse(t):void 0},save(e,t){sessionStorage.setItem(e,JSON.stringify(t))},remove(e){sessionStorage.removeItem(e)}};function dT(e,t,r){var n=t===void 0?null:t,a=function(u,f){var l=atob(u);if(f){for(var c=new Uint8Array(l.length),d=0,v=l.length;d<v;++d)c[d]=l.charCodeAt(d);return String.fromCharCode.apply(null,new Uint16Array(c.buffer))}return l}(e,r!==void 0&&r),i=a.indexOf(`
|
|
2
2
|
`,10)+1,o=a.substring(i)+(n?"//# sourceMappingURL="+n:""),s=new Blob([o],{type:"application/javascript"});return URL.createObjectURL(s)}var _f,Rf,Cf,Ro,vT=(_f="Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=",Rf=null,Cf=!1,function(e){return Ro=Ro||dT(_f,Rf,Cf),new Worker(Ro,e)});const Co={};let hT=class{constructor(t,r){this.cache=t,this.clientId=r,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(t){var r;const n=new Set(((r=await this.cache.get(this.manifestKey))===null||r===void 0?void 0:r.keys)||[]);n.add(t),await this.cache.set(this.manifestKey,{keys:[...n]})}async remove(t){const r=await this.cache.get(this.manifestKey);if(r){const n=new Set(r.keys);return n.delete(t),n.size>0?await this.cache.set(this.manifestKey,{keys:[...n]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(t){return`@@auth0spajs@@::${t}`}};const pT={memory:()=>new Pf().enclosedCache,localstorage:()=>new aT},Af=e=>pT[e],jf=e=>{const{openUrl:t,onRedirect:r}=e,n=Le(e,["openUrl","onRedirect"]);return Object.assign(Object.assign({},n),{openUrl:t===!1||t?t:r})},Ao=new V0;let mT=class{constructor(t){let r,n;if(this.userCache=new Pf().enclosedCache,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{await Ao.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),t),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),t.authorizationParams)}),typeof window<"u"&&(()=>{if(!Bn())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(Bn().subtle===void 0)throw new Error(`
|
|
3
3
|
auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.
|
|
4
4
|
`)})(),t.cache&&t.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),t.cache)n=t.cache;else{if(r=t.cacheLocation||"memory",!Af(r))throw new Error(`Invalid cache location "${r}"`);n=Af(r)()}this.httpTimeoutMs=t.httpTimeoutInSeconds?1e3*t.httpTimeoutInSeconds:1e4,this.cookieStorage=t.legacySameSiteCookie===!1?zt:lT,this.orgHintCookieName=`auth0.${this.options.clientId}.organization_hint`,this.isAuthenticatedCookieName=(o=>`auth0.${o}.is.authenticated`)(this.options.clientId),this.sessionCheckExpiryDays=t.sessionCheckExpiryDays||1;const a=t.useCookiesForTransactions?this.cookieStorage:fT;var i;this.scope=Hn("openid",this.options.authorizationParams.scope,this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new oT(a,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||Sf,this.cacheManager=new iT(n,n.allKeys?void 0:new hT(n,this.options.clientId),this.nowProvider),this.domainUrl=(i=this.options.domain,/^https?:\/\//.test(i)?i:`https://${i}`),this.tokenIssuer=((o,s)=>o?o.startsWith("https://")?o:`https://${o}/`:`${s}/`)(this.options.issuer,this.domainUrl),typeof window<"u"&&window.Worker&&this.options.useRefreshTokens&&r==="memory"&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new vT)}_url(t){const r=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||bf)));return`${this.domainUrl}${t}&auth0Client=${r}`}_authorizeUrl(t){return this._url(`/authorize?${_o(t)}`)}async _verifyIdToken(t,r,n){const a=await this.nowProvider();return cT({iss:this.tokenIssuer,aud:this.options.clientId,id_token:t,nonce:r,organization:n,leeway:this.options.leeway,max_age:(i=this.options.authorizationParams.max_age,typeof i!="string"?i:parseInt(i,10)||void 0),now:a});var i}_processOrgHint(t){t?this.cookieStorage.save(this.orgHintCookieName,t,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(t,r,n){const a=Tf(ko()),i=Tf(ko()),o=ko(),s=(l=>{const c=new Uint8Array(l);return(d=>{const v={"+":"-","/":"_","=":""};return d.replace(/[+/=]/g,p=>v[p])})(window.btoa(String.fromCharCode(...Array.from(c))))})(await(async l=>await Bn().subtle.digest({name:"SHA-256"},new TextEncoder().encode(l)))(o)),u=((l,c,d,v,p,S,g,T)=>Object.assign(Object.assign(Object.assign({client_id:l.clientId},l.authorizationParams),d),{scope:Hn(c,d.scope),response_type:"code",response_mode:T||"query",state:v,nonce:p,redirect_uri:g||l.authorizationParams.redirect_uri,code_challenge:S,code_challenge_method:"S256"}))(this.options,this.scope,t,a,i,s,t.redirect_uri||this.options.authorizationParams.redirect_uri||n,r==null?void 0:r.response_mode),f=this._authorizeUrl(u);return{nonce:i,code_verifier:o,scope:u.scope,audience:u.audience||"default",redirect_uri:u.redirect_uri,state:a,url:f}}async loginWithPopup(t,r){var n;if(t=t||{},!(r=r||{}).popup&&(r.popup=(s=>{const u=window.screenX+(window.innerWidth-400)/2,f=window.screenY+(window.innerHeight-600)/2;return window.open(s,"auth0:authorize:popup",`left=${u},top=${f},width=400,height=600,resizable,scrollbars=yes,status=1`)})(""),!r.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");const a=await this._prepareAuthorizeUrl(t.authorizationParams||{},{response_mode:"web_message"},window.location.origin);r.popup.location.href=a.url;const i=await(s=>new Promise((u,f)=>{let l;const c=setInterval(()=>{s.popup&&s.popup.closed&&(clearInterval(c),clearTimeout(d),window.removeEventListener("message",l,!1),f(new X0(s.popup)))},1e3),d=setTimeout(()=>{clearInterval(c),f(new Y0(s.popup)),window.removeEventListener("message",l,!1)},1e3*(s.timeoutInSeconds||60));l=function(v){if(v.data&&v.data.type==="authorization_response"){if(clearTimeout(d),clearInterval(c),window.removeEventListener("message",l,!1),s.popup.close(),v.data.response.error)return f(ce.fromPayload(v.data.response));u(v.data.response)}},window.addEventListener("message",l)}))(Object.assign(Object.assign({},r),{timeoutInSeconds:r.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(a.state!==i.state)throw new ce("state_mismatch","Invalid state");const o=((n=t.authorizationParams)===null||n===void 0?void 0:n.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:a.audience,scope:a.scope,code_verifier:a.code_verifier,grant_type:"authorization_code",code:i.code,redirect_uri:a.redirect_uri},{nonceIn:a.nonce,organization:o})}async getUser(){var t;const r=await this._getIdTokenFromCache();return(t=r==null?void 0:r.decodedToken)===null||t===void 0?void 0:t.user}async getIdTokenClaims(){var t;const r=await this._getIdTokenFromCache();return(t=r==null?void 0:r.decodedToken)===null||t===void 0?void 0:t.claims}async loginWithRedirect(t={}){var r;const n=jf(t),{openUrl:a,fragment:i,appState:o}=n,s=Le(n,["openUrl","fragment","appState"]),u=((r=s.authorizationParams)===null||r===void 0?void 0:r.organization)||this.options.authorizationParams.organization,f=await this._prepareAuthorizeUrl(s.authorizationParams||{}),{url:l}=f,c=Le(f,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},c),{appState:o}),u&&{organization:u}));const d=i?`${l}#${i}`:l;a?await a(d):window.location.assign(d)}async handleRedirectCallback(t=window.location.href){const r=t.split("?").slice(1);if(r.length===0)throw new Error("There are no query params available for parsing.");const{state:n,code:a,error:i,error_description:o}=(c=>{c.indexOf("#")>-1&&(c=c.substring(0,c.indexOf("#")));const d=new URLSearchParams(c);return{state:d.get("state"),code:d.get("code")||void 0,error:d.get("error")||void 0,error_description:d.get("error_description")||void 0}})(r.join("")),s=this.transactionManager.get();if(!s)throw new ce("missing_transaction","Invalid state");if(this.transactionManager.remove(),i)throw new J0(i,o||i,n,s.appState);if(!s.code_verifier||s.state&&s.state!==n)throw new ce("state_mismatch","Invalid state");const u=s.organization,f=s.nonce,l=s.redirect_uri;return await this._requestToken(Object.assign({audience:s.audience,scope:s.scope,code_verifier:s.code_verifier,grant_type:"authorization_code",code:a},l?{redirect_uri:l}:{}),{nonceIn:f,organization:u}),{appState:s.appState}}async checkSession(t){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(t)}catch{}}async getTokenSilently(t={}){var r;const n=Object.assign(Object.assign({cacheMode:"on"},t),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),t.authorizationParams),{scope:Hn(this.scope,(r=t.authorizationParams)===null||r===void 0?void 0:r.scope)})}),a=await((i,o)=>{let s=Co[o];return s||(s=i().finally(()=>{delete Co[o],s=null}),Co[o]=s),s})(()=>this._getTokenSilently(n),`${this.options.clientId}::${n.authorizationParams.audience}::${n.authorizationParams.scope}`);return t.detailedResponse?a:a==null?void 0:a.access_token}async _getTokenSilently(t){const{cacheMode:r}=t,n=Le(t,["cacheMode"]);if(r!=="off"){const a=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(a)return a}if(r!=="cache-only"){if(!await(async(a,i=3)=>{for(let o=0;o<i;o++)if(await a())return!0;return!1})(()=>Ao.acquireLock("auth0.lock.getTokenSilently",5e3),10))throw new Oo;try{if(window.addEventListener("pagehide",this._releaseLockOnPageHide),r!=="off"){const f=await this._getEntryFromCache({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId});if(f)return f}const a=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(n):await this._getTokenFromIFrame(n),{id_token:i,access_token:o,oauthTokenScope:s,expires_in:u}=a;return Object.assign(Object.assign({id_token:i,access_token:o},s?{scope:s}:null),{expires_in:u})}finally{await Ao.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}}async getTokenWithPopup(t={},r={}){var n;const a=Object.assign(Object.assign({},t),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),t.authorizationParams),{scope:Hn(this.scope,(n=t.authorizationParams)===null||n===void 0?void 0:n.scope)})});return r=Object.assign(Object.assign({},Z0),r),await this.loginWithPopup(a,r),(await this.cacheManager.get(new ft({scope:a.authorizationParams.scope,audience:a.authorizationParams.audience||"default",clientId:this.options.clientId}))).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(t){t.clientId!==null?t.clientId=t.clientId||this.options.clientId:delete t.clientId;const r=t.logoutParams||{},{federated:n}=r,a=Le(r,["federated"]),i=n?"&federated":"";return this._url(`/v2/logout?${_o(Object.assign({clientId:t.clientId},a))}`)+i}async logout(t={}){const r=jf(t),{openUrl:n}=r,a=Le(r,["openUrl"]);t.clientId===null?await this.cacheManager.clear():await this.cacheManager.clear(t.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@");const i=this._buildLogoutUrl(a);n?await n(i):n!==!1&&window.location.assign(i)}async _getTokenFromIFrame(t){const r=Object.assign(Object.assign({},t.authorizationParams),{prompt:"none"}),n=this.cookieStorage.get(this.orgHintCookieName);n&&!r.organization&&(r.organization=n);const{url:a,state:i,nonce:o,code_verifier:s,redirect_uri:u,scope:f,audience:l}=await this._prepareAuthorizeUrl(r,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new ce("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const c=t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,d=await((p,S,g=60)=>new Promise((T,I)=>{const b=window.document.createElement("iframe");b.setAttribute("width","0"),b.setAttribute("height","0"),b.style.display="none";const h=()=>{window.document.body.contains(b)&&(window.document.body.removeChild(b),window.removeEventListener("message",$,!1))};let $;const k=setTimeout(()=>{I(new Oo),h()},1e3*g);$=function(_){if(_.origin!=S||!_.data||_.data.type!=="authorization_response")return;const j=_.source;j&&j.close(),_.data.response.error?I(ce.fromPayload(_.data.response)):T(_.data.response),clearTimeout(k),window.removeEventListener("message",$,!1),setTimeout(h,2e3)},window.addEventListener("message",$,!1),window.document.body.appendChild(b),b.setAttribute("src",p)}))(a,this.domainUrl,c);if(i!==d.state)throw new ce("state_mismatch","Invalid state");const v=await this._requestToken(Object.assign(Object.assign({},t.authorizationParams),{code_verifier:s,code:d.code,grant_type:"authorization_code",redirect_uri:u,timeout:t.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:o,organization:r.organization});return Object.assign(Object.assign({},v),{scope:f,oauthTokenScope:v.scope,audience:l})}catch(c){throw c.error==="login_required"&&this.logout({openUrl:!1}),c}}async _getTokenUsingRefreshToken(t){const r=await this.cacheManager.get(new ft({scope:t.authorizationParams.scope,audience:t.authorizationParams.audience||"default",clientId:this.options.clientId}));if(!(r&&r.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(t);throw new $f(t.authorizationParams.audience||"default",t.authorizationParams.scope)}const n=t.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,a=typeof t.timeoutInSeconds=="number"?1e3*t.timeoutInSeconds:null;try{const i=await this._requestToken(Object.assign(Object.assign(Object.assign({},t.authorizationParams),{grant_type:"refresh_token",refresh_token:r&&r.refresh_token,redirect_uri:n}),a&&{timeout:a}));return Object.assign(Object.assign({},i),{scope:t.authorizationParams.scope,oauthTokenScope:i.scope,audience:t.authorizationParams.audience||"default"})}catch(i){if((i.message.indexOf("Missing Refresh Token")>-1||i.message&&i.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(t);throw i}}async _saveEntryInCache(t){const{id_token:r,decodedToken:n}=t,a=Le(t,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:r,decodedToken:n}),await this.cacheManager.setIdToken(this.options.clientId,t.id_token,t.decodedToken),await this.cacheManager.set(a)}async _getIdTokenFromCache(){const t=this.options.authorizationParams.audience||"default",r=await this.cacheManager.getIdToken(new ft({clientId:this.options.clientId,audience:t,scope:this.scope})),n=this.userCache.get("@@user@@");return r&&r.id_token===(n==null?void 0:n.id_token)?n:(this.userCache.set("@@user@@",r),r)}async _getEntryFromCache({scope:t,audience:r,clientId:n}){const a=await this.cacheManager.get(new ft({scope:t,audience:r,clientId:n}),60);if(a&&a.access_token){const{access_token:i,oauthTokenScope:o,expires_in:s}=a,u=await this._getIdTokenFromCache();return u&&Object.assign(Object.assign({id_token:u.id_token,access_token:i},o?{scope:o}:null),{expires_in:s})}}async _requestToken(t,r){const{nonceIn:n,organization:a}=r||{},i=await nT(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},t),this.worker),o=await this._verifyIdToken(i.id_token,n,a);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},i),{decodedToken:o,scope:t.scope,audience:t.audience||"default"}),i.scope?{oauthTokenScope:i.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(a||o.claims.org_id),Object.assign(Object.assign({},i),{decodedToken:o})}};async function gT(e){const t=new mT(e);return await t.checkSession(),t}var Oe=(e=>(e.READY="sesamyJsReady",e.AUTHENTICATED="sesamyJsAuthenticated",e.LOGOUT="sesamyJsLogout",e.CLEAR_CACHE="sesamyJsClearCache",e.USER_ATTRIBUTE_CHANGED="sesamyUserAttributeChanged",e.PURCHASE="sesamyJsPurchase",e))(Oe||{});const yT="sesamy.com",wT="sesamy.dev",bT="https://sesa.my",jo="sesamyCacheTimestamp";function Ve(e,t){return`https://${e}.${t==="dev"?wT:yT}`}let ue,Lf,Nf=!1;const Bt="sesamyAccessToken",Lo="sesamyRefreshToken";async function kr(){return new Promise((r,n)=>{let a=0;const i=()=>{Nf?r(!0):a>=5e3?n(new Error("Initialization failed: Timeout")):(a+=100,setTimeout(i,100))};i()})}async function ST(e){if(!e)return null;const t=localStorage.getItem(Lo);if(!t)throw new Error("No refresh token available");const r=new URLSearchParams;r.set("client_id",e.iss),r.set("refresh_token",t),r.set("grant_type","refresh_token");const n=new URL(e.iss);n.pathname="/oauth/token",n.searchParams.set("user_id",e.sub);try{const a=await fetch(n.href,{body:r.toString(),method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"}});if(!a.ok)throw localStorage.removeItem(Lo),new Error("Renew token failed");const i=await a.json();return localStorage.setItem(Lo,i.refresh_token),localStorage.setItem(Bt,i.access_token),i.access_token}catch{xf()}}async function No(){const e=localStorage.getItem(Bt);if(!e)return null;const t=Df(e);if(!t||!t.exp||t.exp<new Date().getTime()/1e3){const r=await ST(t);if(r)return r;localStorage.removeItem(Bt)}return e}function Uf(e){try{const t=new URL(e).hostname,r=t.split(".");return r.length>1?r.slice(-2).join("."):t}catch{return null}}async function $T(e){if(e.enabled===!1)return;Lf=e.organization;const t={domain:Ve("token",e.environment),clientId:e.clientId,useCookiesForTransactions:!0};if(Uf(window.location.href)!==Uf(Ve("auth",e.environment))&&(t.cacheLocation="localstorage",t.useRefreshTokens=!0),ue=await gT(t),window.location.search.includes("code="))try{await ue.handleRedirectCallback();const r=await ue.getUser();We(Oe.AUTHENTICATED,r);const n=new URL(location.href),a=n.searchParams;a.delete("code"),a.delete("state"),n.search=a.toString(),window.history.replaceState({},document.title,n.toString())}catch(r){console.error(r)}Nf=!0}async function Uo(){return await kr(),await No()?!0:ue?ue.isAuthenticated():!1}async function IT(){return await kr(),await No()?{sub:"local",name:"Local User"}:ue?ue.getUser():null}async function xo(e){if(await kr(),localStorage.removeItem(Bt),!ue)throw new Error("Auth0 client not initialized");const t=(e==null?void 0:e.authorizationParams)||{};return ue.loginWithRedirect({...e,authorizationParams:{organization:Lf,redirect_uri:window.location.href,...t}})}async function _r(e=!0){await kr();const t=await No();if(t)return t;try{return ue?await ue.getTokenSilently():null}catch(r){if(e)throw r;return null}}async function xf(e={}){if(await kr(),localStorage.removeItem(Bt),We(Oe.LOGOUT,{}),!!ue)return ue.logout({...e,logoutParams:{returnTo:window.location.href,...e.logoutParams}})}function Df(e){const t=e.split(".");if(t.length!==3)return null;const n=t[1].replace(/-/g,"+").replace(/_/g,"/"),a=decodeURIComponent(atob(n).split("").map(function(i){return"%"+("00"+i.charCodeAt(0).toString(16)).slice(-2)}).join(""));return JSON.parse(a)}async function Mf(e){const t=Df(e);if(!t||!t.exp||t.exp<new Date().getTime()/1e3)throw new Error("Invalid token");localStorage.setItem(Bt,e),We(Oe.AUTHENTICATED,t)}const TT=(e,t)=>t.skipDedupe||t.method!=="GET",ET=(e,t)=>t.method+"@"+e,PT=e=>e.clone(),Ff=({skip:e=TT,key:t=ET,resolver:r=PT}={})=>{const n=new Map;return a=>(i,o)=>{if(e(i,o))return a(i,o);const s=t(i,o);if(!n.has(s))n.set(s,[]);else return new Promise((u,f)=>{n.get(s).push([u,f])});try{return a(i,o).then(u=>(n.get(s).forEach(([f])=>f(r(u))),n.delete(s),u)).catch(u=>{throw n.get(s).forEach(([f,l])=>l(u)),n.delete(s),u})}catch(u){return n.delete(s),Promise.reject(u)}}},OT=(e,t)=>e*t,kT=e=>e&&e.ok,zf=({delayTimer:e=500,delayRamp:t=OT,maxAttempts:r=10,until:n=kT,onRetry:a=null,retryOnNetworkError:i=!1,resolveWithLatestResponse:o=!1,skip:s}={})=>u=>(f,l)=>{let c=0;if(s&&s(f,l))return u(f,l);const d=(v,p)=>Promise.resolve(n(v,p)).then(S=>S?v&&o?v:p?Promise.reject(p):v:(c++,!r||c<=r?new Promise(g=>{const T=t(e,c);setTimeout(()=>{typeof a=="function"?Promise.resolve(a({response:v,error:p,url:f,options:l})).then((I={})=>{var b,h;g(u((b=I&&I.url)!==null&&b!==void 0?b:f,(h=I&&I.options)!==null&&h!==void 0?h:l))}):g(u(f,l))},T)}).then(d).catch(g=>{if(!i)throw g;return d(null,g)}):v&&o?v:Promise.reject(p||new Error("Number of attempts exceeded."))));return u(f,l).then(d).catch(v=>{if(!i)throw v;return d(null,v)})},_T="application/json",Bf="Content-Type",Ht=Symbol(),Hf=Symbol();function Kf(e={}){var t;return(t=Object.entries(e).find(([r])=>r.toLowerCase()===Bf.toLowerCase()))===null||t===void 0?void 0:t[1]}function Gf(e){return/^application\/.*json.*/.test(e)}const vt=function(e,t,r=!1){return Object.entries(t).reduce((n,[a,i])=>{const o=e[a];return Array.isArray(o)&&Array.isArray(i)?n[a]=r?[...o,...i]:i:typeof o=="object"&&typeof i=="object"?n[a]=vt(o,i,r):n[a]=i,n},{...e})},Kt={options:{},errorType:"text",polyfills:{},polyfill(e,t=!0,r=!1,...n){const a=this.polyfills[e]||(typeof self<"u"?self[e]:null)||(typeof global<"u"?global[e]:null);if(t&&!a)throw new Error(e+" is not defined");return r&&a?new a(...n):a}};function RT(e,t=!1){Kt.options=t?e:vt(Kt.options,e)}function CT(e,t=!1){Kt.polyfills=t?e:vt(Kt.polyfills,e)}function AT(e){Kt.errorType=e}const jT=e=>t=>e.reduceRight((r,n)=>n(r),t)||t;class Wf extends Error{}const LT=e=>{const t=Object.create(null);e=e._addons.reduce((b,h)=>h.beforeRequest&&h.beforeRequest(b,e._options,t)||b,e);const{_url:r,_options:n,_config:a,_catchers:i,_resolvers:o,_middlewares:s,_addons:u}=e,f=new Map(i),l=vt(a.options,n);let c=r;const d=jT(s)((b,h)=>(c=b,a.polyfill("fetch")(b,h)))(r,l),v=new Error,p=d.catch(b=>{throw{[Ht]:b}}).then(b=>{if(!b.ok){const h=new Wf;if(h.cause=v,h.stack=h.stack+`
|
|
5
5
|
CAUSE: `+v.stack,h.response=b,h.url=c,b.type==="opaque")throw h;return b.text().then($=>{var k;if(h.message=$,a.errorType==="json"||((k=b.headers.get("Content-Type"))===null||k===void 0?void 0:k.split(";")[0])==="application/json")try{h.json=JSON.parse($)}catch{}throw h.text=$,h.status=b.status,h})}return b}),S=b=>b.catch(h=>{const $=h.hasOwnProperty(Ht),k=$?h[Ht]:h,_=(k==null?void 0:k.status)&&f.get(k.status)||f.get(k==null?void 0:k.name)||$&&f.has(Ht)&&f.get(Ht);if(_)return _(k,e);const j=f.get(Hf);if(j)return j(k,e);throw k}),g=b=>h=>S(b?p.then($=>$&&$[b]()).then($=>h?h($):$):p.then($=>h?h($):$)),T={_wretchReq:e,_fetchReq:d,_sharedState:t,res:g(null),json:g("json"),blob:g("blob"),formData:g("formData"),arrayBuffer:g("arrayBuffer"),text:g("text"),error(b,h){return f.set(b,h),this},badRequest(b){return this.error(400,b)},unauthorized(b){return this.error(401,b)},forbidden(b){return this.error(403,b)},notFound(b){return this.error(404,b)},timeout(b){return this.error(408,b)},internalError(b){return this.error(500,b)},fetchError(b){return this.error(Ht,b)}},I=u.reduce((b,h)=>({...b,...typeof h.resolver=="function"?h.resolver(b):h.resolver}),T);return o.reduce((b,h)=>h(b,e),I)},NT={_url:"",_options:{},_config:Kt,_catchers:new Map,_resolvers:[],_deferred:[],_middlewares:[],_addons:[],addon(e){return{...this,_addons:[...this._addons,e],...e.wretch}},errorType(e){return{...this,_config:{...this._config,errorType:e}}},polyfills(e,t=!1){return{...this,_config:{...this._config,polyfills:t?e:vt(this._config.polyfills,e)}}},url(e,t=!1){if(t)return{...this,_url:e};const r=this._url.split("?");return{...this,_url:r.length>1?r[0]+e+"?"+r[1]:this._url+e}},options(e,t=!1){return{...this,_options:t?e:vt(this._options,e)}},headers(e){const t=e?Array.isArray(e)?Object.fromEntries(e):"entries"in e?Object.fromEntries(e.entries()):e:{};return{...this,_options:vt(this._options,{headers:t})}},accept(e){return this.headers({Accept:e})},content(e){return this.headers({[Bf]:e})},auth(e){return this.headers({Authorization:e})},catcher(e,t){const r=new Map(this._catchers);return r.set(e,t),{...this,_catchers:r}},catcherFallback(e){return this.catcher(Hf,e)},resolve(e,t=!1){return{...this,_resolvers:t?[e]:[...this._resolvers,e]}},defer(e,t=!1){return{...this,_deferred:t?[e]:[...this._deferred,e]}},middlewares(e,t=!1){return{...this,_middlewares:t?e:[...this._middlewares,...e]}},fetch(e=this._options.method,t="",r=null){let n=this.url(t).options({method:e});const a=Kf(n._options.headers),i=this._config.polyfill("FormData",!1),o=typeof r=="object"&&!(i&&r instanceof i)&&(!n._options.headers||!a||Gf(a));return n=r?o?n.json(r,a):n.body(r):n,LT(n._deferred.reduce((s,u)=>u(s,s._url,s._options),n))},get(e=""){return this.fetch("GET",e)},delete(e=""){return this.fetch("DELETE",e)},put(e,t=""){return this.fetch("PUT",t,e)},post(e,t=""){return this.fetch("POST",t,e)},patch(e,t=""){return this.fetch("PATCH",t,e)},head(e=""){return this.fetch("HEAD",e)},opts(e=""){return this.fetch("OPTIONS",e)},body(e){return{...this,_options:{...this._options,body:e}}},json(e,t){const r=Kf(this._options.headers);return this.content(t||Gf(r)&&r||_T).body(JSON.stringify(e))}};function Me(e="",t={}){return{...NT,_url:e,_options:t}}Me.default=Me,Me.options=RT,Me.errorType=AT,Me.polyfills=CT,Me.WretchError=Wf;function ke(){sessionStorage.removeItem(jo),We(Oe.CLEAR_CACHE,{})}function Vf(){var r;return(r=(document.documentElement.getAttribute("lang")??"en").split("-")[0])==null?void 0:r.toLocaleLowerCase()}function UT(e){const t=Ve("api2",e.environment),r=w=>async(E,P)=>{let B=sessionStorage.getItem(jo);B||(B=Date.now().toString(),sessionStorage.setItem(jo,B));const oe={...P,headers:{...P.headers,"Cache-Timestamp":B}};return w(E,oe)},n=(w=!0)=>E=>async(P,B)=>{let oe=null;if(oe=await _r(w),!oe){if(w)throw new Error("No access token available");return E(P,B)}const qe={...B,headers:{...B.headers,...oe?{Authorization:`Bearer ${oe}`}:{}}};return E(P,qe)},a=w=>(E,P)=>{if(P.headers.Authorization)return w(E,P);const B=localStorage.getItem("__anon_id"),oe=btoa(`${B}:`),qe={...P,headers:{...P.headers,Authorization:`Basic ${oe}`}};return w(E,qe)},i=Me(t).headers({"Content-Type":"application/json"}).middlewares([r,n(),Ff(),zf({delayTimer:1e3,delayRamp:(w,E)=>w*E,maxAttempts:3,until:w=>!!(w&&(w.ok||w.status>=400&&w.status<500)),retryOnNetworkError:!1})]),o=Me(t).headers({"Content-Type":"application/json"}).middlewares([r,n(!1),a,Ff(),zf({delayTimer:1e3,delayRamp:(w,E)=>w*E,maxAttempts:3,until:w=>!!(w&&(w.ok||w.status>=400&&w.status<500)),retryOnNetworkError:!1})]);async function s(){return i.get("/entitlements").json()}async function u(w){const E=await i.get("/entitlements").json();return E==null?void 0:E.find(P=>P.id===w)}async function f(w){return i.get(`/entitlements/${w}/access`).json()}async function l(){return i.get("/contracts").json()}async function c(w){const E=await i.get("/contracts").json();return E==null?void 0:E.find(P=>P.id===w)}async function d(){return console.warn("getSubscriptions is deprecated, use getContracts instead"),i.get("/subscriptions").json()}async function v(){return i.get("/bills").json()}async function p(w){const E=await i.get("/bills").json();return E==null?void 0:E.find(P=>P.id===w)}async function S(){return i.get("/transactions").json()}async function g(w){const E=await i.get("/transactions").json();return E==null?void 0:E.find(P=>P.id===w)}async function T(w,E){const P=await i.url(`/user-metadata/${w}`).put(E).json();return We(Oe.USER_ATTRIBUTE_CHANGED,{}),ke(),P}async function I(w){const E=await i.url(`/user-metadata/${w}`).delete().res();return ke(),E.ok}async function b(w){return(await i.url(`/user-metadata/${w}`).get().json())[w]}async function h(){return await i.url("/user-metadata").get().json()}async function $(){return await i.url("/tags").get().json()}async function k(w){const E=await i.url(`/tags/${w}`).delete().res();return ke(),E.ok}async function _(w){const E=await i.url("/tags").post(w).res();return We(Oe.USER_ATTRIBUTE_CHANGED,{}),ke(),E.ok}async function j(w){return(await o.url("/tallies").get().json())[w]}async function M(){return await o.url("/tallies").get().json()}async function F(w){const E=await o.url(`/tallies/${w}`).delete().res();return ke(),E.ok}async function Z(w,E){return await o.url(`/tallies/${w}/push`).post(E).json()}async function L(w){return await i.url(`/products/${w}`).get().json()}async function x(){return await _r(!1)?await i.url("/profile").get().json():null}async function z(w){const E=await i.url("/profile").patch(w).res();return ke(),E.ok}async function R(){return await i.url("/payment-issues").get().json()}async function V(){return(await i.url("/profile/spotify-link").get().json()).isSpotifyLinked}async function X(){return(await i.url("/profile/unlink-spotify").post().res()).ok}async function Be(w){const E=await _r(!1);if(!E)throw new Error("No access token available");const P=new URL(`${Ve("spotify-oas",e.environment)}/sesamy-callback`);P.searchParams.set("access_token",E),P.searchParams.set("state",w),window.location.href=P.toString()}async function m(w){const E=await i.url(`/products/${w}/auto-onboard`).post().json();return E.length&&ke(),E}async function y(w,E=3600){const{shortlink:P}=await Me(bT).post({url:w,ttl:E}).json();return P}async function O(w){const E=await _r(!1);let P;const B=w.language||Vf();switch(w.target){case"account":P=new URL(`${Ve("account",e.environment)}/${B}/subscriptions/${e.clientId}`);break;case"consume":P=new URL(`${Ve("consume",e.environment)}/${B}/@${e.clientId}/${w.sku}`),w.episodeId?P.href+=`/${w.episodeId}`:P.href+="/listen";break;default:throw new Error("Invalid target")}return P.searchParams.set("sesamy-redirect-url",w.redirectUrl||window.location.href),E&&(P.hash=`#access_token=${E}`),w.shorten?y(P.href,w.ttl):P.href}async function N(w){return(await o.url("/checkouts").post({language:Vf(),...w,vendorId:e.clientId})).json()}async function U(w,E){return(await o.url(`/checkouts/${w}`).patch(E)).json()}async function D(w){return(await o.url(`/checkouts/${w}`).get()).json()}async function J(){const w=await _r(!1),E=new URL(`${Ve("account",e.environment)}/subscriptions/${e.clientId}`);w&&(E.hash=`#access_token=${w}`),window.location.href=E.toString()}return{createCheckout:N,updateCheckout:U,getCheckout:D,getEntitlements:s,getEntitlement:u,getEntitlementAccess:f,getContracts:l,getContract:c,getProfile:x,updateProfile:z,getSubscriptions:d,getBills:v,getBill:p,setUserMetadata:T,deleteUserMetadata:I,getUserMetadata:b,listUserMetadata:h,getTags:$,deleteTag:k,setTag:_,getTally:j,getTallies:M,deleteTally:F,pushTally:Z,getTransactions:S,getTransaction:g,getProduct:L,getPaymentIssues:R,autoOnboardProduct:m,isSpotifyLinked:V,unlinkSpotify:X,linkSpotify:Be,generateLink:O,openHostedAccountPage:J}}const Zf="@sesamy/sesamy-js",Do="1.19.1";function Jf(e,t,r,n,a){for(t=t.split?t.split("."):t,n=0;n<t.length;n++)e=e?e[t[n]]:a;return e===a?r:e}var Kn="undefined",Yf="object",Mo=function(){},Xf="any",qf="*",ht="__",Gn=typeof process<"u"?process:{};Gn.env&&Gn.env.NODE_ENV;var ee=typeof document<"u";Gn.versions!=null&&Gn.versions.node!=null,typeof Deno<"u"&&Deno.core,ee&&window.name==="nodejs"||typeof navigator<"u"&&navigator.userAgent!==void 0&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));function Qf(e,t){return t.charAt(0)[e]()+t.slice(1)}var xT=Qf.bind(null,"toUpperCase"),DT=Qf.bind(null,"toLowerCase");function MT(e){return ed(e)?xT("null"):typeof e=="object"?HT(e):Object.prototype.toString.call(e).slice(8,-1)}function Wn(e,t){t===void 0&&(t=!0);var r=MT(e);return t?DT(r):r}function Rr(e,t){return typeof t===e}var ae=Rr.bind(null,"function"),Ze=Rr.bind(null,"string"),Gt=Rr.bind(null,"undefined"),FT=Rr.bind(null,"boolean");Rr.bind(null,"symbol");function ed(e){return e===null}function zT(e){return Wn(e)==="number"&&!isNaN(e)}function td(e){return Wn(e)==="array"}function ie(e){if(!BT(e))return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function BT(e){return e&&(typeof e=="object"||e!==null)}function HT(e){return ae(e.constructor)?e.constructor.name:null}function KT(e){return e instanceof Error||Ze(e.message)&&e.constructor&&zT(e.constructor.stackTraceLimit)}function rd(e,t){if(typeof t!="object"||ed(t))return!1;if(t instanceof e)return!0;var r=Wn(new e(""));if(KT(t))for(;t;){if(Wn(t)===r)return!0;t=Object.getPrototypeOf(t)}return!1}rd.bind(null,TypeError),rd.bind(null,SyntaxError);function Vn(e,t){var r=e instanceof Element||e instanceof HTMLDocument;return r&&t?GT(e,t):r}function GT(e,t){return t===void 0&&(t=""),e&&e.nodeName===t.toUpperCase()}function Zn(e){var t=[].slice.call(arguments,1);return function(){return e.apply(void 0,[].slice.call(arguments).concat(t))}}Zn(Vn,"form"),Zn(Vn,"button"),Zn(Vn,"input"),Zn(Vn,"select");function WT(e){return e?td(e)?e:[e]:[]}function nd(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function VT(){if(ee){var e=navigator,t=e.languages;return e.userLanguage||(t&&t.length?t[0]:e.language)}}function ZT(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function JT(e){return function(t){for(var r,n=Object.create(null),a=/([^&=]+)=?([^&]*)/g;r=a.exec(t);){var i=nd(r[1]),o=nd(r[2]);i.substring(i.length-2)==="[]"?(n[i=i.substring(0,i.length-2)]||(n[i]=[])).push(o):n[i]=o===""||o}for(var s in n){var u=s.split("[");u.length>1&&(YT(n,u.map(function(f){return f.replace(/[?[\]\\ ]/g,"")}),n[s]),delete n[s])}return n}(function(t){return ee&&window.location.search.substring(1)}())}function YT(e,t,r){for(var n=t.length-1,a=0;a<n;++a){var i=t[a];if(i==="__proto__"||i==="constructor")break;i in e||(e[i]={}),e=e[i]}e[t[n]]=r}function Jn(){for(var e="",t=0,r=4294967295*Math.random()|0;t++<36;){var n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[t-1],a=15&r;e+=n=="-"||n=="4"?n:(n=="x"?a:3&a|8).toString(16),r=t%8==0?4294967295*Math.random()|0:r>>4}return e}function XT(e,t){var r,n,a,i=null,o=0,s=function(){o=new Date,i=null,a=e.apply(r,n)};return function(){var u=new Date;o||(o=u);var f=t-(u-o);return r=this,n=arguments,f<=0?(clearTimeout(i),i=null,o=u,a=e.apply(r,n)):i||(i=setTimeout(s,f)),a}}var Cr="global",Wt=ht+"global"+ht,Vt=typeof self===Yf&&self.self===self&&self||typeof global===Yf&&global.global===global&&global||void 0;function pt(e){return Vt[Wt][e]}function mt(e,t){return Vt[Wt][e]=t}function Zt(e){delete Vt[Wt][e]}function Jt(e,t,r){var n;try{if(Fo(e)){var a=window[e];n=a[t].bind(a)}}catch{}return n||r}Vt[Wt]||(Vt[Wt]={});var Yn={};function Fo(e){if(typeof Yn[e]!==Kn)return Yn[e];try{var t=window[e];t.setItem(Kn,Kn),t.removeItem(Kn)}catch{return Yn[e]=!1}return Yn[e]=!0}function C(){return C=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},C.apply(this,arguments)}var Je="function",Fe="undefined",qT="@@redux/"+Math.random().toString(36),ad=function(){return typeof Symbol===Je&&Symbol.observable||"@@observable"}(),Xn=" != "+Je;function id(e,t,r){var n;if(typeof t===Je&&typeof r===Fe&&(r=t,t=void 0),typeof r!==Fe){if(typeof r!==Je)throw new Error("enhancer"+Xn);return r(id)(e,t)}if(typeof e!==Je)throw new Error("reducer"+Xn);var a=e,i=t,o=[],s=o,u=!1;function f(){s===o&&(s=o.slice())}function l(){return i}function c(v){if(typeof v!==Je)throw new Error("Listener"+Xn);var p=!0;return f(),s.push(v),function(){if(p){p=!1,f();var S=s.indexOf(v);s.splice(S,1)}}}function d(v){if(!ie(v))throw new Error("Act != obj");if(typeof v.type===Fe)throw new Error("ActType "+Fe);if(u)throw new Error("Dispatch in reducer");try{u=!0,i=a(i,v)}finally{u=!1}for(var p=o=s,S=0;S<p.length;S++)(0,p[S])();return v}return d({type:"@@redux/INIT"}),(n={dispatch:d,subscribe:c,getState:l,replaceReducer:function(v){if(typeof v!==Je)throw new Error("next reducer"+Xn);a=v,d({type:"@@redux/INIT"})}})[ad]=function(){var v,p=c;return(v={subscribe:function(S){if(typeof S!="object")throw new TypeError("Observer != obj");function g(){S.next&&S.next(l())}return g(),{unsubscribe:p(g)}}})[ad]=function(){return this},v},n}function QT(e,t){var r=t&&t.type;return"action "+(r&&r.toString()||"?")+"reducer "+e+" returns "+Fe}function Yt(){var e=[].slice.call(arguments);return e.length===0?function(t){return t}:e.length===1?e[0]:e.reduce(function(t,r){return function(){return t(r.apply(void 0,[].slice.call(arguments)))}})}function eE(){var e=arguments;return function(t){return function(r,n,a){var i,o=t(r,n,a),s=o.dispatch,u={getState:o.getState,dispatch:function(f){return s(f)}};return i=[].slice.call(e).map(function(f){return f(u)}),C({},o,{dispatch:s=Yt.apply(void 0,i)(o.dispatch)})}}}var Ye=ht+"anon_id",gt=ht+"user_id",Xt=ht+"user_traits",Xe="userId",qt="anonymousId",qn=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],zo=["name","EVENTS","config","loaded"],A=qn.reduce(function(e,t){return e[t]=t,e},{registerPluginType:function(e){return"registerPlugin:"+e},pluginReadyType:function(e){return"ready:"+e}}),od=/^utm_/,sd=/^an_prop_/,cd=/^an_trait_/;function tE(e){var t=e.storage.setItem;return function(r){return function(n){return function(a){if(a.type===A.bootstrap){var i=a.params,o=a.user,s=a.persistedUser,u=a.initialUser,f=s.userId===o.userId;s.anonymousId!==o.anonymousId&&t(Ye,o.anonymousId),f||t(gt,o.userId),u.traits&&t(Xt,C({},f&&s.traits?s.traits:{},u.traits));var l=Object.keys(a.params);if(l.length){var c=i.an_uid,d=i.an_event,v=l.reduce(function(p,S){if(S.match(od)||S.match(/^(d|g)clid/)){var g=S.replace(od,"");p.campaign[g==="campaign"?"name":g]=i[S]}return S.match(sd)&&(p.props[S.replace(sd,"")]=i[S]),S.match(cd)&&(p.traits[S.replace(cd,"")]=i[S]),p},{campaign:{},props:{},traits:{}});r.dispatch(C({type:A.params,raw:i},v,c?{userId:c}:{})),c&&setTimeout(function(){return e.identify(c,v.traits)},0),d&&setTimeout(function(){return e.track(d,v.props)},0),Object.keys(v.campaign).length&&r.dispatch({type:A.campaign,campaign:v.campaign})}}return n(a)}}}}function rE(e){return function(t,r){if(t===void 0&&(t={}),r===void 0&&(r={}),r.type===A.setItemEnd){if(r.key===Ye)return C({},t,{anonymousId:r.value});if(r.key===gt)return C({},t,{userId:r.value})}switch(r.type){case A.identify:return Object.assign({},t,{userId:r.userId,traits:C({},t.traits,r.traits)});case A.reset:return[gt,Ye,Xt].forEach(function(n){e.removeItem(n)}),Object.assign({},t,{userId:null,anonymousId:null,traits:{}});default:return t}}}function ud(e){return{userId:e.getItem(gt),anonymousId:e.getItem(Ye),traits:e.getItem(Xt)}}var Bo=function(e){return ht+"TEMP"+ht+e};function nE(e){var t=e.storage,r=t.setItem,n=t.removeItem,a=t.getItem;return function(i){return function(o){return function(s){var u=s.userId,f=s.traits,l=s.options;if(s.type===A.reset&&([gt,Xt,Ye].forEach(function(v){n(v)}),[Xe,qt,"traits"].forEach(function(v){Zt(Bo(v))})),s.type===A.identify){a(Ye)||r(Ye,Jn());var c=a(gt),d=a(Xt)||{};c&&c!==u&&i.dispatch({type:A.userIdChanged,old:{userId:c,traits:d},new:{userId:u,traits:f},options:l}),u&&r(gt,u),f&&r(Xt,C({},d,f))}return o(s)}}}}var Ar={};function ld(e,t){Ar[e]&&ae(Ar[e])&&(Ar[e](t),delete Ar[e])}function fd(e,t,r){return new Promise(function(n,a){return t()?n(e):r<1?a(C({},e,{queue:!0})):new Promise(function(i){return setTimeout(i,10)}).then(function(i){return fd(e,t,r-10).then(n,a)})})}function aE(e){return{abort:e}}function dd(e,t,r){var n={},a=t(),i=e.getState(),o=i.plugins,s=i.queue,u=i.user;if(!i.context.offline&&s&&s.actions&&s.actions.length){var f=s.actions.reduce(function(c,d,v){return o[d.plugin].loaded?(c.process.push(d),c.processIndex.push(v)):(c.requeue.push(d),c.requeueIndex.push(v)),c},{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(f.processIndex&&f.processIndex.length){f.processIndex.forEach(function(c){var d=s.actions[c],v=d.plugin,p=d.payload.type,S=a[v][p];if(S&&ae(S)){var g,T=function(h,$){return h===void 0&&(h={}),$===void 0&&($={}),[Xe,qt].reduce(function(k,_){return h.hasOwnProperty(_)&&$[_]&&$[_]!==h[_]&&(k[_]=$[_]),k},h)}(d.payload,u),I=n[T.meta.rid];if(!I&&(g=S({payload:T,config:o[v].config,instance:r,abort:aE}))&&ie(g)&&g.abort)return void(n[T.meta.rid]=!0);if(!I){var b=p+":"+v;e.dispatch(C({},T,{type:b,_:{called:b,from:"queueDrain"}}))}}});var l=s.actions.filter(function(c,d){return!~f.processIndex.indexOf(d)});s.actions=l}}}var Ho=function(e){var t=e.data,r=e.action,n=e.instance,a=e.state,i=e.allPlugins,o=e.allMatches,s=e.store,u=e.EVENTS;try{var f=a.plugins,l=a.context,c=r.type,d=c.match(Qt),v=t.exact.map(function(g){return g.pluginName});d&&(v=o.during.map(function(g){return g.pluginName}));var p=function(g,T){return function(I,b,h){var $=b.config,k=b.name,_=k+"."+I.type;h&&(_=h.event);var j=I.type.match(Qt)?function(M,F,Z,L,x){return function(z,R){var V=L?L.name:M,X=R&&jr(R)?R:Z;if(L&&(!(X=R&&jr(R)?R:[M]).includes(M)||X.length!==1))throw new Error("Method "+F+" can only abort "+M+" plugin. "+JSON.stringify(X)+" input valid");return C({},x,{abort:{reason:z,plugins:X,caller:F,_:V}})}}(k,_,T,h,I):function(M,F){return function(){throw new Error(M.type+" action not cancellable. Remove abort in "+F)}}(I,_);return{payload:iE(I),instance:g,config:$||{},abort:j}}}(n,v),S=t.exact.reduce(function(g,T){var I=T.pluginName,b=T.methodName,h=!1;return b.match(/^initialize/)||b.match(/^reset/)||(h=!f[I].loaded),l.offline&&b.match(/^(page|track|identify)/)&&(h=!0),g[""+I]=h,g},{});return Promise.resolve(t.exact.reduce(function(g,T,I){try{var b=T.pluginName;return Promise.resolve(g).then(function(h){function $(){return Promise.resolve(h)}var k=function(){if(t.namespaced&&t.namespaced[b])return Promise.resolve(t.namespaced[b].reduce(function(_,j,M){try{return Promise.resolve(_).then(function(F){return j.method&&ae(j.method)?(function(z,R){var V=bd(z);if(V&&V.name===R){var X=bd(V.method);throw new Error([R+" plugin is calling method "+z,"Plugins cant call self","Use "+V.method+" "+(X?"or "+X.method:"")+" in "+R+" plugin insteadof "+z].join(`
|
|
6
|
-
`))}}(j.methodName,j.pluginName),Promise.resolve(j.method({payload:F,instance:n,abort:(Z=F,L=b,x=j.pluginName,function(z,R){return C({},Z,{abort:{reason:z,plugins:R||[L],caller:c,from:x||L}})}),config:pd(j.pluginName,f,i),plugins:f})).then(function(z){var R=ie(z)?z:{};return Promise.resolve(C({},F,R))})):F;var Z,L,x})}catch(F){return Promise.reject(F)}},Promise.resolve(r))).then(function(_){h[b]=_});h[b]=r}();return k&&k.then?k.then($):$()})}catch(h){return Promise.reject(h)}},Promise.resolve({}))).then(function(g){return Promise.resolve(t.exact.reduce(function(T,I,b){try{var h=t.exact.length===b+1,$=I.pluginName,k=i[$];return Promise.resolve(T).then(function(_){var j=g[$]?g[$]:{};if(d&&(j=_),Go(j,$))return Ko({data:j,method:c,instance:n,pluginName:$,store:s}),Promise.resolve(_);if(Go(_,$))return h&&Ko({data:_,method:c,instance:n,store:s}),Promise.resolve(_);if(S.hasOwnProperty($)&&S[$]===!0)return s.dispatch({type:"queue",plugin:$,payload:j,_:{called:"queue",from:"queueMechanism"}}),Promise.resolve(_);var M=p(g[$],i[$]);return Promise.resolve(k[c]({abort:M.abort,payload:j,instance:n,config:pd($,f,i),plugins:f})).then(function(F){var Z=ie(F)?F:{},L=C({},_,Z),x=g[$];if(Go(x,$))Ko({data:x,method:c,instance:n,pluginName:$,store:s});else{var z=c+":"+$;(z.match(/:/g)||[]).length<2&&!c.match(vd)&&!c.match(hd)&&n.dispatch(C({},d?L:j,{type:z,_:{called:z,from:"submethod"}}))}return Promise.resolve(L)})})}catch(_){return Promise.reject(_)}},Promise.resolve(r))).then(function(T){if(!(c.match(Qt)||c.match(/^registerPlugin/)||c.match(hd)||c.match(vd)||c.match(/^params/)||c.match(/^userIdChanged/))){if(u.plugins.includes(c),T._&&T._.originalAction===c)return T;var I=C({},T,{_:{originalAction:T.type,called:T.type,from:"engineEnd"}});yd(T,t.exact.length)&&!c.match(/End$/)&&(I=C({},I,{type:T.type+"Aborted"})),s.dispatch(I)}return T})})}catch(g){return Promise.reject(g)}},Qt=/Start$/,vd=/^bootstrap/,hd=/^ready/;function Ko(e){var t=e.pluginName,r=e.method+"Aborted"+(t?":"+t:"");e.store.dispatch(C({},e.data,{type:r,_:{called:r,from:"abort"}}))}function pd(e,t,r){var n=t[e]||r[e];return n&&n.config?n.config:{}}function md(e,t){return t.reduce(function(r,n){return n[e]?r.concat({methodName:e,pluginName:n.name,method:n[e]}):r},[])}function gd(e,t){var r=e.replace(Qt,""),n=t?":"+t:"";return[""+e+n,""+r+n,r+"End"+n]}function Go(e,t){var r=e.abort;return!!r&&(r===!0||wd(r,t)||r&&wd(r.plugins,t))}function yd(e,t){var r=e.abort;if(!r)return!1;if(r===!0||Ze(r))return!0;var n=r.plugins;return jr(r)&&r.length===t||jr(n)&&n.length===t}function jr(e){return Array.isArray(e)}function wd(e,t){return!(!e||!jr(e))&&e.includes(t)}function bd(e){var t=e.match(/(.*):(.*)/);return!!t&&{method:t[1],name:t[2]}}function iE(e){return Object.keys(e).reduce(function(t,r){return r==="type"||(t[r]=ie(e[r])?Object.assign({},e[r]):e[r]),t},{})}function oE(e,t,r){var n={};return function(a){return function(i){return function(o){try{var s,u=function(h){return s?h:i(c)},f=o.type,l=o.plugins,c=o;if(o.abort)return Promise.resolve(i(o));if(f===A.enablePlugin&&a.dispatch({type:A.initializeStart,plugins:l,disabled:[],fromEnable:!0,meta:o.meta}),f===A.disablePlugin&&setTimeout(function(){return ld(o.meta.rid,{payload:o})},0),f===A.initializeEnd){var d=t(),v=Object.keys(d),p=v.filter(function(h){return l.includes(h)}).map(function(h){return d[h]}),S=[],g=[],T=o.disabled,I=p.map(function(h){var $=h.loaded,k=h.name,_=h.config;return fd(h,function(){return $({config:_})},1e4).then(function(j){return n[k]||(a.dispatch({type:A.pluginReadyType(k),name:k,events:Object.keys(h).filter(function(M){return!zo.includes(M)})}),n[k]=!0),S=S.concat(k),h}).catch(function(j){if(j instanceof Error)throw new Error(j);return g=g.concat(j.name),j})});Promise.all(I).then(function(h){var $={plugins:S,failed:g,disabled:T};setTimeout(function(){v.length===I.length+T.length&&a.dispatch(C({},{type:A.ready},$))},0)})}var b=function(){if(f!==A.bootstrap)return/^ready:([^:]*)$/.test(f)&&setTimeout(function(){return dd(a,t,e)},0),Promise.resolve(function(h,$,k,_,j){try{var M=ae($)?$():$,F=h.type,Z=F.replace(Qt,"");if(h._&&h._.called)return Promise.resolve(h);var L=k.getState(),x=(V=M,(X=L.plugins)===void 0&&(X={}),(Be=h.options)===void 0&&(Be={}),Object.keys(V).filter(function(m){var y=Be.plugins||{};return FT(y[m])?y[m]:y.all!==!1&&(!X[m]||X[m].enabled!==!1)}).map(function(m){return V[m]}));F===A.initializeStart&&h.fromEnable&&(x=Object.keys(L.plugins).filter(function(m){var y=L.plugins[m];return h.plugins.includes(m)&&!y.initialized}).map(function(m){return M[m]}));var z=x.map(function(m){return m.name}),R=function(m,y,O){var N=gd(m).map(function(U){return md(U,y)});return y.reduce(function(U,D){var J=D.name,w=gd(m,J).map(function(oe){return md(oe,y)}),E=w[0],P=w[1],B=w[2];return E.length&&(U.beforeNS[J]=E),P.length&&(U.duringNS[J]=P),B.length&&(U.afterNS[J]=B),U},{before:N[0],beforeNS:{},during:N[1],duringNS:{},after:N[2],afterNS:{}})}(F,x);return Promise.resolve(Ho({action:h,data:{exact:R.before,namespaced:R.beforeNS},state:L,allPlugins:M,allMatches:R,instance:k,store:_,EVENTS:j})).then(function(m){function y(){var U=function(){if(F.match(Qt))return Promise.resolve(Ho({action:C({},O,{type:Z+"End"}),data:{exact:R.after,namespaced:R.afterNS},state:L,allPlugins:M,allMatches:R,instance:k,store:_,EVENTS:j})).then(function(D){D.meta&&D.meta.hasCallback&&ld(D.meta.rid,{payload:D})})}();return U&&U.then?U.then(function(){return m}):m}if(yd(m,z.length))return m;var O,N=function(){if(F!==Z)return Promise.resolve(Ho({action:C({},m,{type:Z}),data:{exact:R.during,namespaced:R.duringNS},state:L,allPlugins:M,allMatches:R,instance:k,store:_,EVENTS:j})).then(function(U){O=U});O=m}();return N&&N.then?N.then(y):y()})}catch(m){return Promise.reject(m)}var V,X,Be}(o,t,e,a,r)).then(function(h){return s=1,i(h)})}();return Promise.resolve(b&&b.then?b.then(u):u(b))}catch(h){return Promise.reject(h)}}}}}function sE(e){return function(t){return function(r){return function(n){var a=n.type,i=n.key,o=n.value,s=n.options;if(a===A.setItem||a===A.removeItem){if(n.abort)return r(n);a===A.setItem?e.setItem(i,o,s):e.removeItem(i,s)}return r(n)}}}}var cE=function(){var e=this;this.before=[],this.after=[],this.addMiddleware=function(t,r){e[r]=e[r].concat(t)},this.removeMiddleware=function(t,r){var n=e[r].findIndex(function(a){return a===t});n!==-1&&(e[r]=[].concat(e[r].slice(0,n),e[r].slice(n+1)))},this.dynamicMiddlewares=function(t){return function(r){return function(n){return function(a){var i={getState:r.getState,dispatch:function(s){return r.dispatch(s)}},o=e[t].map(function(s){return s(i)});return Yt.apply(void 0,o)(n)(a)}}}}};function uE(e){return function(t,r){t===void 0&&(t={});var n={};if(r.type==="initialize:aborted")return t;if(/^registerPlugin:([^:]*)$/.test(r.type)){var a=Sd(r.type,"registerPlugin"),i=e()[a];if(!i||!a)return t;var o=r.enabled,s=i.config;return n[a]={enabled:o,initialized:!!o&&!i.initialize,loaded:!!o&&!!i.loaded({config:s}),config:s},C({},t,n)}if(/^initialize:([^:]*)$/.test(r.type)){var u=Sd(r.type,A.initialize),f=e()[u];return f&&u?(n[u]=C({},t[u],{initialized:!0,loaded:!!f.loaded({config:f.config})}),C({},t,n)):t}if(/^ready:([^:]*)$/.test(r.type))return n[r.name]=C({},t[r.name],{loaded:!0}),C({},t,n);switch(r.type){case A.disablePlugin:return C({},t,$d(r.plugins,!1,t));case A.enablePlugin:return C({},t,$d(r.plugins,!0,t));default:return t}}}function Sd(e,t){return e.substring(t.length+1,e.length)}function $d(e,t,r){return e.reduce(function(n,a){return n[a]=C({},r[a],{enabled:t}),n},r)}function Id(e){try{return JSON.parse(JSON.stringify(e))}catch{}return e}var lE={last:{},history:[]};function fE(e,t){e===void 0&&(e=lE);var r=t.options,n=t.meta;if(t.type===A.track){var a=Id(C({event:t.event,properties:t.properties},Object.keys(r).length&&{options:r},{meta:n}));return C({},e,{last:a,history:e.history.concat(a)})}return e}var dE={actions:[]};function vE(e,t){e===void 0&&(e=dE);var r=t.payload;switch(t.type){case"queue":var n;return n=r&&r.type&&r.type===A.identify?[t].concat(e.actions):e.actions.concat(t),C({},e,{actions:n});case"dequeue":return[];default:return e}}var Td=/#.*$/;function hE(e){var t=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(e);return"/"+(t&&t[3]?t[3].split("?")[0].replace(Td,""):"")}var Ed,Pd,Od,kd,pE=function(e){if(e===void 0&&(e={}),!ee)return e;var t=document,r=t.title,n=t.referrer,a=window,i=a.location,o=a.innerWidth,s=a.innerHeight,u=i.hash,f=i.search,l=function(d){var v=function(){if(ee){for(var p,S=document.getElementsByTagName("link"),g=0;p=S[g];g++)if(p.getAttribute("rel")==="canonical")return p.getAttribute("href")}}();return v?v.match(/\?/)?v:v+d:window.location.href.replace(Td,"")}(f),c={title:r,url:l,path:hE(l),hash:u,search:f,width:o,height:s};return n&&n!==""&&(c.referrer=n),C({},c,e)},mE={last:{},history:[]};function gE(e,t){e===void 0&&(e=mE);var r=t.options;if(t.type===A.page){var n=Id(C({properties:t.properties,meta:t.meta},Object.keys(r).length&&{options:r}));return C({},e,{last:n,history:e.history.concat(n)})}return e}Ed=function(){if(!ee)return!1;var e=navigator.appVersion;return~e.indexOf("Win")?"Windows":~e.indexOf("Mac")?"MacOS":~e.indexOf("X11")?"UNIX":~e.indexOf("Linux")?"Linux":"Unknown OS"}(),Pd=ee?document.referrer:null,Od=VT(),kd=ZT();var _d={initialized:!1,sessionId:Jn(),app:null,version:null,debug:!1,offline:!!ee&&!navigator.onLine,os:{name:Ed},userAgent:ee?navigator.userAgent:"node",library:{name:"analytics",version:"0.12.13"},timezone:kd,locale:Od,campaign:{},referrer:Pd};function yE(e,t){e===void 0&&(e=_d);var r=e.initialized,n=t.campaign;switch(t.type){case A.campaign:return C({},e,{campaign:n});case A.offline:return C({},e,{offline:!0});case A.online:return C({},e,{offline:!1});default:return r?e:C({},_d,e,{initialized:!0})}}var wE=["plugins","reducers","storage"];function bE(e,t,r){if(ee){var n=window[(r?"add":"remove")+"EventListener"];e.split(" ").forEach(function(a){n(a,t)})}}function SE(e){var t=bE.bind(null,"online offline",function(r){return Promise.resolve(!navigator.onLine).then(e)});return t(!0),function(r){return t(!1)}}function Rd(){return mt("analytics",[]),function(e){return function(t,r,n){var a=e(t,r,n),i=a.dispatch;return Object.assign(a,{dispatch:function(o){return Vt[Wt].analytics.push(o.action||o),i(o)}})}}}function Cd(e){return function(){return Yt(Yt.apply(null,arguments),Rd())}}function Wo(e){return e?td(e)?e:[e]:[]}function Ad(e,t,r){e===void 0&&(e={});var n,a,i=Jn();return t&&(Ar[i]=(n=t,a=function(o){for(var s,u=o||Array.prototype.slice.call(arguments),f=0;f<u.length;f++)if(ae(u[f])){s=u[f];break}return s}(r),function(o){a&&a(o),n(o)})),C({},e,{rid:i,ts:new Date().getTime()},t?{hasCallback:!0}:{})}function $E(e){e===void 0&&(e={});var t=e.reducers||{},r=e.initialUser||{},n=(e.plugins||[]).reduce(function(m,y){if(ae(y))return m.middlewares=m.middlewares.concat(y),m;if(y.NAMESPACE&&(y.name=y.NAMESPACE),!y.name)throw new Error("https://lytics.dev/errors/1");y.config||(y.config={});var O=y.EVENTS?Object.keys(y.EVENTS).map(function(D){return y.EVENTS[D]}):[];m.pluginEnabled[y.name]=!(y.enabled===!1||y.config.enabled===!1),delete y.enabled,y.methods&&(m.methods[y.name]=Object.keys(y.methods).reduce(function(D,J){var w;return D[J]=(w=y.methods[J],function(){for(var E=Array.prototype.slice.call(arguments),P=new Array(w.length),B=0;B<E.length;B++)P[B]=E[B];return P[P.length]=$,w.apply({instance:$},P)}),D},{}),delete y.methods);var N=Object.keys(y).concat(O),U=new Set(m.events.concat(N));if(m.events=Array.from(U),m.pluginsArray=m.pluginsArray.concat(y),m.plugins[y.name])throw new Error(y.name+"AlreadyLoaded");return m.plugins[y.name]=y,m.plugins[y.name].loaded||(m.plugins[y.name].loaded=function(){return!0}),m},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),a=e.storage?e.storage:{getItem:pt,setItem:mt,removeItem:Zt},i=function(m){return function(y,O,N){return O.getState("user")[y]||(N&&ie(N)&&N[y]?N[y]:ud(m)[y]||pt(Bo(y))||null)}}(a),o=n.plugins,s=n.events.filter(function(m){return!zo.includes(m)}).sort(),u=new Set(s.concat(qn).filter(function(m){return!zo.includes(m)})),f=Array.from(u).sort(),l=function(){return o},c=new cE,d=c.addMiddleware,v=c.removeMiddleware,p=c.dynamicMiddlewares,S=function(){throw new Error("Abort disabled inListener")},g=JT(),T=ud(a),I=C({},T,r,g.an_uid?{userId:g.an_uid}:{},g.an_aid?{anonymousId:g.an_aid}:{});I.anonymousId||(I.anonymousId=Jn());var b=C({enable:function(m,y){return new Promise(function(O){R.dispatch({type:A.enablePlugin,plugins:Wo(m),_:{originalAction:A.enablePlugin}},O,[y])})},disable:function(m,y){return new Promise(function(O){R.dispatch({type:A.disablePlugin,plugins:Wo(m),_:{originalAction:A.disablePlugin}},O,[y])})}},n.methods),h=!1,$={identify:function(m,y,O,N){try{var U=Ze(m)?m:null,D=ie(m)?m:y,J=O||{},w=$.user();mt(Bo(Xe),U);var E=U||D.userId||i(Xe,$,D);return Promise.resolve(new Promise(function(P){R.dispatch(C({type:A.identifyStart,userId:E,traits:D||{},options:J,anonymousId:w.anonymousId},w.id&&w.id!==U&&{previousId:w.id}),P,[y,O,N])}))}catch(P){return Promise.reject(P)}},track:function(m,y,O,N){try{var U=ie(m)?m.event:m;if(!U||!Ze(U))throw new Error("EventMissing");var D=ie(m)?m:y||{},J=ie(O)?O:{};return Promise.resolve(new Promise(function(w){R.dispatch({type:A.trackStart,event:U,properties:D,options:J,userId:i(Xe,$,y),anonymousId:i(qt,$,y)},w,[y,O,N])}))}catch(w){return Promise.reject(w)}},page:function(m,y,O){try{var N=ie(m)?m:{},U=ie(y)?y:{};return Promise.resolve(new Promise(function(D){R.dispatch({type:A.pageStart,properties:pE(N),options:U,userId:i(Xe,$,N),anonymousId:i(qt,$,N)},D,[m,y,O])}))}catch(D){return Promise.reject(D)}},user:function(m){if(m===Xe||m==="id")return i(Xe,$);if(m===qt||m==="anonId")return i(qt,$);var y=$.getState("user");return m?Jf(y,m):y},reset:function(m){return new Promise(function(y){R.dispatch({type:A.resetStart},y,m)})},ready:function(m){return h&&m({plugins:b,instance:$}),$.on(A.ready,function(y){m(y),h=!0})},on:function(m,y){if(!m||!ae(y))return!1;if(m===A.bootstrap)throw new Error(".on disabled for "+m);var O=/Start$|Start:/;if(m==="*"){var N=function(w){return function(E){return function(P){return P.type.match(O)&&y({payload:P,instance:$,plugins:o}),E(P)}}},U=function(w){return function(E){return function(P){return P.type.match(O)||y({payload:P,instance:$,plugins:o}),E(P)}}};return d(N,Qn),d(U,ea),function(){v(N,Qn),v(U,ea)}}var D=m.match(O)?Qn:ea,J=function(w){return function(E){return function(P){return P.type===m&&y({payload:P,instance:$,plugins:o,abort:S}),E(P)}}};return d(J,D),function(){return v(J,D)}},once:function(m,y){if(!m||!ae(y))return!1;if(m===A.bootstrap)throw new Error(".once disabled for "+m);var O=$.on(m,function(N){y({payload:N.payload,instance:$,plugins:o,abort:S}),O()});return O},getState:function(m){var y=R.getState();return m?Jf(y,m):Object.assign({},y)},dispatch:function(m){var y=Ze(m)?{type:m}:m;if(qn.includes(y.type))throw new Error("reserved action "+y.type);var O=C({},y,{_:C({originalAction:y.type},m._||{})});R.dispatch(O)},enablePlugin:b.enable,disablePlugin:b.disable,plugins:b,storage:{getItem:a.getItem,setItem:function(m,y,O){R.dispatch({type:A.setItemStart,key:m,value:y,options:O})},removeItem:function(m,y){R.dispatch({type:A.removeItemStart,key:m,options:y})}},setAnonymousId:function(m,y){$.storage.setItem(Ye,m,y)},events:{core:qn,plugins:s}},k=n.middlewares.concat([function(m){return function(y){return function(O){return O.meta||(O.meta=Ad()),y(O)}}},p(Qn),oE($,l,{all:f,plugins:s}),sE(a),tE($),nE($),p(ea)]),_={context:yE,user:rE(a),page:gE,track:fE,plugins:uE(l),queue:vE},j=Yt,M=Yt;if(ee&&e.debug){var F=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;F&&(j=F({trace:!0,traceLimit:25})),M=function(){return arguments.length===0?Rd():ie(typeof arguments[0])?Cd():Cd().apply(null,arguments)}}var Z,L=function(m){return Object.keys(m).reduce(function(y,O){return wE.includes(O)||(y[O]=m[O]),y},{})}(e),x=n.pluginsArray.reduce(function(m,y){var O=y.name,N=y.config,U=y.loaded,D=n.pluginEnabled[O];return m[O]={enabled:D,initialized:!!D&&!y.initialize,loaded:!!U({config:N}),config:N},m},{}),z={context:L,user:I,plugins:x},R=id(function(m){for(var y=Object.keys(m),O={},N=0;N<y.length;N++){var U=y[N];typeof m[U]===Je&&(O[U]=m[U])}var D,J=Object.keys(O);try{(function(w){Object.keys(w).forEach(function(E){var P=w[E];if(typeof P(void 0,{type:"@@redux/INIT"})===Fe||typeof P(void 0,{type:qT})===Fe)throw new Error("reducer "+E+" "+Fe)})})(O)}catch(w){D=w}return function(w,E){if(w===void 0&&(w={}),D)throw D;for(var P=!1,B={},oe=0;oe<J.length;oe++){var qe=J[oe],cv=w[qe],ns=(0,O[qe])(cv,E);if(typeof ns===Fe){var dP=QT(qe,E);throw new Error(dP)}B[qe]=ns,P=P||ns!==cv}return P?B:w}}(C({},_,t)),z,M(j(eE.apply(void 0,k))));R.dispatch=(Z=R.dispatch,function(m,y,O){var N=C({},m,{meta:Ad(m.meta,y,Wo(O))});return Z.apply(null,[N])});var V=Object.keys(o);R.dispatch({type:A.bootstrap,plugins:V,config:L,params:g,user:I,initialUser:r,persistedUser:T});var X=V.filter(function(m){return n.pluginEnabled[m]}),Be=V.filter(function(m){return!n.pluginEnabled[m]});return R.dispatch({type:A.registerPlugins,plugins:V,enabled:n.pluginEnabled}),n.pluginsArray.map(function(m,y){var O=m.bootstrap,N=m.config,U=m.name;O&&ae(O)&&O({instance:$,config:N,payload:m}),R.dispatch({type:A.registerPluginType(U),name:U,enabled:n.pluginEnabled[U],plugin:m}),n.pluginsArray.length===y+1&&R.dispatch({type:A.initializeStart,plugins:X,disabled:Be})}),SE(function(m){R.dispatch({type:m?A.offline:A.online})}),function(m,y,O){setInterval(function(){return dd(m,y,O)},3e3)}(R,l,$),$}var Qn="before",ea="after",Lr="cookie",yt=Nd(),jd=ta,IE=ta;function Ld(e){return yt?ta(e,"",-1):Zt(e)}function Nd(){if(yt!==void 0)return yt;var e="cookiecookie";try{ta(e,e),yt=document.cookie.indexOf(e)!==-1,Ld(e)}catch{yt=!1}return yt}function ta(e,t,r,n,a,i){if(typeof window<"u"){var o=arguments.length>1;return yt===!1&&(o?mt(e,t):pt(e)),o?document.cookie=e+"="+encodeURIComponent(t)+(r?"; expires="+new Date(+new Date+1e3*r).toUTCString()+(n?"; path="+n:"")+(a?"; domain="+a:"")+(i?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}}var Nr="localStorage",TE=Fo.bind(null,"localStorage");Jt("localStorage","getItem",pt),Jt("localStorage","setItem",mt),Jt("localStorage","removeItem",Zt);var Ur="sessionStorage",EE=Fo.bind(null,"sessionStorage");Jt("sessionStorage","getItem",pt),Jt("sessionStorage","setItem",mt),Jt("sessionStorage","removeItem",Zt);function er(e){var t=e;try{if((t=JSON.parse(e))==="true")return!0;if(t==="false")return!1;if(ie(t))return t;parseFloat(t)===t&&(t=parseFloat(t))}catch{}if(t!==null&&t!=="")return t}var PE=TE(),OE=EE(),kE=Nd();function Ud(e,t){if(e){var r=Vo(t),n=!Xo(r),a=Zo(r)?er(localStorage.getItem(e)):void 0;if(n&&!Gt(a))return a;var i=Jo(r)?er(jd(e)):void 0;if(n&&i)return i;var o=Yo(r)?er(sessionStorage.getItem(e)):void 0;if(n&&o)return o;var s=pt(e);return n?s:{localStorage:a,sessionStorage:o,cookie:i,global:s}}}function _E(e,t,r){if(e&&!Gt(t)){var n={},a=Vo(r),i=JSON.stringify(t),o=!Xo(a);return Zo(a)&&(n[Nr]=na(Nr,t,er(localStorage.getItem(e))),localStorage.setItem(e,i),o)?n[Nr]:Jo(a)&&(n[Lr]=na(Lr,t,er(jd(e))),IE(e,i),o)?n[Lr]:Yo(a)&&(n[Ur]=na(Ur,t,er(sessionStorage.getItem(e))),sessionStorage.setItem(e,i),o)?n[Ur]:(n[Cr]=na(Cr,t,pt(e)),mt(e,t),o?n[Cr]:n)}}function RE(e,t){if(e){var r=Vo(t),n=Ud(e,qf),a={};return!Gt(n.localStorage)&&Zo(r)&&(localStorage.removeItem(e),a[Nr]=n.localStorage),!Gt(n.cookie)&&Jo(r)&&(Ld(e),a[Lr]=n.cookie),!Gt(n.sessionStorage)&&Yo(r)&&(sessionStorage.removeItem(e),a[Ur]=n.sessionStorage),!Gt(n.global)&&ra(r,Cr)&&(Zt(e),a[Cr]=n.global),a}}function Vo(e){return e?Ze(e)?e:e.storage:Xf}function Zo(e){return PE&&ra(e,Nr)}function Jo(e){return kE&&ra(e,Lr)}function Yo(e){return OE&&ra(e,Ur)}function Xo(e){return e===qf||e==="all"}function ra(e,t){return e===Xf||e===t||Xo(e)}function na(e,t,r){return{location:e,current:t,previous:r}}var CE={setItem:_E,getItem:Ud,removeItem:RE};function AE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Dd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xd(Object(r),!0).forEach(function(n){AE(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jE(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={storage:CE};return $E(Dd(Dd({},t),e))}function LE(e,t){t=t||{};var r,n,a=[],i=t.max||1/0;function o(){clearInterval(r),e(a.splice(0,i)),s()}function s(){r=setInterval(o,t.interval||1e4)}return s(),{flush:o,push:function(u){return n=a.push(u),n>=i&&o(),n},size:function(){return a.length},end:function(u){u&&o(),clearInterval(r)}}}function NE(e){if(typeof window>"u")return;const{addEventListener:t,history:r,location:n}=window;let a=n.pathname;t("popstate",()=>e(n.pathname)),["push","replace"].map(i=>{const o=`${i}State`;if(o!=="pushState"&&o!=="replaceState")return;const s=r[o];r[o]=function(...u){var c;const f=((c=u[2])==null?void 0:c.toString())||"",l=xE(f);return a!==l&&(a=l,setTimeout(()=>e(f),0)),s.apply(r,u)}})}function UE(e,t){const r=e.indexOf(t);return r>-1?e.slice(0,r):e}function xE(e){return["#","?"].forEach(t=>e=UE(e,t)),e}function DE(){NE(()=>{ze.page()})}function ME(e){if(e===void 0&&(e={}),!ee)return Mo;var t=Fd(),r=qo(),n=Md(),a=aa(n,t),i=aa(r,t),o=[],s=[],u=[],f=n,l=a,c=i,d=Object.keys(e);if(!d.length)return Mo;var v=d.map(function(S){return Number(S)}),p=XT(function(){var S=Fd(),g=function(L,x){return x.map(function(z){return z===100?L-5:L*(z/100)})}(S,v),T=qo(),I=Md(),b=aa(I,S),h=aa(T,S);if(l=b>l?b:l,c=h<c?h:c,!(o.length>=v.length)){var $=f===I,k="up";$?k="initial":f<=I&&(k="down");var _=g,j=v;(k==="up"||$)&&(_=g.slice().reverse(),j=v.slice().reverse());var M=j.reduce(function(L,x,z){var R=_[z];return u.includes(x)&&I<=R&&(u=u.filter(function(V){return V!==x}),L.singleFunction=x),k==="down"&&!o.includes(x)&&I>=R&&x>i?(s.push(x),L.callbacks=L.callbacks.concat(x),L):k==="up"&&!o.includes(x)&&I<=R&&x<=b?(L.foundFunc=[x],L):($&&I>=R&&L.foundFunc.length===0&&(L.foundFunc=[x]),!s.includes(x)&&I>=R&&(s.push(x),L.singleFunction?u.push(x):L.singleFunction=x),L)},{foundFunc:[],singleFunction:null,callbacks:[],direction:k});if(f=I,k==="down"&&M.callbacks&&M.callbacks.forEach(function(L){ae(e[L])&&(e[L]({trigger:L,direction:k,scrollMin:c,scrollMax:l,range:[c,l]}),o.push(L))}),M.singleFunction){var F=M.singleFunction,Z=M.direction;ae(e[F])&&e[F]({trigger:F,direction:Z,scrollMin:c,scrollMax:l,range:[c,l]}),o.push(F)}}},500);return window.addEventListener("scroll",p),function(){return window.removeEventListener("scroll",p)}}function qo(){return ee?document.body.scrollTop||document.documentElement.scrollTop:0}function FE(){return ee?window.innerHeight||document.documentElement.clientHeight:0}function Md(){return Math.round(qo()+FE())}function Fd(){if(!ee)return 0;var e=document.body,t=document.documentElement;return Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight)}function aa(e,t){return Math.round(e/t*100)}var zd="EventListener";function zE(e){return function(t,r,n,a){var i=n||Mo,o=a||!1;if(!ee)return i;var s=ia(r),u=ia(t,!0);if(!u.length)throw new Error("noElements");if(!s.length)throw new Error("noEvent");var f=[];return function l(c){c&&(f=[]);for(var d=c?"add"+zd:"remove"+zd,v=0;v<u.length;v++){var p=u[v];f[v]=c?o&&o.once?BE(i):i:f[v]||i;for(var S=0;S<s.length;S++)p[d]?p["on"+s[S]]=c?f[v]:null:p[d](s[S],f[v],o)}return l.bind(null,!c)}(e)}}function ia(e,t){if(Ze(e))return t?ia(document.querySelectorAll(e)):(r=e).split(r.indexOf(",")>-1?",":" ").map(function(o){return o.trim()});var r;if(NodeList.prototype.isPrototypeOf(e)){for(var n=[],a=e.length>>>0;a--;)n[a]=e[a];return n}var i=WT(e);return t?i.map(function(o){return Ze(o)?ia(o,!0):o}).flat():i}function BE(e,t){var r;return function(){return e&&(r=e.apply(this,arguments),e=null),r}}var Qo=zE("Event");function Bd(e,t){return ee&&ae(window[e])?(r=window[e],n=t,(a=window)===void 0&&(a=null),ae(r)?function(){r.apply(a,arguments),n.apply(a,arguments)}:n):window[e]=t;var r,n,a}Bd.bind(null,"onerror"),Bd.bind(null,"onload");var Hd=typeof window>"u",Kd="hidden";function HE(e){if(Hd)return!1;var t=KE(),r="".concat(t.replace(/[H|h]idden/,""),"visibilitychange"),n=function(){return e(!!document[t])},a=function(){return document.addEventListener(r,n)};return a(),function(){return document.removeEventListener(r,n),a}}function KE(){var e=["webkit","moz","ms","o"];return Hd||Kd in document?Kd:e.reduce(function(t,r){var n=r+"Hidden";return!t&&n in document?n:t},null)}var GE=["mousemove","mousedown","touchmove","touchstart","touchend","keydown"];function WE(e,t){t===void 0&&(t={});var r=function(o,s){var u=this,f=!1;return function(l){f||(o.call(u,l),f=!0,setTimeout(function(){return f=!1},s))}}(e,t.throttle||1e4),n=[];function a(){var o=HE(function(s){s||r({type:"tabVisible"})});return n=[o].concat(GE.map(function(s){return Qo(document,s,r)})).concat(Qo(window,"load",r)).concat(Qo(window,"scroll",r,{capture:!0,passive:!0})),i}function i(){n.map(function(o){return o()})}return a(),function(){return i(),a}}function VE(e){var t,r,n=e.onIdle,a=e.onWakeUp,i=e.onHeartbeat,o=e.timeout,s=o===void 0?1e4:o,u=e.throttle,f=u===void 0?2e3:u,l=!1,c=!1,d=new Date,v=function(){return clearTimeout(t)};function p(g){v(),i&&!l&&i(xr(d),g),a&&l&&(l=!1,a(xr(r),g),d=new Date),t=setTimeout(function(){l=!0,n&&(r=new Date,n(xr(d),g))},s)}var S=WE(p,{throttle:f});return{disable:function(){c=!0,l=!1,v();var g=S();return function(){return c=!1,d=new Date,p({type:"load"}),g()}},getStatus:function(){return{isIdle:l,isDisabled:c,active:l?0:xr(d,c),idle:l?xr(r,c):0}}}}function xr(e,t){return t?0:Math.round((new Date-e)/1e3)}const Gd=5e3;class ZE{constructor(t){be(this,"element");be(this,"isInViewport",!1);be(this,"isAwake",!1);be(this,"isFlushing");be(this,"observer");be(this,"lastEventAt",Date.now());be(this,"registeredView",!1);be(this,"viewCallback");be(this,"activeDurationCallback");be(this,"idleDurationCallback");be(this,"scrollCallback");this.element=t.element,this.viewCallback=t.viewCallback,this.activeDurationCallback=t.activeDurationCallback,this.idleDurationCallback=t.idleDurationCallback,this.scrollCallback=t.scrollCallback,this.observer=new IntersectionObserver(r=>{r.forEach(n=>{this.handleInViewPort(n.isIntersecting)})},{threshold:0}),this.observer.observe(this.element),VE({onIdle:r=>this.handleAwake(!1,r),onWakeUp:r=>this.handleAwake(!0,r),timeout:Gd}),ME({25:this.handleScroll.bind(this),50:this.handleScroll.bind(this),75:this.handleScroll.bind(this),90:this.handleScroll.bind(this),100:this.handleScroll.bind(this)})}flush(){this.isFlushing=!0,this.handleAwake(!this.isAwake)}handleInViewPort(t){t?(this.isAwake=!0,this.trackInViewport()):this.handleAwake(!1),this.isInViewport=t}handleAwake(t,r=Math.round((Date.now()-this.lastEventAt)/1e3)){this.isAwake=t,this.lastEventAt=t?Date.now()-r*Gd:Date.now(),this.isInViewport&&this.trackAwake(t,r)}handleScroll(t){this.scrollCallback&&this.scrollCallback(t)}handleVisibilityChange(){this.isAwake=!1;const t=Math.round((Date.now()-this.lastEventAt)/1e3);t>1&&(this.lastEventAt=Date.now(),this.trackAwake(!1,t))}trackAwake(t,r){!t&&this.activeDurationCallback&&this.activeDurationCallback(r,this.isFlushing,this.lastEventAt),t&&this.idleDurationCallback&&this.idleDurationCallback(r,this.isFlushing,this.lastEventAt)}trackInViewport(){this.registeredView||(this.registeredView=!0,this.viewCallback&&this.viewCallback())}}const Wd="sesamy_session_id";function JE(){let e=sessionStorage.getItem(Wd);return e||(e=Math.random().toString(36).slice(2,9),sessionStorage.setItem(Wd,e)),e}let Vd=!1,es,Zd,oa;const Jd=new Map;function YE({clientId:e,enabled:t=!0,environment:r}){if(es=e,Zd=t,oa=`${Ve("logs",r)}/events`,!Zd)return;window.addEventListener("beforeunload",()=>{Xd.forEach((a,i)=>{a.bind(i)()}),qE()}),window.addEventListener("visibilitychange",()=>{document.visibilityState!=="visible"&&Jd.forEach((a,i)=>{a.bind(i)()})}),DE();const n=new ZE({element:document.body,viewCallback:()=>{ze.page()},activeDurationCallback:(a,i,o)=>{ze.track("activeDuration",{duration:a,durationStart:o,flushing:i})},idleDurationCallback:(a,i,o)=>{ze.track("idleDuration",{duration:a,durationStart:o,flushing:i})},scrollCallback:a=>{ze.track("scroll",{scroll:a.scrollMax})}});QE(document.body,()=>{n.flush()}),eP(document.body,()=>{n.handleVisibilityChange()}),window.addEventListener(Oe.AUTHENTICATED,async a=>{const i=a;await ze.identify(i.detail.sub)}),window.addEventListener(Oe.LOGOUT,async()=>{await ze.track("logout",{}),ts.flush(),await ze.reset()})}function Yd(e){return JSON.stringify(e.map(t=>({...t,clientId:es,requestId:Math.random().toString(36).slice(2,9),sessionId:JE(),timestamp:new Date().toISOString(),version:Do,event:t.event,context:{page:{url:window.location.hostname,path:window.location.pathname,title:document.title,search:window.location.search,referrer:document.referrer},locale:navigator.language,library:Zf,userAgent:navigator.userAgent,clientId:es}})))}const ts=LE(async e=>{if(e.length>0){const t=Yd(e);Vd?navigator.sendBeacon(oa,t):(await fetch(oa,{method:"POST",body:t,headers:{"Content-Type":"text/plain"}})).ok}},{max:10,interval:3e3});function rs(e){var t;if(e.anonymousId)if((t=e.properties)!=null&&t.flushing){const r={...e};delete r.properties.flushing,navigator.sendBeacon(oa,Yd([r]))}else ts.push(e)}const ze=jE({app:Zf,version:Do,plugins:[{name:"custom-analytics-plugin",page:({payload:e})=>{const{properties:t,anonymousId:r,userId:n,event:a}=e;rs({anonymousId:r,userId:n,properties:t,event:a,type:"page"})},track:({payload:e})=>{const{properties:t,anonymousId:r,userId:n,event:a}=e;rs({anonymousId:r,userId:n,properties:t,event:a,type:"track"})},identify:({payload:e})=>{const{properties:t,anonymousId:r,userId:n}=e;rs({anonymousId:r,userId:n,properties:t,type:"identify"})}}]});function XE(e,t){ze.track(e,t)}function qE(){return Vd=!0,ts.flush()}const Xd=new Map;function QE(e,t){Xd.set(e,t)}function eP(e,t){Jd.set(e,t)}const qd="sesamySignedURLs";function Qd(){const e=sessionStorage.getItem(qd);return e?JSON.parse(e):[]}function tP(e){const t=Qd();t.push(e),sessionStorage.setItem(qd,JSON.stringify(t))}function rP(e){const{createCheckout:t,getCheckout:r,updateCheckout:n,getEntitlement:a,getEntitlements:i,getEntitlementAccess:o,getSubscriptions:s,getContract:u,getContracts:f,getBill:l,getBills:c,getTransaction:d,getTransactions:v,getProfile:p,updateProfile:S,getTags:g,deleteTag:T,setTag:I,getUserMetadata:b,listUserMetadata:h,setUserMetadata:$,deleteUserMetadata:k,getTally:_,getTallies:j,pushTally:M,deleteTally:F,getProduct:Z,getPaymentIssues:L,isSpotifyLinked:x,unlinkSpotify:z,linkSpotify:R,autoOnboardProduct:V,openHostedAccountPage:X,generateLink:Be}=UT(e),m={auth:{getUser:p,isAuthenticated:Uo,loginWithRedirect:xo,logout:xf,setToken:Mf},checkouts:{get:r,create:t,update:n},profile:{get:p,update:S,openHostedAccountPage:X,isSpotifyLinked:x,unlinkSpotify:z},analytics:{track:XE},tags:{list:g,set:I,delete:T},entitlements:{get:a,list:i,access:o,signedLinks:Qd},contracts:{get:u,list:f},bills:{get:l,list:c},userMetadata:{get:b,list:h,set:$,delete:k},tallies:{get:_,list:j,push:M,delete:F},subscriptions:{list:s},transactions:{get:d,list:v},products:{get:Z,autoOnboard:V,linkSpotify:R},getVersion:nP,getPaymentIssues:L,generateLink:Be,clearCache:ke};return e.namespace&&(window[e.namespace]=m),m}function nP(){return Do}async function aP({enabled:e=!1,rules:t}){if(!e)return;const r=await Uo(),n=window.location.href;for(const a of t){const i=document.querySelectorAll(a.selector);if(!(a.path&&!new RegExp(a.path).test(n))){for(const o of i)if(!(a.authenticated!==void 0&&a.authenticated!==r))switch(a.transform){case"insert":if(a.contentType==="selector"&&a.content){const s=document.querySelector(a.content);s?o.innerHTML+=s.innerHTML:console.warn(`Source element for selector '${a.content}' not found`)}else if(a.contentType==="url"&&a.content){const s=await ev(a.content);s?o.innerHTML+=s:console.warn(`Failed to fetch content from URL '${a.content}'`)}else a.content&&(o.innerHTML+=a.content);break;case"replace":if(a.contentType==="selector"&&a.content){const s=document.querySelector(a.content);s?o.innerHTML=s.innerHTML:console.warn(`Source element for selector '${a.content}' not found`)}else if(a.contentType==="url"&&a.content){const s=await ev(a.content);s?o.innerHTML=s:console.warn(`Failed to fetch content from URL '${a.content}'`)}else a.content&&(o.innerHTML=a.content);break;case"remove":o.remove();break;default:console.warn(`Unknown transform type: ${a.transform}`)}}}}async function ev(e){try{const t=await fetch(e);return t.ok?await t.text():(console.error(`Failed to fetch content from ${e}: ${t.statusText}`),null)}catch(t){return console.error(`Error fetching content from ${e}:`,t),null}}function iP(){const e=new URLSearchParams(window.location.hash.substring(1)),t=e.get("access_token");if(t){Mf(t);const r=new URL(window.location.href);e.delete("access_token"),r.hash=e.toString(),window.history.replaceState(null,"",r)}}const tv="sesamy-refresh",rv="force-refetch-entitlements";function oP(){const e=new URLSearchParams(window.location.search),t=e.get(rv),r=e.get(tv);if(t!==null||r!==null){const n=new URL(window.location.href);e.delete(rv),e.delete(tv),n.search=e.toString(),ke(),window.history.replaceState(null,"",n)}}function sP(){const e=new URLSearchParams(window.location.search),t=e.get("token"),r=e.get("se");if(!r||!t)return;const n=parseInt(r,10);if(Number.isNaN(n)||n<Date.now())return;tP({url:window.location.href.split("?")[0],token:t,expiresAt:n,publisherContentId:e.get("sp")??void 0});const a=new URL(window.location.href);a.searchParams.delete("ss"),a.searchParams.delete("se"),a.searchParams.delete("sp"),a.searchParams.delete("so"),a.searchParams.delete("token"),window.history.replaceState(null,"",a)}const nv="sesamy-user";async function cP(){const t=new URLSearchParams(window.location.search).get(nv);if(!t)return;const r=await IT();(r==null?void 0:r.email)!==t&&(ke(),xo({authorizationParams:{email_hint:t,login_hint:t}}));const n=new URL(window.location.href);n.searchParams.delete(nv),window.history.replaceState(null,"",n)}const av="sesamy-purchase";function uP(){const e=new URLSearchParams(window.location.search),t=e.get(av);if(t!==null){const r=new URL(window.location.href);e.delete(av),r.search=e.toString(),We(Oe.PURCHASE,{itemSrc:t}),ke(),window.history.replaceState(null,"",r)}}const iv="sesamy-login";async function lP(){if(!new URLSearchParams(window.location.search).get(iv))return;await Uo()||xo();const n=new URL(window.location.href);n.searchParams.delete(iv),window.history.replaceState(null,"",n)}const fP=typeof window<"u";async function ov(e){YE({clientId:e.clientId,environment:e.environment,...e.analytics}),await $T({clientId:e.clientId,organization:e.organization,environment:e.environment,...e.auth}),e.transform&&await aP(e.transform),iP(),oP(),sP(),await lP(),await cP(),uP(),We(Oe.READY,{})}async function sv(e){const t=rP({clientId:e.clientId,environment:e.environment,...e.api});return fP&&(e.awaitAllServices?await ov(e):ov(e)),t}if(typeof document<"u"){const e=document.getElementById("sesamy-js");if(e!=null&&e.textContent)try{const t=JSON.parse(e.textContent);sv(t)}catch(t){console.error("Failed to parse config",t)}}return Ne.init=sv,Object.defineProperty(Ne,Symbol.toStringTag,{value:"Module"}),Ne}({});
|
|
6
|
+
`))}}(j.methodName,j.pluginName),Promise.resolve(j.method({payload:F,instance:n,abort:(Z=F,L=b,x=j.pluginName,function(z,R){return C({},Z,{abort:{reason:z,plugins:R||[L],caller:c,from:x||L}})}),config:pd(j.pluginName,f,i),plugins:f})).then(function(z){var R=ie(z)?z:{};return Promise.resolve(C({},F,R))})):F;var Z,L,x})}catch(F){return Promise.reject(F)}},Promise.resolve(r))).then(function(_){h[b]=_});h[b]=r}();return k&&k.then?k.then($):$()})}catch(h){return Promise.reject(h)}},Promise.resolve({}))).then(function(g){return Promise.resolve(t.exact.reduce(function(T,I,b){try{var h=t.exact.length===b+1,$=I.pluginName,k=i[$];return Promise.resolve(T).then(function(_){var j=g[$]?g[$]:{};if(d&&(j=_),Go(j,$))return Ko({data:j,method:c,instance:n,pluginName:$,store:s}),Promise.resolve(_);if(Go(_,$))return h&&Ko({data:_,method:c,instance:n,store:s}),Promise.resolve(_);if(S.hasOwnProperty($)&&S[$]===!0)return s.dispatch({type:"queue",plugin:$,payload:j,_:{called:"queue",from:"queueMechanism"}}),Promise.resolve(_);var M=p(g[$],i[$]);return Promise.resolve(k[c]({abort:M.abort,payload:j,instance:n,config:pd($,f,i),plugins:f})).then(function(F){var Z=ie(F)?F:{},L=C({},_,Z),x=g[$];if(Go(x,$))Ko({data:x,method:c,instance:n,pluginName:$,store:s});else{var z=c+":"+$;(z.match(/:/g)||[]).length<2&&!c.match(vd)&&!c.match(hd)&&n.dispatch(C({},d?L:j,{type:z,_:{called:z,from:"submethod"}}))}return Promise.resolve(L)})})}catch(_){return Promise.reject(_)}},Promise.resolve(r))).then(function(T){if(!(c.match(Qt)||c.match(/^registerPlugin/)||c.match(hd)||c.match(vd)||c.match(/^params/)||c.match(/^userIdChanged/))){if(u.plugins.includes(c),T._&&T._.originalAction===c)return T;var I=C({},T,{_:{originalAction:T.type,called:T.type,from:"engineEnd"}});yd(T,t.exact.length)&&!c.match(/End$/)&&(I=C({},I,{type:T.type+"Aborted"})),s.dispatch(I)}return T})})}catch(g){return Promise.reject(g)}},Qt=/Start$/,vd=/^bootstrap/,hd=/^ready/;function Ko(e){var t=e.pluginName,r=e.method+"Aborted"+(t?":"+t:"");e.store.dispatch(C({},e.data,{type:r,_:{called:r,from:"abort"}}))}function pd(e,t,r){var n=t[e]||r[e];return n&&n.config?n.config:{}}function md(e,t){return t.reduce(function(r,n){return n[e]?r.concat({methodName:e,pluginName:n.name,method:n[e]}):r},[])}function gd(e,t){var r=e.replace(Qt,""),n=t?":"+t:"";return[""+e+n,""+r+n,r+"End"+n]}function Go(e,t){var r=e.abort;return!!r&&(r===!0||wd(r,t)||r&&wd(r.plugins,t))}function yd(e,t){var r=e.abort;if(!r)return!1;if(r===!0||Ze(r))return!0;var n=r.plugins;return jr(r)&&r.length===t||jr(n)&&n.length===t}function jr(e){return Array.isArray(e)}function wd(e,t){return!(!e||!jr(e))&&e.includes(t)}function bd(e){var t=e.match(/(.*):(.*)/);return!!t&&{method:t[1],name:t[2]}}function iE(e){return Object.keys(e).reduce(function(t,r){return r==="type"||(t[r]=ie(e[r])?Object.assign({},e[r]):e[r]),t},{})}function oE(e,t,r){var n={};return function(a){return function(i){return function(o){try{var s,u=function(h){return s?h:i(c)},f=o.type,l=o.plugins,c=o;if(o.abort)return Promise.resolve(i(o));if(f===A.enablePlugin&&a.dispatch({type:A.initializeStart,plugins:l,disabled:[],fromEnable:!0,meta:o.meta}),f===A.disablePlugin&&setTimeout(function(){return ld(o.meta.rid,{payload:o})},0),f===A.initializeEnd){var d=t(),v=Object.keys(d),p=v.filter(function(h){return l.includes(h)}).map(function(h){return d[h]}),S=[],g=[],T=o.disabled,I=p.map(function(h){var $=h.loaded,k=h.name,_=h.config;return fd(h,function(){return $({config:_})},1e4).then(function(j){return n[k]||(a.dispatch({type:A.pluginReadyType(k),name:k,events:Object.keys(h).filter(function(M){return!zo.includes(M)})}),n[k]=!0),S=S.concat(k),h}).catch(function(j){if(j instanceof Error)throw new Error(j);return g=g.concat(j.name),j})});Promise.all(I).then(function(h){var $={plugins:S,failed:g,disabled:T};setTimeout(function(){v.length===I.length+T.length&&a.dispatch(C({},{type:A.ready},$))},0)})}var b=function(){if(f!==A.bootstrap)return/^ready:([^:]*)$/.test(f)&&setTimeout(function(){return dd(a,t,e)},0),Promise.resolve(function(h,$,k,_,j){try{var M=ae($)?$():$,F=h.type,Z=F.replace(Qt,"");if(h._&&h._.called)return Promise.resolve(h);var L=k.getState(),x=(V=M,(X=L.plugins)===void 0&&(X={}),(Be=h.options)===void 0&&(Be={}),Object.keys(V).filter(function(m){var y=Be.plugins||{};return FT(y[m])?y[m]:y.all!==!1&&(!X[m]||X[m].enabled!==!1)}).map(function(m){return V[m]}));F===A.initializeStart&&h.fromEnable&&(x=Object.keys(L.plugins).filter(function(m){var y=L.plugins[m];return h.plugins.includes(m)&&!y.initialized}).map(function(m){return M[m]}));var z=x.map(function(m){return m.name}),R=function(m,y,O){var N=gd(m).map(function(U){return md(U,y)});return y.reduce(function(U,D){var J=D.name,w=gd(m,J).map(function(oe){return md(oe,y)}),E=w[0],P=w[1],B=w[2];return E.length&&(U.beforeNS[J]=E),P.length&&(U.duringNS[J]=P),B.length&&(U.afterNS[J]=B),U},{before:N[0],beforeNS:{},during:N[1],duringNS:{},after:N[2],afterNS:{}})}(F,x);return Promise.resolve(Ho({action:h,data:{exact:R.before,namespaced:R.beforeNS},state:L,allPlugins:M,allMatches:R,instance:k,store:_,EVENTS:j})).then(function(m){function y(){var U=function(){if(F.match(Qt))return Promise.resolve(Ho({action:C({},O,{type:Z+"End"}),data:{exact:R.after,namespaced:R.afterNS},state:L,allPlugins:M,allMatches:R,instance:k,store:_,EVENTS:j})).then(function(D){D.meta&&D.meta.hasCallback&&ld(D.meta.rid,{payload:D})})}();return U&&U.then?U.then(function(){return m}):m}if(yd(m,z.length))return m;var O,N=function(){if(F!==Z)return Promise.resolve(Ho({action:C({},m,{type:Z}),data:{exact:R.during,namespaced:R.duringNS},state:L,allPlugins:M,allMatches:R,instance:k,store:_,EVENTS:j})).then(function(U){O=U});O=m}();return N&&N.then?N.then(y):y()})}catch(m){return Promise.reject(m)}var V,X,Be}(o,t,e,a,r)).then(function(h){return s=1,i(h)})}();return Promise.resolve(b&&b.then?b.then(u):u(b))}catch(h){return Promise.reject(h)}}}}}function sE(e){return function(t){return function(r){return function(n){var a=n.type,i=n.key,o=n.value,s=n.options;if(a===A.setItem||a===A.removeItem){if(n.abort)return r(n);a===A.setItem?e.setItem(i,o,s):e.removeItem(i,s)}return r(n)}}}}var cE=function(){var e=this;this.before=[],this.after=[],this.addMiddleware=function(t,r){e[r]=e[r].concat(t)},this.removeMiddleware=function(t,r){var n=e[r].findIndex(function(a){return a===t});n!==-1&&(e[r]=[].concat(e[r].slice(0,n),e[r].slice(n+1)))},this.dynamicMiddlewares=function(t){return function(r){return function(n){return function(a){var i={getState:r.getState,dispatch:function(s){return r.dispatch(s)}},o=e[t].map(function(s){return s(i)});return Yt.apply(void 0,o)(n)(a)}}}}};function uE(e){return function(t,r){t===void 0&&(t={});var n={};if(r.type==="initialize:aborted")return t;if(/^registerPlugin:([^:]*)$/.test(r.type)){var a=Sd(r.type,"registerPlugin"),i=e()[a];if(!i||!a)return t;var o=r.enabled,s=i.config;return n[a]={enabled:o,initialized:!!o&&!i.initialize,loaded:!!o&&!!i.loaded({config:s}),config:s},C({},t,n)}if(/^initialize:([^:]*)$/.test(r.type)){var u=Sd(r.type,A.initialize),f=e()[u];return f&&u?(n[u]=C({},t[u],{initialized:!0,loaded:!!f.loaded({config:f.config})}),C({},t,n)):t}if(/^ready:([^:]*)$/.test(r.type))return n[r.name]=C({},t[r.name],{loaded:!0}),C({},t,n);switch(r.type){case A.disablePlugin:return C({},t,$d(r.plugins,!1,t));case A.enablePlugin:return C({},t,$d(r.plugins,!0,t));default:return t}}}function Sd(e,t){return e.substring(t.length+1,e.length)}function $d(e,t,r){return e.reduce(function(n,a){return n[a]=C({},r[a],{enabled:t}),n},r)}function Id(e){try{return JSON.parse(JSON.stringify(e))}catch{}return e}var lE={last:{},history:[]};function fE(e,t){e===void 0&&(e=lE);var r=t.options,n=t.meta;if(t.type===A.track){var a=Id(C({event:t.event,properties:t.properties},Object.keys(r).length&&{options:r},{meta:n}));return C({},e,{last:a,history:e.history.concat(a)})}return e}var dE={actions:[]};function vE(e,t){e===void 0&&(e=dE);var r=t.payload;switch(t.type){case"queue":var n;return n=r&&r.type&&r.type===A.identify?[t].concat(e.actions):e.actions.concat(t),C({},e,{actions:n});case"dequeue":return[];default:return e}}var Td=/#.*$/;function hE(e){var t=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(e);return"/"+(t&&t[3]?t[3].split("?")[0].replace(Td,""):"")}var Ed,Pd,Od,kd,pE=function(e){if(e===void 0&&(e={}),!ee)return e;var t=document,r=t.title,n=t.referrer,a=window,i=a.location,o=a.innerWidth,s=a.innerHeight,u=i.hash,f=i.search,l=function(d){var v=function(){if(ee){for(var p,S=document.getElementsByTagName("link"),g=0;p=S[g];g++)if(p.getAttribute("rel")==="canonical")return p.getAttribute("href")}}();return v?v.match(/\?/)?v:v+d:window.location.href.replace(Td,"")}(f),c={title:r,url:l,path:hE(l),hash:u,search:f,width:o,height:s};return n&&n!==""&&(c.referrer=n),C({},c,e)},mE={last:{},history:[]};function gE(e,t){e===void 0&&(e=mE);var r=t.options;if(t.type===A.page){var n=Id(C({properties:t.properties,meta:t.meta},Object.keys(r).length&&{options:r}));return C({},e,{last:n,history:e.history.concat(n)})}return e}Ed=function(){if(!ee)return!1;var e=navigator.appVersion;return~e.indexOf("Win")?"Windows":~e.indexOf("Mac")?"MacOS":~e.indexOf("X11")?"UNIX":~e.indexOf("Linux")?"Linux":"Unknown OS"}(),Pd=ee?document.referrer:null,Od=VT(),kd=ZT();var _d={initialized:!1,sessionId:Jn(),app:null,version:null,debug:!1,offline:!!ee&&!navigator.onLine,os:{name:Ed},userAgent:ee?navigator.userAgent:"node",library:{name:"analytics",version:"0.12.13"},timezone:kd,locale:Od,campaign:{},referrer:Pd};function yE(e,t){e===void 0&&(e=_d);var r=e.initialized,n=t.campaign;switch(t.type){case A.campaign:return C({},e,{campaign:n});case A.offline:return C({},e,{offline:!0});case A.online:return C({},e,{offline:!1});default:return r?e:C({},_d,e,{initialized:!0})}}var wE=["plugins","reducers","storage"];function bE(e,t,r){if(ee){var n=window[(r?"add":"remove")+"EventListener"];e.split(" ").forEach(function(a){n(a,t)})}}function SE(e){var t=bE.bind(null,"online offline",function(r){return Promise.resolve(!navigator.onLine).then(e)});return t(!0),function(r){return t(!1)}}function Rd(){return mt("analytics",[]),function(e){return function(t,r,n){var a=e(t,r,n),i=a.dispatch;return Object.assign(a,{dispatch:function(o){return Vt[Wt].analytics.push(o.action||o),i(o)}})}}}function Cd(e){return function(){return Yt(Yt.apply(null,arguments),Rd())}}function Wo(e){return e?td(e)?e:[e]:[]}function Ad(e,t,r){e===void 0&&(e={});var n,a,i=Jn();return t&&(Ar[i]=(n=t,a=function(o){for(var s,u=o||Array.prototype.slice.call(arguments),f=0;f<u.length;f++)if(ae(u[f])){s=u[f];break}return s}(r),function(o){a&&a(o),n(o)})),C({},e,{rid:i,ts:new Date().getTime()},t?{hasCallback:!0}:{})}function $E(e){e===void 0&&(e={});var t=e.reducers||{},r=e.initialUser||{},n=(e.plugins||[]).reduce(function(m,y){if(ae(y))return m.middlewares=m.middlewares.concat(y),m;if(y.NAMESPACE&&(y.name=y.NAMESPACE),!y.name)throw new Error("https://lytics.dev/errors/1");y.config||(y.config={});var O=y.EVENTS?Object.keys(y.EVENTS).map(function(D){return y.EVENTS[D]}):[];m.pluginEnabled[y.name]=!(y.enabled===!1||y.config.enabled===!1),delete y.enabled,y.methods&&(m.methods[y.name]=Object.keys(y.methods).reduce(function(D,J){var w;return D[J]=(w=y.methods[J],function(){for(var E=Array.prototype.slice.call(arguments),P=new Array(w.length),B=0;B<E.length;B++)P[B]=E[B];return P[P.length]=$,w.apply({instance:$},P)}),D},{}),delete y.methods);var N=Object.keys(y).concat(O),U=new Set(m.events.concat(N));if(m.events=Array.from(U),m.pluginsArray=m.pluginsArray.concat(y),m.plugins[y.name])throw new Error(y.name+"AlreadyLoaded");return m.plugins[y.name]=y,m.plugins[y.name].loaded||(m.plugins[y.name].loaded=function(){return!0}),m},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),a=e.storage?e.storage:{getItem:pt,setItem:mt,removeItem:Zt},i=function(m){return function(y,O,N){return O.getState("user")[y]||(N&&ie(N)&&N[y]?N[y]:ud(m)[y]||pt(Bo(y))||null)}}(a),o=n.plugins,s=n.events.filter(function(m){return!zo.includes(m)}).sort(),u=new Set(s.concat(qn).filter(function(m){return!zo.includes(m)})),f=Array.from(u).sort(),l=function(){return o},c=new cE,d=c.addMiddleware,v=c.removeMiddleware,p=c.dynamicMiddlewares,S=function(){throw new Error("Abort disabled inListener")},g=JT(),T=ud(a),I=C({},T,r,g.an_uid?{userId:g.an_uid}:{},g.an_aid?{anonymousId:g.an_aid}:{});I.anonymousId||(I.anonymousId=Jn());var b=C({enable:function(m,y){return new Promise(function(O){R.dispatch({type:A.enablePlugin,plugins:Wo(m),_:{originalAction:A.enablePlugin}},O,[y])})},disable:function(m,y){return new Promise(function(O){R.dispatch({type:A.disablePlugin,plugins:Wo(m),_:{originalAction:A.disablePlugin}},O,[y])})}},n.methods),h=!1,$={identify:function(m,y,O,N){try{var U=Ze(m)?m:null,D=ie(m)?m:y,J=O||{},w=$.user();mt(Bo(Xe),U);var E=U||D.userId||i(Xe,$,D);return Promise.resolve(new Promise(function(P){R.dispatch(C({type:A.identifyStart,userId:E,traits:D||{},options:J,anonymousId:w.anonymousId},w.id&&w.id!==U&&{previousId:w.id}),P,[y,O,N])}))}catch(P){return Promise.reject(P)}},track:function(m,y,O,N){try{var U=ie(m)?m.event:m;if(!U||!Ze(U))throw new Error("EventMissing");var D=ie(m)?m:y||{},J=ie(O)?O:{};return Promise.resolve(new Promise(function(w){R.dispatch({type:A.trackStart,event:U,properties:D,options:J,userId:i(Xe,$,y),anonymousId:i(qt,$,y)},w,[y,O,N])}))}catch(w){return Promise.reject(w)}},page:function(m,y,O){try{var N=ie(m)?m:{},U=ie(y)?y:{};return Promise.resolve(new Promise(function(D){R.dispatch({type:A.pageStart,properties:pE(N),options:U,userId:i(Xe,$,N),anonymousId:i(qt,$,N)},D,[m,y,O])}))}catch(D){return Promise.reject(D)}},user:function(m){if(m===Xe||m==="id")return i(Xe,$);if(m===qt||m==="anonId")return i(qt,$);var y=$.getState("user");return m?Jf(y,m):y},reset:function(m){return new Promise(function(y){R.dispatch({type:A.resetStart},y,m)})},ready:function(m){return h&&m({plugins:b,instance:$}),$.on(A.ready,function(y){m(y),h=!0})},on:function(m,y){if(!m||!ae(y))return!1;if(m===A.bootstrap)throw new Error(".on disabled for "+m);var O=/Start$|Start:/;if(m==="*"){var N=function(w){return function(E){return function(P){return P.type.match(O)&&y({payload:P,instance:$,plugins:o}),E(P)}}},U=function(w){return function(E){return function(P){return P.type.match(O)||y({payload:P,instance:$,plugins:o}),E(P)}}};return d(N,Qn),d(U,ea),function(){v(N,Qn),v(U,ea)}}var D=m.match(O)?Qn:ea,J=function(w){return function(E){return function(P){return P.type===m&&y({payload:P,instance:$,plugins:o,abort:S}),E(P)}}};return d(J,D),function(){return v(J,D)}},once:function(m,y){if(!m||!ae(y))return!1;if(m===A.bootstrap)throw new Error(".once disabled for "+m);var O=$.on(m,function(N){y({payload:N.payload,instance:$,plugins:o,abort:S}),O()});return O},getState:function(m){var y=R.getState();return m?Jf(y,m):Object.assign({},y)},dispatch:function(m){var y=Ze(m)?{type:m}:m;if(qn.includes(y.type))throw new Error("reserved action "+y.type);var O=C({},y,{_:C({originalAction:y.type},m._||{})});R.dispatch(O)},enablePlugin:b.enable,disablePlugin:b.disable,plugins:b,storage:{getItem:a.getItem,setItem:function(m,y,O){R.dispatch({type:A.setItemStart,key:m,value:y,options:O})},removeItem:function(m,y){R.dispatch({type:A.removeItemStart,key:m,options:y})}},setAnonymousId:function(m,y){$.storage.setItem(Ye,m,y)},events:{core:qn,plugins:s}},k=n.middlewares.concat([function(m){return function(y){return function(O){return O.meta||(O.meta=Ad()),y(O)}}},p(Qn),oE($,l,{all:f,plugins:s}),sE(a),tE($),nE($),p(ea)]),_={context:yE,user:rE(a),page:gE,track:fE,plugins:uE(l),queue:vE},j=Yt,M=Yt;if(ee&&e.debug){var F=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;F&&(j=F({trace:!0,traceLimit:25})),M=function(){return arguments.length===0?Rd():ie(typeof arguments[0])?Cd():Cd().apply(null,arguments)}}var Z,L=function(m){return Object.keys(m).reduce(function(y,O){return wE.includes(O)||(y[O]=m[O]),y},{})}(e),x=n.pluginsArray.reduce(function(m,y){var O=y.name,N=y.config,U=y.loaded,D=n.pluginEnabled[O];return m[O]={enabled:D,initialized:!!D&&!y.initialize,loaded:!!U({config:N}),config:N},m},{}),z={context:L,user:I,plugins:x},R=id(function(m){for(var y=Object.keys(m),O={},N=0;N<y.length;N++){var U=y[N];typeof m[U]===Je&&(O[U]=m[U])}var D,J=Object.keys(O);try{(function(w){Object.keys(w).forEach(function(E){var P=w[E];if(typeof P(void 0,{type:"@@redux/INIT"})===Fe||typeof P(void 0,{type:qT})===Fe)throw new Error("reducer "+E+" "+Fe)})})(O)}catch(w){D=w}return function(w,E){if(w===void 0&&(w={}),D)throw D;for(var P=!1,B={},oe=0;oe<J.length;oe++){var qe=J[oe],cv=w[qe],ns=(0,O[qe])(cv,E);if(typeof ns===Fe){var hP=QT(qe,E);throw new Error(hP)}B[qe]=ns,P=P||ns!==cv}return P?B:w}}(C({},_,t)),z,M(j(eE.apply(void 0,k))));R.dispatch=(Z=R.dispatch,function(m,y,O){var N=C({},m,{meta:Ad(m.meta,y,Wo(O))});return Z.apply(null,[N])});var V=Object.keys(o);R.dispatch({type:A.bootstrap,plugins:V,config:L,params:g,user:I,initialUser:r,persistedUser:T});var X=V.filter(function(m){return n.pluginEnabled[m]}),Be=V.filter(function(m){return!n.pluginEnabled[m]});return R.dispatch({type:A.registerPlugins,plugins:V,enabled:n.pluginEnabled}),n.pluginsArray.map(function(m,y){var O=m.bootstrap,N=m.config,U=m.name;O&&ae(O)&&O({instance:$,config:N,payload:m}),R.dispatch({type:A.registerPluginType(U),name:U,enabled:n.pluginEnabled[U],plugin:m}),n.pluginsArray.length===y+1&&R.dispatch({type:A.initializeStart,plugins:X,disabled:Be})}),SE(function(m){R.dispatch({type:m?A.offline:A.online})}),function(m,y,O){setInterval(function(){return dd(m,y,O)},3e3)}(R,l,$),$}var Qn="before",ea="after",Lr="cookie",yt=Nd(),jd=ta,IE=ta;function Ld(e){return yt?ta(e,"",-1):Zt(e)}function Nd(){if(yt!==void 0)return yt;var e="cookiecookie";try{ta(e,e),yt=document.cookie.indexOf(e)!==-1,Ld(e)}catch{yt=!1}return yt}function ta(e,t,r,n,a,i){if(typeof window<"u"){var o=arguments.length>1;return yt===!1&&(o?mt(e,t):pt(e)),o?document.cookie=e+"="+encodeURIComponent(t)+(r?"; expires="+new Date(+new Date+1e3*r).toUTCString()+(n?"; path="+n:"")+(a?"; domain="+a:"")+(i?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}}var Nr="localStorage",TE=Fo.bind(null,"localStorage");Jt("localStorage","getItem",pt),Jt("localStorage","setItem",mt),Jt("localStorage","removeItem",Zt);var Ur="sessionStorage",EE=Fo.bind(null,"sessionStorage");Jt("sessionStorage","getItem",pt),Jt("sessionStorage","setItem",mt),Jt("sessionStorage","removeItem",Zt);function er(e){var t=e;try{if((t=JSON.parse(e))==="true")return!0;if(t==="false")return!1;if(ie(t))return t;parseFloat(t)===t&&(t=parseFloat(t))}catch{}if(t!==null&&t!=="")return t}var PE=TE(),OE=EE(),kE=Nd();function Ud(e,t){if(e){var r=Vo(t),n=!Xo(r),a=Zo(r)?er(localStorage.getItem(e)):void 0;if(n&&!Gt(a))return a;var i=Jo(r)?er(jd(e)):void 0;if(n&&i)return i;var o=Yo(r)?er(sessionStorage.getItem(e)):void 0;if(n&&o)return o;var s=pt(e);return n?s:{localStorage:a,sessionStorage:o,cookie:i,global:s}}}function _E(e,t,r){if(e&&!Gt(t)){var n={},a=Vo(r),i=JSON.stringify(t),o=!Xo(a);return Zo(a)&&(n[Nr]=na(Nr,t,er(localStorage.getItem(e))),localStorage.setItem(e,i),o)?n[Nr]:Jo(a)&&(n[Lr]=na(Lr,t,er(jd(e))),IE(e,i),o)?n[Lr]:Yo(a)&&(n[Ur]=na(Ur,t,er(sessionStorage.getItem(e))),sessionStorage.setItem(e,i),o)?n[Ur]:(n[Cr]=na(Cr,t,pt(e)),mt(e,t),o?n[Cr]:n)}}function RE(e,t){if(e){var r=Vo(t),n=Ud(e,qf),a={};return!Gt(n.localStorage)&&Zo(r)&&(localStorage.removeItem(e),a[Nr]=n.localStorage),!Gt(n.cookie)&&Jo(r)&&(Ld(e),a[Lr]=n.cookie),!Gt(n.sessionStorage)&&Yo(r)&&(sessionStorage.removeItem(e),a[Ur]=n.sessionStorage),!Gt(n.global)&&ra(r,Cr)&&(Zt(e),a[Cr]=n.global),a}}function Vo(e){return e?Ze(e)?e:e.storage:Xf}function Zo(e){return PE&&ra(e,Nr)}function Jo(e){return kE&&ra(e,Lr)}function Yo(e){return OE&&ra(e,Ur)}function Xo(e){return e===qf||e==="all"}function ra(e,t){return e===Xf||e===t||Xo(e)}function na(e,t,r){return{location:e,current:t,previous:r}}var CE={setItem:_E,getItem:Ud,removeItem:RE};function AE(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Dd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xd(Object(r),!0).forEach(function(n){AE(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jE(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={storage:CE};return $E(Dd(Dd({},t),e))}function LE(e,t){t=t||{};var r,n,a=[],i=t.max||1/0;function o(){clearInterval(r),e(a.splice(0,i)),s()}function s(){r=setInterval(o,t.interval||1e4)}return s(),{flush:o,push:function(u){return n=a.push(u),n>=i&&o(),n},size:function(){return a.length},end:function(u){u&&o(),clearInterval(r)}}}function NE(e){if(typeof window>"u")return;const{addEventListener:t,history:r,location:n}=window;let a=n.pathname;t("popstate",()=>e(n.pathname)),["push","replace"].map(i=>{const o=`${i}State`;if(o!=="pushState"&&o!=="replaceState")return;const s=r[o];r[o]=function(...u){var c;const f=((c=u[2])==null?void 0:c.toString())||"",l=xE(f);return a!==l&&(a=l,setTimeout(()=>e(f),0)),s.apply(r,u)}})}function UE(e,t){const r=e.indexOf(t);return r>-1?e.slice(0,r):e}function xE(e){return["#","?"].forEach(t=>e=UE(e,t)),e}function DE(){NE(()=>{ze.page()})}function ME(e){if(e===void 0&&(e={}),!ee)return Mo;var t=Fd(),r=qo(),n=Md(),a=aa(n,t),i=aa(r,t),o=[],s=[],u=[],f=n,l=a,c=i,d=Object.keys(e);if(!d.length)return Mo;var v=d.map(function(S){return Number(S)}),p=XT(function(){var S=Fd(),g=function(L,x){return x.map(function(z){return z===100?L-5:L*(z/100)})}(S,v),T=qo(),I=Md(),b=aa(I,S),h=aa(T,S);if(l=b>l?b:l,c=h<c?h:c,!(o.length>=v.length)){var $=f===I,k="up";$?k="initial":f<=I&&(k="down");var _=g,j=v;(k==="up"||$)&&(_=g.slice().reverse(),j=v.slice().reverse());var M=j.reduce(function(L,x,z){var R=_[z];return u.includes(x)&&I<=R&&(u=u.filter(function(V){return V!==x}),L.singleFunction=x),k==="down"&&!o.includes(x)&&I>=R&&x>i?(s.push(x),L.callbacks=L.callbacks.concat(x),L):k==="up"&&!o.includes(x)&&I<=R&&x<=b?(L.foundFunc=[x],L):($&&I>=R&&L.foundFunc.length===0&&(L.foundFunc=[x]),!s.includes(x)&&I>=R&&(s.push(x),L.singleFunction?u.push(x):L.singleFunction=x),L)},{foundFunc:[],singleFunction:null,callbacks:[],direction:k});if(f=I,k==="down"&&M.callbacks&&M.callbacks.forEach(function(L){ae(e[L])&&(e[L]({trigger:L,direction:k,scrollMin:c,scrollMax:l,range:[c,l]}),o.push(L))}),M.singleFunction){var F=M.singleFunction,Z=M.direction;ae(e[F])&&e[F]({trigger:F,direction:Z,scrollMin:c,scrollMax:l,range:[c,l]}),o.push(F)}}},500);return window.addEventListener("scroll",p),function(){return window.removeEventListener("scroll",p)}}function qo(){return ee?document.body.scrollTop||document.documentElement.scrollTop:0}function FE(){return ee?window.innerHeight||document.documentElement.clientHeight:0}function Md(){return Math.round(qo()+FE())}function Fd(){if(!ee)return 0;var e=document.body,t=document.documentElement;return Math.max(e.scrollHeight,e.offsetHeight,t.clientHeight,t.scrollHeight,t.offsetHeight)}function aa(e,t){return Math.round(e/t*100)}var zd="EventListener";function zE(e){return function(t,r,n,a){var i=n||Mo,o=a||!1;if(!ee)return i;var s=ia(r),u=ia(t,!0);if(!u.length)throw new Error("noElements");if(!s.length)throw new Error("noEvent");var f=[];return function l(c){c&&(f=[]);for(var d=c?"add"+zd:"remove"+zd,v=0;v<u.length;v++){var p=u[v];f[v]=c?o&&o.once?BE(i):i:f[v]||i;for(var S=0;S<s.length;S++)p[d]?p["on"+s[S]]=c?f[v]:null:p[d](s[S],f[v],o)}return l.bind(null,!c)}(e)}}function ia(e,t){if(Ze(e))return t?ia(document.querySelectorAll(e)):(r=e).split(r.indexOf(",")>-1?",":" ").map(function(o){return o.trim()});var r;if(NodeList.prototype.isPrototypeOf(e)){for(var n=[],a=e.length>>>0;a--;)n[a]=e[a];return n}var i=WT(e);return t?i.map(function(o){return Ze(o)?ia(o,!0):o}).flat():i}function BE(e,t){var r;return function(){return e&&(r=e.apply(this,arguments),e=null),r}}var Qo=zE("Event");function Bd(e,t){return ee&&ae(window[e])?(r=window[e],n=t,(a=window)===void 0&&(a=null),ae(r)?function(){r.apply(a,arguments),n.apply(a,arguments)}:n):window[e]=t;var r,n,a}Bd.bind(null,"onerror"),Bd.bind(null,"onload");var Hd=typeof window>"u",Kd="hidden";function HE(e){if(Hd)return!1;var t=KE(),r="".concat(t.replace(/[H|h]idden/,""),"visibilitychange"),n=function(){return e(!!document[t])},a=function(){return document.addEventListener(r,n)};return a(),function(){return document.removeEventListener(r,n),a}}function KE(){var e=["webkit","moz","ms","o"];return Hd||Kd in document?Kd:e.reduce(function(t,r){var n=r+"Hidden";return!t&&n in document?n:t},null)}var GE=["mousemove","mousedown","touchmove","touchstart","touchend","keydown"];function WE(e,t){t===void 0&&(t={});var r=function(o,s){var u=this,f=!1;return function(l){f||(o.call(u,l),f=!0,setTimeout(function(){return f=!1},s))}}(e,t.throttle||1e4),n=[];function a(){var o=HE(function(s){s||r({type:"tabVisible"})});return n=[o].concat(GE.map(function(s){return Qo(document,s,r)})).concat(Qo(window,"load",r)).concat(Qo(window,"scroll",r,{capture:!0,passive:!0})),i}function i(){n.map(function(o){return o()})}return a(),function(){return i(),a}}function VE(e){var t,r,n=e.onIdle,a=e.onWakeUp,i=e.onHeartbeat,o=e.timeout,s=o===void 0?1e4:o,u=e.throttle,f=u===void 0?2e3:u,l=!1,c=!1,d=new Date,v=function(){return clearTimeout(t)};function p(g){v(),i&&!l&&i(xr(d),g),a&&l&&(l=!1,a(xr(r),g),d=new Date),t=setTimeout(function(){l=!0,n&&(r=new Date,n(xr(d),g))},s)}var S=WE(p,{throttle:f});return{disable:function(){c=!0,l=!1,v();var g=S();return function(){return c=!1,d=new Date,p({type:"load"}),g()}},getStatus:function(){return{isIdle:l,isDisabled:c,active:l?0:xr(d,c),idle:l?xr(r,c):0}}}}function xr(e,t){return t?0:Math.round((new Date-e)/1e3)}const Gd=5e3;class ZE{constructor(t){be(this,"element");be(this,"isInViewport",!1);be(this,"isAwake",!1);be(this,"isFlushing");be(this,"observer");be(this,"lastEventAt",Date.now());be(this,"registeredView",!1);be(this,"viewCallback");be(this,"activeDurationCallback");be(this,"idleDurationCallback");be(this,"scrollCallback");this.element=t.element,this.viewCallback=t.viewCallback,this.activeDurationCallback=t.activeDurationCallback,this.idleDurationCallback=t.idleDurationCallback,this.scrollCallback=t.scrollCallback,this.observer=new IntersectionObserver(r=>{r.forEach(n=>{this.handleInViewPort(n.isIntersecting)})},{threshold:0}),this.observer.observe(this.element),VE({onIdle:r=>this.handleAwake(!1,r),onWakeUp:r=>this.handleAwake(!0,r),timeout:Gd}),ME({25:this.handleScroll.bind(this),50:this.handleScroll.bind(this),75:this.handleScroll.bind(this),90:this.handleScroll.bind(this),100:this.handleScroll.bind(this)})}flush(){this.isFlushing=!0,this.handleAwake(!this.isAwake)}handleInViewPort(t){t?(this.isAwake=!0,this.trackInViewport()):this.handleAwake(!1),this.isInViewport=t}handleAwake(t,r=Math.round((Date.now()-this.lastEventAt)/1e3)){this.isAwake=t,this.lastEventAt=t?Date.now()-r*Gd:Date.now(),this.isInViewport&&this.trackAwake(t,r)}handleScroll(t){this.scrollCallback&&this.scrollCallback(t)}handleVisibilityChange(){this.isAwake=!1;const t=Math.round((Date.now()-this.lastEventAt)/1e3);t>1&&(this.lastEventAt=Date.now(),this.trackAwake(!1,t))}trackAwake(t,r){!t&&this.activeDurationCallback&&this.activeDurationCallback(r,this.isFlushing,this.lastEventAt),t&&this.idleDurationCallback&&this.idleDurationCallback(r,this.isFlushing,this.lastEventAt)}trackInViewport(){this.registeredView||(this.registeredView=!0,this.viewCallback&&this.viewCallback())}}const Wd="sesamy_session_id";function JE(){let e=sessionStorage.getItem(Wd);return e||(e=Math.random().toString(36).slice(2,9),sessionStorage.setItem(Wd,e)),e}let Vd=!1,es,Zd,oa;const Jd=new Map;function YE({clientId:e,enabled:t=!0,environment:r}){if(es=e,Zd=t,oa=`${Ve("logs",r)}/events`,!Zd)return;window.addEventListener("beforeunload",()=>{Xd.forEach((a,i)=>{a.bind(i)()}),qE()}),window.addEventListener("visibilitychange",()=>{document.visibilityState!=="visible"&&Jd.forEach((a,i)=>{a.bind(i)()})}),DE();const n=new ZE({element:document.body,viewCallback:()=>{ze.page()},activeDurationCallback:(a,i,o)=>{ze.track("activeDuration",{duration:a,durationStart:o,flushing:i})},idleDurationCallback:(a,i,o)=>{ze.track("idleDuration",{duration:a,durationStart:o,flushing:i})},scrollCallback:a=>{ze.track("scroll",{scroll:a.scrollMax})}});QE(document.body,()=>{n.flush()}),eP(document.body,()=>{n.handleVisibilityChange()}),window.addEventListener(Oe.AUTHENTICATED,async a=>{const i=a;await ze.identify(i.detail.sub)}),window.addEventListener(Oe.LOGOUT,async()=>{await ze.track("logout",{}),ts.flush(),await ze.reset()})}function Yd(e){return JSON.stringify(e.map(t=>({...t,clientId:es,requestId:Math.random().toString(36).slice(2,9),sessionId:JE(),timestamp:new Date().toISOString(),version:Do,event:t.event,context:{page:{url:window.location.hostname,path:window.location.pathname,title:document.title,search:window.location.search,referrer:document.referrer},locale:navigator.language,library:Zf,userAgent:navigator.userAgent,clientId:es}})))}const ts=LE(async e=>{if(e.length>0){const t=Yd(e);Vd?navigator.sendBeacon(oa,t):(await fetch(oa,{method:"POST",body:t,headers:{"Content-Type":"text/plain"}})).ok}},{max:10,interval:3e3});function rs(e){var t;if(e.anonymousId)if((t=e.properties)!=null&&t.flushing){const r={...e};delete r.properties.flushing,navigator.sendBeacon(oa,Yd([r]))}else ts.push(e)}const ze=jE({app:Zf,version:Do,plugins:[{name:"custom-analytics-plugin",page:({payload:e})=>{const{properties:t,anonymousId:r,userId:n,event:a}=e;rs({anonymousId:r,userId:n,properties:t,event:a,type:"page"})},track:({payload:e})=>{const{properties:t,anonymousId:r,userId:n,event:a}=e;rs({anonymousId:r,userId:n,properties:t,event:a,type:"track"})},identify:({payload:e})=>{const{properties:t,anonymousId:r,userId:n}=e;rs({anonymousId:r,userId:n,properties:t,type:"identify"})}}]});function XE(e,t){ze.track(e,t)}function qE(){return Vd=!0,ts.flush()}const Xd=new Map;function QE(e,t){Xd.set(e,t)}function eP(e,t){Jd.set(e,t)}const qd="sesamySignedURLs";function Qd(){const e=sessionStorage.getItem(qd);return e?JSON.parse(e):[]}function tP(e){const t=Qd();t.push(e),sessionStorage.setItem(qd,JSON.stringify(t))}const rP=["AdHeader","AdContainer","AD_Top","homead","ad-lead"];function nP(){return new Promise(e=>{const t=rP.map(r=>{const n=document.createElement("div");return n.innerHTML=" ",n.id=r,n.style.position="absolute",document.body.appendChild(n),n});window.setTimeout(()=>{const r=!t.every(n=>{const a=document.querySelector(`#${n.id}`);return a==null?void 0:a.offsetParent});t.forEach(n=>n.remove()),e(r)},100)})}function aP(e){const{createCheckout:t,getCheckout:r,updateCheckout:n,getEntitlement:a,getEntitlements:i,getEntitlementAccess:o,getSubscriptions:s,getContract:u,getContracts:f,getBill:l,getBills:c,getTransaction:d,getTransactions:v,getProfile:p,updateProfile:S,getTags:g,deleteTag:T,setTag:I,getUserMetadata:b,listUserMetadata:h,setUserMetadata:$,deleteUserMetadata:k,getTally:_,getTallies:j,pushTally:M,deleteTally:F,getProduct:Z,getPaymentIssues:L,isSpotifyLinked:x,unlinkSpotify:z,linkSpotify:R,autoOnboardProduct:V,openHostedAccountPage:X,generateLink:Be}=UT(e),m={auth:{getUser:p,isAuthenticated:Uo,loginWithRedirect:xo,logout:xf,setToken:Mf},checkouts:{get:r,create:t,update:n},profile:{get:p,update:S,openHostedAccountPage:X,isSpotifyLinked:x,unlinkSpotify:z},analytics:{track:XE},tags:{list:g,set:I,delete:T},entitlements:{get:a,list:i,access:o,signedLinks:Qd},contracts:{get:u,list:f},bills:{get:l,list:c},userMetadata:{get:b,list:h,set:$,delete:k},tallies:{get:_,list:j,push:M,delete:F},subscriptions:{list:s},transactions:{get:d,list:v},products:{get:Z,autoOnboard:V,linkSpotify:R},browser:{detectAdblock:nP},getVersion:iP,getPaymentIssues:L,generateLink:Be,clearCache:ke};return e.namespace&&(window[e.namespace]=m),m}function iP(){return Do}async function oP({enabled:e=!1,rules:t}){if(!e)return;const r=await Uo(),n=window.location.href;for(const a of t){const i=document.querySelectorAll(a.selector);if(!(a.path&&!new RegExp(a.path).test(n))){for(const o of i)if(!(a.authenticated!==void 0&&a.authenticated!==r))switch(a.transform){case"insert":if(a.contentType==="selector"&&a.content){const s=document.querySelector(a.content);s?o.innerHTML+=s.innerHTML:console.warn(`Source element for selector '${a.content}' not found`)}else if(a.contentType==="url"&&a.content){const s=await ev(a.content);s?o.innerHTML+=s:console.warn(`Failed to fetch content from URL '${a.content}'`)}else a.content&&(o.innerHTML+=a.content);break;case"replace":if(a.contentType==="selector"&&a.content){const s=document.querySelector(a.content);s?o.innerHTML=s.innerHTML:console.warn(`Source element for selector '${a.content}' not found`)}else if(a.contentType==="url"&&a.content){const s=await ev(a.content);s?o.innerHTML=s:console.warn(`Failed to fetch content from URL '${a.content}'`)}else a.content&&(o.innerHTML=a.content);break;case"remove":o.remove();break;default:console.warn(`Unknown transform type: ${a.transform}`)}}}}async function ev(e){try{const t=await fetch(e);return t.ok?await t.text():(console.error(`Failed to fetch content from ${e}: ${t.statusText}`),null)}catch(t){return console.error(`Error fetching content from ${e}:`,t),null}}function sP(){const e=new URLSearchParams(window.location.hash.substring(1)),t=e.get("access_token");if(t){Mf(t);const r=new URL(window.location.href);e.delete("access_token"),r.hash=e.toString(),window.history.replaceState(null,"",r)}}const tv="sesamy-refresh",rv="force-refetch-entitlements";function cP(){const e=new URLSearchParams(window.location.search),t=e.get(rv),r=e.get(tv);if(t!==null||r!==null){const n=new URL(window.location.href);e.delete(rv),e.delete(tv),n.search=e.toString(),ke(),window.history.replaceState(null,"",n)}}function uP(){const e=new URLSearchParams(window.location.search),t=e.get("token"),r=e.get("se");if(!r||!t)return;const n=parseInt(r,10);if(Number.isNaN(n)||n<Date.now())return;tP({url:window.location.href.split("?")[0],token:t,expiresAt:n,publisherContentId:e.get("sp")??void 0});const a=new URL(window.location.href);a.searchParams.delete("ss"),a.searchParams.delete("se"),a.searchParams.delete("sp"),a.searchParams.delete("so"),a.searchParams.delete("token"),window.history.replaceState(null,"",a)}const nv="sesamy-user";async function lP(){const t=new URLSearchParams(window.location.search).get(nv);if(!t)return;const r=await IT();(r==null?void 0:r.email)!==t&&(ke(),xo({authorizationParams:{email_hint:t,login_hint:t}}));const n=new URL(window.location.href);n.searchParams.delete(nv),window.history.replaceState(null,"",n)}const av="sesamy-purchase";function fP(){const e=new URLSearchParams(window.location.search),t=e.get(av);if(t!==null){const r=new URL(window.location.href);e.delete(av),r.search=e.toString(),We(Oe.PURCHASE,{itemSrc:t}),ke(),window.history.replaceState(null,"",r)}}const iv="sesamy-login";async function dP(){if(!new URLSearchParams(window.location.search).get(iv))return;await Uo()||xo();const n=new URL(window.location.href);n.searchParams.delete(iv),window.history.replaceState(null,"",n)}const vP=typeof window<"u";async function ov(e){YE({clientId:e.clientId,environment:e.environment,...e.analytics}),await $T({clientId:e.clientId,organization:e.organization,environment:e.environment,...e.auth}),e.transform&&await oP(e.transform),sP(),cP(),uP(),await dP(),await lP(),fP(),We(Oe.READY,{})}async function sv(e){const t=aP({clientId:e.clientId,environment:e.environment,...e.api});return vP&&(e.awaitAllServices?await ov(e):ov(e)),t}if(typeof document<"u"){const e=document.getElementById("sesamy-js");if(e!=null&&e.textContent)try{const t=JSON.parse(e.textContent);sv(t)}catch(t){console.error("Failed to parse config",t)}}return Ne.init=sv,Object.defineProperty(Ne,Symbol.toStringTag,{value:"Module"}),Ne}({});
|