@rechargeapps/storefront-client 0.2.0 → 0.3.0

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.
@@ -1,24 +1,24 @@
1
- (function(re,Ke){typeof exports=="object"&&typeof module<"u"?module.exports=Ke():typeof define=="function"&&define.amd?define(Ke):(re=typeof globalThis<"u"?globalThis:re||self,re.recharge=Ke())})(this,function(){"use strict";var re=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ke(r){var e=r.default;if(typeof e=="function"){var t=function(){return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}function Sf(r,e){for(var t=-1,n=r==null?0:r.length,i=Array(n);++t<n;)i[t]=e(r[t],t,r);return i}var Tr=Sf;function If(){this.__data__=[],this.size=0}var Tf=If;function xf(r,e){return r===e||r!==r&&e!==e}var xr=xf,Pf=xr;function Ff(r,e){for(var t=r.length;t--;)if(Pf(r[t][0],e))return t;return-1}var Pr=Ff,Rf=Pr,Mf=Array.prototype,Bf=Mf.splice;function Uf(r){var e=this.__data__,t=Rf(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():Bf.call(e,t,1),--this.size,!0}var Nf=Uf,Df=Pr;function Cf(r){var e=this.__data__,t=Df(e,r);return t<0?void 0:e[t][1]}var Lf=Cf,jf=Pr;function kf(r){return jf(this.__data__,r)>-1}var Vf=kf,qf=Pr;function Gf(r,e){var t=this.__data__,n=qf(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}var Hf=Gf,Wf=Tf,Xf=Nf,zf=Lf,Yf=Vf,Kf=Hf;function Fe(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Fe.prototype.clear=Wf,Fe.prototype.delete=Xf,Fe.prototype.get=zf,Fe.prototype.has=Yf,Fe.prototype.set=Kf;var Fr=Fe,Zf=Fr;function Jf(){this.__data__=new Zf,this.size=0}var Qf=Jf;function es(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}var rs=es;function ts(r){return this.__data__.get(r)}var ns=ts;function is(r){return this.__data__.has(r)}var as=is,os=typeof re=="object"&&re&&re.Object===Object&&re,di=os,us=di,fs=typeof self=="object"&&self&&self.Object===Object&&self,ss=us||fs||Function("return this")(),H=ss,ls=H,cs=ls.Symbol,Re=cs,vi=Re,gi=Object.prototype,ps=gi.hasOwnProperty,hs=gi.toString,Ze=vi?vi.toStringTag:void 0;function ys(r){var e=ps.call(r,Ze),t=r[Ze];try{r[Ze]=void 0;var n=!0}catch{}var i=hs.call(r);return n&&(e?r[Ze]=t:delete r[Ze]),i}var ds=ys,vs=Object.prototype,gs=vs.toString;function _s(r){return gs.call(r)}var ms=_s,_i=Re,bs=ds,ws=ms,$s="[object Null]",Es="[object Undefined]",mi=_i?_i.toStringTag:void 0;function Os(r){return r==null?r===void 0?Es:$s:mi&&mi in Object(r)?bs(r):ws(r)}var te=Os;function As(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var se=As,Ss=te,Is=se,Ts="[object AsyncFunction]",xs="[object Function]",Ps="[object GeneratorFunction]",Fs="[object Proxy]";function Rs(r){if(!Is(r))return!1;var e=Ss(r);return e==xs||e==Ps||e==Ts||e==Fs}var Ut=Rs,Ms=H,Bs=Ms["__core-js_shared__"],Us=Bs,Nt=Us,bi=function(){var r=/[^.]+$/.exec(Nt&&Nt.keys&&Nt.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function Ns(r){return!!bi&&bi in r}var Ds=Ns,Cs=Function.prototype,Ls=Cs.toString;function js(r){if(r!=null){try{return Ls.call(r)}catch{}try{return r+""}catch{}}return""}var wi=js,ks=Ut,Vs=Ds,qs=se,Gs=wi,Hs=/[\\^$.*+?()[\]{}|]/g,Ws=/^\[object .+?Constructor\]$/,Xs=Function.prototype,zs=Object.prototype,Ys=Xs.toString,Ks=zs.hasOwnProperty,Zs=RegExp("^"+Ys.call(Ks).replace(Hs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Js(r){if(!qs(r)||Vs(r))return!1;var e=ks(r)?Zs:Ws;return e.test(Gs(r))}var Qs=Js;function el(r,e){return r?.[e]}var rl=el,tl=Qs,nl=rl;function il(r,e){var t=nl(r,e);return tl(t)?t:void 0}var ge=il,al=ge,ol=H,ul=al(ol,"Map"),Dt=ul,fl=ge,sl=fl(Object,"create"),Rr=sl,$i=Rr;function ll(){this.__data__=$i?$i(null):{},this.size=0}var cl=ll;function pl(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var hl=pl,yl=Rr,dl="__lodash_hash_undefined__",vl=Object.prototype,gl=vl.hasOwnProperty;function _l(r){var e=this.__data__;if(yl){var t=e[r];return t===dl?void 0:t}return gl.call(e,r)?e[r]:void 0}var ml=_l,bl=Rr,wl=Object.prototype,$l=wl.hasOwnProperty;function El(r){var e=this.__data__;return bl?e[r]!==void 0:$l.call(e,r)}var Ol=El,Al=Rr,Sl="__lodash_hash_undefined__";function Il(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=Al&&e===void 0?Sl:e,this}var Tl=Il,xl=cl,Pl=hl,Fl=ml,Rl=Ol,Ml=Tl;function Me(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Me.prototype.clear=xl,Me.prototype.delete=Pl,Me.prototype.get=Fl,Me.prototype.has=Rl,Me.prototype.set=Ml;var Bl=Me,Ei=Bl,Ul=Fr,Nl=Dt;function Dl(){this.size=0,this.__data__={hash:new Ei,map:new(Nl||Ul),string:new Ei}}var Cl=Dl;function Ll(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}var jl=Ll,kl=jl;function Vl(r,e){var t=r.__data__;return kl(e)?t[typeof e=="string"?"string":"hash"]:t.map}var Mr=Vl,ql=Mr;function Gl(r){var e=ql(this,r).delete(r);return this.size-=e?1:0,e}var Hl=Gl,Wl=Mr;function Xl(r){return Wl(this,r).get(r)}var zl=Xl,Yl=Mr;function Kl(r){return Yl(this,r).has(r)}var Zl=Kl,Jl=Mr;function Ql(r,e){var t=Jl(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}var ec=Ql,rc=Cl,tc=Hl,nc=zl,ic=Zl,ac=ec;function Be(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Be.prototype.clear=rc,Be.prototype.delete=tc,Be.prototype.get=nc,Be.prototype.has=ic,Be.prototype.set=ac;var Ct=Be,oc=Fr,uc=Dt,fc=Ct,sc=200;function lc(r,e){var t=this.__data__;if(t instanceof oc){var n=t.__data__;if(!uc||n.length<sc-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new fc(n)}return t.set(r,e),this.size=t.size,this}var cc=lc,pc=Fr,hc=Qf,yc=rs,dc=ns,vc=as,gc=cc;function Ue(r){var e=this.__data__=new pc(r);this.size=e.size}Ue.prototype.clear=hc,Ue.prototype.delete=yc,Ue.prototype.get=dc,Ue.prototype.has=vc,Ue.prototype.set=gc;var Lt=Ue;function _c(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}var Oi=_c,mc=ge,bc=function(){try{var r=mc(Object,"defineProperty");return r({},"",{}),r}catch{}}(),Ai=bc,Si=Ai;function wc(r,e,t){e=="__proto__"&&Si?Si(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}var Ii=wc,$c=Ii,Ec=xr,Oc=Object.prototype,Ac=Oc.hasOwnProperty;function Sc(r,e,t){var n=r[e];(!(Ac.call(r,e)&&Ec(n,t))||t===void 0&&!(e in r))&&$c(r,e,t)}var Ti=Sc,Ic=Ti,Tc=Ii;function xc(r,e,t,n){var i=!t;t||(t={});for(var a=-1,o=e.length;++a<o;){var f=e[a],s=n?n(t[f],r[f],f,t,r):void 0;s===void 0&&(s=r[f]),i?Tc(t,f,s):Ic(t,f,s)}return t}var Ne=xc;function Pc(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var xi=Pc;function Fc(r){return r!=null&&typeof r=="object"}var G=Fc,Rc=te,Mc=G,Bc="[object Arguments]";function Uc(r){return Mc(r)&&Rc(r)==Bc}var Nc=Uc,Pi=Nc,Dc=G,Fi=Object.prototype,Cc=Fi.hasOwnProperty,Lc=Fi.propertyIsEnumerable,jc=Pi(function(){return arguments}())?Pi:function(r){return Dc(r)&&Cc.call(r,"callee")&&!Lc.call(r,"callee")},jt=jc,kc=Array.isArray,N=kc,Je={exports:{}};function Vc(){return!1}var qc=Vc;(function(r,e){var t=H,n=qc,i=e&&!e.nodeType&&e,a=i&&!0&&r&&!r.nodeType&&r,o=a&&a.exports===i,f=o?t.Buffer:void 0,s=f?f.isBuffer:void 0,l=s||n;r.exports=l})(Je,Je.exports);var Gc=9007199254740991,Hc=/^(?:0|[1-9]\d*)$/;function Wc(r,e){var t=typeof r;return e=e??Gc,!!e&&(t=="number"||t!="symbol"&&Hc.test(r))&&r>-1&&r%1==0&&r<e}var kt=Wc,Xc=9007199254740991;function zc(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Xc}var Vt=zc,Yc=te,Kc=Vt,Zc=G,Jc="[object Arguments]",Qc="[object Array]",ep="[object Boolean]",rp="[object Date]",tp="[object Error]",np="[object Function]",ip="[object Map]",ap="[object Number]",op="[object Object]",up="[object RegExp]",fp="[object Set]",sp="[object String]",lp="[object WeakMap]",cp="[object ArrayBuffer]",pp="[object DataView]",hp="[object Float32Array]",yp="[object Float64Array]",dp="[object Int8Array]",vp="[object Int16Array]",gp="[object Int32Array]",_p="[object Uint8Array]",mp="[object Uint8ClampedArray]",bp="[object Uint16Array]",wp="[object Uint32Array]",P={};P[hp]=P[yp]=P[dp]=P[vp]=P[gp]=P[_p]=P[mp]=P[bp]=P[wp]=!0,P[Jc]=P[Qc]=P[cp]=P[ep]=P[pp]=P[rp]=P[tp]=P[np]=P[ip]=P[ap]=P[op]=P[up]=P[fp]=P[sp]=P[lp]=!1;function $p(r){return Zc(r)&&Kc(r.length)&&!!P[Yc(r)]}var Ep=$p;function Op(r){return function(e){return r(e)}}var qt=Op,Qe={exports:{}};(function(r,e){var t=di,n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a&&t.process,f=function(){try{var s=i&&i.require&&i.require("util").types;return s||o&&o.binding&&o.binding("util")}catch{}}();r.exports=f})(Qe,Qe.exports);var Ap=Ep,Sp=qt,Ri=Qe.exports,Mi=Ri&&Ri.isTypedArray,Ip=Mi?Sp(Mi):Ap,Bi=Ip,Tp=xi,xp=jt,Pp=N,Fp=Je.exports,Rp=kt,Mp=Bi,Bp=Object.prototype,Up=Bp.hasOwnProperty;function Np(r,e){var t=Pp(r),n=!t&&xp(r),i=!t&&!n&&Fp(r),a=!t&&!n&&!i&&Mp(r),o=t||n||i||a,f=o?Tp(r.length,String):[],s=f.length;for(var l in r)(e||Up.call(r,l))&&!(o&&(l=="length"||i&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Rp(l,s)))&&f.push(l);return f}var Ui=Np,Dp=Object.prototype;function Cp(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||Dp;return r===t}var Gt=Cp;function Lp(r,e){return function(t){return r(e(t))}}var Ni=Lp,jp=Ni,kp=jp(Object.keys,Object),Vp=kp,qp=Gt,Gp=Vp,Hp=Object.prototype,Wp=Hp.hasOwnProperty;function Xp(r){if(!qp(r))return Gp(r);var e=[];for(var t in Object(r))Wp.call(r,t)&&t!="constructor"&&e.push(t);return e}var zp=Xp,Yp=Ut,Kp=Vt;function Zp(r){return r!=null&&Kp(r.length)&&!Yp(r)}var er=Zp,Jp=Ui,Qp=zp,eh=er;function rh(r){return eh(r)?Jp(r):Qp(r)}var De=rh,th=Ne,nh=De;function ih(r,e){return r&&th(e,nh(e),r)}var ah=ih;function oh(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var uh=oh,fh=se,sh=Gt,lh=uh,ch=Object.prototype,ph=ch.hasOwnProperty;function hh(r){if(!fh(r))return lh(r);var e=sh(r),t=[];for(var n in r)n=="constructor"&&(e||!ph.call(r,n))||t.push(n);return t}var yh=hh,dh=Ui,vh=yh,gh=er;function _h(r){return gh(r)?dh(r,!0):vh(r)}var Br=_h,mh=Ne,bh=Br;function wh(r,e){return r&&mh(e,bh(e),r)}var $h=wh,Ht={exports:{}};(function(r,e){var t=H,n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a?t.Buffer:void 0,f=o?o.allocUnsafe:void 0;function s(l,c){if(c)return l.slice();var u=l.length,p=f?f(u):new l.constructor(u);return l.copy(p),p}r.exports=s})(Ht,Ht.exports);function Eh(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}var Oh=Eh;function Ah(r,e){for(var t=-1,n=r==null?0:r.length,i=0,a=[];++t<n;){var o=r[t];e(o,t,r)&&(a[i++]=o)}return a}var Sh=Ah;function Ih(){return[]}var Di=Ih,Th=Sh,xh=Di,Ph=Object.prototype,Fh=Ph.propertyIsEnumerable,Ci=Object.getOwnPropertySymbols,Rh=Ci?function(r){return r==null?[]:(r=Object(r),Th(Ci(r),function(e){return Fh.call(r,e)}))}:xh,Wt=Rh,Mh=Ne,Bh=Wt;function Uh(r,e){return Mh(r,Bh(r),e)}var Nh=Uh;function Dh(r,e){for(var t=-1,n=e.length,i=r.length;++t<n;)r[i+t]=e[t];return r}var Xt=Dh,Ch=Ni,Lh=Ch(Object.getPrototypeOf,Object),zt=Lh,jh=Xt,kh=zt,Vh=Wt,qh=Di,Gh=Object.getOwnPropertySymbols,Hh=Gh?function(r){for(var e=[];r;)jh(e,Vh(r)),r=kh(r);return e}:qh,Li=Hh,Wh=Ne,Xh=Li;function zh(r,e){return Wh(r,Xh(r),e)}var Yh=zh,Kh=Xt,Zh=N;function Jh(r,e,t){var n=e(r);return Zh(r)?n:Kh(n,t(r))}var ji=Jh,Qh=ji,ey=Wt,ry=De;function ty(r){return Qh(r,ry,ey)}var ki=ty,ny=ji,iy=Li,ay=Br;function oy(r){return ny(r,ay,iy)}var Vi=oy,uy=ge,fy=H,sy=uy(fy,"DataView"),ly=sy,cy=ge,py=H,hy=cy(py,"Promise"),yy=hy,dy=ge,vy=H,gy=dy(vy,"Set"),_y=gy,my=ge,by=H,wy=my(by,"WeakMap"),$y=wy,Yt=ly,Kt=Dt,Zt=yy,Jt=_y,Qt=$y,qi=te,Ce=wi,Gi="[object Map]",Ey="[object Object]",Hi="[object Promise]",Wi="[object Set]",Xi="[object WeakMap]",zi="[object DataView]",Oy=Ce(Yt),Ay=Ce(Kt),Sy=Ce(Zt),Iy=Ce(Jt),Ty=Ce(Qt),_e=qi;(Yt&&_e(new Yt(new ArrayBuffer(1)))!=zi||Kt&&_e(new Kt)!=Gi||Zt&&_e(Zt.resolve())!=Hi||Jt&&_e(new Jt)!=Wi||Qt&&_e(new Qt)!=Xi)&&(_e=function(r){var e=qi(r),t=e==Ey?r.constructor:void 0,n=t?Ce(t):"";if(n)switch(n){case Oy:return zi;case Ay:return Gi;case Sy:return Hi;case Iy:return Wi;case Ty:return Xi}return e});var Ur=_e,xy=Object.prototype,Py=xy.hasOwnProperty;function Fy(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&Py.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var Ry=Fy,My=H,By=My.Uint8Array,Yi=By,Ki=Yi;function Uy(r){var e=new r.constructor(r.byteLength);return new Ki(e).set(new Ki(r)),e}var en=Uy,Ny=en;function Dy(r,e){var t=e?Ny(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}var Cy=Dy,Ly=/\w*$/;function jy(r){var e=new r.constructor(r.source,Ly.exec(r));return e.lastIndex=r.lastIndex,e}var ky=jy,Zi=Re,Ji=Zi?Zi.prototype:void 0,Qi=Ji?Ji.valueOf:void 0;function Vy(r){return Qi?Object(Qi.call(r)):{}}var qy=Vy,Gy=en;function Hy(r,e){var t=e?Gy(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var Wy=Hy,Xy=en,zy=Cy,Yy=ky,Ky=qy,Zy=Wy,Jy="[object Boolean]",Qy="[object Date]",ed="[object Map]",rd="[object Number]",td="[object RegExp]",nd="[object Set]",id="[object String]",ad="[object Symbol]",od="[object ArrayBuffer]",ud="[object DataView]",fd="[object Float32Array]",sd="[object Float64Array]",ld="[object Int8Array]",cd="[object Int16Array]",pd="[object Int32Array]",hd="[object Uint8Array]",yd="[object Uint8ClampedArray]",dd="[object Uint16Array]",vd="[object Uint32Array]";function gd(r,e,t){var n=r.constructor;switch(e){case od:return Xy(r);case Jy:case Qy:return new n(+r);case ud:return zy(r,t);case fd:case sd:case ld:case cd:case pd:case hd:case yd:case dd:case vd:return Zy(r,t);case ed:return new n;case rd:case id:return new n(r);case td:return Yy(r);case nd:return new n;case ad:return Ky(r)}}var _d=gd,md=se,ea=Object.create,bd=function(){function r(){}return function(e){if(!md(e))return{};if(ea)return ea(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}(),wd=bd,$d=wd,Ed=zt,Od=Gt;function Ad(r){return typeof r.constructor=="function"&&!Od(r)?$d(Ed(r)):{}}var Sd=Ad,Id=Ur,Td=G,xd="[object Map]";function Pd(r){return Td(r)&&Id(r)==xd}var Fd=Pd,Rd=Fd,Md=qt,ra=Qe.exports,ta=ra&&ra.isMap,Bd=ta?Md(ta):Rd,Ud=Bd,Nd=Ur,Dd=G,Cd="[object Set]";function Ld(r){return Dd(r)&&Nd(r)==Cd}var jd=Ld,kd=jd,Vd=qt,na=Qe.exports,ia=na&&na.isSet,qd=ia?Vd(ia):kd,Gd=qd,Hd=Lt,Wd=Oi,Xd=Ti,zd=ah,Yd=$h,Kd=Ht.exports,Zd=Oh,Jd=Nh,Qd=Yh,ev=ki,rv=Vi,tv=Ur,nv=Ry,iv=_d,av=Sd,ov=N,uv=Je.exports,fv=Ud,sv=se,lv=Gd,cv=De,pv=Br,hv=1,yv=2,dv=4,aa="[object Arguments]",vv="[object Array]",gv="[object Boolean]",_v="[object Date]",mv="[object Error]",oa="[object Function]",bv="[object GeneratorFunction]",wv="[object Map]",$v="[object Number]",ua="[object Object]",Ev="[object RegExp]",Ov="[object Set]",Av="[object String]",Sv="[object Symbol]",Iv="[object WeakMap]",Tv="[object ArrayBuffer]",xv="[object DataView]",Pv="[object Float32Array]",Fv="[object Float64Array]",Rv="[object Int8Array]",Mv="[object Int16Array]",Bv="[object Int32Array]",Uv="[object Uint8Array]",Nv="[object Uint8ClampedArray]",Dv="[object Uint16Array]",Cv="[object Uint32Array]",x={};x[aa]=x[vv]=x[Tv]=x[xv]=x[gv]=x[_v]=x[Pv]=x[Fv]=x[Rv]=x[Mv]=x[Bv]=x[wv]=x[$v]=x[ua]=x[Ev]=x[Ov]=x[Av]=x[Sv]=x[Uv]=x[Nv]=x[Dv]=x[Cv]=!0,x[mv]=x[oa]=x[Iv]=!1;function Nr(r,e,t,n,i,a){var o,f=e&hv,s=e&yv,l=e&dv;if(t&&(o=i?t(r,n,i,a):t(r)),o!==void 0)return o;if(!sv(r))return r;var c=ov(r);if(c){if(o=nv(r),!f)return Zd(r,o)}else{var u=tv(r),p=u==oa||u==bv;if(uv(r))return Kd(r,f);if(u==ua||u==aa||p&&!i){if(o=s||p?{}:av(r),!f)return s?Qd(r,Yd(o,r)):Jd(r,zd(o,r))}else{if(!x[u])return i?r:{};o=iv(r,u,f)}}a||(a=new Hd);var d=a.get(r);if(d)return d;a.set(r,o),lv(r)?r.forEach(function($){o.add(Nr($,e,t,$,r,a))}):fv(r)&&r.forEach(function($,b){o.set(b,Nr($,e,t,b,r,a))});var _=l?s?rv:ev:s?pv:cv,E=c?void 0:_(r);return Wd(E||r,function($,b){E&&(b=$,$=r[b]),Xd(o,b,Nr($,e,t,b,r,a))}),o}var Lv=Nr,jv=te,kv=G,Vv="[object Symbol]";function qv(r){return typeof r=="symbol"||kv(r)&&jv(r)==Vv}var Dr=qv,Gv=N,Hv=Dr,Wv=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Xv=/^\w*$/;function zv(r,e){if(Gv(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||Hv(r)?!0:Xv.test(r)||!Wv.test(r)||e!=null&&r in Object(e)}var rn=zv,fa=Ct,Yv="Expected a function";function tn(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(Yv);var t=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=t.cache;if(a.has(i))return a.get(i);var o=r.apply(this,n);return t.cache=a.set(i,o)||a,o};return t.cache=new(tn.Cache||fa),t}tn.Cache=fa;var Kv=tn,Zv=Kv,Jv=500;function Qv(r){var e=Zv(r,function(n){return t.size===Jv&&t.clear(),n}),t=e.cache;return e}var eg=Qv,rg=eg,tg=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ng=/\\(\\)?/g,ig=rg(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(tg,function(t,n,i,a){e.push(i?a.replace(ng,"$1"):n||t)}),e}),ag=ig,sa=Re,og=Tr,ug=N,fg=Dr,sg=1/0,la=sa?sa.prototype:void 0,ca=la?la.toString:void 0;function pa(r){if(typeof r=="string")return r;if(ug(r))return og(r,pa)+"";if(fg(r))return ca?ca.call(r):"";var e=r+"";return e=="0"&&1/r==-sg?"-0":e}var nn=pa,lg=nn;function cg(r){return r==null?"":lg(r)}var an=cg,pg=N,hg=rn,yg=ag,dg=an;function vg(r,e){return pg(r)?r:hg(r,e)?[r]:yg(dg(r))}var Cr=vg;function gg(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var _g=gg,mg=Dr,bg=1/0;function wg(r){if(typeof r=="string"||mg(r))return r;var e=r+"";return e=="0"&&1/r==-bg?"-0":e}var rr=wg,$g=Cr,Eg=rr;function Og(r,e){e=$g(e,r);for(var t=0,n=e.length;r!=null&&t<n;)r=r[Eg(e[t++])];return t&&t==n?r:void 0}var on=Og;function Ag(r,e,t){var n=-1,i=r.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=r[n+e];return a}var ha=Ag,Sg=on,Ig=ha;function Tg(r,e){return e.length<2?r:Sg(r,Ig(e,0,-1))}var xg=Tg,Pg=Cr,Fg=_g,Rg=xg,Mg=rr;function Bg(r,e){return e=Pg(e,r),r=Rg(r,e),r==null||delete r[Mg(Fg(e))]}var Ug=Bg,Ng=te,Dg=zt,Cg=G,Lg="[object Object]",jg=Function.prototype,kg=Object.prototype,ya=jg.toString,Vg=kg.hasOwnProperty,qg=ya.call(Object);function Gg(r){if(!Cg(r)||Ng(r)!=Lg)return!1;var e=Dg(r);if(e===null)return!0;var t=Vg.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&ya.call(t)==qg}var Hg=Gg,Wg=Hg;function Xg(r){return Wg(r)?void 0:r}var zg=Xg,da=Re,Yg=jt,Kg=N,va=da?da.isConcatSpreadable:void 0;function Zg(r){return Kg(r)||Yg(r)||!!(va&&r&&r[va])}var Jg=Zg,Qg=Xt,e_=Jg;function ga(r,e,t,n,i){var a=-1,o=r.length;for(t||(t=e_),i||(i=[]);++a<o;){var f=r[a];e>0&&t(f)?e>1?ga(f,e-1,t,n,i):Qg(i,f):n||(i[i.length]=f)}return i}var r_=ga,t_=r_;function n_(r){var e=r==null?0:r.length;return e?t_(r,1):[]}var i_=n_;function a_(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}var o_=a_,u_=o_,_a=Math.max;function f_(r,e,t){return e=_a(e===void 0?r.length-1:e,0),function(){for(var n=arguments,i=-1,a=_a(n.length-e,0),o=Array(a);++i<a;)o[i]=n[e+i];i=-1;for(var f=Array(e+1);++i<e;)f[i]=n[i];return f[e]=t(o),u_(r,this,f)}}var ma=f_;function s_(r){return function(){return r}}var l_=s_;function c_(r){return r}var Lr=c_,p_=l_,ba=Ai,h_=Lr,y_=ba?function(r,e){return ba(r,"toString",{configurable:!0,enumerable:!1,value:p_(e),writable:!0})}:h_,d_=y_,v_=800,g_=16,__=Date.now;function m_(r){var e=0,t=0;return function(){var n=__(),i=g_-(n-t);if(t=n,i>0){if(++e>=v_)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}var b_=m_,w_=d_,$_=b_,E_=$_(w_),wa=E_,O_=i_,A_=ma,S_=wa;function I_(r){return S_(A_(r,void 0,O_),r+"")}var T_=I_,x_=Tr,P_=Lv,F_=Ug,R_=Cr,M_=Ne,B_=zg,U_=T_,N_=Vi,D_=1,C_=2,L_=4,j_=U_(function(r,e){var t={};if(r==null)return t;var n=!1;e=x_(e,function(a){return a=R_(a,r),n||(n=a.length>1),a}),M_(r,N_(r),t),n&&(t=P_(t,D_|C_|L_,B_));for(var i=e.length;i--;)F_(t,e[i]);return t}),k_=j_,V_=Object.defineProperty,q_=Object.defineProperties,G_=Object.getOwnPropertyDescriptors,$a=Object.getOwnPropertySymbols,H_=Object.prototype.hasOwnProperty,W_=Object.prototype.propertyIsEnumerable,Ea=(r,e,t)=>e in r?V_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,X_=(r,e)=>{for(var t in e||(e={}))H_.call(e,t)&&Ea(r,t,e[t]);if($a)for(var t of $a(e))W_.call(e,t)&&Ea(r,t,e[t]);return r},z_=(r,e)=>q_(r,G_(e));function Y_(r){try{return JSON.parse(r)}catch{return r}}function K_(r){return Object.entries(r).reduce((e,[t,n])=>z_(X_({},e),{[t]:Y_(n)}),{})}var Z_=Object.defineProperty,J_=Object.defineProperties,Q_=Object.getOwnPropertyDescriptors,Oa=Object.getOwnPropertySymbols,e0=Object.prototype.hasOwnProperty,r0=Object.prototype.propertyIsEnumerable,Aa=(r,e,t)=>e in r?Z_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Sa=(r,e)=>{for(var t in e||(e={}))e0.call(e,t)&&Aa(r,t,e[t]);if(Oa)for(var t of Oa(e))r0.call(e,t)&&Aa(r,t,e[t]);return r},Ia=(r,e)=>J_(r,Q_(e));function Ta(r){var e;const t=K_(r),n=t.auto_inject===void 0?!0:t.auto_inject,i=(e=t.display_on)!=null?e:[],a=t.first_option==="autodeliver";return Ia(Sa({},k_(t,["display_on","first_option"])),{auto_inject:n,valid_pages:i,is_subscription_first:a,autoInject:n,validPages:i,isSubscriptionFirst:a})}function xa(r){var e;const t=((e=r.subscription_options)==null?void 0:e.storefront_purchase_options)==="subscription_only";return Ia(Sa({},r),{is_subscription_only:t,isSubscriptionOnly:t})}function t0(r){return r.map(e=>{const t={};return Object.entries(e).forEach(([n,i])=>{t[n]=xa(i)}),t})}var L=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof L<"u"&&L,k={searchParams:"URLSearchParams"in L,iterable:"Symbol"in L&&"iterator"in Symbol,blob:"FileReader"in L&&"Blob"in L&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in L,arrayBuffer:"ArrayBuffer"in L};function n0(r){return r&&DataView.prototype.isPrototypeOf(r)}if(k.arrayBuffer)var i0=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a0=ArrayBuffer.isView||function(r){return r&&i0.indexOf(Object.prototype.toString.call(r))>-1};function tr(r){if(typeof r!="string"&&(r=String(r)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(r)||r==="")throw new TypeError('Invalid character in header field name: "'+r+'"');return r.toLowerCase()}function un(r){return typeof r!="string"&&(r=String(r)),r}function fn(r){var e={next:function(){var t=r.shift();return{done:t===void 0,value:t}}};return k.iterable&&(e[Symbol.iterator]=function(){return e}),e}function M(r){this.map={},r instanceof M?r.forEach(function(e,t){this.append(t,e)},this):Array.isArray(r)?r.forEach(function(e){this.append(e[0],e[1])},this):r&&Object.getOwnPropertyNames(r).forEach(function(e){this.append(e,r[e])},this)}M.prototype.append=function(r,e){r=tr(r),e=un(e);var t=this.map[r];this.map[r]=t?t+", "+e:e},M.prototype.delete=function(r){delete this.map[tr(r)]},M.prototype.get=function(r){return r=tr(r),this.has(r)?this.map[r]:null},M.prototype.has=function(r){return this.map.hasOwnProperty(tr(r))},M.prototype.set=function(r,e){this.map[tr(r)]=un(e)},M.prototype.forEach=function(r,e){for(var t in this.map)this.map.hasOwnProperty(t)&&r.call(e,this.map[t],t,this)},M.prototype.keys=function(){var r=[];return this.forEach(function(e,t){r.push(t)}),fn(r)},M.prototype.values=function(){var r=[];return this.forEach(function(e){r.push(e)}),fn(r)},M.prototype.entries=function(){var r=[];return this.forEach(function(e,t){r.push([t,e])}),fn(r)},k.iterable&&(M.prototype[Symbol.iterator]=M.prototype.entries);function sn(r){if(r.bodyUsed)return Promise.reject(new TypeError("Already read"));r.bodyUsed=!0}function Pa(r){return new Promise(function(e,t){r.onload=function(){e(r.result)},r.onerror=function(){t(r.error)}})}function o0(r){var e=new FileReader,t=Pa(e);return e.readAsArrayBuffer(r),t}function u0(r){var e=new FileReader,t=Pa(e);return e.readAsText(r),t}function f0(r){for(var e=new Uint8Array(r),t=new Array(e.length),n=0;n<e.length;n++)t[n]=String.fromCharCode(e[n]);return t.join("")}function Fa(r){if(r.slice)return r.slice(0);var e=new Uint8Array(r.byteLength);return e.set(new Uint8Array(r)),e.buffer}function Ra(){return this.bodyUsed=!1,this._initBody=function(r){this.bodyUsed=this.bodyUsed,this._bodyInit=r,r?typeof r=="string"?this._bodyText=r:k.blob&&Blob.prototype.isPrototypeOf(r)?this._bodyBlob=r:k.formData&&FormData.prototype.isPrototypeOf(r)?this._bodyFormData=r:k.searchParams&&URLSearchParams.prototype.isPrototypeOf(r)?this._bodyText=r.toString():k.arrayBuffer&&k.blob&&n0(r)?(this._bodyArrayBuffer=Fa(r.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):k.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(r)||a0(r))?this._bodyArrayBuffer=Fa(r):this._bodyText=r=Object.prototype.toString.call(r):this._bodyText="",this.headers.get("content-type")||(typeof r=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):k.searchParams&&URLSearchParams.prototype.isPrototypeOf(r)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},k.blob&&(this.blob=function(){var r=sn(this);if(r)return r;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var r=sn(this);return r||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(o0)}),this.text=function(){var r=sn(this);if(r)return r;if(this._bodyBlob)return u0(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(f0(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},k.formData&&(this.formData=function(){return this.text().then(c0)}),this.json=function(){return this.text().then(JSON.parse)},this}var s0=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function l0(r){var e=r.toUpperCase();return s0.indexOf(e)>-1?e:r}function me(r,e){if(!(this instanceof me))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e=e||{};var t=e.body;if(r instanceof me){if(r.bodyUsed)throw new TypeError("Already read");this.url=r.url,this.credentials=r.credentials,e.headers||(this.headers=new M(r.headers)),this.method=r.method,this.mode=r.mode,this.signal=r.signal,!t&&r._bodyInit!=null&&(t=r._bodyInit,r.bodyUsed=!0)}else this.url=String(r);if(this.credentials=e.credentials||this.credentials||"same-origin",(e.headers||!this.headers)&&(this.headers=new M(e.headers)),this.method=l0(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&t)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(t),(this.method==="GET"||this.method==="HEAD")&&(e.cache==="no-store"||e.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var i=/\?/;this.url+=(i.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}me.prototype.clone=function(){return new me(this,{body:this._bodyInit})};function c0(r){var e=new FormData;return r.trim().split("&").forEach(function(t){if(t){var n=t.split("="),i=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(a))}}),e}function p0(r){var e=new M,t=r.replace(/\r?\n[\t ]+/g," ");return t.split("\r").map(function(n){return n.indexOf(`
2
- `)===0?n.substr(1,n.length):n}).forEach(function(n){var i=n.split(":"),a=i.shift().trim();if(a){var o=i.join(":").trim();e.append(a,o)}}),e}Ra.call(me.prototype);function W(r,e){if(!(this instanceof W))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=e.status===void 0?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText===void 0?"":""+e.statusText,this.headers=new M(e.headers),this.url=e.url||"",this._initBody(r)}Ra.call(W.prototype),W.prototype.clone=function(){return new W(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new M(this.headers),url:this.url})},W.error=function(){var r=new W(null,{status:0,statusText:""});return r.type="error",r};var h0=[301,302,303,307,308];W.redirect=function(r,e){if(h0.indexOf(e)===-1)throw new RangeError("Invalid status code");return new W(null,{status:e,headers:{location:r}})};var be=L.DOMException;try{new be}catch{be=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},be.prototype=Object.create(Error.prototype),be.prototype.constructor=be}function Ma(r,e){return new Promise(function(t,n){var i=new me(r,e);if(i.signal&&i.signal.aborted)return n(new be("Aborted","AbortError"));var a=new XMLHttpRequest;function o(){a.abort()}a.onload=function(){var s={status:a.status,statusText:a.statusText,headers:p0(a.getAllResponseHeaders()||"")};s.url="responseURL"in a?a.responseURL:s.headers.get("X-Request-URL");var l="response"in a?a.response:a.responseText;setTimeout(function(){t(new W(l,s))},0)},a.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},a.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},a.onabort=function(){setTimeout(function(){n(new be("Aborted","AbortError"))},0)};function f(s){try{return s===""&&L.location.href?L.location.href:s}catch{return s}}a.open(i.method,f(i.url),!0),i.credentials==="include"?a.withCredentials=!0:i.credentials==="omit"&&(a.withCredentials=!1),"responseType"in a&&(k.blob?a.responseType="blob":k.arrayBuffer&&i.headers.get("Content-Type")&&i.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(a.responseType="arraybuffer")),e&&typeof e.headers=="object"&&!(e.headers instanceof M)?Object.getOwnPropertyNames(e.headers).forEach(function(s){a.setRequestHeader(s,un(e.headers[s]))}):i.headers.forEach(function(s,l){a.setRequestHeader(l,s)}),i.signal&&(i.signal.addEventListener("abort",o),a.onreadystatechange=function(){a.readyState===4&&i.signal.removeEventListener("abort",o)}),a.send(typeof i._bodyInit>"u"?null:i._bodyInit)})}Ma.polyfill=!0,L.fetch||(L.fetch=Ma,L.Headers=M,L.Request=me,L.Response=W),self.fetch.bind(self);/*! js-cookie v3.0.1 | MIT */function jr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)r[n]=t[n]}return r}var y0={read:function(r){return r[0]==='"'&&(r=r.slice(1,-1)),r.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(r){return encodeURIComponent(r).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function ln(r,e){function t(i,a,o){if(!(typeof document>"u")){o=jr({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var f="";for(var s in o)!o[s]||(f+="; "+s,o[s]!==!0&&(f+="="+o[s].split(";")[0]));return document.cookie=i+"="+r.write(a,i)+f}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var a=document.cookie?document.cookie.split("; "):[],o={},f=0;f<a.length;f++){var s=a[f].split("="),l=s.slice(1).join("=");try{var c=decodeURIComponent(s[0]);if(o[c]=r.read(l,c),i===c)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:n,remove:function(i,a){t(i,"",jr({},a,{expires:-1}))},withAttributes:function(i){return ln(this.converter,jr({},this.attributes,i))},withConverter:function(i){return ln(jr({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(r)}})}var kr=ln(y0,{path:"/"}),d0=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==i||o.enumerable!==!0)return!1}return!0},Ba=typeof Symbol<"u"&&Symbol,v0=d0,g0=function(){return typeof Ba!="function"||typeof Symbol!="function"||typeof Ba("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:v0()},_0="Function.prototype.bind called on incompatible ",cn=Array.prototype.slice,m0=Object.prototype.toString,b0="[object Function]",w0=function(e){var t=this;if(typeof t!="function"||m0.call(t)!==b0)throw new TypeError(_0+t);for(var n=cn.call(arguments,1),i,a=function(){if(this instanceof i){var c=t.apply(this,n.concat(cn.call(arguments)));return Object(c)===c?c:this}else return t.apply(e,n.concat(cn.call(arguments)))},o=Math.max(0,t.length-n.length),f=[],s=0;s<o;s++)f.push("$"+s);if(i=Function("binder","return function ("+f.join(",")+"){ return binder.apply(this,arguments); }")(a),t.prototype){var l=function(){};l.prototype=t.prototype,i.prototype=new l,l.prototype=null}return i},$0=w0,pn=Function.prototype.bind||$0,E0=pn,O0=E0.call(Function.call,Object.prototype.hasOwnProperty),I,Le=SyntaxError,Ua=Function,je=TypeError,hn=function(r){try{return Ua('"use strict"; return ('+r+").constructor;")()}catch{}},we=Object.getOwnPropertyDescriptor;if(we)try{we({},"")}catch{we=null}var yn=function(){throw new je},A0=we?function(){try{return arguments.callee,yn}catch{try{return we(arguments,"callee").get}catch{return yn}}}():yn,ke=g0(),le=Object.getPrototypeOf||function(r){return r.__proto__},Ve={},S0=typeof Uint8Array>"u"?I:le(Uint8Array),qe={"%AggregateError%":typeof AggregateError>"u"?I:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?I:ArrayBuffer,"%ArrayIteratorPrototype%":ke?le([][Symbol.iterator]()):I,"%AsyncFromSyncIteratorPrototype%":I,"%AsyncFunction%":Ve,"%AsyncGenerator%":Ve,"%AsyncGeneratorFunction%":Ve,"%AsyncIteratorPrototype%":Ve,"%Atomics%":typeof Atomics>"u"?I:Atomics,"%BigInt%":typeof BigInt>"u"?I:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?I:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?I:Float32Array,"%Float64Array%":typeof Float64Array>"u"?I:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?I:FinalizationRegistry,"%Function%":Ua,"%GeneratorFunction%":Ve,"%Int8Array%":typeof Int8Array>"u"?I:Int8Array,"%Int16Array%":typeof Int16Array>"u"?I:Int16Array,"%Int32Array%":typeof Int32Array>"u"?I:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ke?le(le([][Symbol.iterator]())):I,"%JSON%":typeof JSON=="object"?JSON:I,"%Map%":typeof Map>"u"?I:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ke?I:le(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?I:Promise,"%Proxy%":typeof Proxy>"u"?I:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?I:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?I:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ke?I:le(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?I:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ke?le(""[Symbol.iterator]()):I,"%Symbol%":ke?Symbol:I,"%SyntaxError%":Le,"%ThrowTypeError%":A0,"%TypedArray%":S0,"%TypeError%":je,"%Uint8Array%":typeof Uint8Array>"u"?I:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?I:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?I:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?I:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?I:WeakMap,"%WeakRef%":typeof WeakRef>"u"?I:WeakRef,"%WeakSet%":typeof WeakSet>"u"?I:WeakSet},I0=function r(e){var t;if(e==="%AsyncFunction%")t=hn("async function () {}");else if(e==="%GeneratorFunction%")t=hn("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=hn("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=r("%AsyncGenerator%");i&&(t=le(i.prototype))}return qe[e]=t,t},Na={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},nr=pn,Vr=O0,T0=nr.call(Function.call,Array.prototype.concat),x0=nr.call(Function.apply,Array.prototype.splice),Da=nr.call(Function.call,String.prototype.replace),qr=nr.call(Function.call,String.prototype.slice),P0=nr.call(Function.call,RegExp.prototype.exec),F0=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,R0=/\\(\\)?/g,M0=function(e){var t=qr(e,0,1),n=qr(e,-1);if(t==="%"&&n!=="%")throw new Le("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Le("invalid intrinsic syntax, expected opening `%`");var i=[];return Da(e,F0,function(a,o,f,s){i[i.length]=f?Da(s,R0,"$1"):o||a}),i},B0=function(e,t){var n=e,i;if(Vr(Na,n)&&(i=Na[n],n="%"+i[0]+"%"),Vr(qe,n)){var a=qe[n];if(a===Ve&&(a=I0(n)),typeof a>"u"&&!t)throw new je("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new Le("intrinsic "+e+" does not exist!")},dn=function(e,t){if(typeof e!="string"||e.length===0)throw new je("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new je('"allowMissing" argument must be a boolean');if(P0(/^%?[^%]*%?$/g,e)===null)throw new Le("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M0(e),i=n.length>0?n[0]:"",a=B0("%"+i+"%",t),o=a.name,f=a.value,s=!1,l=a.alias;l&&(i=l[0],x0(n,T0([0,1],l)));for(var c=1,u=!0;c<n.length;c+=1){var p=n[c],d=qr(p,0,1),_=qr(p,-1);if((d==='"'||d==="'"||d==="`"||_==='"'||_==="'"||_==="`")&&d!==_)throw new Le("property names with quotes must have matching quotes");if((p==="constructor"||!u)&&(s=!0),i+="."+p,o="%"+i+"%",Vr(qe,o))f=qe[o];else if(f!=null){if(!(p in f)){if(!t)throw new je("base intrinsic for "+e+" exists, but the property is not available.");return}if(we&&c+1>=n.length){var E=we(f,p);u=!!E,u&&"get"in E&&!("originalValue"in E.get)?f=E.get:f=f[p]}else u=Vr(f,p),f=f[p];u&&!s&&(qe[o]=f)}}return f},Ca={exports:{}};(function(r){var e=pn,t=dn,n=t("%Function.prototype.apply%"),i=t("%Function.prototype.call%"),a=t("%Reflect.apply%",!0)||e.call(i,n),o=t("%Object.getOwnPropertyDescriptor%",!0),f=t("%Object.defineProperty%",!0),s=t("%Math.max%");if(f)try{f({},"a",{value:1})}catch{f=null}r.exports=function(u){var p=a(e,i,arguments);if(o&&f){var d=o(p,"length");d.configurable&&f(p,"length",{value:1+s(0,u.length-(arguments.length-1))})}return p};var l=function(){return a(e,n,arguments)};f?f(r.exports,"apply",{value:l}):r.exports.apply=l})(Ca);var La=dn,ja=Ca.exports,U0=ja(La("String.prototype.indexOf")),N0=function(e,t){var n=La(e,!!t);return typeof n=="function"&&U0(e,".prototype.")>-1?ja(n):n},Ge=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},X=[],q=[],D0=typeof Uint8Array<"u"?Uint8Array:Array,vn=!1;function ka(){vn=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,t=r.length;e<t;++e)X[e]=r[e],q[r.charCodeAt(e)]=e;q["-".charCodeAt(0)]=62,q["_".charCodeAt(0)]=63}function C0(r){vn||ka();var e,t,n,i,a,o,f=r.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=r[f-2]==="="?2:r[f-1]==="="?1:0,o=new D0(f*3/4-a),n=a>0?f-4:f;var s=0;for(e=0,t=0;e<n;e+=4,t+=3)i=q[r.charCodeAt(e)]<<18|q[r.charCodeAt(e+1)]<<12|q[r.charCodeAt(e+2)]<<6|q[r.charCodeAt(e+3)],o[s++]=i>>16&255,o[s++]=i>>8&255,o[s++]=i&255;return a===2?(i=q[r.charCodeAt(e)]<<2|q[r.charCodeAt(e+1)]>>4,o[s++]=i&255):a===1&&(i=q[r.charCodeAt(e)]<<10|q[r.charCodeAt(e+1)]<<4|q[r.charCodeAt(e+2)]>>2,o[s++]=i>>8&255,o[s++]=i&255),o}function L0(r){return X[r>>18&63]+X[r>>12&63]+X[r>>6&63]+X[r&63]}function j0(r,e,t){for(var n,i=[],a=e;a<t;a+=3)n=(r[a]<<16)+(r[a+1]<<8)+r[a+2],i.push(L0(n));return i.join("")}function Va(r){vn||ka();for(var e,t=r.length,n=t%3,i="",a=[],o=16383,f=0,s=t-n;f<s;f+=o)a.push(j0(r,f,f+o>s?s:f+o));return n===1?(e=r[t-1],i+=X[e>>2],i+=X[e<<4&63],i+="=="):n===2&&(e=(r[t-2]<<8)+r[t-1],i+=X[e>>10],i+=X[e>>4&63],i+=X[e<<2&63],i+="="),a.push(i),a.join("")}function Gr(r,e,t,n,i){var a,o,f=i*8-n-1,s=(1<<f)-1,l=s>>1,c=-7,u=t?i-1:0,p=t?-1:1,d=r[e+u];for(u+=p,a=d&(1<<-c)-1,d>>=-c,c+=f;c>0;a=a*256+r[e+u],u+=p,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=o*256+r[e+u],u+=p,c-=8);if(a===0)a=1-l;else{if(a===s)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-l}return(d?-1:1)*o*Math.pow(2,a-n)}function qa(r,e,t,n,i,a){var o,f,s,l=a*8-i-1,c=(1<<l)-1,u=c>>1,p=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,_=n?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(f=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-o))<1&&(o--,s*=2),o+u>=1?e+=p/s:e+=p*Math.pow(2,1-u),e*s>=2&&(o++,s/=2),o+u>=c?(f=0,o=c):o+u>=1?(f=(e*s-1)*Math.pow(2,i),o=o+u):(f=e*Math.pow(2,u-1)*Math.pow(2,i),o=0));i>=8;r[t+d]=f&255,d+=_,f/=256,i-=8);for(o=o<<i|f,l+=i;l>0;r[t+d]=o&255,d+=_,o/=256,l-=8);r[t+d-_]|=E*128}var k0={}.toString,Ga=Array.isArray||function(r){return k0.call(r)=="[object Array]"};/*!
1
+ (function(te,Ze){typeof exports=="object"&&typeof module<"u"?module.exports=Ze():typeof define=="function"&&define.amd?define(Ze):(te=typeof globalThis<"u"?globalThis:te||self,te.recharge=Ze())})(this,function(){"use strict";var te=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ze(r){var e=r.default;if(typeof e=="function"){var t=function(){return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var j=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof j<"u"&&j,V={searchParams:"URLSearchParams"in j,iterable:"Symbol"in j&&"iterator"in Symbol,blob:"FileReader"in j&&"Blob"in j&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in j,arrayBuffer:"ArrayBuffer"in j};function sf(r){return r&&DataView.prototype.isPrototypeOf(r)}if(V.arrayBuffer)var cf=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],lf=ArrayBuffer.isView||function(r){return r&&cf.indexOf(Object.prototype.toString.call(r))>-1};function Je(r){if(typeof r!="string"&&(r=String(r)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(r)||r==="")throw new TypeError('Invalid character in header field name: "'+r+'"');return r.toLowerCase()}function Dt(r){return typeof r!="string"&&(r=String(r)),r}function Nt(r){var e={next:function(){var t=r.shift();return{done:t===void 0,value:t}}};return V.iterable&&(e[Symbol.iterator]=function(){return e}),e}function B(r){this.map={},r instanceof B?r.forEach(function(e,t){this.append(t,e)},this):Array.isArray(r)?r.forEach(function(e){this.append(e[0],e[1])},this):r&&Object.getOwnPropertyNames(r).forEach(function(e){this.append(e,r[e])},this)}B.prototype.append=function(r,e){r=Je(r),e=Dt(e);var t=this.map[r];this.map[r]=t?t+", "+e:e},B.prototype.delete=function(r){delete this.map[Je(r)]},B.prototype.get=function(r){return r=Je(r),this.has(r)?this.map[r]:null},B.prototype.has=function(r){return this.map.hasOwnProperty(Je(r))},B.prototype.set=function(r,e){this.map[Je(r)]=Dt(e)},B.prototype.forEach=function(r,e){for(var t in this.map)this.map.hasOwnProperty(t)&&r.call(e,this.map[t],t,this)},B.prototype.keys=function(){var r=[];return this.forEach(function(e,t){r.push(t)}),Nt(r)},B.prototype.values=function(){var r=[];return this.forEach(function(e){r.push(e)}),Nt(r)},B.prototype.entries=function(){var r=[];return this.forEach(function(e,t){r.push([t,e])}),Nt(r)},V.iterable&&(B.prototype[Symbol.iterator]=B.prototype.entries);function Ct(r){if(r.bodyUsed)return Promise.reject(new TypeError("Already read"));r.bodyUsed=!0}function li(r){return new Promise(function(e,t){r.onload=function(){e(r.result)},r.onerror=function(){t(r.error)}})}function pf(r){var e=new FileReader,t=li(e);return e.readAsArrayBuffer(r),t}function hf(r){var e=new FileReader,t=li(e);return e.readAsText(r),t}function yf(r){for(var e=new Uint8Array(r),t=new Array(e.length),n=0;n<e.length;n++)t[n]=String.fromCharCode(e[n]);return t.join("")}function pi(r){if(r.slice)return r.slice(0);var e=new Uint8Array(r.byteLength);return e.set(new Uint8Array(r)),e.buffer}function hi(){return this.bodyUsed=!1,this._initBody=function(r){this.bodyUsed=this.bodyUsed,this._bodyInit=r,r?typeof r=="string"?this._bodyText=r:V.blob&&Blob.prototype.isPrototypeOf(r)?this._bodyBlob=r:V.formData&&FormData.prototype.isPrototypeOf(r)?this._bodyFormData=r:V.searchParams&&URLSearchParams.prototype.isPrototypeOf(r)?this._bodyText=r.toString():V.arrayBuffer&&V.blob&&sf(r)?(this._bodyArrayBuffer=pi(r.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):V.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(r)||lf(r))?this._bodyArrayBuffer=pi(r):this._bodyText=r=Object.prototype.toString.call(r):this._bodyText="",this.headers.get("content-type")||(typeof r=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):V.searchParams&&URLSearchParams.prototype.isPrototypeOf(r)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},V.blob&&(this.blob=function(){var r=Ct(this);if(r)return r;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var r=Ct(this);return r||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(pf)}),this.text=function(){var r=Ct(this);if(r)return r;if(this._bodyBlob)return hf(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(yf(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},V.formData&&(this.formData=function(){return this.text().then(gf)}),this.json=function(){return this.text().then(JSON.parse)},this}var df=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function vf(r){var e=r.toUpperCase();return df.indexOf(e)>-1?e:r}function _e(r,e){if(!(this instanceof _e))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e=e||{};var t=e.body;if(r instanceof _e){if(r.bodyUsed)throw new TypeError("Already read");this.url=r.url,this.credentials=r.credentials,e.headers||(this.headers=new B(r.headers)),this.method=r.method,this.mode=r.mode,this.signal=r.signal,!t&&r._bodyInit!=null&&(t=r._bodyInit,r.bodyUsed=!0)}else this.url=String(r);if(this.credentials=e.credentials||this.credentials||"same-origin",(e.headers||!this.headers)&&(this.headers=new B(e.headers)),this.method=vf(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&t)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(t),(this.method==="GET"||this.method==="HEAD")&&(e.cache==="no-store"||e.cache==="no-cache")){var n=/([?&])_=[^&]*/;if(n.test(this.url))this.url=this.url.replace(n,"$1_="+new Date().getTime());else{var i=/\?/;this.url+=(i.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}_e.prototype.clone=function(){return new _e(this,{body:this._bodyInit})};function gf(r){var e=new FormData;return r.trim().split("&").forEach(function(t){if(t){var n=t.split("="),i=n.shift().replace(/\+/g," "),a=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(i),decodeURIComponent(a))}}),e}function _f(r){var e=new B,t=r.replace(/\r?\n[\t ]+/g," ");return t.split("\r").map(function(n){return n.indexOf(`
2
+ `)===0?n.substr(1,n.length):n}).forEach(function(n){var i=n.split(":"),a=i.shift().trim();if(a){var o=i.join(":").trim();e.append(a,o)}}),e}hi.call(_e.prototype);function W(r,e){if(!(this instanceof W))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=e.status===void 0?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=e.statusText===void 0?"":""+e.statusText,this.headers=new B(e.headers),this.url=e.url||"",this._initBody(r)}hi.call(W.prototype),W.prototype.clone=function(){return new W(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new B(this.headers),url:this.url})},W.error=function(){var r=new W(null,{status:0,statusText:""});return r.type="error",r};var mf=[301,302,303,307,308];W.redirect=function(r,e){if(mf.indexOf(e)===-1)throw new RangeError("Invalid status code");return new W(null,{status:e,headers:{location:r}})};var me=j.DOMException;try{new me}catch{me=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},me.prototype=Object.create(Error.prototype),me.prototype.constructor=me}function yi(r,e){return new Promise(function(t,n){var i=new _e(r,e);if(i.signal&&i.signal.aborted)return n(new me("Aborted","AbortError"));var a=new XMLHttpRequest;function o(){a.abort()}a.onload=function(){var s={status:a.status,statusText:a.statusText,headers:_f(a.getAllResponseHeaders()||"")};s.url="responseURL"in a?a.responseURL:s.headers.get("X-Request-URL");var c="response"in a?a.response:a.responseText;setTimeout(function(){t(new W(c,s))},0)},a.onerror=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},a.ontimeout=function(){setTimeout(function(){n(new TypeError("Network request failed"))},0)},a.onabort=function(){setTimeout(function(){n(new me("Aborted","AbortError"))},0)};function f(s){try{return s===""&&j.location.href?j.location.href:s}catch{return s}}a.open(i.method,f(i.url),!0),i.credentials==="include"?a.withCredentials=!0:i.credentials==="omit"&&(a.withCredentials=!1),"responseType"in a&&(V.blob?a.responseType="blob":V.arrayBuffer&&i.headers.get("Content-Type")&&i.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(a.responseType="arraybuffer")),e&&typeof e.headers=="object"&&!(e.headers instanceof B)?Object.getOwnPropertyNames(e.headers).forEach(function(s){a.setRequestHeader(s,Dt(e.headers[s]))}):i.headers.forEach(function(s,c){a.setRequestHeader(c,s)}),i.signal&&(i.signal.addEventListener("abort",o),a.onreadystatechange=function(){a.readyState===4&&i.signal.removeEventListener("abort",o)}),a.send(typeof i._bodyInit>"u"?null:i._bodyInit)})}yi.polyfill=!0,j.fetch||(j.fetch=yi,j.Headers=B,j.Request=_e,j.Response=W),self.fetch.bind(self);/*! js-cookie v3.0.1 | MIT */function xr(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)r[n]=t[n]}return r}var bf={read:function(r){return r[0]==='"'&&(r=r.slice(1,-1)),r.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(r){return encodeURIComponent(r).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Lt(r,e){function t(i,a,o){if(!(typeof document>"u")){o=xr({},e,o),typeof o.expires=="number"&&(o.expires=new Date(Date.now()+o.expires*864e5)),o.expires&&(o.expires=o.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var f="";for(var s in o)!o[s]||(f+="; "+s,o[s]!==!0&&(f+="="+o[s].split(";")[0]));return document.cookie=i+"="+r.write(a,i)+f}}function n(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var a=document.cookie?document.cookie.split("; "):[],o={},f=0;f<a.length;f++){var s=a[f].split("="),c=s.slice(1).join("=");try{var l=decodeURIComponent(s[0]);if(o[l]=r.read(c,l),i===l)break}catch{}}return i?o[i]:o}}return Object.create({set:t,get:n,remove:function(i,a){t(i,"",xr({},a,{expires:-1}))},withAttributes:function(i){return Lt(this.converter,xr({},this.attributes,i))},withConverter:function(i){return Lt(xr({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(r)}})}var Pr=Lt(bf,{path:"/"}),wf=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==i||o.enumerable!==!0)return!1}return!0},di=typeof Symbol<"u"&&Symbol,$f=wf,Ef=function(){return typeof di!="function"||typeof Symbol!="function"||typeof di("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:$f()},Of="Function.prototype.bind called on incompatible ",jt=Array.prototype.slice,Af=Object.prototype.toString,Sf="[object Function]",Tf=function(e){var t=this;if(typeof t!="function"||Af.call(t)!==Sf)throw new TypeError(Of+t);for(var n=jt.call(arguments,1),i,a=function(){if(this instanceof i){var l=t.apply(this,n.concat(jt.call(arguments)));return Object(l)===l?l:this}else return t.apply(e,n.concat(jt.call(arguments)))},o=Math.max(0,t.length-n.length),f=[],s=0;s<o;s++)f.push("$"+s);if(i=Function("binder","return function ("+f.join(",")+"){ return binder.apply(this,arguments); }")(a),t.prototype){var c=function(){};c.prototype=t.prototype,i.prototype=new c,c.prototype=null}return i},If=Tf,kt=Function.prototype.bind||If,xf=kt,Pf=xf.call(Function.call,Object.prototype.hasOwnProperty),T,Re=SyntaxError,vi=Function,Me=TypeError,Vt=function(r){try{return vi('"use strict"; return ('+r+").constructor;")()}catch{}},be=Object.getOwnPropertyDescriptor;if(be)try{be({},"")}catch{be=null}var qt=function(){throw new Me},Ff=be?function(){try{return arguments.callee,qt}catch{try{return be(arguments,"callee").get}catch{return qt}}}():qt,Be=Ef(),ce=Object.getPrototypeOf||function(r){return r.__proto__},Ue={},Rf=typeof Uint8Array>"u"?T:ce(Uint8Array),De={"%AggregateError%":typeof AggregateError>"u"?T:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?T:ArrayBuffer,"%ArrayIteratorPrototype%":Be?ce([][Symbol.iterator]()):T,"%AsyncFromSyncIteratorPrototype%":T,"%AsyncFunction%":Ue,"%AsyncGenerator%":Ue,"%AsyncGeneratorFunction%":Ue,"%AsyncIteratorPrototype%":Ue,"%Atomics%":typeof Atomics>"u"?T:Atomics,"%BigInt%":typeof BigInt>"u"?T:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?T:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?T:Float32Array,"%Float64Array%":typeof Float64Array>"u"?T:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?T:FinalizationRegistry,"%Function%":vi,"%GeneratorFunction%":Ue,"%Int8Array%":typeof Int8Array>"u"?T:Int8Array,"%Int16Array%":typeof Int16Array>"u"?T:Int16Array,"%Int32Array%":typeof Int32Array>"u"?T:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Be?ce(ce([][Symbol.iterator]())):T,"%JSON%":typeof JSON=="object"?JSON:T,"%Map%":typeof Map>"u"?T:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Be?T:ce(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?T:Promise,"%Proxy%":typeof Proxy>"u"?T:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?T:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?T:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Be?T:ce(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?T:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Be?ce(""[Symbol.iterator]()):T,"%Symbol%":Be?Symbol:T,"%SyntaxError%":Re,"%ThrowTypeError%":Ff,"%TypedArray%":Rf,"%TypeError%":Me,"%Uint8Array%":typeof Uint8Array>"u"?T:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?T:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?T:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?T:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?T:WeakMap,"%WeakRef%":typeof WeakRef>"u"?T:WeakRef,"%WeakSet%":typeof WeakSet>"u"?T:WeakSet},Mf=function r(e){var t;if(e==="%AsyncFunction%")t=Vt("async function () {}");else if(e==="%GeneratorFunction%")t=Vt("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Vt("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=r("%AsyncGenerator%");i&&(t=ce(i.prototype))}return De[e]=t,t},gi={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Qe=kt,Fr=Pf,Bf=Qe.call(Function.call,Array.prototype.concat),Uf=Qe.call(Function.apply,Array.prototype.splice),_i=Qe.call(Function.call,String.prototype.replace),Rr=Qe.call(Function.call,String.prototype.slice),Df=Qe.call(Function.call,RegExp.prototype.exec),Nf=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Cf=/\\(\\)?/g,Lf=function(e){var t=Rr(e,0,1),n=Rr(e,-1);if(t==="%"&&n!=="%")throw new Re("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Re("invalid intrinsic syntax, expected opening `%`");var i=[];return _i(e,Nf,function(a,o,f,s){i[i.length]=f?_i(s,Cf,"$1"):o||a}),i},jf=function(e,t){var n=e,i;if(Fr(gi,n)&&(i=gi[n],n="%"+i[0]+"%"),Fr(De,n)){var a=De[n];if(a===Ue&&(a=Mf(n)),typeof a>"u"&&!t)throw new Me("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new Re("intrinsic "+e+" does not exist!")},Gt=function(e,t){if(typeof e!="string"||e.length===0)throw new Me("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Me('"allowMissing" argument must be a boolean');if(Df(/^%?[^%]*%?$/g,e)===null)throw new Re("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Lf(e),i=n.length>0?n[0]:"",a=jf("%"+i+"%",t),o=a.name,f=a.value,s=!1,c=a.alias;c&&(i=c[0],Uf(n,Bf([0,1],c)));for(var l=1,u=!0;l<n.length;l+=1){var p=n[l],d=Rr(p,0,1),_=Rr(p,-1);if((d==='"'||d==="'"||d==="`"||_==='"'||_==="'"||_==="`")&&d!==_)throw new Re("property names with quotes must have matching quotes");if((p==="constructor"||!u)&&(s=!0),i+="."+p,o="%"+i+"%",Fr(De,o))f=De[o];else if(f!=null){if(!(p in f)){if(!t)throw new Me("base intrinsic for "+e+" exists, but the property is not available.");return}if(be&&l+1>=n.length){var E=be(f,p);u=!!E,u&&"get"in E&&!("originalValue"in E.get)?f=E.get:f=f[p]}else u=Fr(f,p),f=f[p];u&&!s&&(De[o]=f)}}return f},mi={exports:{}};(function(r){var e=kt,t=Gt,n=t("%Function.prototype.apply%"),i=t("%Function.prototype.call%"),a=t("%Reflect.apply%",!0)||e.call(i,n),o=t("%Object.getOwnPropertyDescriptor%",!0),f=t("%Object.defineProperty%",!0),s=t("%Math.max%");if(f)try{f({},"a",{value:1})}catch{f=null}r.exports=function(u){var p=a(e,i,arguments);if(o&&f){var d=o(p,"length");d.configurable&&f(p,"length",{value:1+s(0,u.length-(arguments.length-1))})}return p};var c=function(){return a(e,n,arguments)};f?f(r.exports,"apply",{value:c}):r.exports.apply=c})(mi);var bi=Gt,wi=mi.exports,kf=wi(bi("String.prototype.indexOf")),Vf=function(e,t){var n=bi(e,!!t);return typeof n=="function"&&kf(e,".prototype.")>-1?wi(n):n},Ne=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},z=[],G=[],qf=typeof Uint8Array<"u"?Uint8Array:Array,Ht=!1;function $i(){Ht=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0,t=r.length;e<t;++e)z[e]=r[e],G[r.charCodeAt(e)]=e;G["-".charCodeAt(0)]=62,G["_".charCodeAt(0)]=63}function Gf(r){Ht||$i();var e,t,n,i,a,o,f=r.length;if(f%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a=r[f-2]==="="?2:r[f-1]==="="?1:0,o=new qf(f*3/4-a),n=a>0?f-4:f;var s=0;for(e=0,t=0;e<n;e+=4,t+=3)i=G[r.charCodeAt(e)]<<18|G[r.charCodeAt(e+1)]<<12|G[r.charCodeAt(e+2)]<<6|G[r.charCodeAt(e+3)],o[s++]=i>>16&255,o[s++]=i>>8&255,o[s++]=i&255;return a===2?(i=G[r.charCodeAt(e)]<<2|G[r.charCodeAt(e+1)]>>4,o[s++]=i&255):a===1&&(i=G[r.charCodeAt(e)]<<10|G[r.charCodeAt(e+1)]<<4|G[r.charCodeAt(e+2)]>>2,o[s++]=i>>8&255,o[s++]=i&255),o}function Hf(r){return z[r>>18&63]+z[r>>12&63]+z[r>>6&63]+z[r&63]}function Wf(r,e,t){for(var n,i=[],a=e;a<t;a+=3)n=(r[a]<<16)+(r[a+1]<<8)+r[a+2],i.push(Hf(n));return i.join("")}function Ei(r){Ht||$i();for(var e,t=r.length,n=t%3,i="",a=[],o=16383,f=0,s=t-n;f<s;f+=o)a.push(Wf(r,f,f+o>s?s:f+o));return n===1?(e=r[t-1],i+=z[e>>2],i+=z[e<<4&63],i+="=="):n===2&&(e=(r[t-2]<<8)+r[t-1],i+=z[e>>10],i+=z[e>>4&63],i+=z[e<<2&63],i+="="),a.push(i),a.join("")}function Mr(r,e,t,n,i){var a,o,f=i*8-n-1,s=(1<<f)-1,c=s>>1,l=-7,u=t?i-1:0,p=t?-1:1,d=r[e+u];for(u+=p,a=d&(1<<-l)-1,d>>=-l,l+=f;l>0;a=a*256+r[e+u],u+=p,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=o*256+r[e+u],u+=p,l-=8);if(a===0)a=1-c;else{if(a===s)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-c}return(d?-1:1)*o*Math.pow(2,a-n)}function Oi(r,e,t,n,i,a){var o,f,s,c=a*8-i-1,l=(1<<c)-1,u=l>>1,p=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,_=n?1:-1,E=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(f=isNaN(e)?1:0,o=l):(o=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-o))<1&&(o--,s*=2),o+u>=1?e+=p/s:e+=p*Math.pow(2,1-u),e*s>=2&&(o++,s/=2),o+u>=l?(f=0,o=l):o+u>=1?(f=(e*s-1)*Math.pow(2,i),o=o+u):(f=e*Math.pow(2,u-1)*Math.pow(2,i),o=0));i>=8;r[t+d]=f&255,d+=_,f/=256,i-=8);for(o=o<<i|f,c+=i;c>0;r[t+d]=o&255,d+=_,o/=256,c-=8);r[t+d-_]|=E*128}var zf={}.toString,Ai=Array.isArray||function(r){return zf.call(r)=="[object Array]"};/*!
3
3
  * The buffer module from node.js, for the browser.
4
4
  *
5
5
  * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
6
6
  * @license MIT
7
- */var V0=50;y.TYPED_ARRAY_SUPPORT=Ge.TYPED_ARRAY_SUPPORT!==void 0?Ge.TYPED_ARRAY_SUPPORT:!0,Hr();function Hr(){return y.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ne(r,e){if(Hr()<e)throw new RangeError("Invalid typed array length");return y.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=y.prototype):(r===null&&(r=new y(e)),r.length=e),r}function y(r,e,t){if(!y.TYPED_ARRAY_SUPPORT&&!(this instanceof y))return new y(r,e,t);if(typeof r=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return gn(this,r)}return Ha(this,r,e,t)}y.poolSize=8192,y._augment=function(r){return r.__proto__=y.prototype,r};function Ha(r,e,t,n){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?H0(r,e,t,n):typeof e=="string"?G0(r,e,t):W0(r,e)}y.from=function(r,e,t){return Ha(null,r,e,t)},y.TYPED_ARRAY_SUPPORT&&(y.prototype.__proto__=Uint8Array.prototype,y.__proto__=Uint8Array);function Wa(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function q0(r,e,t,n){return Wa(e),e<=0?ne(r,e):t!==void 0?typeof n=="string"?ne(r,e).fill(t,n):ne(r,e).fill(t):ne(r,e)}y.alloc=function(r,e,t){return q0(null,r,e,t)};function gn(r,e){if(Wa(e),r=ne(r,e<0?0:mn(e)|0),!y.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)r[t]=0;return r}y.allocUnsafe=function(r){return gn(null,r)},y.allocUnsafeSlow=function(r){return gn(null,r)};function G0(r,e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!y.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=Xa(e,t)|0;r=ne(r,n);var i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function _n(r,e){var t=e.length<0?0:mn(e.length)|0;r=ne(r,t);for(var n=0;n<t;n+=1)r[n]=e[n]&255;return r}function H0(r,e,t,n){if(e.byteLength,t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(n||0))throw new RangeError("'length' is out of bounds");return t===void 0&&n===void 0?e=new Uint8Array(e):n===void 0?e=new Uint8Array(e,t):e=new Uint8Array(e,t,n),y.TYPED_ARRAY_SUPPORT?(r=e,r.__proto__=y.prototype):r=_n(r,e),r}function W0(r,e){if(z(e)){var t=mn(e.length)|0;return r=ne(r,t),r.length===0||e.copy(r,0,0,t),r}if(e){if(typeof ArrayBuffer<"u"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||cm(e.length)?ne(r,0):_n(r,e);if(e.type==="Buffer"&&Ga(e.data))return _n(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function mn(r){if(r>=Hr())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Hr().toString(16)+" bytes");return r|0}y.isBuffer=pm;function z(r){return!!(r!=null&&r._isBuffer)}y.compare=function(e,t){if(!z(e)||!z(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,a=0,o=Math.min(n,i);a<o;++a)if(e[a]!==t[a]){n=e[a],i=t[a];break}return n<i?-1:i<n?1:0},y.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},y.concat=function(e,t){if(!Ga(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return y.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=y.allocUnsafe(t),a=0;for(n=0;n<e.length;++n){var o=e[n];if(!z(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};function Xa(r,e){if(z(r))return r.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var t=r.length;if(t===0)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return zr(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return to(r).length;default:if(n)return zr(r).length;e=(""+e).toLowerCase(),n=!0}}y.byteLength=Xa;function X0(r,e,t){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return nm(this,e,t);case"utf8":case"utf-8":return Za(this,e,t);case"ascii":return rm(this,e,t);case"latin1":case"binary":return tm(this,e,t);case"base64":return Q0(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return im(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}y.prototype._isBuffer=!0;function $e(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}y.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)$e(this,t,t+1);return this},y.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)$e(this,t,t+3),$e(this,t+1,t+2);return this},y.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)$e(this,t,t+7),$e(this,t+1,t+6),$e(this,t+2,t+5),$e(this,t+3,t+4);return this},y.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?Za(this,0,e):X0.apply(this,arguments)},y.prototype.equals=function(e){if(!z(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:y.compare(this,e)===0},y.prototype.inspect=function(){var e="",t=V0;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},y.prototype.compare=function(e,t,n,i,a){if(!z(e))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),t<0||n>e.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&t>=n)return 0;if(i>=a)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,a>>>=0,this===e)return 0;for(var o=a-i,f=n-t,s=Math.min(o,f),l=this.slice(i,a),c=e.slice(t,n),u=0;u<s;++u)if(l[u]!==c[u]){o=l[u],f=c[u];break}return o<f?-1:f<o?1:0};function za(r,e,t,n,i){if(r.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=i?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(i)return-1;t=r.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof e=="string"&&(e=y.from(e,n)),z(e))return e.length===0?-1:Ya(r,e,t,n,i);if(typeof e=="number")return e=e&255,y.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):Ya(r,[e],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Ya(r,e,t,n,i){var a=1,o=r.length,f=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||e.length<2)return-1;a=2,o/=2,f/=2,t/=2}function s(d,_){return a===1?d[_]:d.readUInt16BE(_*a)}var l;if(i){var c=-1;for(l=t;l<o;l++)if(s(r,l)===s(e,c===-1?0:l-c)){if(c===-1&&(c=l),l-c+1===f)return c*a}else c!==-1&&(l-=l-c),c=-1}else for(t+f>o&&(t=o-f),l=t;l>=0;l--){for(var u=!0,p=0;p<f;p++)if(s(r,l+p)!==s(e,p)){u=!1;break}if(u)return l}return-1}y.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},y.prototype.indexOf=function(e,t,n){return za(this,e,t,n,!0)},y.prototype.lastIndexOf=function(e,t,n){return za(this,e,t,n,!1)};function z0(r,e,t,n){t=Number(t)||0;var i=r.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;var a=e.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var f=parseInt(e.substr(o*2,2),16);if(isNaN(f))return o;r[t+o]=f}return o}function Y0(r,e,t,n){return Yr(zr(e,r.length-t),r,t,n)}function Ka(r,e,t,n){return Yr(sm(e),r,t,n)}function K0(r,e,t,n){return Ka(r,e,t,n)}function Z0(r,e,t,n){return Yr(to(e),r,t,n)}function J0(r,e,t,n){return Yr(lm(e,r.length-t),r,t,n)}y.prototype.write=function(e,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var a=this.length-t;if((n===void 0||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return z0(this,e,t,n);case"utf8":case"utf-8":return Y0(this,e,t,n);case"ascii":return Ka(this,e,t,n);case"latin1":case"binary":return K0(this,e,t,n);case"base64":return Z0(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J0(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Q0(r,e,t){return e===0&&t===r.length?Va(r):Va(r.slice(e,t))}function Za(r,e,t){t=Math.min(r.length,t);for(var n=[],i=e;i<t;){var a=r[i],o=null,f=a>239?4:a>223?3:a>191?2:1;if(i+f<=t){var s,l,c,u;switch(f){case 1:a<128&&(o=a);break;case 2:s=r[i+1],(s&192)===128&&(u=(a&31)<<6|s&63,u>127&&(o=u));break;case 3:s=r[i+1],l=r[i+2],(s&192)===128&&(l&192)===128&&(u=(a&15)<<12|(s&63)<<6|l&63,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:s=r[i+1],l=r[i+2],c=r[i+3],(s&192)===128&&(l&192)===128&&(c&192)===128&&(u=(a&15)<<18|(s&63)<<12|(l&63)<<6|c&63,u>65535&&u<1114112&&(o=u))}}o===null?(o=65533,f=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=f}return em(n)}var Ja=4096;function em(r){var e=r.length;if(e<=Ja)return String.fromCharCode.apply(String,r);for(var t="",n=0;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=Ja));return t}function rm(r,e,t){var n="";t=Math.min(r.length,t);for(var i=e;i<t;++i)n+=String.fromCharCode(r[i]&127);return n}function tm(r,e,t){var n="";t=Math.min(r.length,t);for(var i=e;i<t;++i)n+=String.fromCharCode(r[i]);return n}function nm(r,e,t){var n=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);for(var i="",a=e;a<t;++a)i+=fm(r[a]);return i}function im(r,e,t){for(var n=r.slice(e,t),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}y.prototype.slice=function(e,t){var n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var i;if(y.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=y.prototype;else{var a=t-e;i=new y(a,void 0);for(var o=0;o<a;++o)i[o]=this[o+e]}return i};function B(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}y.prototype.readUIntLE=function(e,t,n){e=e|0,t=t|0,n||B(e,t,this.length);for(var i=this[e],a=1,o=0;++o<t&&(a*=256);)i+=this[e+o]*a;return i},y.prototype.readUIntBE=function(e,t,n){e=e|0,t=t|0,n||B(e,t,this.length);for(var i=this[e+--t],a=1;t>0&&(a*=256);)i+=this[e+--t]*a;return i},y.prototype.readUInt8=function(e,t){return t||B(e,1,this.length),this[e]},y.prototype.readUInt16LE=function(e,t){return t||B(e,2,this.length),this[e]|this[e+1]<<8},y.prototype.readUInt16BE=function(e,t){return t||B(e,2,this.length),this[e]<<8|this[e+1]},y.prototype.readUInt32LE=function(e,t){return t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},y.prototype.readUInt32BE=function(e,t){return t||B(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},y.prototype.readIntLE=function(e,t,n){e=e|0,t=t|0,n||B(e,t,this.length);for(var i=this[e],a=1,o=0;++o<t&&(a*=256);)i+=this[e+o]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*t)),i},y.prototype.readIntBE=function(e,t,n){e=e|0,t=t|0,n||B(e,t,this.length);for(var i=t,a=1,o=this[e+--i];i>0&&(a*=256);)o+=this[e+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*t)),o},y.prototype.readInt8=function(e,t){return t||B(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},y.prototype.readInt16LE=function(e,t){t||B(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},y.prototype.readInt16BE=function(e,t){t||B(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},y.prototype.readInt32LE=function(e,t){return t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},y.prototype.readInt32BE=function(e,t){return t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},y.prototype.readFloatLE=function(e,t){return t||B(e,4,this.length),Gr(this,e,!0,23,4)},y.prototype.readFloatBE=function(e,t){return t||B(e,4,this.length),Gr(this,e,!1,23,4)},y.prototype.readDoubleLE=function(e,t){return t||B(e,8,this.length),Gr(this,e,!0,52,8)},y.prototype.readDoubleBE=function(e,t){return t||B(e,8,this.length),Gr(this,e,!1,52,8)};function V(r,e,t,n,i,a){if(!z(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}y.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;V(this,e,t,n,a,0)}var o=1,f=0;for(this[t]=e&255;++f<n&&(o*=256);)this[t+f]=e/o&255;return t+n},y.prototype.writeUIntBE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;V(this,e,t,n,a,0)}var o=n-1,f=1;for(this[t+o]=e&255;--o>=0&&(f*=256);)this[t+o]=e/f&255;return t+n},y.prototype.writeUInt8=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,1,255,0),y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e&255,t+1};function Wr(r,e,t,n){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(r.length-t,2);i<a;++i)r[t+i]=(e&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}y.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Wr(this,e,t,!0),t+2},y.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Wr(this,e,t,!1),t+2};function Xr(r,e,t,n){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(r.length-t,4);i<a;++i)r[t+i]=e>>>(n?i:3-i)*8&255}y.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,4294967295,0),y.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255):Xr(this,e,t,!0),t+4},y.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,4294967295,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Xr(this,e,t,!1),t+4},y.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=t|0,!i){var a=Math.pow(2,8*n-1);V(this,e,t,n,a-1,-a)}var o=0,f=1,s=0;for(this[t]=e&255;++o<n&&(f*=256);)e<0&&s===0&&this[t+o-1]!==0&&(s=1),this[t+o]=(e/f>>0)-s&255;return t+n},y.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t=t|0,!i){var a=Math.pow(2,8*n-1);V(this,e,t,n,a-1,-a)}var o=n-1,f=1,s=0;for(this[t+o]=e&255;--o>=0&&(f*=256);)e<0&&s===0&&this[t+o+1]!==0&&(s=1),this[t+o]=(e/f>>0)-s&255;return t+n},y.prototype.writeInt8=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,1,127,-128),y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=e&255,t+1},y.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Wr(this,e,t,!0),t+2},y.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Wr(this,e,t,!1),t+2},y.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,2147483647,-2147483648),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Xr(this,e,t,!0),t+4},y.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t|0,n||V(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Xr(this,e,t,!1),t+4};function Qa(r,e,t,n,i,a){if(t+n>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function eo(r,e,t,n,i){return i||Qa(r,e,t,4),qa(r,e,t,n,23,4),t+4}y.prototype.writeFloatLE=function(e,t,n){return eo(this,e,t,!0,n)},y.prototype.writeFloatBE=function(e,t,n){return eo(this,e,t,!1,n)};function ro(r,e,t,n,i){return i||Qa(r,e,t,8),qa(r,e,t,n,52,8),t+8}y.prototype.writeDoubleLE=function(e,t,n){return ro(this,e,t,!0,n)},y.prototype.writeDoubleBE=function(e,t,n){return ro(this,e,t,!1,n)},y.prototype.copy=function(e,t,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var a=i-n,o;if(this===e&&n<t&&t<i)for(o=a-1;o>=0;--o)e[o+t]=this[o+n];else if(a<1e3||!y.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},y.prototype.fill=function(e,t,n,i){if(typeof e=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),e.length===1){var a=e.charCodeAt(0);a<256&&(e=a)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!y.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof e=="number"&&(e=e&255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var o;if(typeof e=="number")for(o=t;o<n;++o)this[o]=e;else{var f=z(e)?e:zr(new y(e,i).toString()),s=f.length;for(o=0;o<n-t;++o)this[o+t]=f[o%s]}return this};var am=/[^+\/0-9A-Za-z-_]/g;function om(r){if(r=um(r).replace(am,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function um(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function fm(r){return r<16?"0"+r.toString(16):r.toString(16)}function zr(r,e){e=e||1/0;for(var t,n=r.length,i=null,a=[],o=0;o<n;++o){if(t=r.charCodeAt(o),t>55295&&t<57344){if(!i){if(t>56319){(e-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=t;continue}if(t<56320){(e-=3)>-1&&a.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,t<128){if((e-=1)<0)break;a.push(t)}else if(t<2048){if((e-=2)<0)break;a.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;a.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;a.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return a}function sm(r){for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function lm(r,e){for(var t,n,i,a=[],o=0;o<r.length&&!((e-=2)<0);++o)t=r.charCodeAt(o),n=t>>8,i=t%256,a.push(i),a.push(n);return a}function to(r){return C0(om(r))}function Yr(r,e,t,n){for(var i=0;i<n&&!(i+t>=e.length||i>=r.length);++i)e[i+t]=r[i];return i}function cm(r){return r!==r}function pm(r){return r!=null&&(!!r._isBuffer||no(r)||hm(r))}function no(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function hm(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&no(r.slice(0,0))}function io(){throw new Error("setTimeout has not been defined")}function ao(){throw new Error("clearTimeout has not been defined")}var ce=io,pe=ao;typeof Ge.setTimeout=="function"&&(ce=setTimeout),typeof Ge.clearTimeout=="function"&&(pe=clearTimeout);function oo(r){if(ce===setTimeout)return setTimeout(r,0);if((ce===io||!ce)&&setTimeout)return ce=setTimeout,setTimeout(r,0);try{return ce(r,0)}catch{try{return ce.call(null,r,0)}catch{return ce.call(this,r,0)}}}function ym(r){if(pe===clearTimeout)return clearTimeout(r);if((pe===ao||!pe)&&clearTimeout)return pe=clearTimeout,clearTimeout(r);try{return pe(r)}catch{try{return pe.call(null,r)}catch{return pe.call(this,r)}}}var ie=[],He=!1,Ee,Kr=-1;function dm(){!He||!Ee||(He=!1,Ee.length?ie=Ee.concat(ie):Kr=-1,ie.length&&uo())}function uo(){if(!He){var r=oo(dm);He=!0;for(var e=ie.length;e;){for(Ee=ie,ie=[];++Kr<e;)Ee&&Ee[Kr].run();Kr=-1,e=ie.length}Ee=null,He=!1,ym(r)}}function vm(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];ie.push(new fo(r,e)),ie.length===1&&!He&&oo(uo)}function fo(r,e){this.fun=r,this.array=e}fo.prototype.run=function(){this.fun.apply(null,this.array)};var gm="browser",_m="browser",mm=!0,bm={},wm=[],$m="",Em={},Om={},Am={};function Oe(){}var Sm=Oe,Im=Oe,Tm=Oe,xm=Oe,Pm=Oe,Fm=Oe,Rm=Oe;function Mm(r){throw new Error("process.binding is not supported")}function Bm(){return"/"}function Um(r){throw new Error("process.chdir is not supported")}function Nm(){return 0}var We=Ge.performance||{},Dm=We.now||We.mozNow||We.msNow||We.oNow||We.webkitNow||function(){return new Date().getTime()};function Cm(r){var e=Dm.call(We)*.001,t=Math.floor(e),n=Math.floor(e%1*1e9);return r&&(t=t-r[0],n=n-r[1],n<0&&(t--,n+=1e9)),[t,n]}var Lm=new Date;function jm(){var r=new Date,e=r-Lm;return e/1e3}var Zr={nextTick:vm,title:gm,browser:mm,env:bm,argv:wm,version:$m,versions:Em,on:Sm,addListener:Im,once:Tm,off:xm,removeListener:Pm,removeAllListeners:Fm,emit:Rm,binding:Mm,cwd:Bm,chdir:Um,umask:Nm,hrtime:Cm,platform:_m,release:Om,config:Am,uptime:jm},bn;typeof Object.create=="function"?bn=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:bn=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e};var so=bn,km=/%[sdj%]/g;function Jr(r){if(!ar(r)){for(var e=[],t=0;t<arguments.length;t++)e.push(Y(arguments[t]));return e.join(" ")}for(var t=1,n=arguments,i=n.length,a=String(r).replace(km,function(f){if(f==="%%")return"%";if(t>=i)return f;switch(f){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch{return"[Circular]"}default:return f}}),o=n[t];t<i;o=n[++t])ir(o)||!Ae(o)?a+=" "+o:a+=" "+Y(o);return a}function wn(r,e){if(K(Ge.process))return function(){return wn(r,e).apply(this,arguments)};if(Zr.noDeprecation===!0)return r;var t=!1;function n(){if(!t){if(Zr.throwDeprecation)throw new Error(e);Zr.traceDeprecation?console.trace(e):console.error(e),t=!0}return r.apply(this,arguments)}return n}var Qr={},$n;function lo(r){if(K($n)&&($n=Zr.env.NODE_DEBUG||""),r=r.toUpperCase(),!Qr[r])if(new RegExp("\\b"+r+"\\b","i").test($n)){var e=0;Qr[r]=function(){var t=Jr.apply(null,arguments);console.error("%s %d: %s",r,e,t)}}else Qr[r]=function(){};return Qr[r]}function Y(r,e){var t={seen:[],stylize:qm};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),rt(e)?t.showHidden=e:e&&xn(t,e),K(t.showHidden)&&(t.showHidden=!1),K(t.depth)&&(t.depth=2),K(t.colors)&&(t.colors=!1),K(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=Vm),et(t,r,t.depth)}Y.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Y.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Vm(r,e){var t=Y.styles[e];return t?"\x1B["+Y.colors[t][0]+"m"+r+"\x1B["+Y.colors[t][1]+"m":r}function qm(r,e){return r}function Gm(r){var e={};return r.forEach(function(t,n){e[t]=!0}),e}function et(r,e,t){if(r.customInspect&&e&&fr(e.inspect)&&e.inspect!==Y&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(t,r);return ar(n)||(n=et(r,n,t)),n}var i=Hm(r,e);if(i)return i;var a=Object.keys(e),o=Gm(a);if(r.showHidden&&(a=Object.getOwnPropertyNames(e)),ur(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return En(e);if(a.length===0){if(fr(e)){var f=e.name?": "+e.name:"";return r.stylize("[Function"+f+"]","special")}if(or(e))return r.stylize(RegExp.prototype.toString.call(e),"regexp");if(tt(e))return r.stylize(Date.prototype.toString.call(e),"date");if(ur(e))return En(e)}var s="",l=!1,c=["{","}"];if(An(e)&&(l=!0,c=["[","]"]),fr(e)){var u=e.name?": "+e.name:"";s=" [Function"+u+"]"}if(or(e)&&(s=" "+RegExp.prototype.toString.call(e)),tt(e)&&(s=" "+Date.prototype.toUTCString.call(e)),ur(e)&&(s=" "+En(e)),a.length===0&&(!l||e.length==0))return c[0]+s+c[1];if(t<0)return or(e)?r.stylize(RegExp.prototype.toString.call(e),"regexp"):r.stylize("[Object]","special");r.seen.push(e);var p;return l?p=Wm(r,e,t,o,a):p=a.map(function(d){return On(r,e,t,o,d,l)}),r.seen.pop(),Xm(p,s,c)}function Hm(r,e){if(K(e))return r.stylize("undefined","undefined");if(ar(e)){var t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(t,"string")}if(Sn(e))return r.stylize(""+e,"number");if(rt(e))return r.stylize(""+e,"boolean");if(ir(e))return r.stylize("null","null")}function En(r){return"["+Error.prototype.toString.call(r)+"]"}function Wm(r,e,t,n,i){for(var a=[],o=0,f=e.length;o<f;++o)go(e,String(o))?a.push(On(r,e,t,n,String(o),!0)):a.push("");return i.forEach(function(s){s.match(/^\d+$/)||a.push(On(r,e,t,n,s,!0))}),a}function On(r,e,t,n,i,a){var o,f,s;if(s=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},s.get?s.set?f=r.stylize("[Getter/Setter]","special"):f=r.stylize("[Getter]","special"):s.set&&(f=r.stylize("[Setter]","special")),go(n,i)||(o="["+i+"]"),f||(r.seen.indexOf(s.value)<0?(ir(t)?f=et(r,s.value,null):f=et(r,s.value,t-1),f.indexOf(`
7
+ */var Xf=50;y.TYPED_ARRAY_SUPPORT=Ne.TYPED_ARRAY_SUPPORT!==void 0?Ne.TYPED_ARRAY_SUPPORT:!0,Br();function Br(){return y.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function ne(r,e){if(Br()<e)throw new RangeError("Invalid typed array length");return y.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(e),r.__proto__=y.prototype):(r===null&&(r=new y(e)),r.length=e),r}function y(r,e,t){if(!y.TYPED_ARRAY_SUPPORT&&!(this instanceof y))return new y(r,e,t);if(typeof r=="number"){if(typeof e=="string")throw new Error("If encoding is specified then the first argument must be a string");return Wt(this,r)}return Si(this,r,e,t)}y.poolSize=8192,y._augment=function(r){return r.__proto__=y.prototype,r};function Si(r,e,t,n){if(typeof e=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer?Zf(r,e,t,n):typeof e=="string"?Kf(r,e,t):Jf(r,e)}y.from=function(r,e,t){return Si(null,r,e,t)},y.TYPED_ARRAY_SUPPORT&&(y.prototype.__proto__=Uint8Array.prototype,y.__proto__=Uint8Array);function Ti(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function Yf(r,e,t,n){return Ti(e),e<=0?ne(r,e):t!==void 0?typeof n=="string"?ne(r,e).fill(t,n):ne(r,e).fill(t):ne(r,e)}y.alloc=function(r,e,t){return Yf(null,r,e,t)};function Wt(r,e){if(Ti(e),r=ne(r,e<0?0:Xt(e)|0),!y.TYPED_ARRAY_SUPPORT)for(var t=0;t<e;++t)r[t]=0;return r}y.allocUnsafe=function(r){return Wt(null,r)},y.allocUnsafeSlow=function(r){return Wt(null,r)};function Kf(r,e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!y.isEncoding(t))throw new TypeError('"encoding" must be a valid string encoding');var n=Ii(e,t)|0;r=ne(r,n);var i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function zt(r,e){var t=e.length<0?0:Xt(e.length)|0;r=ne(r,t);for(var n=0;n<t;n+=1)r[n]=e[n]&255;return r}function Zf(r,e,t,n){if(e.byteLength,t<0||e.byteLength<t)throw new RangeError("'offset' is out of bounds");if(e.byteLength<t+(n||0))throw new RangeError("'length' is out of bounds");return t===void 0&&n===void 0?e=new Uint8Array(e):n===void 0?e=new Uint8Array(e,t):e=new Uint8Array(e,t,n),y.TYPED_ARRAY_SUPPORT?(r=e,r.__proto__=y.prototype):r=zt(r,e),r}function Jf(r,e){if(X(e)){var t=Xt(e.length)|0;return r=ne(r,t),r.length===0||e.copy(r,0,0,t),r}if(e){if(typeof ArrayBuffer<"u"&&e.buffer instanceof ArrayBuffer||"length"in e)return typeof e.length!="number"||gs(e.length)?ne(r,0):zt(r,e);if(e.type==="Buffer"&&Ai(e.data))return zt(r,e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function Xt(r){if(r>=Br())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Br().toString(16)+" bytes");return r|0}y.isBuffer=_s;function X(r){return!!(r!=null&&r._isBuffer)}y.compare=function(e,t){if(!X(e)||!X(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,a=0,o=Math.min(n,i);a<o;++a)if(e[a]!==t[a]){n=e[a],i=t[a];break}return n<i?-1:i<n?1:0},y.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},y.concat=function(e,t){if(!Ai(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return y.alloc(0);var n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var i=y.allocUnsafe(t),a=0;for(n=0;n<e.length;++n){var o=e[n];if(!X(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,a),a+=o.length}return i};function Ii(r,e){if(X(r))return r.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var t=r.length;if(t===0)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return Nr(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return t*2;case"hex":return t>>>1;case"base64":return Ni(r).length;default:if(n)return Nr(r).length;e=(""+e).toLowerCase(),n=!0}}y.byteLength=Ii;function Qf(r,e,t){var n=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((t===void 0||t>this.length)&&(t=this.length),t<=0)||(t>>>=0,e>>>=0,t<=e))return"";for(r||(r="utf8");;)switch(r){case"hex":return ss(this,e,t);case"utf8":case"utf-8":return Ri(this,e,t);case"ascii":return us(this,e,t);case"latin1":case"binary":return fs(this,e,t);case"base64":return as(this,e,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return cs(this,e,t);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}y.prototype._isBuffer=!0;function we(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}y.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)we(this,t,t+1);return this},y.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)we(this,t,t+3),we(this,t+1,t+2);return this},y.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)we(this,t,t+7),we(this,t+1,t+6),we(this,t+2,t+5),we(this,t+3,t+4);return this},y.prototype.toString=function(){var e=this.length|0;return e===0?"":arguments.length===0?Ri(this,0,e):Qf.apply(this,arguments)},y.prototype.equals=function(e){if(!X(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:y.compare(this,e)===0},y.prototype.inspect=function(){var e="",t=Xf;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},y.prototype.compare=function(e,t,n,i,a){if(!X(e))throw new TypeError("Argument must be a Buffer");if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),i===void 0&&(i=0),a===void 0&&(a=this.length),t<0||n>e.length||i<0||a>this.length)throw new RangeError("out of range index");if(i>=a&&t>=n)return 0;if(i>=a)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,a>>>=0,this===e)return 0;for(var o=a-i,f=n-t,s=Math.min(o,f),c=this.slice(i,a),l=e.slice(t,n),u=0;u<s;++u)if(c[u]!==l[u]){o=c[u],f=l[u];break}return o<f?-1:f<o?1:0};function xi(r,e,t,n,i){if(r.length===0)return-1;if(typeof t=="string"?(n=t,t=0):t>2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,isNaN(t)&&(t=i?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(i)return-1;t=r.length-1}else if(t<0)if(i)t=0;else return-1;if(typeof e=="string"&&(e=y.from(e,n)),X(e))return e.length===0?-1:Pi(r,e,t,n,i);if(typeof e=="number")return e=e&255,y.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,e,t):Uint8Array.prototype.lastIndexOf.call(r,e,t):Pi(r,[e],t,n,i);throw new TypeError("val must be string, number or Buffer")}function Pi(r,e,t,n,i){var a=1,o=r.length,f=e.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||e.length<2)return-1;a=2,o/=2,f/=2,t/=2}function s(d,_){return a===1?d[_]:d.readUInt16BE(_*a)}var c;if(i){var l=-1;for(c=t;c<o;c++)if(s(r,c)===s(e,l===-1?0:c-l)){if(l===-1&&(l=c),c-l+1===f)return l*a}else l!==-1&&(c-=c-l),l=-1}else for(t+f>o&&(t=o-f),c=t;c>=0;c--){for(var u=!0,p=0;p<f;p++)if(s(r,c+p)!==s(e,p)){u=!1;break}if(u)return c}return-1}y.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},y.prototype.indexOf=function(e,t,n){return xi(this,e,t,n,!0)},y.prototype.lastIndexOf=function(e,t,n){return xi(this,e,t,n,!1)};function es(r,e,t,n){t=Number(t)||0;var i=r.length-t;n?(n=Number(n),n>i&&(n=i)):n=i;var a=e.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var f=parseInt(e.substr(o*2,2),16);if(isNaN(f))return o;r[t+o]=f}return o}function rs(r,e,t,n){return Cr(Nr(e,r.length-t),r,t,n)}function Fi(r,e,t,n){return Cr(ds(e),r,t,n)}function ts(r,e,t,n){return Fi(r,e,t,n)}function ns(r,e,t,n){return Cr(Ni(e),r,t,n)}function is(r,e,t,n){return Cr(vs(e,r.length-t),r,t,n)}y.prototype.write=function(e,t,n,i){if(t===void 0)i="utf8",n=this.length,t=0;else if(n===void 0&&typeof t=="string")i=t,n=this.length,t=0;else if(isFinite(t))t=t|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var a=this.length-t;if((n===void 0||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return es(this,e,t,n);case"utf8":case"utf-8":return rs(this,e,t,n);case"ascii":return Fi(this,e,t,n);case"latin1":case"binary":return ts(this,e,t,n);case"base64":return ns(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return is(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function as(r,e,t){return e===0&&t===r.length?Ei(r):Ei(r.slice(e,t))}function Ri(r,e,t){t=Math.min(r.length,t);for(var n=[],i=e;i<t;){var a=r[i],o=null,f=a>239?4:a>223?3:a>191?2:1;if(i+f<=t){var s,c,l,u;switch(f){case 1:a<128&&(o=a);break;case 2:s=r[i+1],(s&192)===128&&(u=(a&31)<<6|s&63,u>127&&(o=u));break;case 3:s=r[i+1],c=r[i+2],(s&192)===128&&(c&192)===128&&(u=(a&15)<<12|(s&63)<<6|c&63,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:s=r[i+1],c=r[i+2],l=r[i+3],(s&192)===128&&(c&192)===128&&(l&192)===128&&(u=(a&15)<<18|(s&63)<<12|(c&63)<<6|l&63,u>65535&&u<1114112&&(o=u))}}o===null?(o=65533,f=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),i+=f}return os(n)}var Mi=4096;function os(r){var e=r.length;if(e<=Mi)return String.fromCharCode.apply(String,r);for(var t="",n=0;n<e;)t+=String.fromCharCode.apply(String,r.slice(n,n+=Mi));return t}function us(r,e,t){var n="";t=Math.min(r.length,t);for(var i=e;i<t;++i)n+=String.fromCharCode(r[i]&127);return n}function fs(r,e,t){var n="";t=Math.min(r.length,t);for(var i=e;i<t;++i)n+=String.fromCharCode(r[i]);return n}function ss(r,e,t){var n=r.length;(!e||e<0)&&(e=0),(!t||t<0||t>n)&&(t=n);for(var i="",a=e;a<t;++a)i+=ys(r[a]);return i}function cs(r,e,t){for(var n=r.slice(e,t),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+n[a+1]*256);return i}y.prototype.slice=function(e,t){var n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);var i;if(y.TYPED_ARRAY_SUPPORT)i=this.subarray(e,t),i.__proto__=y.prototype;else{var a=t-e;i=new y(a,void 0);for(var o=0;o<a;++o)i[o]=this[o+e]}return i};function U(r,e,t){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+e>t)throw new RangeError("Trying to access beyond buffer length")}y.prototype.readUIntLE=function(e,t,n){e=e|0,t=t|0,n||U(e,t,this.length);for(var i=this[e],a=1,o=0;++o<t&&(a*=256);)i+=this[e+o]*a;return i},y.prototype.readUIntBE=function(e,t,n){e=e|0,t=t|0,n||U(e,t,this.length);for(var i=this[e+--t],a=1;t>0&&(a*=256);)i+=this[e+--t]*a;return i},y.prototype.readUInt8=function(e,t){return t||U(e,1,this.length),this[e]},y.prototype.readUInt16LE=function(e,t){return t||U(e,2,this.length),this[e]|this[e+1]<<8},y.prototype.readUInt16BE=function(e,t){return t||U(e,2,this.length),this[e]<<8|this[e+1]},y.prototype.readUInt32LE=function(e,t){return t||U(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},y.prototype.readUInt32BE=function(e,t){return t||U(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},y.prototype.readIntLE=function(e,t,n){e=e|0,t=t|0,n||U(e,t,this.length);for(var i=this[e],a=1,o=0;++o<t&&(a*=256);)i+=this[e+o]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*t)),i},y.prototype.readIntBE=function(e,t,n){e=e|0,t=t|0,n||U(e,t,this.length);for(var i=t,a=1,o=this[e+--i];i>0&&(a*=256);)o+=this[e+--i]*a;return a*=128,o>=a&&(o-=Math.pow(2,8*t)),o},y.prototype.readInt8=function(e,t){return t||U(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},y.prototype.readInt16LE=function(e,t){t||U(e,2,this.length);var n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},y.prototype.readInt16BE=function(e,t){t||U(e,2,this.length);var n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},y.prototype.readInt32LE=function(e,t){return t||U(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},y.prototype.readInt32BE=function(e,t){return t||U(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},y.prototype.readFloatLE=function(e,t){return t||U(e,4,this.length),Mr(this,e,!0,23,4)},y.prototype.readFloatBE=function(e,t){return t||U(e,4,this.length),Mr(this,e,!1,23,4)},y.prototype.readDoubleLE=function(e,t){return t||U(e,8,this.length),Mr(this,e,!0,52,8)},y.prototype.readDoubleBE=function(e,t){return t||U(e,8,this.length),Mr(this,e,!1,52,8)};function q(r,e,t,n,i,a){if(!X(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(t+n>r.length)throw new RangeError("Index out of range")}y.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;q(this,e,t,n,a,0)}var o=1,f=0;for(this[t]=e&255;++f<n&&(o*=256);)this[t+f]=e/o&255;return t+n},y.prototype.writeUIntBE=function(e,t,n,i){if(e=+e,t=t|0,n=n|0,!i){var a=Math.pow(2,8*n)-1;q(this,e,t,n,a,0)}var o=n-1,f=1;for(this[t+o]=e&255;--o>=0&&(f*=256);)this[t+o]=e/f&255;return t+n},y.prototype.writeUInt8=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,1,255,0),y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e&255,t+1};function Ur(r,e,t,n){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(r.length-t,2);i<a;++i)r[t+i]=(e&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}y.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Ur(this,e,t,!0),t+2},y.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,2,65535,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Ur(this,e,t,!1),t+2};function Dr(r,e,t,n){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(r.length-t,4);i<a;++i)r[t+i]=e>>>(n?i:3-i)*8&255}y.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,4,4294967295,0),y.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255):Dr(this,e,t,!0),t+4},y.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,4,4294967295,0),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Dr(this,e,t,!1),t+4},y.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=t|0,!i){var a=Math.pow(2,8*n-1);q(this,e,t,n,a-1,-a)}var o=0,f=1,s=0;for(this[t]=e&255;++o<n&&(f*=256);)e<0&&s===0&&this[t+o-1]!==0&&(s=1),this[t+o]=(e/f>>0)-s&255;return t+n},y.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t=t|0,!i){var a=Math.pow(2,8*n-1);q(this,e,t,n,a-1,-a)}var o=n-1,f=1,s=0;for(this[t+o]=e&255;--o>=0&&(f*=256);)e<0&&s===0&&this[t+o+1]!==0&&(s=1),this[t+o]=(e/f>>0)-s&255;return t+n},y.prototype.writeInt8=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,1,127,-128),y.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=e&255,t+1},y.prototype.writeInt16LE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8):Ur(this,e,t,!0),t+2},y.prototype.writeInt16BE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,2,32767,-32768),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e&255):Ur(this,e,t,!1),t+2},y.prototype.writeInt32LE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,4,2147483647,-2147483648),y.TYPED_ARRAY_SUPPORT?(this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):Dr(this,e,t,!0),t+4},y.prototype.writeInt32BE=function(e,t,n){return e=+e,t=t|0,n||q(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),y.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255):Dr(this,e,t,!1),t+4};function Bi(r,e,t,n,i,a){if(t+n>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function Ui(r,e,t,n,i){return i||Bi(r,e,t,4),Oi(r,e,t,n,23,4),t+4}y.prototype.writeFloatLE=function(e,t,n){return Ui(this,e,t,!0,n)},y.prototype.writeFloatBE=function(e,t,n){return Ui(this,e,t,!1,n)};function Di(r,e,t,n,i){return i||Bi(r,e,t,8),Oi(r,e,t,n,52,8),t+8}y.prototype.writeDoubleLE=function(e,t,n){return Di(this,e,t,!0,n)},y.prototype.writeDoubleBE=function(e,t,n){return Di(this,e,t,!1,n)},y.prototype.copy=function(e,t,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i<n&&(i=n),i===n||e.length===0||this.length===0)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var a=i-n,o;if(this===e&&n<t&&t<i)for(o=a-1;o>=0;--o)e[o+t]=this[o+n];else if(a<1e3||!y.TYPED_ARRAY_SUPPORT)for(o=0;o<a;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+a),t);return a},y.prototype.fill=function(e,t,n,i){if(typeof e=="string"){if(typeof t=="string"?(i=t,t=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),e.length===1){var a=e.charCodeAt(0);a<256&&(e=a)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!y.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof e=="number"&&(e=e&255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;t=t>>>0,n=n===void 0?this.length:n>>>0,e||(e=0);var o;if(typeof e=="number")for(o=t;o<n;++o)this[o]=e;else{var f=X(e)?e:Nr(new y(e,i).toString()),s=f.length;for(o=0;o<n-t;++o)this[o+t]=f[o%s]}return this};var ls=/[^+\/0-9A-Za-z-_]/g;function ps(r){if(r=hs(r).replace(ls,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function hs(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function ys(r){return r<16?"0"+r.toString(16):r.toString(16)}function Nr(r,e){e=e||1/0;for(var t,n=r.length,i=null,a=[],o=0;o<n;++o){if(t=r.charCodeAt(o),t>55295&&t<57344){if(!i){if(t>56319){(e-=3)>-1&&a.push(239,191,189);continue}else if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=t;continue}if(t<56320){(e-=3)>-1&&a.push(239,191,189),i=t;continue}t=(i-55296<<10|t-56320)+65536}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,t<128){if((e-=1)<0)break;a.push(t)}else if(t<2048){if((e-=2)<0)break;a.push(t>>6|192,t&63|128)}else if(t<65536){if((e-=3)<0)break;a.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((e-=4)<0)break;a.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else throw new Error("Invalid code point")}return a}function ds(r){for(var e=[],t=0;t<r.length;++t)e.push(r.charCodeAt(t)&255);return e}function vs(r,e){for(var t,n,i,a=[],o=0;o<r.length&&!((e-=2)<0);++o)t=r.charCodeAt(o),n=t>>8,i=t%256,a.push(i),a.push(n);return a}function Ni(r){return Gf(ps(r))}function Cr(r,e,t,n){for(var i=0;i<n&&!(i+t>=e.length||i>=r.length);++i)e[i+t]=r[i];return i}function gs(r){return r!==r}function _s(r){return r!=null&&(!!r._isBuffer||Ci(r)||ms(r))}function Ci(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function ms(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Ci(r.slice(0,0))}function Li(){throw new Error("setTimeout has not been defined")}function ji(){throw new Error("clearTimeout has not been defined")}var le=Li,pe=ji;typeof Ne.setTimeout=="function"&&(le=setTimeout),typeof Ne.clearTimeout=="function"&&(pe=clearTimeout);function ki(r){if(le===setTimeout)return setTimeout(r,0);if((le===Li||!le)&&setTimeout)return le=setTimeout,setTimeout(r,0);try{return le(r,0)}catch{try{return le.call(null,r,0)}catch{return le.call(this,r,0)}}}function bs(r){if(pe===clearTimeout)return clearTimeout(r);if((pe===ji||!pe)&&clearTimeout)return pe=clearTimeout,clearTimeout(r);try{return pe(r)}catch{try{return pe.call(null,r)}catch{return pe.call(this,r)}}}var ie=[],Ce=!1,$e,Lr=-1;function ws(){!Ce||!$e||(Ce=!1,$e.length?ie=$e.concat(ie):Lr=-1,ie.length&&Vi())}function Vi(){if(!Ce){var r=ki(ws);Ce=!0;for(var e=ie.length;e;){for($e=ie,ie=[];++Lr<e;)$e&&$e[Lr].run();Lr=-1,e=ie.length}$e=null,Ce=!1,bs(r)}}function $s(r){var e=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)e[t-1]=arguments[t];ie.push(new qi(r,e)),ie.length===1&&!Ce&&ki(Vi)}function qi(r,e){this.fun=r,this.array=e}qi.prototype.run=function(){this.fun.apply(null,this.array)};var Es="browser",Os="browser",As=!0,Ss={},Ts=[],Is="",xs={},Ps={},Fs={};function Ee(){}var Rs=Ee,Ms=Ee,Bs=Ee,Us=Ee,Ds=Ee,Ns=Ee,Cs=Ee;function Ls(r){throw new Error("process.binding is not supported")}function js(){return"/"}function ks(r){throw new Error("process.chdir is not supported")}function Vs(){return 0}var Le=Ne.performance||{},qs=Le.now||Le.mozNow||Le.msNow||Le.oNow||Le.webkitNow||function(){return new Date().getTime()};function Gs(r){var e=qs.call(Le)*.001,t=Math.floor(e),n=Math.floor(e%1*1e9);return r&&(t=t-r[0],n=n-r[1],n<0&&(t--,n+=1e9)),[t,n]}var Hs=new Date;function Ws(){var r=new Date,e=r-Hs;return e/1e3}var jr={nextTick:$s,title:Es,browser:As,env:Ss,argv:Ts,version:Is,versions:xs,on:Rs,addListener:Ms,once:Bs,off:Us,removeListener:Ds,removeAllListeners:Ns,emit:Cs,binding:Ls,cwd:js,chdir:ks,umask:Vs,hrtime:Gs,platform:Os,release:Ps,config:Fs,uptime:Ws},Yt;typeof Object.create=="function"?Yt=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:Yt=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e};var Gi=Yt,zs=/%[sdj%]/g;function kr(r){if(!rr(r)){for(var e=[],t=0;t<arguments.length;t++)e.push(Y(arguments[t]));return e.join(" ")}for(var t=1,n=arguments,i=n.length,a=String(r).replace(zs,function(f){if(f==="%%")return"%";if(t>=i)return f;switch(f){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch{return"[Circular]"}default:return f}}),o=n[t];t<i;o=n[++t])er(o)||!Oe(o)?a+=" "+o:a+=" "+Y(o);return a}function Kt(r,e){if(K(Ne.process))return function(){return Kt(r,e).apply(this,arguments)};if(jr.noDeprecation===!0)return r;var t=!1;function n(){if(!t){if(jr.throwDeprecation)throw new Error(e);jr.traceDeprecation?console.trace(e):console.error(e),t=!0}return r.apply(this,arguments)}return n}var Vr={},Zt;function Hi(r){if(K(Zt)&&(Zt=jr.env.NODE_DEBUG||""),r=r.toUpperCase(),!Vr[r])if(new RegExp("\\b"+r+"\\b","i").test(Zt)){var e=0;Vr[r]=function(){var t=kr.apply(null,arguments);console.error("%s %d: %s",r,e,t)}}else Vr[r]=function(){};return Vr[r]}function Y(r,e){var t={seen:[],stylize:Ys};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),Gr(e)?t.showHidden=e:e&&an(t,e),K(t.showHidden)&&(t.showHidden=!1),K(t.depth)&&(t.depth=2),K(t.colors)&&(t.colors=!1),K(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=Xs),qr(t,r,t.depth)}Y.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},Y.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function Xs(r,e){var t=Y.styles[e];return t?"\x1B["+Y.colors[t][0]+"m"+r+"\x1B["+Y.colors[t][1]+"m":r}function Ys(r,e){return r}function Ks(r){var e={};return r.forEach(function(t,n){e[t]=!0}),e}function qr(r,e,t){if(r.customInspect&&e&&ir(e.inspect)&&e.inspect!==Y&&!(e.constructor&&e.constructor.prototype===e)){var n=e.inspect(t,r);return rr(n)||(n=qr(r,n,t)),n}var i=Zs(r,e);if(i)return i;var a=Object.keys(e),o=Ks(a);if(r.showHidden&&(a=Object.getOwnPropertyNames(e)),nr(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return Jt(e);if(a.length===0){if(ir(e)){var f=e.name?": "+e.name:"";return r.stylize("[Function"+f+"]","special")}if(tr(e))return r.stylize(RegExp.prototype.toString.call(e),"regexp");if(Hr(e))return r.stylize(Date.prototype.toString.call(e),"date");if(nr(e))return Jt(e)}var s="",c=!1,l=["{","}"];if(en(e)&&(c=!0,l=["[","]"]),ir(e)){var u=e.name?": "+e.name:"";s=" [Function"+u+"]"}if(tr(e)&&(s=" "+RegExp.prototype.toString.call(e)),Hr(e)&&(s=" "+Date.prototype.toUTCString.call(e)),nr(e)&&(s=" "+Jt(e)),a.length===0&&(!c||e.length==0))return l[0]+s+l[1];if(t<0)return tr(e)?r.stylize(RegExp.prototype.toString.call(e),"regexp"):r.stylize("[Object]","special");r.seen.push(e);var p;return c?p=Js(r,e,t,o,a):p=a.map(function(d){return Qt(r,e,t,o,d,c)}),r.seen.pop(),Qs(p,s,l)}function Zs(r,e){if(K(e))return r.stylize("undefined","undefined");if(rr(e)){var t="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return r.stylize(t,"string")}if(rn(e))return r.stylize(""+e,"number");if(Gr(e))return r.stylize(""+e,"boolean");if(er(e))return r.stylize("null","null")}function Jt(r){return"["+Error.prototype.toString.call(r)+"]"}function Js(r,e,t,n,i){for(var a=[],o=0,f=e.length;o<f;++o)Zi(e,String(o))?a.push(Qt(r,e,t,n,String(o),!0)):a.push("");return i.forEach(function(s){s.match(/^\d+$/)||a.push(Qt(r,e,t,n,s,!0))}),a}function Qt(r,e,t,n,i,a){var o,f,s;if(s=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]},s.get?s.set?f=r.stylize("[Getter/Setter]","special"):f=r.stylize("[Getter]","special"):s.set&&(f=r.stylize("[Setter]","special")),Zi(n,i)||(o="["+i+"]"),f||(r.seen.indexOf(s.value)<0?(er(t)?f=qr(r,s.value,null):f=qr(r,s.value,t-1),f.indexOf(`
8
8
  `)>-1&&(a?f=f.split(`
9
- `).map(function(l){return" "+l}).join(`
9
+ `).map(function(c){return" "+c}).join(`
10
10
  `).substr(2):f=`
11
11
  `+f.split(`
12
- `).map(function(l){return" "+l}).join(`
13
- `))):f=r.stylize("[Circular]","special")),K(o)){if(a&&i.match(/^\d+$/))return f;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=r.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=r.stylize(o,"string"))}return o+": "+f}function Xm(r,e,t){var n=r.reduce(function(i,a){return a.indexOf(`
12
+ `).map(function(c){return" "+c}).join(`
13
+ `))):f=r.stylize("[Circular]","special")),K(o)){if(a&&i.match(/^\d+$/))return f;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=r.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=r.stylize(o,"string"))}return o+": "+f}function Qs(r,e,t){var n=r.reduce(function(i,a){return a.indexOf(`
14
14
  `)>=0,i+a.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?t[0]+(e===""?"":e+`
15
15
  `)+" "+r.join(`,
16
- `)+" "+t[1]:t[0]+e+" "+r.join(", ")+" "+t[1]}function An(r){return Array.isArray(r)}function rt(r){return typeof r=="boolean"}function ir(r){return r===null}function co(r){return r==null}function Sn(r){return typeof r=="number"}function ar(r){return typeof r=="string"}function po(r){return typeof r=="symbol"}function K(r){return r===void 0}function or(r){return Ae(r)&&In(r)==="[object RegExp]"}function Ae(r){return typeof r=="object"&&r!==null}function tt(r){return Ae(r)&&In(r)==="[object Date]"}function ur(r){return Ae(r)&&(In(r)==="[object Error]"||r instanceof Error)}function fr(r){return typeof r=="function"}function ho(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r>"u"}function yo(r){return y.isBuffer(r)}function In(r){return Object.prototype.toString.call(r)}function Tn(r){return r<10?"0"+r.toString(10):r.toString(10)}var zm=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ym(){var r=new Date,e=[Tn(r.getHours()),Tn(r.getMinutes()),Tn(r.getSeconds())].join(":");return[r.getDate(),zm[r.getMonth()],e].join(" ")}function vo(){console.log("%s - %s",Ym(),Jr.apply(null,arguments))}function xn(r,e){if(!e||!Ae(e))return r;for(var t=Object.keys(e),n=t.length;n--;)r[t[n]]=e[t[n]];return r}function go(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var Km={inherits:so,_extend:xn,log:vo,isBuffer:yo,isPrimitive:ho,isFunction:fr,isError:ur,isDate:tt,isObject:Ae,isRegExp:or,isUndefined:K,isSymbol:po,isString:ar,isNumber:Sn,isNullOrUndefined:co,isNull:ir,isBoolean:rt,isArray:An,inspect:Y,deprecate:wn,format:Jr,debuglog:lo},Zm=Object.freeze({__proto__:null,format:Jr,deprecate:wn,debuglog:lo,inspect:Y,isArray:An,isBoolean:rt,isNull:ir,isNullOrUndefined:co,isNumber:Sn,isString:ar,isSymbol:po,isUndefined:K,isRegExp:or,isObject:Ae,isDate:tt,isError:ur,isFunction:fr,isPrimitive:ho,isBuffer:yo,log:vo,inherits:so,_extend:xn,default:Km}),Jm=Ke(Zm),Qm=Jm.inspect,Pn=typeof Map=="function"&&Map.prototype,Fn=Object.getOwnPropertyDescriptor&&Pn?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,nt=Pn&&Fn&&typeof Fn.get=="function"?Fn.get:null,eb=Pn&&Map.prototype.forEach,Rn=typeof Set=="function"&&Set.prototype,Mn=Object.getOwnPropertyDescriptor&&Rn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,it=Rn&&Mn&&typeof Mn.get=="function"?Mn.get:null,rb=Rn&&Set.prototype.forEach,tb=typeof WeakMap=="function"&&WeakMap.prototype,sr=tb?WeakMap.prototype.has:null,nb=typeof WeakSet=="function"&&WeakSet.prototype,lr=nb?WeakSet.prototype.has:null,ib=typeof WeakRef=="function"&&WeakRef.prototype,_o=ib?WeakRef.prototype.deref:null,ab=Boolean.prototype.valueOf,ob=Object.prototype.toString,ub=Function.prototype.toString,fb=String.prototype.match,Bn=String.prototype.slice,he=String.prototype.replace,sb=String.prototype.toUpperCase,mo=String.prototype.toLowerCase,bo=RegExp.prototype.test,wo=Array.prototype.concat,Z=Array.prototype.join,lb=Array.prototype.slice,$o=Math.floor,Un=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Nn=Object.getOwnPropertySymbols,Dn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Xe=typeof Symbol=="function"&&typeof Symbol.iterator=="object",j=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Xe?"object":"symbol")?Symbol.toStringTag:null,Eo=Object.prototype.propertyIsEnumerable,Oo=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function Ao(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||bo.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-$o(-r):$o(r);if(n!==r){var i=String(n),a=Bn.call(e,i.length+1);return he.call(i,t,"$&_")+"."+he.call(he.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return he.call(e,t,"$&_")}var Cn=Qm,So=Cn.custom,Io=Po(So)?So:null,cb=function r(e,t,n,i){var a=t||{};if(ye(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ye(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=ye(a,"customInspect")?a.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ye(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ye(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var f=a.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Ro(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var s=String(e);return f?Ao(e,s):s}if(typeof e=="bigint"){var l=String(e)+"n";return f?Ao(e,l):l}var c=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=c&&c>0&&typeof e=="object")return Ln(e)?"[Array]":"[Object]";var u=xb(a,n);if(typeof i>"u")i=[];else if(Fo(i,e)>=0)return"[Circular]";function p(ee,ve,fe){if(ve&&(i=lb.call(i),i.push(ve)),fe){var Ir={depth:a.depth};return ye(a,"quoteStyle")&&(Ir.quoteStyle=a.quoteStyle),r(ee,Ir,n+1,i)}return r(ee,a,n+1,i)}if(typeof e=="function"&&!xo(e)){var d=bb(e),_=at(e,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(_.length>0?" { "+Z.call(_,", ")+" }":"")}if(Po(e)){var E=Xe?he.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Dn.call(e);return typeof e=="object"&&!Xe?cr(E):E}if(Sb(e)){for(var $="<"+mo.call(String(e.nodeName)),b=e.attributes||[],S=0;S<b.length;S++)$+=" "+b[S].name+"="+To(pb(b[S].value),"double",a);return $+=">",e.childNodes&&e.childNodes.length&&($+="..."),$+="</"+mo.call(String(e.nodeName))+">",$}if(Ln(e)){if(e.length===0)return"[]";var h=at(e,p);return u&&!Tb(h)?"["+kn(h,u)+"]":"[ "+Z.call(h,", ")+" ]"}if(yb(e)){var A=at(e,p);return!("cause"in Error.prototype)&&"cause"in e&&!Eo.call(e,"cause")?"{ ["+String(e)+"] "+Z.call(wo.call("[cause]: "+p(e.cause),A),", ")+" }":A.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Z.call(A,", ")+" }"}if(typeof e=="object"&&o){if(Io&&typeof e[Io]=="function"&&Cn)return Cn(e,{depth:c-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(wb(e)){var T=[];return eb.call(e,function(ee,ve){T.push(p(ve,e,!0)+" => "+p(ee,e))}),Mo("Map",nt.call(e),T,u)}if(Ob(e)){var F=[];return rb.call(e,function(ee){F.push(p(ee,e))}),Mo("Set",it.call(e),F,u)}if($b(e))return jn("WeakMap");if(Ab(e))return jn("WeakSet");if(Eb(e))return jn("WeakRef");if(vb(e))return cr(p(Number(e)));if(_b(e))return cr(p(Un.call(e)));if(gb(e))return cr(ab.call(e));if(db(e))return cr(p(String(e)));if(!hb(e)&&!xo(e)){var m=at(e,p),v=Oo?Oo(e)===Object.prototype:e instanceof Object||e.constructor===Object,g=e instanceof Object?"":"null prototype",w=!v&&j&&Object(e)===e&&j in e?Bn.call(de(e),8,-1):g?"Object":"",O=v||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",C=O+(w||g?"["+Z.call(wo.call([],w||[],g||[]),": ")+"] ":"");return m.length===0?C+"{}":u?C+"{"+kn(m,u)+"}":C+"{ "+Z.call(m,", ")+" }"}return String(e)};function To(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function pb(r){return he.call(String(r),/"/g,"&quot;")}function Ln(r){return de(r)==="[object Array]"&&(!j||!(typeof r=="object"&&j in r))}function hb(r){return de(r)==="[object Date]"&&(!j||!(typeof r=="object"&&j in r))}function xo(r){return de(r)==="[object RegExp]"&&(!j||!(typeof r=="object"&&j in r))}function yb(r){return de(r)==="[object Error]"&&(!j||!(typeof r=="object"&&j in r))}function db(r){return de(r)==="[object String]"&&(!j||!(typeof r=="object"&&j in r))}function vb(r){return de(r)==="[object Number]"&&(!j||!(typeof r=="object"&&j in r))}function gb(r){return de(r)==="[object Boolean]"&&(!j||!(typeof r=="object"&&j in r))}function Po(r){if(Xe)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!Dn)return!1;try{return Dn.call(r),!0}catch{}return!1}function _b(r){if(!r||typeof r!="object"||!Un)return!1;try{return Un.call(r),!0}catch{}return!1}var mb=Object.prototype.hasOwnProperty||function(r){return r in this};function ye(r,e){return mb.call(r,e)}function de(r){return ob.call(r)}function bb(r){if(r.name)return r.name;var e=fb.call(ub.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function Fo(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t;return-1}function wb(r){if(!nt||!r||typeof r!="object")return!1;try{nt.call(r);try{it.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function $b(r){if(!sr||!r||typeof r!="object")return!1;try{sr.call(r,sr);try{lr.call(r,lr)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function Eb(r){if(!_o||!r||typeof r!="object")return!1;try{return _o.call(r),!0}catch{}return!1}function Ob(r){if(!it||!r||typeof r!="object")return!1;try{it.call(r);try{nt.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function Ab(r){if(!lr||!r||typeof r!="object")return!1;try{lr.call(r,lr);try{sr.call(r,sr)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function Sb(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function Ro(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return Ro(Bn.call(r,0,e.maxStringLength),e)+n}var i=he.call(he.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Ib);return To(i,"single",e)}function Ib(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+sb.call(e.toString(16))}function cr(r){return"Object("+r+")"}function jn(r){return r+" { ? }"}function Mo(r,e,t,n){var i=n?kn(t,n):Z.call(t,", ");return r+" ("+e+") {"+i+"}"}function Tb(r){for(var e=0;e<r.length;e++)if(Fo(r[e],`
17
- `)>=0)return!1;return!0}function xb(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=Z.call(Array(r.indent+1)," ");else return null;return{base:t,prev:Z.call(Array(e+1),t)}}function kn(r,e){if(r.length===0)return"";var t=`
16
+ `)+" "+t[1]:t[0]+e+" "+r.join(", ")+" "+t[1]}function en(r){return Array.isArray(r)}function Gr(r){return typeof r=="boolean"}function er(r){return r===null}function Wi(r){return r==null}function rn(r){return typeof r=="number"}function rr(r){return typeof r=="string"}function zi(r){return typeof r=="symbol"}function K(r){return r===void 0}function tr(r){return Oe(r)&&tn(r)==="[object RegExp]"}function Oe(r){return typeof r=="object"&&r!==null}function Hr(r){return Oe(r)&&tn(r)==="[object Date]"}function nr(r){return Oe(r)&&(tn(r)==="[object Error]"||r instanceof Error)}function ir(r){return typeof r=="function"}function Xi(r){return r===null||typeof r=="boolean"||typeof r=="number"||typeof r=="string"||typeof r=="symbol"||typeof r>"u"}function Yi(r){return y.isBuffer(r)}function tn(r){return Object.prototype.toString.call(r)}function nn(r){return r<10?"0"+r.toString(10):r.toString(10)}var ec=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function rc(){var r=new Date,e=[nn(r.getHours()),nn(r.getMinutes()),nn(r.getSeconds())].join(":");return[r.getDate(),ec[r.getMonth()],e].join(" ")}function Ki(){console.log("%s - %s",rc(),kr.apply(null,arguments))}function an(r,e){if(!e||!Oe(e))return r;for(var t=Object.keys(e),n=t.length;n--;)r[t[n]]=e[t[n]];return r}function Zi(r,e){return Object.prototype.hasOwnProperty.call(r,e)}var tc={inherits:Gi,_extend:an,log:Ki,isBuffer:Yi,isPrimitive:Xi,isFunction:ir,isError:nr,isDate:Hr,isObject:Oe,isRegExp:tr,isUndefined:K,isSymbol:zi,isString:rr,isNumber:rn,isNullOrUndefined:Wi,isNull:er,isBoolean:Gr,isArray:en,inspect:Y,deprecate:Kt,format:kr,debuglog:Hi},nc=Object.freeze({__proto__:null,format:kr,deprecate:Kt,debuglog:Hi,inspect:Y,isArray:en,isBoolean:Gr,isNull:er,isNullOrUndefined:Wi,isNumber:rn,isString:rr,isSymbol:zi,isUndefined:K,isRegExp:tr,isObject:Oe,isDate:Hr,isError:nr,isFunction:ir,isPrimitive:Xi,isBuffer:Yi,log:Ki,inherits:Gi,_extend:an,default:tc}),ic=Ze(nc),ac=ic.inspect,on=typeof Map=="function"&&Map.prototype,un=Object.getOwnPropertyDescriptor&&on?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Wr=on&&un&&typeof un.get=="function"?un.get:null,oc=on&&Map.prototype.forEach,fn=typeof Set=="function"&&Set.prototype,sn=Object.getOwnPropertyDescriptor&&fn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,zr=fn&&sn&&typeof sn.get=="function"?sn.get:null,uc=fn&&Set.prototype.forEach,fc=typeof WeakMap=="function"&&WeakMap.prototype,ar=fc?WeakMap.prototype.has:null,sc=typeof WeakSet=="function"&&WeakSet.prototype,or=sc?WeakSet.prototype.has:null,cc=typeof WeakRef=="function"&&WeakRef.prototype,Ji=cc?WeakRef.prototype.deref:null,lc=Boolean.prototype.valueOf,pc=Object.prototype.toString,hc=Function.prototype.toString,yc=String.prototype.match,cn=String.prototype.slice,he=String.prototype.replace,dc=String.prototype.toUpperCase,Qi=String.prototype.toLowerCase,ea=RegExp.prototype.test,ra=Array.prototype.concat,Z=Array.prototype.join,vc=Array.prototype.slice,ta=Math.floor,ln=typeof BigInt=="function"?BigInt.prototype.valueOf:null,pn=Object.getOwnPropertySymbols,hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,je=typeof Symbol=="function"&&typeof Symbol.iterator=="object",k=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===je?"object":"symbol")?Symbol.toStringTag:null,na=Object.prototype.propertyIsEnumerable,ia=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function aa(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||ea.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-ta(-r):ta(r);if(n!==r){var i=String(n),a=cn.call(e,i.length+1);return he.call(i,t,"$&_")+"."+he.call(he.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return he.call(e,t,"$&_")}var yn=ac,oa=yn.custom,ua=ca(oa)?oa:null,gc=function r(e,t,n,i){var a=t||{};if(ye(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ye(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=ye(a,"customInspect")?a.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ye(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ye(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var f=a.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return pa(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var s=String(e);return f?aa(e,s):s}if(typeof e=="bigint"){var c=String(e)+"n";return f?aa(e,c):c}var l=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=l&&l>0&&typeof e=="object")return dn(e)?"[Array]":"[Object]";var u=Uc(a,n);if(typeof i>"u")i=[];else if(la(i,e)>=0)return"[Circular]";function p(re,ge,se){if(ge&&(i=vc.call(i),i.push(ge)),se){var Ir={depth:a.depth};return ye(a,"quoteStyle")&&(Ir.quoteStyle=a.quoteStyle),r(re,Ir,n+1,i)}return r(re,a,n+1,i)}if(typeof e=="function"&&!sa(e)){var d=Sc(e),_=Xr(e,p);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(_.length>0?" { "+Z.call(_,", ")+" }":"")}if(ca(e)){var E=je?he.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):hn.call(e);return typeof e=="object"&&!je?ur(E):E}if(Rc(e)){for(var $="<"+Qi.call(String(e.nodeName)),b=e.attributes||[],S=0;S<b.length;S++)$+=" "+b[S].name+"="+fa(_c(b[S].value),"double",a);return $+=">",e.childNodes&&e.childNodes.length&&($+="..."),$+="</"+Qi.call(String(e.nodeName))+">",$}if(dn(e)){if(e.length===0)return"[]";var h=Xr(e,p);return u&&!Bc(h)?"["+gn(h,u)+"]":"[ "+Z.call(h,", ")+" ]"}if(bc(e)){var A=Xr(e,p);return!("cause"in Error.prototype)&&"cause"in e&&!na.call(e,"cause")?"{ ["+String(e)+"] "+Z.call(ra.call("[cause]: "+p(e.cause),A),", ")+" }":A.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Z.call(A,", ")+" }"}if(typeof e=="object"&&o){if(ua&&typeof e[ua]=="function"&&yn)return yn(e,{depth:l-n});if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Tc(e)){var x=[];return oc.call(e,function(re,ge){x.push(p(ge,e,!0)+" => "+p(re,e))}),ha("Map",Wr.call(e),x,u)}if(Pc(e)){var R=[];return uc.call(e,function(re){R.push(p(re,e))}),ha("Set",zr.call(e),R,u)}if(Ic(e))return vn("WeakMap");if(Fc(e))return vn("WeakSet");if(xc(e))return vn("WeakRef");if($c(e))return ur(p(Number(e)));if(Oc(e))return ur(p(ln.call(e)));if(Ec(e))return ur(lc.call(e));if(wc(e))return ur(p(String(e)));if(!mc(e)&&!sa(e)){var m=Xr(e,p),v=ia?ia(e)===Object.prototype:e instanceof Object||e.constructor===Object,g=e instanceof Object?"":"null prototype",w=!v&&k&&Object(e)===e&&k in e?cn.call(de(e),8,-1):g?"Object":"",O=v||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",L=O+(w||g?"["+Z.call(ra.call([],w||[],g||[]),": ")+"] ":"");return m.length===0?L+"{}":u?L+"{"+gn(m,u)+"}":L+"{ "+Z.call(m,", ")+" }"}return String(e)};function fa(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function _c(r){return he.call(String(r),/"/g,"&quot;")}function dn(r){return de(r)==="[object Array]"&&(!k||!(typeof r=="object"&&k in r))}function mc(r){return de(r)==="[object Date]"&&(!k||!(typeof r=="object"&&k in r))}function sa(r){return de(r)==="[object RegExp]"&&(!k||!(typeof r=="object"&&k in r))}function bc(r){return de(r)==="[object Error]"&&(!k||!(typeof r=="object"&&k in r))}function wc(r){return de(r)==="[object String]"&&(!k||!(typeof r=="object"&&k in r))}function $c(r){return de(r)==="[object Number]"&&(!k||!(typeof r=="object"&&k in r))}function Ec(r){return de(r)==="[object Boolean]"&&(!k||!(typeof r=="object"&&k in r))}function ca(r){if(je)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!hn)return!1;try{return hn.call(r),!0}catch{}return!1}function Oc(r){if(!r||typeof r!="object"||!ln)return!1;try{return ln.call(r),!0}catch{}return!1}var Ac=Object.prototype.hasOwnProperty||function(r){return r in this};function ye(r,e){return Ac.call(r,e)}function de(r){return pc.call(r)}function Sc(r){if(r.name)return r.name;var e=yc.call(hc.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function la(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t;return-1}function Tc(r){if(!Wr||!r||typeof r!="object")return!1;try{Wr.call(r);try{zr.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function Ic(r){if(!ar||!r||typeof r!="object")return!1;try{ar.call(r,ar);try{or.call(r,or)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function xc(r){if(!Ji||!r||typeof r!="object")return!1;try{return Ji.call(r),!0}catch{}return!1}function Pc(r){if(!zr||!r||typeof r!="object")return!1;try{zr.call(r);try{Wr.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function Fc(r){if(!or||!r||typeof r!="object")return!1;try{or.call(r,or);try{ar.call(r,ar)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function Rc(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function pa(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return pa(cn.call(r,0,e.maxStringLength),e)+n}var i=he.call(he.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Mc);return fa(i,"single",e)}function Mc(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+dc.call(e.toString(16))}function ur(r){return"Object("+r+")"}function vn(r){return r+" { ? }"}function ha(r,e,t,n){var i=n?gn(t,n):Z.call(t,", ");return r+" ("+e+") {"+i+"}"}function Bc(r){for(var e=0;e<r.length;e++)if(la(r[e],`
17
+ `)>=0)return!1;return!0}function Uc(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=Z.call(Array(r.indent+1)," ");else return null;return{base:t,prev:Z.call(Array(e+1),t)}}function gn(r,e){if(r.length===0)return"";var t=`
18
18
  `+e.prev+e.base;return t+Z.call(r,","+t)+`
19
- `+e.prev}function at(r,e){var t=Ln(r),n=[];if(t){n.length=r.length;for(var i=0;i<r.length;i++)n[i]=ye(r,i)?e(r[i],r):""}var a=typeof Nn=="function"?Nn(r):[],o;if(Xe){o={};for(var f=0;f<a.length;f++)o["$"+a[f]]=a[f]}for(var s in r)!ye(r,s)||t&&String(Number(s))===s&&s<r.length||Xe&&o["$"+s]instanceof Symbol||(bo.call(/[^\w$]/,s)?n.push(e(s,r)+": "+e(r[s],r)):n.push(s+": "+e(r[s],r)));if(typeof Nn=="function")for(var l=0;l<a.length;l++)Eo.call(r,a[l])&&n.push("["+e(a[l])+"]: "+e(r[a[l]],r));return n}var Vn=dn,ze=N0,Pb=cb,Fb=Vn("%TypeError%"),ot=Vn("%WeakMap%",!0),ut=Vn("%Map%",!0),Rb=ze("WeakMap.prototype.get",!0),Mb=ze("WeakMap.prototype.set",!0),Bb=ze("WeakMap.prototype.has",!0),Ub=ze("Map.prototype.get",!0),Nb=ze("Map.prototype.set",!0),Db=ze("Map.prototype.has",!0),qn=function(r,e){for(var t=r,n;(n=t.next)!==null;t=n)if(n.key===e)return t.next=n.next,n.next=r.next,r.next=n,n},Cb=function(r,e){var t=qn(r,e);return t&&t.value},Lb=function(r,e,t){var n=qn(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},jb=function(r,e){return!!qn(r,e)},kb=function(){var e,t,n,i={assert:function(a){if(!i.has(a))throw new Fb("Side channel does not contain "+Pb(a))},get:function(a){if(ot&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Rb(e,a)}else if(ut){if(t)return Ub(t,a)}else if(n)return Cb(n,a)},has:function(a){if(ot&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Bb(e,a)}else if(ut){if(t)return Db(t,a)}else if(n)return jb(n,a);return!1},set:function(a,o){ot&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new ot),Mb(e,a,o)):ut?(t||(t=new ut),Nb(t,a,o)):(n||(n={key:{},next:null}),Lb(n,a,o))}};return i},Vb=String.prototype.replace,qb=/%20/g,Gn={RFC1738:"RFC1738",RFC3986:"RFC3986"},Hn={default:Gn.RFC3986,formatters:{RFC1738:function(r){return Vb.call(r,qb,"+")},RFC3986:function(r){return String(r)}},RFC1738:Gn.RFC1738,RFC3986:Gn.RFC3986},Gb=Hn,Wn=Object.prototype.hasOwnProperty,Se=Array.isArray,J=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),Hb=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(Se(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);t.obj[t.prop]=i}}},Bo=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},i=0;i<e.length;++i)typeof e[i]<"u"&&(n[i]=e[i]);return n},Wb=function r(e,t,n){if(!t)return e;if(typeof t!="object"){if(Se(e))e.push(t);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Wn.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var i=e;return Se(e)&&!Se(t)&&(i=Bo(e,n)),Se(e)&&Se(t)?(t.forEach(function(a,o){if(Wn.call(e,o)){var f=e[o];f&&typeof f=="object"&&a&&typeof a=="object"?e[o]=r(f,a,n):e.push(a)}else e[o]=a}),e):Object.keys(t).reduce(function(a,o){var f=t[o];return Wn.call(a,o)?a[o]=r(a[o],f,n):a[o]=f,a},i)},Xb=function(e,t){return Object.keys(t).reduce(function(n,i){return n[i]=t[i],n},e)},zb=function(r,e,t){var n=r.replace(/\+/g," ");if(t==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},Yb=function(e,t,n,i,a){if(e.length===0)return e;var o=e;if(typeof e=="symbol"?o=Symbol.prototype.toString.call(e):typeof e!="string"&&(o=String(e)),n==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(c){return"%26%23"+parseInt(c.slice(2),16)+"%3B"});for(var f="",s=0;s<o.length;++s){var l=o.charCodeAt(s);if(l===45||l===46||l===95||l===126||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||a===Gb.RFC1738&&(l===40||l===41)){f+=o.charAt(s);continue}if(l<128){f=f+J[l];continue}if(l<2048){f=f+(J[192|l>>6]+J[128|l&63]);continue}if(l<55296||l>=57344){f=f+(J[224|l>>12]+J[128|l>>6&63]+J[128|l&63]);continue}s+=1,l=65536+((l&1023)<<10|o.charCodeAt(s)&1023),f+=J[240|l>>18]+J[128|l>>12&63]+J[128|l>>6&63]+J[128|l&63]}return f},Kb=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],i=0;i<t.length;++i)for(var a=t[i],o=a.obj[a.prop],f=Object.keys(o),s=0;s<f.length;++s){var l=f[s],c=o[l];typeof c=="object"&&c!==null&&n.indexOf(c)===-1&&(t.push({obj:o,prop:l}),n.push(c))}return Hb(t),e},Zb=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Jb=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Qb=function(e,t){return[].concat(e,t)},ew=function(e,t){if(Se(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(t(e[i]));return n}return t(e)},Uo={arrayToObject:Bo,assign:Xb,combine:Qb,compact:Kb,decode:zb,encode:Yb,isBuffer:Jb,isRegExp:Zb,maybeMap:ew,merge:Wb},No=kb,Xn=Uo,pr=Hn,rw=Object.prototype.hasOwnProperty,Do={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},ae=Array.isArray,tw=String.prototype.split,nw=Array.prototype.push,Co=function(r,e){nw.apply(r,ae(e)?e:[e])},iw=Date.prototype.toISOString,Lo=pr.default,D={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Xn.encode,encodeValuesOnly:!1,format:Lo,formatter:pr.formatters[Lo],indices:!1,serializeDate:function(e){return iw.call(e)},skipNulls:!1,strictNullHandling:!1},aw=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},zn={},ow=function r(e,t,n,i,a,o,f,s,l,c,u,p,d,_,E,$){for(var b=e,S=$,h=0,A=!1;(S=S.get(zn))!==void 0&&!A;){var T=S.get(e);if(h+=1,typeof T<"u"){if(T===h)throw new RangeError("Cyclic object value");A=!0}typeof S.get(zn)>"u"&&(h=0)}if(typeof s=="function"?b=s(t,b):b instanceof Date?b=u(b):n==="comma"&&ae(b)&&(b=Xn.maybeMap(b,function(yi){return yi instanceof Date?u(yi):yi})),b===null){if(a)return f&&!_?f(t,D.encoder,E,"key",p):t;b=""}if(aw(b)||Xn.isBuffer(b)){if(f){var F=_?t:f(t,D.encoder,E,"key",p);if(n==="comma"&&_){for(var m=tw.call(String(b),","),v="",g=0;g<m.length;++g)v+=(g===0?"":",")+d(f(m[g],D.encoder,E,"value",p));return[d(F)+(i&&ae(b)&&m.length===1?"[]":"")+"="+v]}return[d(F)+"="+d(f(b,D.encoder,E,"value",p))]}return[d(t)+"="+d(String(b))]}var w=[];if(typeof b>"u")return w;var O;if(n==="comma"&&ae(b))O=[{value:b.length>0?b.join(",")||null:void 0}];else if(ae(s))O=s;else{var C=Object.keys(b);O=l?C.sort(l):C}for(var ee=i&&ae(b)&&b.length===1?t+"[]":t,ve=0;ve<O.length;++ve){var fe=O[ve],Ir=typeof fe=="object"&&typeof fe.value<"u"?fe.value:b[fe];if(!(o&&Ir===null)){var f2=ae(b)?typeof n=="function"?n(ee,fe):ee:ee+(c?"."+fe:"["+fe+"]");$.set(e,h);var Af=No();Af.set(zn,$),Co(w,r(Ir,f2,n,i,a,o,f,s,l,c,u,p,d,_,E,Af))}}return w},uw=function(e){if(!e)return D;if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||D.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=pr.default;if(typeof e.format<"u"){if(!rw.call(pr.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=pr.formatters[n],a=D.filter;return(typeof e.filter=="function"||ae(e.filter))&&(a=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:D.addQueryPrefix,allowDots:typeof e.allowDots>"u"?D.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:D.charsetSentinel,delimiter:typeof e.delimiter>"u"?D.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:D.encode,encoder:typeof e.encoder=="function"?e.encoder:D.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:D.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:D.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:D.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:D.strictNullHandling}},fw=function(r,e){var t=r,n=uw(e),i,a;typeof n.filter=="function"?(a=n.filter,t=a("",t)):ae(n.filter)&&(a=n.filter,i=a);var o=[];if(typeof t!="object"||t===null)return"";var f;e&&e.arrayFormat in Do?f=e.arrayFormat:e&&"indices"in e?f=e.indices?"indices":"repeat":f="indices";var s=Do[f];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=s==="comma"&&e&&e.commaRoundTrip;i||(i=Object.keys(t)),n.sort&&i.sort(n.sort);for(var c=No(),u=0;u<i.length;++u){var p=i[u];n.skipNulls&&t[p]===null||Co(o,ow(t[p],p,s,l,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,c))}var d=o.join(n.delimiter),_=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),d.length>0?_+d:""},Ye=Uo,Yn=Object.prototype.hasOwnProperty,sw=Array.isArray,U={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Ye.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},lw=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},jo=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},cw="utf8=%26%2310003%3B",pw="utf8=%E2%9C%93",hw=function(e,t){var n={},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=i.split(t.delimiter,a),f=-1,s,l=t.charset;if(t.charsetSentinel)for(s=0;s<o.length;++s)o[s].indexOf("utf8=")===0&&(o[s]===pw?l="utf-8":o[s]===cw&&(l="iso-8859-1"),f=s,s=o.length);for(s=0;s<o.length;++s)if(s!==f){var c=o[s],u=c.indexOf("]="),p=u===-1?c.indexOf("="):u+1,d,_;p===-1?(d=t.decoder(c,U.decoder,l,"key"),_=t.strictNullHandling?null:""):(d=t.decoder(c.slice(0,p),U.decoder,l,"key"),_=Ye.maybeMap(jo(c.slice(p+1),t),function(E){return t.decoder(E,U.decoder,l,"value")})),_&&t.interpretNumericEntities&&l==="iso-8859-1"&&(_=lw(_)),c.indexOf("[]=")>-1&&(_=sw(_)?[_]:_),Yn.call(n,d)?n[d]=Ye.combine(n[d],_):n[d]=_}return n},yw=function(r,e,t,n){for(var i=n?e:jo(e,t),a=r.length-1;a>=0;--a){var o,f=r[a];if(f==="[]"&&t.parseArrays)o=[].concat(i);else{o=t.plainObjects?Object.create(null):{};var s=f.charAt(0)==="["&&f.charAt(f.length-1)==="]"?f.slice(1,-1):f,l=parseInt(s,10);!t.parseArrays&&s===""?o={0:i}:!isNaN(l)&&f!==s&&String(l)===s&&l>=0&&t.parseArrays&&l<=t.arrayLimit?(o=[],o[l]=i):s!=="__proto__"&&(o[s]=i)}i=o}return i},dw=function(e,t,n,i){if(!!e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,f=/(\[[^[\]]*])/g,s=n.depth>0&&o.exec(a),l=s?a.slice(0,s.index):a,c=[];if(l){if(!n.plainObjects&&Yn.call(Object.prototype,l)&&!n.allowPrototypes)return;c.push(l)}for(var u=0;n.depth>0&&(s=f.exec(a))!==null&&u<n.depth;){if(u+=1,!n.plainObjects&&Yn.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;c.push(s[1])}return s&&c.push("["+a.slice(s.index)+"]"),yw(c,t,n,i)}},vw=function(e){if(!e)return U;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?U.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?U.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:U.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:U.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:U.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:U.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:U.comma,decoder:typeof e.decoder=="function"?e.decoder:U.decoder,delimiter:typeof e.delimiter=="string"||Ye.isRegExp(e.delimiter)?e.delimiter:U.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:U.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:U.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:U.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:U.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:U.strictNullHandling}},gw=function(r,e){var t=vw(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var n=typeof r=="string"?hw(r,t):r,i=t.plainObjects?Object.create(null):{},a=Object.keys(n),o=0;o<a.length;++o){var f=a[o],s=dw(f,n[f],t,typeof r=="string");i=Ye.merge(i,s,t)}return t.allowSparse===!0?i:Ye.compact(i)},_w=fw,mw=gw,bw=Hn,ww={formats:bw,parse:mw,stringify:_w},$w=ha;function Ew(r,e,t){var n=r.length;return t=t===void 0?n:t,!e&&t>=n?r:$w(r,e,t)}var ko=Ew;function Ow(r,e,t,n){for(var i=r.length,a=t+(n?1:-1);n?a--:++a<i;)if(e(r[a],a,r))return a;return-1}var Aw=Ow;function Sw(r){return r!==r}var Iw=Sw;function Tw(r,e,t){for(var n=t-1,i=r.length;++n<i;)if(r[n]===e)return n;return-1}var xw=Tw,Pw=Aw,Fw=Iw,Rw=xw;function Mw(r,e,t){return e===e?Rw(r,e,t):Pw(r,Fw,t)}var Vo=Mw,Bw=Vo;function Uw(r,e){for(var t=-1,n=r.length;++t<n&&Bw(e,r[t],0)>-1;);return t}var Nw=Uw;function Dw(r){return r.split("")}var Cw=Dw,Lw="\\ud800-\\udfff",jw="\\u0300-\\u036f",kw="\\ufe20-\\ufe2f",Vw="\\u20d0-\\u20ff",qw=jw+kw+Vw,Gw="\\ufe0e\\ufe0f",Hw="\\u200d",Ww=RegExp("["+Hw+Lw+qw+Gw+"]");function Xw(r){return Ww.test(r)}var zw=Xw,qo="\\ud800-\\udfff",Yw="\\u0300-\\u036f",Kw="\\ufe20-\\ufe2f",Zw="\\u20d0-\\u20ff",Jw=Yw+Kw+Zw,Qw="\\ufe0e\\ufe0f",e1="["+qo+"]",Kn="["+Jw+"]",Zn="\\ud83c[\\udffb-\\udfff]",r1="(?:"+Kn+"|"+Zn+")",Go="[^"+qo+"]",Ho="(?:\\ud83c[\\udde6-\\uddff]){2}",Wo="[\\ud800-\\udbff][\\udc00-\\udfff]",t1="\\u200d",Xo=r1+"?",zo="["+Qw+"]?",n1="(?:"+t1+"(?:"+[Go,Ho,Wo].join("|")+")"+zo+Xo+")*",i1=zo+Xo+n1,a1="(?:"+[Go+Kn+"?",Kn,Ho,Wo,e1].join("|")+")",o1=RegExp(Zn+"(?="+Zn+")|"+a1+i1,"g");function u1(r){return r.match(o1)||[]}var f1=u1,s1=Cw,l1=zw,c1=f1;function p1(r){return l1(r)?c1(r):s1(r)}var Yo=p1,h1=nn,y1=ko,d1=Nw,Ko=Yo,v1=an,g1=/^\s+/;function _1(r,e,t){if(r=v1(r),r&&(t||e===void 0))return r.replace(g1,"");if(!r||!(e=h1(e)))return r;var n=Ko(r),i=d1(n,Ko(e));return y1(n,i).join("")}var m1=_1,b1=Vo;function w1(r,e){for(var t=r.length;t--&&b1(e,r[t],0)>-1;);return t}var $1=w1,E1=/\s/;function O1(r){for(var e=r.length;e--&&E1.test(r.charAt(e)););return e}var Zo=O1,A1=nn,S1=ko,I1=$1,Jo=Yo,T1=an,x1=Zo;function P1(r,e,t){if(r=T1(r),r&&(t||e===void 0))return r.slice(0,x1(r)+1);if(!r||!(e=A1(e)))return r;var n=Jo(r),i=I1(n,Jo(e))+1;return S1(n,0,i).join("")}var F1=P1;let Qo={storeIdentifier:"",environment:"prod",apiKey:""};function R1(r){Qo=r}function Jn(){return Qo}const M1=r=>r==="stage"?"https://api.stage.rechargeapps.com":"https://api.rechargeapps.com",B1=r=>r==="stage"?"https://static.stage.rechargecdn.com":"https://static.rechargecdn.com",U1="/tools/recurring";var N1=Object.defineProperty,eu=Object.getOwnPropertySymbols,D1=Object.prototype.hasOwnProperty,C1=Object.prototype.propertyIsEnumerable,ru=(r,e,t)=>e in r?N1(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ft=(r,e)=>{for(var t in e||(e={}))D1.call(e,t)&&ru(r,t,e[t]);if(eu)for(var t of eu(e))C1.call(e,t)&&ru(r,t,e[t]);return r};function L1(r){return ww.stringify(r,{encode:!1,indices:!1,arrayFormat:"comma"})}async function st(r,e,t={}){const n=Jn();return Ie(r,`${B1(n.environment)}/store/${n.storeIdentifier}${e}`,t)}async function Qn(r,e,{id:t,query:n,data:i,headers:a}={}){var o;const f=Jn(),s=(o=kr.get("recharge-session"))!=null?o:f.apiKey;if(!s)throw new Error("No API Key or token found.");const l=M1(f.environment),c=ft({"Content-Type":"application/json","X-Recharge-Access-Token":s,"X-Recharge-Version":"2021-11","X-Recharge-App":"storefront-client"},a||{}),u=ft({shop_url:f.storeIdentifier},n);return Ie(r,`${l}${e}`,{id:t,query:u,data:i,headers:c})}async function ei(r,e,{id:t,query:n,data:i,headers:a}={}){const o=ft({"Content-Type":"application/json","X-Recharge-App":"storefront-client"},a||{});return Ie(r,`${U1}${e}`,{id:t,query:n,data:i,headers:o})}async function Ie(r,e,{id:t,query:n,data:i,headers:a}={}){let o=e;t&&(o=[F1(e),m1(t)].join("/"));let f;if(r==="get"){let u;[o,u]=o.split("?");const p=[u,L1(n)].join("&").replace(/^&/,"");o=`${o}${p?`?${p}`:""}`}else f=JSON.stringify(i);const s=ft({Accept:"application/json"},a||{}),l=await fetch(o,{method:r,headers:s,body:f,mode:"cors"}),c=await l.json();if(!l.ok)throw c&&c.error?new Error(`${l.status}: ${c.error}`):new Error("A connection error occurred while making the request");return c}const lt="2020-12",j1={store_currency:{currency_code:"USD",currency_symbol:"$",decimal_separator:".",thousands_separator:",",currency_symbol_location:"left"}},hr=new Map;function ct(r,e){return hr.has(r)||hr.set(r,e()),hr.get(r)}const ri=async r=>{const{product:e}=await ct(`product.${r}`,()=>st("get",`/product/${lt}/${r}.json`));return xa(e)},tu=async()=>await ct("storeSettings",()=>st("get",`/${lt}/store_settings.json`).catch(()=>j1)),nu=async()=>{const{widget_settings:r}=await ct("widgetSettings",()=>st("get",`/${lt}/widget_settings.json`));return Ta(r)},iu=async()=>{const{products:r,widget_settings:e,store_settings:t,meta:n}=await ct("productsAndSettings",()=>st("get",`/product/${lt}/products.json`));return n?.status==="error"?Promise.reject(n.message):{products:t0(r),widget_settings:Ta(e),store_settings:t}},k1=async()=>{const{products:r}=await iu();return r},V1=async r=>{const[e,t,n]=await Promise.all([ri(r),tu(),nu()]);return{product:e,store_settings:t,widget_settings:n,storeSettings:t,widgetSettings:n}},au=async r=>{const{bundle_product:e}=await ri(r);return e},ou=()=>Array.from(hr.keys()).forEach(r=>hr.delete(r));var q1=Object.freeze({__proto__:null,getProduct:ri,getStoreSettings:tu,getWidgetSettings:nu,getProductsAndSettings:iu,getProducts:k1,getProductAndSettings:V1,getBundleSettings:au,resetCache:ou}),oe={},pt={},uu={},ti={},ue={},G1=te,H1=G,W1="[object Number]";function X1(r){return typeof r=="number"||H1(r)&&G1(r)==W1}var ht=X1,R={},fu={exports:{}},z1=Lr,Y1=ma,K1=wa;function Z1(r,e){return K1(Y1(r,e,z1),r+"")}var J1=Z1,Q1=xr,e$=er,r$=kt,t$=se;function n$(r,e,t){if(!t$(t))return!1;var n=typeof e;return(n=="number"?e$(t)&&r$(e,t.length):n=="string"&&e in t)?Q1(t[e],r):!1}var su=n$,i$=J1,a$=su;function o$(r){return i$(function(e,t){var n=-1,i=t.length,a=i>1?t[i-1]:void 0,o=i>2?t[2]:void 0;for(a=r.length>3&&typeof a=="function"?(i--,a):void 0,o&&a$(t[0],t[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var f=t[n];f&&r(e,f,n,a)}return e})}var u$=o$,f$=Ne,s$=u$,l$=Br,c$=s$(function(r,e){f$(e,l$(e),r)}),p$=c$;(function(r){r.exports=p$})(fu);var yt={},Te={};function h$(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(!e(r[t],t,r))return!1;return!0}var y$=h$;function d$(r){return function(e,t,n){for(var i=-1,a=Object(e),o=n(e),f=o.length;f--;){var s=o[r?f:++i];if(t(a[s],s,a)===!1)break}return e}}var v$=d$,g$=v$,_$=g$(),m$=_$,b$=m$,w$=De;function $$(r,e){return r&&b$(r,e,w$)}var E$=$$,O$=er;function A$(r,e){return function(t,n){if(t==null)return t;if(!O$(t))return r(t,n);for(var i=t.length,a=e?i:-1,o=Object(t);(e?a--:++a<i)&&n(o[a],a,o)!==!1;);return t}}var S$=A$,I$=E$,T$=S$,x$=T$(I$),ni=x$,P$=ni;function F$(r,e){var t=!0;return P$(r,function(n,i,a){return t=!!e(n,i,a),t}),t}var R$=F$,M$="__lodash_hash_undefined__";function B$(r){return this.__data__.set(r,M$),this}var U$=B$;function N$(r){return this.__data__.has(r)}var D$=N$,C$=Ct,L$=U$,j$=D$;function dt(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new C$;++e<t;)this.add(r[e])}dt.prototype.add=dt.prototype.push=L$,dt.prototype.has=j$;var k$=dt;function V$(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1}var q$=V$;function G$(r,e){return r.has(e)}var H$=G$,W$=k$,X$=q$,z$=H$,Y$=1,K$=2;function Z$(r,e,t,n,i,a){var o=t&Y$,f=r.length,s=e.length;if(f!=s&&!(o&&s>f))return!1;var l=a.get(r),c=a.get(e);if(l&&c)return l==e&&c==r;var u=-1,p=!0,d=t&K$?new W$:void 0;for(a.set(r,e),a.set(e,r);++u<f;){var _=r[u],E=e[u];if(n)var $=o?n(E,_,u,e,r,a):n(_,E,u,r,e,a);if($!==void 0){if($)continue;p=!1;break}if(d){if(!X$(e,function(b,S){if(!z$(d,S)&&(_===b||i(_,b,t,n,a)))return d.push(S)})){p=!1;break}}else if(!(_===E||i(_,E,t,n,a))){p=!1;break}}return a.delete(r),a.delete(e),p}var lu=Z$;function J$(r){var e=-1,t=Array(r.size);return r.forEach(function(n,i){t[++e]=[i,n]}),t}var Q$=J$;function eE(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var rE=eE,cu=Re,pu=Yi,tE=xr,nE=lu,iE=Q$,aE=rE,oE=1,uE=2,fE="[object Boolean]",sE="[object Date]",lE="[object Error]",cE="[object Map]",pE="[object Number]",hE="[object RegExp]",yE="[object Set]",dE="[object String]",vE="[object Symbol]",gE="[object ArrayBuffer]",_E="[object DataView]",hu=cu?cu.prototype:void 0,ii=hu?hu.valueOf:void 0;function mE(r,e,t,n,i,a,o){switch(t){case _E:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case gE:return!(r.byteLength!=e.byteLength||!a(new pu(r),new pu(e)));case fE:case sE:case pE:return tE(+r,+e);case lE:return r.name==e.name&&r.message==e.message;case hE:case dE:return r==e+"";case cE:var f=iE;case yE:var s=n&oE;if(f||(f=aE),r.size!=e.size&&!s)return!1;var l=o.get(r);if(l)return l==e;n|=uE,o.set(r,e);var c=nE(f(r),f(e),n,i,a,o);return o.delete(r),c;case vE:if(ii)return ii.call(r)==ii.call(e)}return!1}var bE=mE,yu=ki,wE=1,$E=Object.prototype,EE=$E.hasOwnProperty;function OE(r,e,t,n,i,a){var o=t&wE,f=yu(r),s=f.length,l=yu(e),c=l.length;if(s!=c&&!o)return!1;for(var u=s;u--;){var p=f[u];if(!(o?p in e:EE.call(e,p)))return!1}var d=a.get(r),_=a.get(e);if(d&&_)return d==e&&_==r;var E=!0;a.set(r,e),a.set(e,r);for(var $=o;++u<s;){p=f[u];var b=r[p],S=e[p];if(n)var h=o?n(S,b,p,e,r,a):n(b,S,p,r,e,a);if(!(h===void 0?b===S||i(b,S,t,n,a):h)){E=!1;break}$||($=p=="constructor")}if(E&&!$){var A=r.constructor,T=e.constructor;A!=T&&"constructor"in r&&"constructor"in e&&!(typeof A=="function"&&A instanceof A&&typeof T=="function"&&T instanceof T)&&(E=!1)}return a.delete(r),a.delete(e),E}var AE=OE,ai=Lt,SE=lu,IE=bE,TE=AE,du=Ur,vu=N,gu=Je.exports,xE=Bi,PE=1,_u="[object Arguments]",mu="[object Array]",vt="[object Object]",FE=Object.prototype,bu=FE.hasOwnProperty;function RE(r,e,t,n,i,a){var o=vu(r),f=vu(e),s=o?mu:du(r),l=f?mu:du(e);s=s==_u?vt:s,l=l==_u?vt:l;var c=s==vt,u=l==vt,p=s==l;if(p&&gu(r)){if(!gu(e))return!1;o=!0,c=!1}if(p&&!c)return a||(a=new ai),o||xE(r)?SE(r,e,t,n,i,a):IE(r,e,s,t,n,i,a);if(!(t&PE)){var d=c&&bu.call(r,"__wrapped__"),_=u&&bu.call(e,"__wrapped__");if(d||_){var E=d?r.value():r,$=_?e.value():e;return a||(a=new ai),i(E,$,t,n,a)}}return p?(a||(a=new ai),TE(r,e,t,n,i,a)):!1}var ME=RE,BE=ME,wu=G;function $u(r,e,t,n,i){return r===e?!0:r==null||e==null||!wu(r)&&!wu(e)?r!==r&&e!==e:BE(r,e,t,n,$u,i)}var Eu=$u,UE=Lt,NE=Eu,DE=1,CE=2;function LE(r,e,t,n){var i=t.length,a=i,o=!n;if(r==null)return!a;for(r=Object(r);i--;){var f=t[i];if(o&&f[2]?f[1]!==r[f[0]]:!(f[0]in r))return!1}for(;++i<a;){f=t[i];var s=f[0],l=r[s],c=f[1];if(o&&f[2]){if(l===void 0&&!(s in r))return!1}else{var u=new UE;if(n)var p=n(l,c,s,r,e,u);if(!(p===void 0?NE(c,l,DE|CE,n,u):p))return!1}}return!0}var jE=LE,kE=se;function VE(r){return r===r&&!kE(r)}var Ou=VE,qE=Ou,GE=De;function HE(r){for(var e=GE(r),t=e.length;t--;){var n=e[t],i=r[n];e[t]=[n,i,qE(i)]}return e}var WE=HE;function XE(r,e){return function(t){return t==null?!1:t[r]===e&&(e!==void 0||r in Object(t))}}var Au=XE,zE=jE,YE=WE,KE=Au;function ZE(r){var e=YE(r);return e.length==1&&e[0][2]?KE(e[0][0],e[0][1]):function(t){return t===r||zE(t,r,e)}}var JE=ZE,QE=on;function eO(r,e,t){var n=r==null?void 0:QE(r,e);return n===void 0?t:n}var rO=eO;function tO(r,e){return r!=null&&e in Object(r)}var nO=tO,iO=Cr,aO=jt,oO=N,uO=kt,fO=Vt,sO=rr;function lO(r,e,t){e=iO(e,r);for(var n=-1,i=e.length,a=!1;++n<i;){var o=sO(e[n]);if(!(a=r!=null&&t(r,o)))break;r=r[o]}return a||++n!=i?a:(i=r==null?0:r.length,!!i&&fO(i)&&uO(o,i)&&(oO(r)||aO(r)))}var cO=lO,pO=nO,hO=cO;function yO(r,e){return r!=null&&hO(r,e,pO)}var dO=yO,vO=Eu,gO=rO,_O=dO,mO=rn,bO=Ou,wO=Au,$O=rr,EO=1,OO=2;function AO(r,e){return mO(r)&&bO(e)?wO($O(r),e):function(t){var n=gO(t,r);return n===void 0&&n===e?_O(t,r):vO(e,n,EO|OO)}}var SO=AO;function IO(r){return function(e){return e?.[r]}}var TO=IO,xO=on;function PO(r){return function(e){return xO(e,r)}}var FO=PO,RO=TO,MO=FO,BO=rn,UO=rr;function NO(r){return BO(r)?RO(UO(r)):MO(r)}var DO=NO,CO=JE,LO=SO,jO=Lr,kO=N,VO=DO;function qO(r){return typeof r=="function"?r:r==null?jO:typeof r=="object"?kO(r)?LO(r[0],r[1]):CO(r):VO(r)}var Su=qO,GO=y$,HO=R$,WO=Su,XO=N,zO=su;function YO(r,e,t){var n=XO(r)?GO:HO;return t&&zO(r,e,t)&&(e=void 0),n(r,WO(e))}var oi=YO;Object.defineProperty(Te,"__esModule",{value:!0}),Te.calculatePadding=QO,Te.slicePadding=eA;var KO=oi,ZO=JO(KO);function JO(r){return r&&r.__esModule?r:{default:r}}function QO(r){switch(r%4){case 0:return 0;case 1:return 3;case 2:return 2;case 3:return 1;default:return null}}function eA(r,e){var t=r.slice(e),n=(0,ZO.default)(t.buffer(),function(i){return i===0});if(n!==!0)throw new Error("XDR Read Error: invalid padding")}Object.defineProperty(yt,"__esModule",{value:!0}),yt.Cursor=void 0;var rA=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),tA=Te;function nA(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var ui=function(){function r(e){nA(this,r),e instanceof y||(e=typeof e=="number"?y.alloc(e):y.from(e)),this._setBuffer(e),this.rewind()}return rA(r,[{key:"_setBuffer",value:function(t){this._buffer=t,this.length=t.length}},{key:"buffer",value:function(){return this._buffer}},{key:"tap",value:function(t){return t(this),this}},{key:"clone",value:function(t){var n=new this.constructor(this.buffer());return n.seek(arguments.length===0?this.tell():t),n}},{key:"tell",value:function(){return this._index}},{key:"seek",value:function(t,n){return arguments.length===1&&(n=t,t="="),t==="+"?this._index+=n:t==="-"?this._index-=n:this._index=n,this}},{key:"rewind",value:function(){return this.seek(0)}},{key:"eof",value:function(){return this.tell()===this.buffer().length}},{key:"write",value:function(t,n,i){return this.seek("+",this.buffer().write(t,this.tell(),n,i))}},{key:"fill",value:function(t,n){return arguments.length===1&&(n=this.buffer().length-this.tell()),this.buffer().fill(t,this.tell(),this.tell()+n),this.seek("+",n),this}},{key:"slice",value:function(t){arguments.length===0&&(t=this.length-this.tell());var n=new this.constructor(this.buffer().slice(this.tell(),this.tell()+t));return this.seek("+",t),n}},{key:"copyFrom",value:function(t){var n=t instanceof y?t:t.buffer();return n.copy(this.buffer(),this.tell(),0,n.length),this.seek("+",n.length),this}},{key:"concat",value:function(t){t.forEach(function(i,a){i instanceof r&&(t[a]=i.buffer())}),t.unshift(this.buffer());var n=y.concat(t);return this._setBuffer(n),this}},{key:"toString",value:function(t,n){arguments.length===0?(t="utf8",n=this.buffer().length-this.tell()):arguments.length===1&&(n=this.buffer().length-this.tell());var i=this.buffer().toString(t,this.tell(),this.tell()+n);return this.seek("+",n),i}},{key:"writeBufferPadded",value:function(t){var n=(0,tA.calculatePadding)(t.length),i=y.alloc(n);return this.copyFrom(new r(t)).copyFrom(new r(i))}}]),r}();[[1,["readInt8","readUInt8"]],[2,["readInt16BE","readInt16LE","readUInt16BE","readUInt16LE"]],[4,["readInt32BE","readInt32LE","readUInt32BE","readUInt32LE","readFloatBE","readFloatLE"]],[8,["readDoubleBE","readDoubleLE"]]].forEach(function(r){r[1].forEach(function(e){ui.prototype[e]=function(){var n=this.buffer()[e](this.tell());return this.seek("+",r[0]),n}})}),[[1,["writeInt8","writeUInt8"]],[2,["writeInt16BE","writeInt16LE","writeUInt16BE","writeUInt16LE"]],[4,["writeInt32BE","writeInt32LE","writeUInt32BE","writeUInt32LE","writeFloatBE","writeFloatLE"]],[8,["writeDoubleBE","writeDoubleLE"]]].forEach(function(r){r[1].forEach(function(e){ui.prototype[e]=function(n){return this.buffer()[e](n,this.tell()),this.seek("+",r[0]),this}})}),yt.Cursor=ui,Object.defineProperty(R,"__esModule",{value:!0}),R.default=lA;var iA=fu.exports,Iu=xu(iA),aA=Ut,oA=xu(aA),Tu=yt;function xu(r){return r&&r.__esModule?r:{default:r}}var uA=Math.pow(2,16),fA={toXDR:function(e){var t=new Tu.Cursor(uA);this.write(e,t);var n=t.tell();return t.rewind(),t.slice(n).buffer()},fromXDR:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"raw",n=void 0;switch(t){case"raw":n=e;break;case"hex":n=y.from(e,"hex");break;case"base64":n=y.from(e,"base64");break;default:throw new Error("Invalid format "+t+', must be "raw", "hex", "base64"')}var i=new Tu.Cursor(n),a=this.read(i);return a},validateXDR:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"raw";try{return this.fromXDR(e,t),!0}catch{return!1}}},sA={toXDR:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"raw",t=this.constructor.toXDR(this);switch(e){case"raw":return t;case"hex":return t.toString("hex");case"base64":return t.toString("base64");default:throw new Error("Invalid format "+e+', must be "raw", "hex", "base64"')}}};function lA(r){(0,Iu.default)(r,fA),(0,oA.default)(r)&&(0,Iu.default)(r.prototype,sA)}Object.defineProperty(ue,"__esModule",{value:!0}),ue.Int=void 0;var cA=ht,Pu=Fu(cA),pA=R,hA=Fu(pA);function Fu(r){return r&&r.__esModule?r:{default:r}}var yr=ue.Int={read:function(e){return e.readInt32BE()},write:function(e,t){if(!(0,Pu.default)(e))throw new Error("XDR Write Error: not a number");if(Math.floor(e)!==e)throw new Error("XDR Write Error: not an integer");t.writeInt32BE(e)},isValid:function(e){return!(0,Pu.default)(e)||Math.floor(e)!==e?!1:e>=yr.MIN_VALUE&&e<=yr.MAX_VALUE}};yr.MAX_VALUE=Math.pow(2,31)-1,yr.MIN_VALUE=-Math.pow(2,31),(0,hA.default)(yr);var gt={};function yA(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var fi={exports:{}};(function(r){/**
19
+ `+e.prev}function Xr(r,e){var t=dn(r),n=[];if(t){n.length=r.length;for(var i=0;i<r.length;i++)n[i]=ye(r,i)?e(r[i],r):""}var a=typeof pn=="function"?pn(r):[],o;if(je){o={};for(var f=0;f<a.length;f++)o["$"+a[f]]=a[f]}for(var s in r)!ye(r,s)||t&&String(Number(s))===s&&s<r.length||je&&o["$"+s]instanceof Symbol||(ea.call(/[^\w$]/,s)?n.push(e(s,r)+": "+e(r[s],r)):n.push(s+": "+e(r[s],r)));if(typeof pn=="function")for(var c=0;c<a.length;c++)na.call(r,a[c])&&n.push("["+e(a[c])+"]: "+e(r[a[c]],r));return n}var _n=Gt,ke=Vf,Dc=gc,Nc=_n("%TypeError%"),Yr=_n("%WeakMap%",!0),Kr=_n("%Map%",!0),Cc=ke("WeakMap.prototype.get",!0),Lc=ke("WeakMap.prototype.set",!0),jc=ke("WeakMap.prototype.has",!0),kc=ke("Map.prototype.get",!0),Vc=ke("Map.prototype.set",!0),qc=ke("Map.prototype.has",!0),mn=function(r,e){for(var t=r,n;(n=t.next)!==null;t=n)if(n.key===e)return t.next=n.next,n.next=r.next,r.next=n,n},Gc=function(r,e){var t=mn(r,e);return t&&t.value},Hc=function(r,e,t){var n=mn(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},Wc=function(r,e){return!!mn(r,e)},zc=function(){var e,t,n,i={assert:function(a){if(!i.has(a))throw new Nc("Side channel does not contain "+Dc(a))},get:function(a){if(Yr&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Cc(e,a)}else if(Kr){if(t)return kc(t,a)}else if(n)return Gc(n,a)},has:function(a){if(Yr&&a&&(typeof a=="object"||typeof a=="function")){if(e)return jc(e,a)}else if(Kr){if(t)return qc(t,a)}else if(n)return Wc(n,a);return!1},set:function(a,o){Yr&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new Yr),Lc(e,a,o)):Kr?(t||(t=new Kr),Vc(t,a,o)):(n||(n={key:{},next:null}),Hc(n,a,o))}};return i},Xc=String.prototype.replace,Yc=/%20/g,bn={RFC1738:"RFC1738",RFC3986:"RFC3986"},wn={default:bn.RFC3986,formatters:{RFC1738:function(r){return Xc.call(r,Yc,"+")},RFC3986:function(r){return String(r)}},RFC1738:bn.RFC1738,RFC3986:bn.RFC3986},Kc=wn,$n=Object.prototype.hasOwnProperty,Ae=Array.isArray,J=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),Zc=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(Ae(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]<"u"&&i.push(n[a]);t.obj[t.prop]=i}}},ya=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},i=0;i<e.length;++i)typeof e[i]<"u"&&(n[i]=e[i]);return n},Jc=function r(e,t,n){if(!t)return e;if(typeof t!="object"){if(Ae(e))e.push(t);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!$n.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var i=e;return Ae(e)&&!Ae(t)&&(i=ya(e,n)),Ae(e)&&Ae(t)?(t.forEach(function(a,o){if($n.call(e,o)){var f=e[o];f&&typeof f=="object"&&a&&typeof a=="object"?e[o]=r(f,a,n):e.push(a)}else e[o]=a}),e):Object.keys(t).reduce(function(a,o){var f=t[o];return $n.call(a,o)?a[o]=r(a[o],f,n):a[o]=f,a},i)},Qc=function(e,t){return Object.keys(t).reduce(function(n,i){return n[i]=t[i],n},e)},el=function(r,e,t){var n=r.replace(/\+/g," ");if(t==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},rl=function(e,t,n,i,a){if(e.length===0)return e;var o=e;if(typeof e=="symbol"?o=Symbol.prototype.toString.call(e):typeof e!="string"&&(o=String(e)),n==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(l){return"%26%23"+parseInt(l.slice(2),16)+"%3B"});for(var f="",s=0;s<o.length;++s){var c=o.charCodeAt(s);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||a===Kc.RFC1738&&(c===40||c===41)){f+=o.charAt(s);continue}if(c<128){f=f+J[c];continue}if(c<2048){f=f+(J[192|c>>6]+J[128|c&63]);continue}if(c<55296||c>=57344){f=f+(J[224|c>>12]+J[128|c>>6&63]+J[128|c&63]);continue}s+=1,c=65536+((c&1023)<<10|o.charCodeAt(s)&1023),f+=J[240|c>>18]+J[128|c>>12&63]+J[128|c>>6&63]+J[128|c&63]}return f},tl=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],i=0;i<t.length;++i)for(var a=t[i],o=a.obj[a.prop],f=Object.keys(o),s=0;s<f.length;++s){var c=f[s],l=o[c];typeof l=="object"&&l!==null&&n.indexOf(l)===-1&&(t.push({obj:o,prop:c}),n.push(l))}return Zc(t),e},nl=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},il=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},al=function(e,t){return[].concat(e,t)},ol=function(e,t){if(Ae(e)){for(var n=[],i=0;i<e.length;i+=1)n.push(t(e[i]));return n}return t(e)},da={arrayToObject:ya,assign:Qc,combine:al,compact:tl,decode:el,encode:rl,isBuffer:il,isRegExp:nl,maybeMap:ol,merge:Jc},va=zc,En=da,fr=wn,ul=Object.prototype.hasOwnProperty,ga={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},ae=Array.isArray,fl=String.prototype.split,sl=Array.prototype.push,_a=function(r,e){sl.apply(r,ae(e)?e:[e])},cl=Date.prototype.toISOString,ma=fr.default,N={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:En.encode,encodeValuesOnly:!1,format:ma,formatter:fr.formatters[ma],indices:!1,serializeDate:function(e){return cl.call(e)},skipNulls:!1,strictNullHandling:!1},ll=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},On={},pl=function r(e,t,n,i,a,o,f,s,c,l,u,p,d,_,E,$){for(var b=e,S=$,h=0,A=!1;(S=S.get(On))!==void 0&&!A;){var x=S.get(e);if(h+=1,typeof x<"u"){if(x===h)throw new RangeError("Cyclic object value");A=!0}typeof S.get(On)>"u"&&(h=0)}if(typeof s=="function"?b=s(t,b):b instanceof Date?b=u(b):n==="comma"&&ae(b)&&(b=En.maybeMap(b,function(ci){return ci instanceof Date?u(ci):ci})),b===null){if(a)return f&&!_?f(t,N.encoder,E,"key",p):t;b=""}if(ll(b)||En.isBuffer(b)){if(f){var R=_?t:f(t,N.encoder,E,"key",p);if(n==="comma"&&_){for(var m=fl.call(String(b),","),v="",g=0;g<m.length;++g)v+=(g===0?"":",")+d(f(m[g],N.encoder,E,"value",p));return[d(R)+(i&&ae(b)&&m.length===1?"[]":"")+"="+v]}return[d(R)+"="+d(f(b,N.encoder,E,"value",p))]}return[d(t)+"="+d(String(b))]}var w=[];if(typeof b>"u")return w;var O;if(n==="comma"&&ae(b))O=[{value:b.length>0?b.join(",")||null:void 0}];else if(ae(s))O=s;else{var L=Object.keys(b);O=c?L.sort(c):L}for(var re=i&&ae(b)&&b.length===1?t+"[]":t,ge=0;ge<O.length;++ge){var se=O[ge],Ir=typeof se=="object"&&typeof se.value<"u"?se.value:b[se];if(!(o&&Ir===null)){var i2=ae(b)?typeof n=="function"?n(re,se):re:re+(l?"."+se:"["+se+"]");$.set(e,h);var ff=va();ff.set(On,$),_a(w,r(Ir,i2,n,i,a,o,f,s,c,l,u,p,d,_,E,ff))}}return w},hl=function(e){if(!e)return N;if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||N.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=fr.default;if(typeof e.format<"u"){if(!ul.call(fr.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=fr.formatters[n],a=N.filter;return(typeof e.filter=="function"||ae(e.filter))&&(a=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:N.addQueryPrefix,allowDots:typeof e.allowDots>"u"?N.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:N.charsetSentinel,delimiter:typeof e.delimiter>"u"?N.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:N.encode,encoder:typeof e.encoder=="function"?e.encoder:N.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:N.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:N.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:N.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:N.strictNullHandling}},yl=function(r,e){var t=r,n=hl(e),i,a;typeof n.filter=="function"?(a=n.filter,t=a("",t)):ae(n.filter)&&(a=n.filter,i=a);var o=[];if(typeof t!="object"||t===null)return"";var f;e&&e.arrayFormat in ga?f=e.arrayFormat:e&&"indices"in e?f=e.indices?"indices":"repeat":f="indices";var s=ga[f];if(e&&"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c=s==="comma"&&e&&e.commaRoundTrip;i||(i=Object.keys(t)),n.sort&&i.sort(n.sort);for(var l=va(),u=0;u<i.length;++u){var p=i[u];n.skipNulls&&t[p]===null||_a(o,pl(t[p],p,s,c,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,l))}var d=o.join(n.delimiter),_=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?_+="utf8=%26%2310003%3B&":_+="utf8=%E2%9C%93&"),d.length>0?_+d:""},Ve=da,An=Object.prototype.hasOwnProperty,dl=Array.isArray,D={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Ve.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},vl=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},ba=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},gl="utf8=%26%2310003%3B",_l="utf8=%E2%9C%93",ml=function(e,t){var n={},i=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,o=i.split(t.delimiter,a),f=-1,s,c=t.charset;if(t.charsetSentinel)for(s=0;s<o.length;++s)o[s].indexOf("utf8=")===0&&(o[s]===_l?c="utf-8":o[s]===gl&&(c="iso-8859-1"),f=s,s=o.length);for(s=0;s<o.length;++s)if(s!==f){var l=o[s],u=l.indexOf("]="),p=u===-1?l.indexOf("="):u+1,d,_;p===-1?(d=t.decoder(l,D.decoder,c,"key"),_=t.strictNullHandling?null:""):(d=t.decoder(l.slice(0,p),D.decoder,c,"key"),_=Ve.maybeMap(ba(l.slice(p+1),t),function(E){return t.decoder(E,D.decoder,c,"value")})),_&&t.interpretNumericEntities&&c==="iso-8859-1"&&(_=vl(_)),l.indexOf("[]=")>-1&&(_=dl(_)?[_]:_),An.call(n,d)?n[d]=Ve.combine(n[d],_):n[d]=_}return n},bl=function(r,e,t,n){for(var i=n?e:ba(e,t),a=r.length-1;a>=0;--a){var o,f=r[a];if(f==="[]"&&t.parseArrays)o=[].concat(i);else{o=t.plainObjects?Object.create(null):{};var s=f.charAt(0)==="["&&f.charAt(f.length-1)==="]"?f.slice(1,-1):f,c=parseInt(s,10);!t.parseArrays&&s===""?o={0:i}:!isNaN(c)&&f!==s&&String(c)===s&&c>=0&&t.parseArrays&&c<=t.arrayLimit?(o=[],o[c]=i):s!=="__proto__"&&(o[s]=i)}i=o}return i},wl=function(e,t,n,i){if(!!e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,f=/(\[[^[\]]*])/g,s=n.depth>0&&o.exec(a),c=s?a.slice(0,s.index):a,l=[];if(c){if(!n.plainObjects&&An.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var u=0;n.depth>0&&(s=f.exec(a))!==null&&u<n.depth;){if(u+=1,!n.plainObjects&&An.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+a.slice(s.index)+"]"),bl(l,t,n,i)}},$l=function(e){if(!e)return D;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?D.charset:e.charset;return{allowDots:typeof e.allowDots>"u"?D.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:D.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:D.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:D.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:D.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:D.comma,decoder:typeof e.decoder=="function"?e.decoder:D.decoder,delimiter:typeof e.delimiter=="string"||Ve.isRegExp(e.delimiter)?e.delimiter:D.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:D.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:D.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:D.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:D.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:D.strictNullHandling}},El=function(r,e){var t=$l(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var n=typeof r=="string"?ml(r,t):r,i=t.plainObjects?Object.create(null):{},a=Object.keys(n),o=0;o<a.length;++o){var f=a[o],s=wl(f,n[f],t,typeof r=="string");i=Ve.merge(i,s,t)}return t.allowSparse===!0?i:Ve.compact(i)},Ol=yl,Al=El,Sl=wn,Tl={formats:Sl,parse:Al,stringify:Ol};let wa={storeIdentifier:"",environment:"prod",apiKey:""};function Il(r){wa=r}function Sn(){return wa}const xl=r=>r==="stage"?"https://api.stage.rechargeapps.com":"https://api.rechargeapps.com",Pl=r=>r==="stage"?"https://static.stage.rechargecdn.com":"https://static.rechargecdn.com",Fl="/tools/recurring";var Rl=Object.defineProperty,$a=Object.getOwnPropertySymbols,Ml=Object.prototype.hasOwnProperty,Bl=Object.prototype.propertyIsEnumerable,Ea=(r,e,t)=>e in r?Rl(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Zr=(r,e)=>{for(var t in e||(e={}))Ml.call(e,t)&&Ea(r,t,e[t]);if($a)for(var t of $a(e))Bl.call(e,t)&&Ea(r,t,e[t]);return r};function Ul(r){return Tl.stringify(r,{encode:!1,indices:!1,arrayFormat:"comma"})}async function Jr(r,e,t={}){const n=Sn();return Se(r,`${Pl(n.environment)}/store/${n.storeIdentifier}${e}`,t)}async function I(r,e,{id:t,query:n,data:i,headers:a}={}){var o;const f=Sn(),s=(o=Pr.get("recharge-session"))!=null?o:f.apiKey;if(!s)throw new Error("No API Key or token found.");const c=xl(f.environment),l=Zr({"Content-Type":"application/json","X-Recharge-Access-Token":s,"X-Recharge-Version":"2021-11","X-Recharge-App":"storefront-client"},a||{}),u=Zr({shop_url:f.storeIdentifier},n);return Se(r,`${c}${e}`,{id:t,query:u,data:i,headers:l})}async function Tn(r,e,{id:t,query:n,data:i,headers:a}={}){const o=Zr({"Content-Type":"application/json","X-Recharge-App":"storefront-client"},a||{});return Se(r,`${Fl}${e}`,{id:t,query:n,data:i,headers:o})}async function Se(r,e,{id:t,query:n,data:i,headers:a}={}){let o=e.trim();if(t&&(o=[o,`${t}`.trim()].join("/")),n){let u;[o,u]=o.split("?");const p=[u,Ul(n)].join("&").replace(/^&/,"");o=`${o}${p?`?${p}`:""}`}let f;i&&r!=="get"&&(f=JSON.stringify(i));const s=Zr({Accept:"application/json"},a||{}),c=await fetch(o,{method:r,headers:s,body:f,mode:"cors"});let l;try{l=await c.json()}catch{}if(!c.ok)throw l&&l.error?new Error(`${c.status}: ${l.error}`):new Error("A connection error occurred while making the request");return l}function Dl(r){return I("get","/addresses",{query:r})}async function Nl(r){const{address:e}=await I("get","/addresses",{id:r});return e}async function Cl(r){const{address:e}=await I("post","/addresses",{data:r});return e}async function Ll(r,e){const{address:t}=await I("put","/addresses",{id:r,data:e});return t}function jl(r){return I("delete","/addresses",{id:r})}async function kl(r){const{address:e}=await I("post","/addresses/merge",{data:r});return e}async function Vl(r,e){const{charge:t}=await I("post",`/addresses/${r}/charges/skip`,{data:e});return t}var ql=Object.freeze({__proto__:null,listAddresses:Dl,getAddress:Nl,createAddress:Cl,updateAddress:Ll,deleteAddress:jl,mergeAddresses:kl,skipFutureCharge:Vl});function Gl(r,e){for(var t=-1,n=r==null?0:r.length,i=Array(n);++t<n;)i[t]=e(r[t],t,r);return i}var Qr=Gl;function Hl(){this.__data__=[],this.size=0}var Wl=Hl;function zl(r,e){return r===e||r!==r&&e!==e}var et=zl,Xl=et;function Yl(r,e){for(var t=r.length;t--;)if(Xl(r[t][0],e))return t;return-1}var rt=Yl,Kl=rt,Zl=Array.prototype,Jl=Zl.splice;function Ql(r){var e=this.__data__,t=Kl(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():Jl.call(e,t,1),--this.size,!0}var ep=Ql,rp=rt;function tp(r){var e=this.__data__,t=rp(e,r);return t<0?void 0:e[t][1]}var np=tp,ip=rt;function ap(r){return ip(this.__data__,r)>-1}var op=ap,up=rt;function fp(r,e){var t=this.__data__,n=up(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}var sp=fp,cp=Wl,lp=ep,pp=np,hp=op,yp=sp;function qe(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}qe.prototype.clear=cp,qe.prototype.delete=lp,qe.prototype.get=pp,qe.prototype.has=hp,qe.prototype.set=yp;var tt=qe,dp=tt;function vp(){this.__data__=new dp,this.size=0}var gp=vp;function _p(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}var mp=_p;function bp(r){return this.__data__.get(r)}var wp=bp;function $p(r){return this.__data__.has(r)}var Ep=$p,Op=typeof te=="object"&&te&&te.Object===Object&&te,Oa=Op,Ap=Oa,Sp=typeof self=="object"&&self&&self.Object===Object&&self,Tp=Ap||Sp||Function("return this")(),Q=Tp,Ip=Q,xp=Ip.Symbol,Ge=xp,Aa=Ge,Sa=Object.prototype,Pp=Sa.hasOwnProperty,Fp=Sa.toString,sr=Aa?Aa.toStringTag:void 0;function Rp(r){var e=Pp.call(r,sr),t=r[sr];try{r[sr]=void 0;var n=!0}catch{}var i=Fp.call(r);return n&&(e?r[sr]=t:delete r[sr]),i}var Mp=Rp,Bp=Object.prototype,Up=Bp.toString;function Dp(r){return Up.call(r)}var Np=Dp,Ta=Ge,Cp=Mp,Lp=Np,jp="[object Null]",kp="[object Undefined]",Ia=Ta?Ta.toStringTag:void 0;function Vp(r){return r==null?r===void 0?kp:jp:Ia&&Ia in Object(r)?Cp(r):Lp(r)}var oe=Vp;function qp(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}var ve=qp,Gp=oe,Hp=ve,Wp="[object AsyncFunction]",zp="[object Function]",Xp="[object GeneratorFunction]",Yp="[object Proxy]";function Kp(r){if(!Hp(r))return!1;var e=Gp(r);return e==zp||e==Xp||e==Wp||e==Yp}var In=Kp,Zp=Q,Jp=Zp["__core-js_shared__"],Qp=Jp,xn=Qp,xa=function(){var r=/[^.]+$/.exec(xn&&xn.keys&&xn.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function eh(r){return!!xa&&xa in r}var rh=eh,th=Function.prototype,nh=th.toString;function ih(r){if(r!=null){try{return nh.call(r)}catch{}try{return r+""}catch{}}return""}var Pa=ih,ah=In,oh=rh,uh=ve,fh=Pa,sh=/[\\^$.*+?()[\]{}|]/g,ch=/^\[object .+?Constructor\]$/,lh=Function.prototype,ph=Object.prototype,hh=lh.toString,yh=ph.hasOwnProperty,dh=RegExp("^"+hh.call(yh).replace(sh,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function vh(r){if(!uh(r)||oh(r))return!1;var e=ah(r)?dh:ch;return e.test(fh(r))}var gh=vh;function _h(r,e){return r?.[e]}var mh=_h,bh=gh,wh=mh;function $h(r,e){var t=wh(r,e);return bh(t)?t:void 0}var Te=$h,Eh=Te,Oh=Q,Ah=Eh(Oh,"Map"),Pn=Ah,Sh=Te,Th=Sh(Object,"create"),nt=Th,Fa=nt;function Ih(){this.__data__=Fa?Fa(null):{},this.size=0}var xh=Ih;function Ph(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}var Fh=Ph,Rh=nt,Mh="__lodash_hash_undefined__",Bh=Object.prototype,Uh=Bh.hasOwnProperty;function Dh(r){var e=this.__data__;if(Rh){var t=e[r];return t===Mh?void 0:t}return Uh.call(e,r)?e[r]:void 0}var Nh=Dh,Ch=nt,Lh=Object.prototype,jh=Lh.hasOwnProperty;function kh(r){var e=this.__data__;return Ch?e[r]!==void 0:jh.call(e,r)}var Vh=kh,qh=nt,Gh="__lodash_hash_undefined__";function Hh(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=qh&&e===void 0?Gh:e,this}var Wh=Hh,zh=xh,Xh=Fh,Yh=Nh,Kh=Vh,Zh=Wh;function He(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}He.prototype.clear=zh,He.prototype.delete=Xh,He.prototype.get=Yh,He.prototype.has=Kh,He.prototype.set=Zh;var Jh=He,Ra=Jh,Qh=tt,ey=Pn;function ry(){this.size=0,this.__data__={hash:new Ra,map:new(ey||Qh),string:new Ra}}var ty=ry;function ny(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}var iy=ny,ay=iy;function oy(r,e){var t=r.__data__;return ay(e)?t[typeof e=="string"?"string":"hash"]:t.map}var it=oy,uy=it;function fy(r){var e=uy(this,r).delete(r);return this.size-=e?1:0,e}var sy=fy,cy=it;function ly(r){return cy(this,r).get(r)}var py=ly,hy=it;function yy(r){return hy(this,r).has(r)}var dy=yy,vy=it;function gy(r,e){var t=vy(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}var _y=gy,my=ty,by=sy,wy=py,$y=dy,Ey=_y;function We(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}We.prototype.clear=my,We.prototype.delete=by,We.prototype.get=wy,We.prototype.has=$y,We.prototype.set=Ey;var Fn=We,Oy=tt,Ay=Pn,Sy=Fn,Ty=200;function Iy(r,e){var t=this.__data__;if(t instanceof Oy){var n=t.__data__;if(!Ay||n.length<Ty-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new Sy(n)}return t.set(r,e),this.size=t.size,this}var xy=Iy,Py=tt,Fy=gp,Ry=mp,My=wp,By=Ep,Uy=xy;function ze(r){var e=this.__data__=new Py(r);this.size=e.size}ze.prototype.clear=Fy,ze.prototype.delete=Ry,ze.prototype.get=My,ze.prototype.has=By,ze.prototype.set=Uy;var Rn=ze;function Dy(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}var Ma=Dy,Ny=Te,Cy=function(){try{var r=Ny(Object,"defineProperty");return r({},"",{}),r}catch{}}(),Ba=Cy,Ua=Ba;function Ly(r,e,t){e=="__proto__"&&Ua?Ua(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}var Da=Ly,jy=Da,ky=et,Vy=Object.prototype,qy=Vy.hasOwnProperty;function Gy(r,e,t){var n=r[e];(!(qy.call(r,e)&&ky(n,t))||t===void 0&&!(e in r))&&jy(r,e,t)}var Na=Gy,Hy=Na,Wy=Da;function zy(r,e,t,n){var i=!t;t||(t={});for(var a=-1,o=e.length;++a<o;){var f=e[a],s=n?n(t[f],r[f],f,t,r):void 0;s===void 0&&(s=r[f]),i?Wy(t,f,s):Hy(t,f,s)}return t}var Xe=zy;function Xy(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}var Ca=Xy;function Yy(r){return r!=null&&typeof r=="object"}var H=Yy,Ky=oe,Zy=H,Jy="[object Arguments]";function Qy(r){return Zy(r)&&Ky(r)==Jy}var ed=Qy,La=ed,rd=H,ja=Object.prototype,td=ja.hasOwnProperty,nd=ja.propertyIsEnumerable,id=La(function(){return arguments}())?La:function(r){return rd(r)&&td.call(r,"callee")&&!nd.call(r,"callee")},Mn=id,ad=Array.isArray,C=ad,cr={exports:{}};function od(){return!1}var ud=od;(function(r,e){var t=Q,n=ud,i=e&&!e.nodeType&&e,a=i&&!0&&r&&!r.nodeType&&r,o=a&&a.exports===i,f=o?t.Buffer:void 0,s=f?f.isBuffer:void 0,c=s||n;r.exports=c})(cr,cr.exports);var fd=9007199254740991,sd=/^(?:0|[1-9]\d*)$/;function cd(r,e){var t=typeof r;return e=e??fd,!!e&&(t=="number"||t!="symbol"&&sd.test(r))&&r>-1&&r%1==0&&r<e}var Bn=cd,ld=9007199254740991;function pd(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=ld}var Un=pd,hd=oe,yd=Un,dd=H,vd="[object Arguments]",gd="[object Array]",_d="[object Boolean]",md="[object Date]",bd="[object Error]",wd="[object Function]",$d="[object Map]",Ed="[object Number]",Od="[object Object]",Ad="[object RegExp]",Sd="[object Set]",Td="[object String]",Id="[object WeakMap]",xd="[object ArrayBuffer]",Pd="[object DataView]",Fd="[object Float32Array]",Rd="[object Float64Array]",Md="[object Int8Array]",Bd="[object Int16Array]",Ud="[object Int32Array]",Dd="[object Uint8Array]",Nd="[object Uint8ClampedArray]",Cd="[object Uint16Array]",Ld="[object Uint32Array]",F={};F[Fd]=F[Rd]=F[Md]=F[Bd]=F[Ud]=F[Dd]=F[Nd]=F[Cd]=F[Ld]=!0,F[vd]=F[gd]=F[xd]=F[_d]=F[Pd]=F[md]=F[bd]=F[wd]=F[$d]=F[Ed]=F[Od]=F[Ad]=F[Sd]=F[Td]=F[Id]=!1;function jd(r){return dd(r)&&yd(r.length)&&!!F[hd(r)]}var kd=jd;function Vd(r){return function(e){return r(e)}}var Dn=Vd,lr={exports:{}};(function(r,e){var t=Oa,n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a&&t.process,f=function(){try{var s=i&&i.require&&i.require("util").types;return s||o&&o.binding&&o.binding("util")}catch{}}();r.exports=f})(lr,lr.exports);var qd=kd,Gd=Dn,ka=lr.exports,Va=ka&&ka.isTypedArray,Hd=Va?Gd(Va):qd,qa=Hd,Wd=Ca,zd=Mn,Xd=C,Yd=cr.exports,Kd=Bn,Zd=qa,Jd=Object.prototype,Qd=Jd.hasOwnProperty;function ev(r,e){var t=Xd(r),n=!t&&zd(r),i=!t&&!n&&Yd(r),a=!t&&!n&&!i&&Zd(r),o=t||n||i||a,f=o?Wd(r.length,String):[],s=f.length;for(var c in r)(e||Qd.call(r,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Kd(c,s)))&&f.push(c);return f}var Ga=ev,rv=Object.prototype;function tv(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||rv;return r===t}var Nn=tv;function nv(r,e){return function(t){return r(e(t))}}var Ha=nv,iv=Ha,av=iv(Object.keys,Object),ov=av,uv=Nn,fv=ov,sv=Object.prototype,cv=sv.hasOwnProperty;function lv(r){if(!uv(r))return fv(r);var e=[];for(var t in Object(r))cv.call(r,t)&&t!="constructor"&&e.push(t);return e}var pv=lv,hv=In,yv=Un;function dv(r){return r!=null&&yv(r.length)&&!hv(r)}var pr=dv,vv=Ga,gv=pv,_v=pr;function mv(r){return _v(r)?vv(r):gv(r)}var Ye=mv,bv=Xe,wv=Ye;function $v(r,e){return r&&bv(e,wv(e),r)}var Ev=$v;function Ov(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}var Av=Ov,Sv=ve,Tv=Nn,Iv=Av,xv=Object.prototype,Pv=xv.hasOwnProperty;function Fv(r){if(!Sv(r))return Iv(r);var e=Tv(r),t=[];for(var n in r)n=="constructor"&&(e||!Pv.call(r,n))||t.push(n);return t}var Rv=Fv,Mv=Ga,Bv=Rv,Uv=pr;function Dv(r){return Uv(r)?Mv(r,!0):Bv(r)}var at=Dv,Nv=Xe,Cv=at;function Lv(r,e){return r&&Nv(e,Cv(e),r)}var jv=Lv,Cn={exports:{}};(function(r,e){var t=Q,n=e&&!e.nodeType&&e,i=n&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===n,o=a?t.Buffer:void 0,f=o?o.allocUnsafe:void 0;function s(c,l){if(l)return c.slice();var u=c.length,p=f?f(u):new c.constructor(u);return c.copy(p),p}r.exports=s})(Cn,Cn.exports);function kv(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}var Vv=kv;function qv(r,e){for(var t=-1,n=r==null?0:r.length,i=0,a=[];++t<n;){var o=r[t];e(o,t,r)&&(a[i++]=o)}return a}var Gv=qv;function Hv(){return[]}var Wa=Hv,Wv=Gv,zv=Wa,Xv=Object.prototype,Yv=Xv.propertyIsEnumerable,za=Object.getOwnPropertySymbols,Kv=za?function(r){return r==null?[]:(r=Object(r),Wv(za(r),function(e){return Yv.call(r,e)}))}:zv,Ln=Kv,Zv=Xe,Jv=Ln;function Qv(r,e){return Zv(r,Jv(r),e)}var eg=Qv;function rg(r,e){for(var t=-1,n=e.length,i=r.length;++t<n;)r[i+t]=e[t];return r}var jn=rg,tg=Ha,ng=tg(Object.getPrototypeOf,Object),kn=ng,ig=jn,ag=kn,og=Ln,ug=Wa,fg=Object.getOwnPropertySymbols,sg=fg?function(r){for(var e=[];r;)ig(e,og(r)),r=ag(r);return e}:ug,Xa=sg,cg=Xe,lg=Xa;function pg(r,e){return cg(r,lg(r),e)}var hg=pg,yg=jn,dg=C;function vg(r,e,t){var n=e(r);return dg(r)?n:yg(n,t(r))}var Ya=vg,gg=Ya,_g=Ln,mg=Ye;function bg(r){return gg(r,mg,_g)}var Ka=bg,wg=Ya,$g=Xa,Eg=at;function Og(r){return wg(r,Eg,$g)}var Za=Og,Ag=Te,Sg=Q,Tg=Ag(Sg,"DataView"),Ig=Tg,xg=Te,Pg=Q,Fg=xg(Pg,"Promise"),Rg=Fg,Mg=Te,Bg=Q,Ug=Mg(Bg,"Set"),Dg=Ug,Ng=Te,Cg=Q,Lg=Ng(Cg,"WeakMap"),jg=Lg,Vn=Ig,qn=Pn,Gn=Rg,Hn=Dg,Wn=jg,Ja=oe,Ke=Pa,Qa="[object Map]",kg="[object Object]",eo="[object Promise]",ro="[object Set]",to="[object WeakMap]",no="[object DataView]",Vg=Ke(Vn),qg=Ke(qn),Gg=Ke(Gn),Hg=Ke(Hn),Wg=Ke(Wn),Ie=Ja;(Vn&&Ie(new Vn(new ArrayBuffer(1)))!=no||qn&&Ie(new qn)!=Qa||Gn&&Ie(Gn.resolve())!=eo||Hn&&Ie(new Hn)!=ro||Wn&&Ie(new Wn)!=to)&&(Ie=function(r){var e=Ja(r),t=e==kg?r.constructor:void 0,n=t?Ke(t):"";if(n)switch(n){case Vg:return no;case qg:return Qa;case Gg:return eo;case Hg:return ro;case Wg:return to}return e});var ot=Ie,zg=Object.prototype,Xg=zg.hasOwnProperty;function Yg(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&Xg.call(r,"index")&&(t.index=r.index,t.input=r.input),t}var Kg=Yg,Zg=Q,Jg=Zg.Uint8Array,io=Jg,ao=io;function Qg(r){var e=new r.constructor(r.byteLength);return new ao(e).set(new ao(r)),e}var zn=Qg,e_=zn;function r_(r,e){var t=e?e_(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}var t_=r_,n_=/\w*$/;function i_(r){var e=new r.constructor(r.source,n_.exec(r));return e.lastIndex=r.lastIndex,e}var a_=i_,oo=Ge,uo=oo?oo.prototype:void 0,fo=uo?uo.valueOf:void 0;function o_(r){return fo?Object(fo.call(r)):{}}var u_=o_,f_=zn;function s_(r,e){var t=e?f_(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}var c_=s_,l_=zn,p_=t_,h_=a_,y_=u_,d_=c_,v_="[object Boolean]",g_="[object Date]",__="[object Map]",m_="[object Number]",b_="[object RegExp]",w_="[object Set]",$_="[object String]",E_="[object Symbol]",O_="[object ArrayBuffer]",A_="[object DataView]",S_="[object Float32Array]",T_="[object Float64Array]",I_="[object Int8Array]",x_="[object Int16Array]",P_="[object Int32Array]",F_="[object Uint8Array]",R_="[object Uint8ClampedArray]",M_="[object Uint16Array]",B_="[object Uint32Array]";function U_(r,e,t){var n=r.constructor;switch(e){case O_:return l_(r);case v_:case g_:return new n(+r);case A_:return p_(r,t);case S_:case T_:case I_:case x_:case P_:case F_:case R_:case M_:case B_:return d_(r,t);case __:return new n;case m_:case $_:return new n(r);case b_:return h_(r);case w_:return new n;case E_:return y_(r)}}var D_=U_,N_=ve,so=Object.create,C_=function(){function r(){}return function(e){if(!N_(e))return{};if(so)return so(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}(),L_=C_,j_=L_,k_=kn,V_=Nn;function q_(r){return typeof r.constructor=="function"&&!V_(r)?j_(k_(r)):{}}var G_=q_,H_=ot,W_=H,z_="[object Map]";function X_(r){return W_(r)&&H_(r)==z_}var Y_=X_,K_=Y_,Z_=Dn,co=lr.exports,lo=co&&co.isMap,J_=lo?Z_(lo):K_,Q_=J_,em=ot,rm=H,tm="[object Set]";function nm(r){return rm(r)&&em(r)==tm}var im=nm,am=im,om=Dn,po=lr.exports,ho=po&&po.isSet,um=ho?om(ho):am,fm=um,sm=Rn,cm=Ma,lm=Na,pm=Ev,hm=jv,ym=Cn.exports,dm=Vv,vm=eg,gm=hg,_m=Ka,mm=Za,bm=ot,wm=Kg,$m=D_,Em=G_,Om=C,Am=cr.exports,Sm=Q_,Tm=ve,Im=fm,xm=Ye,Pm=at,Fm=1,Rm=2,Mm=4,yo="[object Arguments]",Bm="[object Array]",Um="[object Boolean]",Dm="[object Date]",Nm="[object Error]",vo="[object Function]",Cm="[object GeneratorFunction]",Lm="[object Map]",jm="[object Number]",go="[object Object]",km="[object RegExp]",Vm="[object Set]",qm="[object String]",Gm="[object Symbol]",Hm="[object WeakMap]",Wm="[object ArrayBuffer]",zm="[object DataView]",Xm="[object Float32Array]",Ym="[object Float64Array]",Km="[object Int8Array]",Zm="[object Int16Array]",Jm="[object Int32Array]",Qm="[object Uint8Array]",e0="[object Uint8ClampedArray]",r0="[object Uint16Array]",t0="[object Uint32Array]",P={};P[yo]=P[Bm]=P[Wm]=P[zm]=P[Um]=P[Dm]=P[Xm]=P[Ym]=P[Km]=P[Zm]=P[Jm]=P[Lm]=P[jm]=P[go]=P[km]=P[Vm]=P[qm]=P[Gm]=P[Qm]=P[e0]=P[r0]=P[t0]=!0,P[Nm]=P[vo]=P[Hm]=!1;function ut(r,e,t,n,i,a){var o,f=e&Fm,s=e&Rm,c=e&Mm;if(t&&(o=i?t(r,n,i,a):t(r)),o!==void 0)return o;if(!Tm(r))return r;var l=Om(r);if(l){if(o=wm(r),!f)return dm(r,o)}else{var u=bm(r),p=u==vo||u==Cm;if(Am(r))return ym(r,f);if(u==go||u==yo||p&&!i){if(o=s||p?{}:Em(r),!f)return s?gm(r,hm(o,r)):vm(r,pm(o,r))}else{if(!P[u])return i?r:{};o=$m(r,u,f)}}a||(a=new sm);var d=a.get(r);if(d)return d;a.set(r,o),Im(r)?r.forEach(function($){o.add(ut($,e,t,$,r,a))}):Sm(r)&&r.forEach(function($,b){o.set(b,ut($,e,t,b,r,a))});var _=c?s?mm:_m:s?Pm:xm,E=l?void 0:_(r);return cm(E||r,function($,b){E&&(b=$,$=r[b]),lm(o,b,ut($,e,t,b,r,a))}),o}var n0=ut,i0=oe,a0=H,o0="[object Symbol]";function u0(r){return typeof r=="symbol"||a0(r)&&i0(r)==o0}var ft=u0,f0=C,s0=ft,c0=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l0=/^\w*$/;function p0(r,e){if(f0(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||s0(r)?!0:l0.test(r)||!c0.test(r)||e!=null&&r in Object(e)}var Xn=p0,_o=Fn,h0="Expected a function";function Yn(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(h0);var t=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=t.cache;if(a.has(i))return a.get(i);var o=r.apply(this,n);return t.cache=a.set(i,o)||a,o};return t.cache=new(Yn.Cache||_o),t}Yn.Cache=_o;var y0=Yn,d0=y0,v0=500;function g0(r){var e=d0(r,function(n){return t.size===v0&&t.clear(),n}),t=e.cache;return e}var _0=g0,m0=_0,b0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,w0=/\\(\\)?/g,$0=m0(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(b0,function(t,n,i,a){e.push(i?a.replace(w0,"$1"):n||t)}),e}),E0=$0,mo=Ge,O0=Qr,A0=C,S0=ft,T0=1/0,bo=mo?mo.prototype:void 0,wo=bo?bo.toString:void 0;function $o(r){if(typeof r=="string")return r;if(A0(r))return O0(r,$o)+"";if(S0(r))return wo?wo.call(r):"";var e=r+"";return e=="0"&&1/r==-T0?"-0":e}var I0=$o,x0=I0;function P0(r){return r==null?"":x0(r)}var F0=P0,R0=C,M0=Xn,B0=E0,U0=F0;function D0(r,e){return R0(r)?r:M0(r,e)?[r]:B0(U0(r))}var st=D0;function N0(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var C0=N0,L0=ft,j0=1/0;function k0(r){if(typeof r=="string"||L0(r))return r;var e=r+"";return e=="0"&&1/r==-j0?"-0":e}var hr=k0,V0=st,q0=hr;function G0(r,e){e=V0(e,r);for(var t=0,n=e.length;r!=null&&t<n;)r=r[q0(e[t++])];return t&&t==n?r:void 0}var Kn=G0;function H0(r,e,t){var n=-1,i=r.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var a=Array(i);++n<i;)a[n]=r[n+e];return a}var W0=H0,z0=Kn,X0=W0;function Y0(r,e){return e.length<2?r:z0(r,X0(e,0,-1))}var K0=Y0,Z0=st,J0=C0,Q0=K0,eb=hr;function rb(r,e){return e=Z0(e,r),r=Q0(r,e),r==null||delete r[eb(J0(e))]}var tb=rb,nb=oe,ib=kn,ab=H,ob="[object Object]",ub=Function.prototype,fb=Object.prototype,Eo=ub.toString,sb=fb.hasOwnProperty,cb=Eo.call(Object);function lb(r){if(!ab(r)||nb(r)!=ob)return!1;var e=ib(r);if(e===null)return!0;var t=sb.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Eo.call(t)==cb}var pb=lb,hb=pb;function yb(r){return hb(r)?void 0:r}var db=yb,Oo=Ge,vb=Mn,gb=C,Ao=Oo?Oo.isConcatSpreadable:void 0;function _b(r){return gb(r)||vb(r)||!!(Ao&&r&&r[Ao])}var mb=_b,bb=jn,wb=mb;function So(r,e,t,n,i){var a=-1,o=r.length;for(t||(t=wb),i||(i=[]);++a<o;){var f=r[a];e>0&&t(f)?e>1?So(f,e-1,t,n,i):bb(i,f):n||(i[i.length]=f)}return i}var $b=So,Eb=$b;function Ob(r){var e=r==null?0:r.length;return e?Eb(r,1):[]}var Ab=Ob;function Sb(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}var Tb=Sb,Ib=Tb,To=Math.max;function xb(r,e,t){return e=To(e===void 0?r.length-1:e,0),function(){for(var n=arguments,i=-1,a=To(n.length-e,0),o=Array(a);++i<a;)o[i]=n[e+i];i=-1;for(var f=Array(e+1);++i<e;)f[i]=n[i];return f[e]=t(o),Ib(r,this,f)}}var Io=xb;function Pb(r){return function(){return r}}var Fb=Pb;function Rb(r){return r}var ct=Rb,Mb=Fb,xo=Ba,Bb=ct,Ub=xo?function(r,e){return xo(r,"toString",{configurable:!0,enumerable:!1,value:Mb(e),writable:!0})}:Bb,Db=Ub,Nb=800,Cb=16,Lb=Date.now;function jb(r){var e=0,t=0;return function(){var n=Lb(),i=Cb-(n-t);if(t=n,i>0){if(++e>=Nb)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}var kb=jb,Vb=Db,qb=kb,Gb=qb(Vb),Po=Gb,Hb=Ab,Wb=Io,zb=Po;function Xb(r){return zb(Wb(r,void 0,Hb),r+"")}var Yb=Xb,Kb=Qr,Zb=n0,Jb=tb,Qb=st,ew=Xe,rw=db,tw=Yb,nw=Za,iw=1,aw=2,ow=4,uw=tw(function(r,e){var t={};if(r==null)return t;var n=!1;e=Kb(e,function(a){return a=Qb(a,r),n||(n=a.length>1),a}),ew(r,nw(r),t),n&&(t=Zb(t,iw|aw|ow,rw));for(var i=e.length;i--;)Jb(t,e[i]);return t}),fw=uw,sw=Object.defineProperty,cw=Object.defineProperties,lw=Object.getOwnPropertyDescriptors,Fo=Object.getOwnPropertySymbols,pw=Object.prototype.hasOwnProperty,hw=Object.prototype.propertyIsEnumerable,Ro=(r,e,t)=>e in r?sw(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,yw=(r,e)=>{for(var t in e||(e={}))pw.call(e,t)&&Ro(r,t,e[t]);if(Fo)for(var t of Fo(e))hw.call(e,t)&&Ro(r,t,e[t]);return r},dw=(r,e)=>cw(r,lw(e));function vw(r){try{return JSON.parse(r)}catch{return r}}function gw(r){return Object.entries(r).reduce((e,[t,n])=>dw(yw({},e),{[t]:vw(n)}),{})}var _w=Object.defineProperty,mw=Object.defineProperties,bw=Object.getOwnPropertyDescriptors,Mo=Object.getOwnPropertySymbols,ww=Object.prototype.hasOwnProperty,$w=Object.prototype.propertyIsEnumerable,Bo=(r,e,t)=>e in r?_w(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Uo=(r,e)=>{for(var t in e||(e={}))ww.call(e,t)&&Bo(r,t,e[t]);if(Mo)for(var t of Mo(e))$w.call(e,t)&&Bo(r,t,e[t]);return r},Do=(r,e)=>mw(r,bw(e));function No(r){var e;const t=gw(r),n=t.auto_inject===void 0?!0:t.auto_inject,i=(e=t.display_on)!=null?e:[],a=t.first_option==="autodeliver";return Do(Uo({},fw(t,["display_on","first_option"])),{auto_inject:n,valid_pages:i,is_subscription_first:a,autoInject:n,validPages:i,isSubscriptionFirst:a})}function Co(r){var e;const t=((e=r.subscription_options)==null?void 0:e.storefront_purchase_options)==="subscription_only";return Do(Uo({},r),{is_subscription_only:t,isSubscriptionOnly:t})}function Ew(r){return r.map(e=>{const t={};return Object.entries(e).forEach(([n,i])=>{t[n]=Co(i)}),t})}const lt="2020-12",Ow={store_currency:{currency_code:"USD",currency_symbol:"$",decimal_separator:".",thousands_separator:",",currency_symbol_location:"left"}},yr=new Map;function pt(r,e){return yr.has(r)||yr.set(r,e()),yr.get(r)}const Zn=async r=>{const{product:e}=await pt(`product.${r}`,()=>Jr("get",`/product/${lt}/${r}.json`));return Co(e)},Lo=async()=>await pt("storeSettings",()=>Jr("get",`/${lt}/store_settings.json`).catch(()=>Ow)),jo=async()=>{const{widget_settings:r}=await pt("widgetSettings",()=>Jr("get",`/${lt}/widget_settings.json`));return No(r)},ko=async()=>{const{products:r,widget_settings:e,store_settings:t,meta:n}=await pt("productsAndSettings",()=>Jr("get",`/product/${lt}/products.json`));return n?.status==="error"?Promise.reject(n.message):{products:Ew(r),widget_settings:No(e),store_settings:t}},Aw=async()=>{const{products:r}=await ko();return r},Sw=async r=>{const[e,t,n]=await Promise.all([Zn(r),Lo(),jo()]);return{product:e,store_settings:t,widget_settings:n,storeSettings:t,widgetSettings:n}},Vo=async r=>{const{bundle_product:e}=await Zn(r);return e},qo=()=>Array.from(yr.keys()).forEach(r=>yr.delete(r));var Tw=Object.freeze({__proto__:null,getProduct:Zn,getStoreSettings:Lo,getWidgetSettings:jo,getProductsAndSettings:ko,getProducts:Aw,getProductAndSettings:Sw,getBundleSettings:Vo,resetCache:qo});async function Iw(r){const{charge:e}=await I("get","/charges",{id:r});return e}function xw(r){return I("get","/charges",{query:r})}async function Pw(r,e){const{charge:t}=await I("post",`/charges/${r}/apply_discount`,{data:e});return t}async function Fw(r){const{charge:e}=await I("post",`/charges/${r}/remove_discount`);return e}async function Rw(r){const{charge:e}=await I("post",`/charges/${r}/skip`);return e}async function Mw(r){const{charge:e}=await I("post",`/charges/${r}/unskip`);return e}async function Bw(r,e){const{charge:t}=await I("post",`/charges/${r}/refund`,{data:e});return t}async function Uw(r){const{charge:e}=await I("post",`/charges/${r}/process`);return e}async function Dw(r){const{charge:e}=await I("post",`/charges/${r}/capture_payment`);return e}var Nw=Object.freeze({__proto__:null,getCharge:Iw,listCharges:xw,applyDiscount:Pw,removeDiscount:Fw,skipCharge:Rw,unskipCharge:Mw,refundCharge:Bw,processCharge:Uw,captureCharge:Dw}),ue={},ht={},Go={},Jn={},fe={},Cw=oe,Lw=H,jw="[object Number]";function kw(r){return typeof r=="number"||Lw(r)&&Cw(r)==jw}var yt=kw,M={},Ho={exports:{}},Vw=ct,qw=Io,Gw=Po;function Hw(r,e){return Gw(qw(r,e,Vw),r+"")}var Ww=Hw,zw=et,Xw=pr,Yw=Bn,Kw=ve;function Zw(r,e,t){if(!Kw(t))return!1;var n=typeof e;return(n=="number"?Xw(t)&&Yw(e,t.length):n=="string"&&e in t)?zw(t[e],r):!1}var Wo=Zw,Jw=Ww,Qw=Wo;function e1(r){return Jw(function(e,t){var n=-1,i=t.length,a=i>1?t[i-1]:void 0,o=i>2?t[2]:void 0;for(a=r.length>3&&typeof a=="function"?(i--,a):void 0,o&&Qw(t[0],t[1],o)&&(a=i<3?void 0:a,i=1),e=Object(e);++n<i;){var f=t[n];f&&r(e,f,n,a)}return e})}var r1=e1,t1=Xe,n1=r1,i1=at,a1=n1(function(r,e){t1(e,i1(e),r)}),o1=a1;(function(r){r.exports=o1})(Ho);var dt={},xe={};function u1(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(!e(r[t],t,r))return!1;return!0}var f1=u1;function s1(r){return function(e,t,n){for(var i=-1,a=Object(e),o=n(e),f=o.length;f--;){var s=o[r?f:++i];if(t(a[s],s,a)===!1)break}return e}}var c1=s1,l1=c1,p1=l1(),h1=p1,y1=h1,d1=Ye;function v1(r,e){return r&&y1(r,e,d1)}var g1=v1,_1=pr;function m1(r,e){return function(t,n){if(t==null)return t;if(!_1(t))return r(t,n);for(var i=t.length,a=e?i:-1,o=Object(t);(e?a--:++a<i)&&n(o[a],a,o)!==!1;);return t}}var b1=m1,w1=g1,$1=b1,E1=$1(w1),Qn=E1,O1=Qn;function A1(r,e){var t=!0;return O1(r,function(n,i,a){return t=!!e(n,i,a),t}),t}var S1=A1,T1="__lodash_hash_undefined__";function I1(r){return this.__data__.set(r,T1),this}var x1=I1;function P1(r){return this.__data__.has(r)}var F1=P1,R1=Fn,M1=x1,B1=F1;function vt(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new R1;++e<t;)this.add(r[e])}vt.prototype.add=vt.prototype.push=M1,vt.prototype.has=B1;var U1=vt;function D1(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1}var N1=D1;function C1(r,e){return r.has(e)}var L1=C1,j1=U1,k1=N1,V1=L1,q1=1,G1=2;function H1(r,e,t,n,i,a){var o=t&q1,f=r.length,s=e.length;if(f!=s&&!(o&&s>f))return!1;var c=a.get(r),l=a.get(e);if(c&&l)return c==e&&l==r;var u=-1,p=!0,d=t&G1?new j1:void 0;for(a.set(r,e),a.set(e,r);++u<f;){var _=r[u],E=e[u];if(n)var $=o?n(E,_,u,e,r,a):n(_,E,u,r,e,a);if($!==void 0){if($)continue;p=!1;break}if(d){if(!k1(e,function(b,S){if(!V1(d,S)&&(_===b||i(_,b,t,n,a)))return d.push(S)})){p=!1;break}}else if(!(_===E||i(_,E,t,n,a))){p=!1;break}}return a.delete(r),a.delete(e),p}var zo=H1;function W1(r){var e=-1,t=Array(r.size);return r.forEach(function(n,i){t[++e]=[i,n]}),t}var z1=W1;function X1(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}var Y1=X1,Xo=Ge,Yo=io,K1=et,Z1=zo,J1=z1,Q1=Y1,e$=1,r$=2,t$="[object Boolean]",n$="[object Date]",i$="[object Error]",a$="[object Map]",o$="[object Number]",u$="[object RegExp]",f$="[object Set]",s$="[object String]",c$="[object Symbol]",l$="[object ArrayBuffer]",p$="[object DataView]",Ko=Xo?Xo.prototype:void 0,ei=Ko?Ko.valueOf:void 0;function h$(r,e,t,n,i,a,o){switch(t){case p$:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case l$:return!(r.byteLength!=e.byteLength||!a(new Yo(r),new Yo(e)));case t$:case n$:case o$:return K1(+r,+e);case i$:return r.name==e.name&&r.message==e.message;case u$:case s$:return r==e+"";case a$:var f=J1;case f$:var s=n&e$;if(f||(f=Q1),r.size!=e.size&&!s)return!1;var c=o.get(r);if(c)return c==e;n|=r$,o.set(r,e);var l=Z1(f(r),f(e),n,i,a,o);return o.delete(r),l;case c$:if(ei)return ei.call(r)==ei.call(e)}return!1}var y$=h$,Zo=Ka,d$=1,v$=Object.prototype,g$=v$.hasOwnProperty;function _$(r,e,t,n,i,a){var o=t&d$,f=Zo(r),s=f.length,c=Zo(e),l=c.length;if(s!=l&&!o)return!1;for(var u=s;u--;){var p=f[u];if(!(o?p in e:g$.call(e,p)))return!1}var d=a.get(r),_=a.get(e);if(d&&_)return d==e&&_==r;var E=!0;a.set(r,e),a.set(e,r);for(var $=o;++u<s;){p=f[u];var b=r[p],S=e[p];if(n)var h=o?n(S,b,p,e,r,a):n(b,S,p,r,e,a);if(!(h===void 0?b===S||i(b,S,t,n,a):h)){E=!1;break}$||($=p=="constructor")}if(E&&!$){var A=r.constructor,x=e.constructor;A!=x&&"constructor"in r&&"constructor"in e&&!(typeof A=="function"&&A instanceof A&&typeof x=="function"&&x instanceof x)&&(E=!1)}return a.delete(r),a.delete(e),E}var m$=_$,ri=Rn,b$=zo,w$=y$,$$=m$,Jo=ot,Qo=C,eu=cr.exports,E$=qa,O$=1,ru="[object Arguments]",tu="[object Array]",gt="[object Object]",A$=Object.prototype,nu=A$.hasOwnProperty;function S$(r,e,t,n,i,a){var o=Qo(r),f=Qo(e),s=o?tu:Jo(r),c=f?tu:Jo(e);s=s==ru?gt:s,c=c==ru?gt:c;var l=s==gt,u=c==gt,p=s==c;if(p&&eu(r)){if(!eu(e))return!1;o=!0,l=!1}if(p&&!l)return a||(a=new ri),o||E$(r)?b$(r,e,t,n,i,a):w$(r,e,s,t,n,i,a);if(!(t&O$)){var d=l&&nu.call(r,"__wrapped__"),_=u&&nu.call(e,"__wrapped__");if(d||_){var E=d?r.value():r,$=_?e.value():e;return a||(a=new ri),i(E,$,t,n,a)}}return p?(a||(a=new ri),$$(r,e,t,n,i,a)):!1}var T$=S$,I$=T$,iu=H;function au(r,e,t,n,i){return r===e?!0:r==null||e==null||!iu(r)&&!iu(e)?r!==r&&e!==e:I$(r,e,t,n,au,i)}var ou=au,x$=Rn,P$=ou,F$=1,R$=2;function M$(r,e,t,n){var i=t.length,a=i,o=!n;if(r==null)return!a;for(r=Object(r);i--;){var f=t[i];if(o&&f[2]?f[1]!==r[f[0]]:!(f[0]in r))return!1}for(;++i<a;){f=t[i];var s=f[0],c=r[s],l=f[1];if(o&&f[2]){if(c===void 0&&!(s in r))return!1}else{var u=new x$;if(n)var p=n(c,l,s,r,e,u);if(!(p===void 0?P$(l,c,F$|R$,n,u):p))return!1}}return!0}var B$=M$,U$=ve;function D$(r){return r===r&&!U$(r)}var uu=D$,N$=uu,C$=Ye;function L$(r){for(var e=C$(r),t=e.length;t--;){var n=e[t],i=r[n];e[t]=[n,i,N$(i)]}return e}var j$=L$;function k$(r,e){return function(t){return t==null?!1:t[r]===e&&(e!==void 0||r in Object(t))}}var fu=k$,V$=B$,q$=j$,G$=fu;function H$(r){var e=q$(r);return e.length==1&&e[0][2]?G$(e[0][0],e[0][1]):function(t){return t===r||V$(t,r,e)}}var W$=H$,z$=Kn;function X$(r,e,t){var n=r==null?void 0:z$(r,e);return n===void 0?t:n}var Y$=X$;function K$(r,e){return r!=null&&e in Object(r)}var Z$=K$,J$=st,Q$=Mn,eE=C,rE=Bn,tE=Un,nE=hr;function iE(r,e,t){e=J$(e,r);for(var n=-1,i=e.length,a=!1;++n<i;){var o=nE(e[n]);if(!(a=r!=null&&t(r,o)))break;r=r[o]}return a||++n!=i?a:(i=r==null?0:r.length,!!i&&tE(i)&&rE(o,i)&&(eE(r)||Q$(r)))}var aE=iE,oE=Z$,uE=aE;function fE(r,e){return r!=null&&uE(r,e,oE)}var sE=fE,cE=ou,lE=Y$,pE=sE,hE=Xn,yE=uu,dE=fu,vE=hr,gE=1,_E=2;function mE(r,e){return hE(r)&&yE(e)?dE(vE(r),e):function(t){var n=lE(t,r);return n===void 0&&n===e?pE(t,r):cE(e,n,gE|_E)}}var bE=mE;function wE(r){return function(e){return e?.[r]}}var $E=wE,EE=Kn;function OE(r){return function(e){return EE(e,r)}}var AE=OE,SE=$E,TE=AE,IE=Xn,xE=hr;function PE(r){return IE(r)?SE(xE(r)):TE(r)}var FE=PE,RE=W$,ME=bE,BE=ct,UE=C,DE=FE;function NE(r){return typeof r=="function"?r:r==null?BE:typeof r=="object"?UE(r)?ME(r[0],r[1]):RE(r):DE(r)}var su=NE,CE=f1,LE=S1,jE=su,kE=C,VE=Wo;function qE(r,e,t){var n=kE(r)?CE:LE;return t&&VE(r,e,t)&&(e=void 0),n(r,jE(e))}var ti=qE;Object.defineProperty(xe,"__esModule",{value:!0}),xe.calculatePadding=zE,xe.slicePadding=XE;var GE=ti,HE=WE(GE);function WE(r){return r&&r.__esModule?r:{default:r}}function zE(r){switch(r%4){case 0:return 0;case 1:return 3;case 2:return 2;case 3:return 1;default:return null}}function XE(r,e){var t=r.slice(e),n=(0,HE.default)(t.buffer(),function(i){return i===0});if(n!==!0)throw new Error("XDR Read Error: invalid padding")}Object.defineProperty(dt,"__esModule",{value:!0}),dt.Cursor=void 0;var YE=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),KE=xe;function ZE(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var ni=function(){function r(e){ZE(this,r),e instanceof y||(e=typeof e=="number"?y.alloc(e):y.from(e)),this._setBuffer(e),this.rewind()}return YE(r,[{key:"_setBuffer",value:function(t){this._buffer=t,this.length=t.length}},{key:"buffer",value:function(){return this._buffer}},{key:"tap",value:function(t){return t(this),this}},{key:"clone",value:function(t){var n=new this.constructor(this.buffer());return n.seek(arguments.length===0?this.tell():t),n}},{key:"tell",value:function(){return this._index}},{key:"seek",value:function(t,n){return arguments.length===1&&(n=t,t="="),t==="+"?this._index+=n:t==="-"?this._index-=n:this._index=n,this}},{key:"rewind",value:function(){return this.seek(0)}},{key:"eof",value:function(){return this.tell()===this.buffer().length}},{key:"write",value:function(t,n,i){return this.seek("+",this.buffer().write(t,this.tell(),n,i))}},{key:"fill",value:function(t,n){return arguments.length===1&&(n=this.buffer().length-this.tell()),this.buffer().fill(t,this.tell(),this.tell()+n),this.seek("+",n),this}},{key:"slice",value:function(t){arguments.length===0&&(t=this.length-this.tell());var n=new this.constructor(this.buffer().slice(this.tell(),this.tell()+t));return this.seek("+",t),n}},{key:"copyFrom",value:function(t){var n=t instanceof y?t:t.buffer();return n.copy(this.buffer(),this.tell(),0,n.length),this.seek("+",n.length),this}},{key:"concat",value:function(t){t.forEach(function(i,a){i instanceof r&&(t[a]=i.buffer())}),t.unshift(this.buffer());var n=y.concat(t);return this._setBuffer(n),this}},{key:"toString",value:function(t,n){arguments.length===0?(t="utf8",n=this.buffer().length-this.tell()):arguments.length===1&&(n=this.buffer().length-this.tell());var i=this.buffer().toString(t,this.tell(),this.tell()+n);return this.seek("+",n),i}},{key:"writeBufferPadded",value:function(t){var n=(0,KE.calculatePadding)(t.length),i=y.alloc(n);return this.copyFrom(new r(t)).copyFrom(new r(i))}}]),r}();[[1,["readInt8","readUInt8"]],[2,["readInt16BE","readInt16LE","readUInt16BE","readUInt16LE"]],[4,["readInt32BE","readInt32LE","readUInt32BE","readUInt32LE","readFloatBE","readFloatLE"]],[8,["readDoubleBE","readDoubleLE"]]].forEach(function(r){r[1].forEach(function(e){ni.prototype[e]=function(){var n=this.buffer()[e](this.tell());return this.seek("+",r[0]),n}})}),[[1,["writeInt8","writeUInt8"]],[2,["writeInt16BE","writeInt16LE","writeUInt16BE","writeUInt16LE"]],[4,["writeInt32BE","writeInt32LE","writeUInt32BE","writeUInt32LE","writeFloatBE","writeFloatLE"]],[8,["writeDoubleBE","writeDoubleLE"]]].forEach(function(r){r[1].forEach(function(e){ni.prototype[e]=function(n){return this.buffer()[e](n,this.tell()),this.seek("+",r[0]),this}})}),dt.Cursor=ni,Object.defineProperty(M,"__esModule",{value:!0}),M.default=iO;var JE=Ho.exports,cu=pu(JE),QE=In,eO=pu(QE),lu=dt;function pu(r){return r&&r.__esModule?r:{default:r}}var rO=Math.pow(2,16),tO={toXDR:function(e){var t=new lu.Cursor(rO);this.write(e,t);var n=t.tell();return t.rewind(),t.slice(n).buffer()},fromXDR:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"raw",n=void 0;switch(t){case"raw":n=e;break;case"hex":n=y.from(e,"hex");break;case"base64":n=y.from(e,"base64");break;default:throw new Error("Invalid format "+t+', must be "raw", "hex", "base64"')}var i=new lu.Cursor(n),a=this.read(i);return a},validateXDR:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"raw";try{return this.fromXDR(e,t),!0}catch{return!1}}},nO={toXDR:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"raw",t=this.constructor.toXDR(this);switch(e){case"raw":return t;case"hex":return t.toString("hex");case"base64":return t.toString("base64");default:throw new Error("Invalid format "+e+', must be "raw", "hex", "base64"')}}};function iO(r){(0,cu.default)(r,tO),(0,eO.default)(r)&&(0,cu.default)(r.prototype,nO)}Object.defineProperty(fe,"__esModule",{value:!0}),fe.Int=void 0;var aO=yt,hu=yu(aO),oO=M,uO=yu(oO);function yu(r){return r&&r.__esModule?r:{default:r}}var dr=fe.Int={read:function(e){return e.readInt32BE()},write:function(e,t){if(!(0,hu.default)(e))throw new Error("XDR Write Error: not a number");if(Math.floor(e)!==e)throw new Error("XDR Write Error: not an integer");t.writeInt32BE(e)},isValid:function(e){return!(0,hu.default)(e)||Math.floor(e)!==e?!1:e>=dr.MIN_VALUE&&e<=dr.MAX_VALUE}};dr.MAX_VALUE=Math.pow(2,31)-1,dr.MIN_VALUE=-Math.pow(2,31),(0,uO.default)(dr);var _t={};function fO(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ii={exports:{}};(function(r){/**
20
20
  * @license Long.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
21
21
  * Released under the Apache License, Version 2.0
22
22
  * see: https://github.com/dcodeIO/Long.js for details
23
- */(function(e,t){typeof yA=="function"&&!0&&r&&r.exports?r.exports=t():(e.dcodeIO=e.dcodeIO||{}).Long=t()})(re,function(){function e(c,u,p){this.low=c|0,this.high=u|0,this.unsigned=!!p}e.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),e.isLong=function(u){return(u&&u.__isLong__)===!0};var t={},n={};e.fromInt=function(u,p){var d,_;return p?(u=u>>>0,0<=u&&u<256&&(_=n[u],_)?_:(d=new e(u,(u|0)<0?-1:0,!0),0<=u&&u<256&&(n[u]=d),d)):(u=u|0,-128<=u&&u<128&&(_=t[u],_)?_:(d=new e(u,u<0?-1:0,!1),-128<=u&&u<128&&(t[u]=d),d))},e.fromNumber=function(u,p){return p=!!p,isNaN(u)||!isFinite(u)?e.ZERO:!p&&u<=-s?e.MIN_VALUE:!p&&u+1>=s?e.MAX_VALUE:p&&u>=f?e.MAX_UNSIGNED_VALUE:u<0?e.fromNumber(-u,p).negate():new e(u%o|0,u/o|0,p)},e.fromBits=function(u,p,d){return new e(u,p,d)},e.fromString=function(u,p,d){if(u.length===0)throw Error("number format error: empty string");if(u==="NaN"||u==="Infinity"||u==="+Infinity"||u==="-Infinity")return e.ZERO;if(typeof p=="number"&&(d=p,p=!1),d=d||10,d<2||36<d)throw Error("radix out of range: "+d);var _;if((_=u.indexOf("-"))>0)throw Error('number format error: interior "-" character: '+u);if(_===0)return e.fromString(u.substring(1),p,d).negate();for(var E=e.fromNumber(Math.pow(d,8)),$=e.ZERO,b=0;b<u.length;b+=8){var S=Math.min(8,u.length-b),h=parseInt(u.substring(b,b+S),d);if(S<8){var A=e.fromNumber(Math.pow(d,S));$=$.multiply(A).add(e.fromNumber(h))}else $=$.multiply(E),$=$.add(e.fromNumber(h))}return $.unsigned=p,$},e.fromValue=function(u){return u instanceof e?u:typeof u=="number"?e.fromNumber(u):typeof u=="string"?e.fromString(u):new e(u.low,u.high,u.unsigned)};var i=1<<16,a=1<<24,o=i*i,f=o*o,s=f/2,l=e.fromInt(a);return e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*o+(this.low>>>0):this.high*o+(this.low>>>0)},e.prototype.toString=function(u){if(u=u||10,u<2||36<u)throw RangeError("radix out of range: "+u);if(this.isZero())return"0";var p;if(this.isNegative())if(this.equals(e.MIN_VALUE)){var d=e.fromNumber(u),_=this.divide(d);return p=_.multiply(d).subtract(this),_.toString(u)+p.toInt().toString(u)}else return"-"+this.negate().toString(u);var E=e.fromNumber(Math.pow(u,6),this.unsigned);p=this;for(var $="";;){var b=p.divide(E),S=p.subtract(b.multiply(E)).toInt()>>>0,h=S.toString(u);if(p=b,p.isZero())return h+$;for(;h.length<6;)h="0"+h;$=""+h+$}},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(e.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var u=this.high!=0?this.high:this.low,p=31;p>0&&(u&1<<p)==0;p--);return this.high!=0?p+33:p+1},e.prototype.isZero=function(){return this.high===0&&this.low===0},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isOdd=function(){return(this.low&1)===1},e.prototype.isEven=function(){return(this.low&1)===0},e.prototype.equals=function(u){return e.isLong(u)||(u=e.fromValue(u)),this.unsigned!==u.unsigned&&this.high>>>31===1&&u.high>>>31===1?!1:this.high===u.high&&this.low===u.low},e.eq=e.prototype.equals,e.prototype.notEquals=function(u){return!this.equals(u)},e.neq=e.prototype.notEquals,e.prototype.lessThan=function(u){return this.compare(u)<0},e.prototype.lt=e.prototype.lessThan,e.prototype.lessThanOrEqual=function(u){return this.compare(u)<=0},e.prototype.lte=e.prototype.lessThanOrEqual,e.prototype.greaterThan=function(u){return this.compare(u)>0},e.prototype.gt=e.prototype.greaterThan,e.prototype.greaterThanOrEqual=function(u){return this.compare(u)>=0},e.prototype.gte=e.prototype.greaterThanOrEqual,e.prototype.compare=function(u){if(e.isLong(u)||(u=e.fromValue(u)),this.equals(u))return 0;var p=this.isNegative(),d=u.isNegative();return p&&!d?-1:!p&&d?1:this.unsigned?u.high>>>0>this.high>>>0||u.high===this.high&&u.low>>>0>this.low>>>0?-1:1:this.subtract(u).isNegative()?-1:1},e.prototype.negate=function(){return!this.unsigned&&this.equals(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=e.prototype.negate,e.prototype.add=function(u){e.isLong(u)||(u=e.fromValue(u));var p=this.high>>>16,d=this.high&65535,_=this.low>>>16,E=this.low&65535,$=u.high>>>16,b=u.high&65535,S=u.low>>>16,h=u.low&65535,A=0,T=0,F=0,m=0;return m+=E+h,F+=m>>>16,m&=65535,F+=_+S,T+=F>>>16,F&=65535,T+=d+b,A+=T>>>16,T&=65535,A+=p+$,A&=65535,e.fromBits(F<<16|m,A<<16|T,this.unsigned)},e.prototype.subtract=function(u){return e.isLong(u)||(u=e.fromValue(u)),this.add(u.negate())},e.prototype.sub=e.prototype.subtract,e.prototype.multiply=function(u){if(this.isZero()||(e.isLong(u)||(u=e.fromValue(u)),u.isZero()))return e.ZERO;if(this.equals(e.MIN_VALUE))return u.isOdd()?e.MIN_VALUE:e.ZERO;if(u.equals(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return u.isNegative()?this.negate().multiply(u.negate()):this.negate().multiply(u).negate();if(u.isNegative())return this.multiply(u.negate()).negate();if(this.lessThan(l)&&u.lessThan(l))return e.fromNumber(this.toNumber()*u.toNumber(),this.unsigned);var p=this.high>>>16,d=this.high&65535,_=this.low>>>16,E=this.low&65535,$=u.high>>>16,b=u.high&65535,S=u.low>>>16,h=u.low&65535,A=0,T=0,F=0,m=0;return m+=E*h,F+=m>>>16,m&=65535,F+=_*h,T+=F>>>16,F&=65535,F+=E*S,T+=F>>>16,F&=65535,T+=d*h,A+=T>>>16,T&=65535,T+=_*S,A+=T>>>16,T&=65535,T+=E*b,A+=T>>>16,T&=65535,A+=p*h+d*S+_*b+E*$,A&=65535,e.fromBits(F<<16|m,A<<16|T,this.unsigned)},e.prototype.mul=e.prototype.multiply,e.prototype.divide=function(u){if(e.isLong(u)||(u=e.fromValue(u)),u.isZero())throw new Error("division by zero");if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var p,d,_;if(this.equals(e.MIN_VALUE)){if(u.equals(e.ONE)||u.equals(e.NEG_ONE))return e.MIN_VALUE;if(u.equals(e.MIN_VALUE))return e.ONE;var E=this.shiftRight(1);return p=E.divide(u).shiftLeft(1),p.equals(e.ZERO)?u.isNegative()?e.ONE:e.NEG_ONE:(d=this.subtract(u.multiply(p)),_=p.add(d.divide(u)),_)}else if(u.equals(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return u.isNegative()?this.negate().divide(u.negate()):this.negate().divide(u).negate();if(u.isNegative())return this.divide(u.negate()).negate();for(_=e.ZERO,d=this;d.greaterThanOrEqual(u);){p=Math.max(1,Math.floor(d.toNumber()/u.toNumber()));for(var $=Math.ceil(Math.log(p)/Math.LN2),b=$<=48?1:Math.pow(2,$-48),S=e.fromNumber(p),h=S.multiply(u);h.isNegative()||h.greaterThan(d);)p-=b,S=e.fromNumber(p,this.unsigned),h=S.multiply(u);S.isZero()&&(S=e.ONE),_=_.add(S),d=d.subtract(h)}return _},e.prototype.div=e.prototype.divide,e.prototype.modulo=function(u){return e.isLong(u)||(u=e.fromValue(u)),this.subtract(this.divide(u).multiply(u))},e.prototype.mod=e.prototype.modulo,e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.and=function(u){return e.isLong(u)||(u=e.fromValue(u)),e.fromBits(this.low&u.low,this.high&u.high,this.unsigned)},e.prototype.or=function(u){return e.isLong(u)||(u=e.fromValue(u)),e.fromBits(this.low|u.low,this.high|u.high,this.unsigned)},e.prototype.xor=function(u){return e.isLong(u)||(u=e.fromValue(u)),e.fromBits(this.low^u.low,this.high^u.high,this.unsigned)},e.prototype.shiftLeft=function(u){return e.isLong(u)&&(u=u.toInt()),(u&=63)===0?this:u<32?e.fromBits(this.low<<u,this.high<<u|this.low>>>32-u,this.unsigned):e.fromBits(0,this.low<<u-32,this.unsigned)},e.prototype.shl=e.prototype.shiftLeft,e.prototype.shiftRight=function(u){return e.isLong(u)&&(u=u.toInt()),(u&=63)===0?this:u<32?e.fromBits(this.low>>>u|this.high<<32-u,this.high>>u,this.unsigned):e.fromBits(this.high>>u-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=e.prototype.shiftRight,e.prototype.shiftRightUnsigned=function(u){if(e.isLong(u)&&(u=u.toInt()),u&=63,u===0)return this;var p=this.high;if(u<32){var d=this.low;return e.fromBits(d>>>u|p<<32-u,p>>>u,this.unsigned)}else return u===32?e.fromBits(p,0,this.unsigned):e.fromBits(p>>>u-32,0,this.unsigned)},e.prototype.shru=e.prototype.shiftRightUnsigned,e.prototype.toSigned=function(){return this.unsigned?new e(this.low,this.high,!1):this},e.prototype.toUnsigned=function(){return this.unsigned?this:new e(this.low,this.high,!0)},e})})(fi),Object.defineProperty(gt,"__esModule",{value:!0}),gt.Hyper=void 0;var dA=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),Ru=function r(e,t,n){e===null&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,t);if(i===void 0){var a=Object.getPrototypeOf(e);return a===null?void 0:r(a,t,n)}else{if("value"in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(n)}},vA=fi.exports,dr=Mu(vA),gA=R,_A=Mu(gA);function Mu(r){return r&&r.__esModule?r:{default:r}}function mA(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function bA(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function wA(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}var vr=gt.Hyper=function(r){wA(e,r),dA(e,null,[{key:"read",value:function(n){var i=n.readInt32BE(),a=n.readInt32BE();return this.fromBits(a,i)}},{key:"write",value:function(n,i){if(!(n instanceof this))throw new Error("XDR Write Error: "+n+" is not a Hyper");i.writeInt32BE(n.high),i.writeInt32BE(n.low)}},{key:"fromString",value:function(n){if(!/^-?\d+$/.test(n))throw new Error("Invalid hyper string: "+n);var i=Ru(e.__proto__||Object.getPrototypeOf(e),"fromString",this).call(this,n,!1);return new this(i.low,i.high)}},{key:"fromBits",value:function(n,i){var a=Ru(e.__proto__||Object.getPrototypeOf(e),"fromBits",this).call(this,n,i,!1);return new this(a.low,a.high)}},{key:"isValid",value:function(n){return n instanceof this}}]);function e(t,n){return mA(this,e),bA(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!1))}return e}(dr.default);(0,_A.default)(vr),vr.MAX_VALUE=new vr(dr.default.MAX_VALUE.low,dr.default.MAX_VALUE.high),vr.MIN_VALUE=new vr(dr.default.MIN_VALUE.low,dr.default.MIN_VALUE.high);var xe={};Object.defineProperty(xe,"__esModule",{value:!0}),xe.UnsignedInt=void 0;var $A=ht,Bu=Uu($A),EA=R,OA=Uu(EA);function Uu(r){return r&&r.__esModule?r:{default:r}}var gr=xe.UnsignedInt={read:function(e){return e.readUInt32BE()},write:function(e,t){if(!(0,Bu.default)(e))throw new Error("XDR Write Error: not a number");if(Math.floor(e)!==e)throw new Error("XDR Write Error: not an integer");if(e<0)throw new Error("XDR Write Error: negative number "+e);t.writeUInt32BE(e)},isValid:function(e){return!(0,Bu.default)(e)||Math.floor(e)!==e?!1:e>=gr.MIN_VALUE&&e<=gr.MAX_VALUE}};gr.MAX_VALUE=Math.pow(2,32)-1,gr.MIN_VALUE=0,(0,OA.default)(gr);var _t={};Object.defineProperty(_t,"__esModule",{value:!0}),_t.UnsignedHyper=void 0;var AA=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),Nu=function r(e,t,n){e===null&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,t);if(i===void 0){var a=Object.getPrototypeOf(e);return a===null?void 0:r(a,t,n)}else{if("value"in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(n)}},SA=fi.exports,_r=Du(SA),IA=R,TA=Du(IA);function Du(r){return r&&r.__esModule?r:{default:r}}function xA(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function PA(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function FA(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}var mr=_t.UnsignedHyper=function(r){FA(e,r),AA(e,null,[{key:"read",value:function(n){var i=n.readInt32BE(),a=n.readInt32BE();return this.fromBits(a,i)}},{key:"write",value:function(n,i){if(!(n instanceof this))throw new Error("XDR Write Error: "+n+" is not an UnsignedHyper");i.writeInt32BE(n.high),i.writeInt32BE(n.low)}},{key:"fromString",value:function(n){if(!/^\d+$/.test(n))throw new Error("Invalid hyper string: "+n);var i=Nu(e.__proto__||Object.getPrototypeOf(e),"fromString",this).call(this,n,!0);return new this(i.low,i.high)}},{key:"fromBits",value:function(n,i){var a=Nu(e.__proto__||Object.getPrototypeOf(e),"fromBits",this).call(this,n,i,!0);return new this(a.low,a.high)}},{key:"isValid",value:function(n){return n instanceof this}}]);function e(t,n){return xA(this,e),PA(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!0))}return e}(_r.default);(0,TA.default)(mr),mr.MAX_VALUE=new mr(_r.default.MAX_UNSIGNED_VALUE.low,_r.default.MAX_UNSIGNED_VALUE.high),mr.MIN_VALUE=new mr(_r.default.MIN_VALUE.low,_r.default.MIN_VALUE.high);var mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.Float=void 0;var RA=ht,Cu=Lu(RA),MA=R,BA=Lu(MA);function Lu(r){return r&&r.__esModule?r:{default:r}}var UA=mt.Float={read:function(e){return e.readFloatBE()},write:function(e,t){if(!(0,Cu.default)(e))throw new Error("XDR Write Error: not a number");t.writeFloatBE(e)},isValid:function(e){return(0,Cu.default)(e)}};(0,BA.default)(UA);var bt={};Object.defineProperty(bt,"__esModule",{value:!0}),bt.Double=void 0;var NA=ht,ju=ku(NA),DA=R,CA=ku(DA);function ku(r){return r&&r.__esModule?r:{default:r}}var LA=bt.Double={read:function(e){return e.readDoubleBE()},write:function(e,t){if(!(0,ju.default)(e))throw new Error("XDR Write Error: not a number");t.writeDoubleBE(e)},isValid:function(e){return(0,ju.default)(e)}};(0,CA.default)(LA);var wt={};Object.defineProperty(wt,"__esModule",{value:!0}),wt.Quadruple=void 0;var jA=R,kA=VA(jA);function VA(r){return r&&r.__esModule?r:{default:r}}var qA=wt.Quadruple={read:function(){throw new Error("XDR Read Error: quadruple not supported")},write:function(){throw new Error("XDR Write Error: quadruple not supported")},isValid:function(){return!1}};(0,kA.default)(qA);var br={},GA=te,HA=G,WA="[object Boolean]";function XA(r){return r===!0||r===!1||HA(r)&&GA(r)==WA}var zA=XA;Object.defineProperty(br,"__esModule",{value:!0}),br.Bool=void 0;var YA=zA,KA=qu(YA),Vu=ue,ZA=R,JA=qu(ZA);function qu(r){return r&&r.__esModule?r:{default:r}}var QA=br.Bool={read:function(e){var t=Vu.Int.read(e);switch(t){case 0:return!1;case 1:return!0;default:throw new Error("XDR Read Error: Got "+t+" when trying to read a bool")}},write:function(e,t){var n=e?1:0;return Vu.Int.write(n,t)},isValid:function(e){return(0,KA.default)(e)}};(0,JA.default)(QA);var $t={},eS=te,rS=N,tS=G,nS="[object String]";function iS(r){return typeof r=="string"||!rS(r)&&tS(r)&&eS(r)==nS}var Gu=iS;Object.defineProperty($t,"__esModule",{value:!0}),$t.String=void 0;var aS=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),oS=Gu,Hu=si(oS),uS=N,fS=si(uS),Wu=ue,sS=xe,Xu=Te,lS=R,cS=si(lS);function si(r){return r&&r.__esModule?r:{default:r}}function pS(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var hS=$t.String=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:sS.UnsignedInt.MAX_VALUE;pS(this,r),this._maxLength=e}return aS(r,[{key:"read",value:function(t){var n=Wu.Int.read(t);if(n>this._maxLength)throw new Error("XDR Read Error: Saw "+n+" length String,"+("max allowed is "+this._maxLength));var i=(0,Xu.calculatePadding)(n),a=t.slice(n);return(0,Xu.slicePadding)(t,i),a.buffer()}},{key:"readString",value:function(t){return this.read(t).toString("utf8")}},{key:"write",value:function(t,n){if(t.length>this._maxLength)throw new Error("XDR Write Error: Got "+t.length+" bytes,"+("max allows is "+this._maxLength));var i=void 0;(0,Hu.default)(t)?i=y.from(t,"utf8"):i=y.from(t),Wu.Int.write(i.length,n),n.writeBufferPadded(i)}},{key:"isValid",value:function(t){var n=void 0;if((0,Hu.default)(t))n=y.from(t,"utf8");else if((0,fS.default)(t)||y.isBuffer(t))n=y.from(t);else return!1;return n.length<=this._maxLength}}]),r}();(0,cS.default)(hS.prototype);var Et={};Object.defineProperty(Et,"__esModule",{value:!0}),Et.Opaque=void 0;var yS=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),zu=Te,dS=R,vS=gS(dS);function gS(r){return r&&r.__esModule?r:{default:r}}function _S(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var mS=Et.Opaque=function(){function r(e){_S(this,r),this._length=e,this._padding=(0,zu.calculatePadding)(e)}return yS(r,[{key:"read",value:function(t){var n=t.slice(this._length);return(0,zu.slicePadding)(t,this._padding),n.buffer()}},{key:"write",value:function(t,n){if(t.length!==this._length)throw new Error("XDR Write Error: Got "+t.length+" bytes, expected "+this._length);n.writeBufferPadded(t)}},{key:"isValid",value:function(t){return y.isBuffer(t)&&t.length===this._length}}]),r}();(0,vS.default)(mS.prototype);var Ot={};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.VarOpaque=void 0;var bS=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),Yu=ue,wS=xe,Ku=Te,$S=R,ES=OS($S);function OS(r){return r&&r.__esModule?r:{default:r}}function AS(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var SS=Ot.VarOpaque=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wS.UnsignedInt.MAX_VALUE;AS(this,r),this._maxLength=e}return bS(r,[{key:"read",value:function(t){var n=Yu.Int.read(t);if(n>this._maxLength)throw new Error("XDR Read Error: Saw "+n+" length VarOpaque,"+("max allowed is "+this._maxLength));var i=(0,Ku.calculatePadding)(n),a=t.slice(n);return(0,Ku.slicePadding)(t,i),a.buffer()}},{key:"write",value:function(t,n){if(t.length>this._maxLength)throw new Error("XDR Write Error: Got "+t.length+" bytes,"+("max allows is "+this._maxLength));Yu.Int.write(t.length,n),n.writeBufferPadded(t)}},{key:"isValid",value:function(t){return y.isBuffer(t)&&t.length<=this._maxLength}}]),r}();(0,ES.default)(SS.prototype);var At={},Pe={exports:{}},IS=Lr;function TS(r){return typeof r=="function"?r:IS}var Zu=TS,xS=Oi,PS=ni,FS=Zu,RS=N;function MS(r,e){var t=RS(r)?xS:PS;return t(r,FS(e))}var BS=MS;(function(r){r.exports=BS})(Pe);var US=Zo,NS=/^\s+/;function DS(r){return r&&r.slice(0,US(r)+1).replace(NS,"")}var CS=DS,LS=CS,Ju=se,jS=Dr,Qu=0/0,kS=/^[-+]0x[0-9a-f]+$/i,VS=/^0b[01]+$/i,qS=/^0o[0-7]+$/i,GS=parseInt;function HS(r){if(typeof r=="number")return r;if(jS(r))return Qu;if(Ju(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=Ju(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=LS(r);var t=VS.test(r);return t||qS.test(r)?GS(r.slice(2),t?2:8):kS.test(r)?Qu:+r}var WS=HS,XS=WS,ef=1/0,zS=17976931348623157e292;function YS(r){if(!r)return r===0?r:0;if(r=XS(r),r===ef||r===-ef){var e=r<0?-1:1;return e*zS}return r===r?r:0}var KS=YS,ZS=KS;function JS(r){var e=ZS(r),t=e%1;return e===e?t?e-t:e:0}var QS=JS,eI=xi,rI=Zu,tI=QS,nI=9007199254740991,li=4294967295,iI=Math.min;function aI(r,e){if(r=tI(r),r<1||r>nI)return[];var t=li,n=iI(r,li);e=rI(e),r-=li;for(var i=eI(n,e);++t<r;)e(t);return i}var rf=aI;Object.defineProperty(At,"__esModule",{value:!0}),At.Array=void 0;var oI=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),uI=oi,fI=wr(uI),sI=Pe.exports,lI=wr(sI),cI=rf,pI=wr(cI),hI=N,tf=wr(hI),yI=R,dI=wr(yI);function wr(r){return r&&r.__esModule?r:{default:r}}function vI(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var gI=At.Array=function(){function r(e,t){vI(this,r),this._childType=e,this._length=t}return oI(r,[{key:"read",value:function(t){var n=this;return(0,pI.default)(this._length,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,tf.default)(t))throw new Error("XDR Write Error: value is not array");if(t.length!==this._length)throw new Error("XDR Write Error: Got array of size "+t.length+","+("expected "+this._length));(0,lI.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,tf.default)(t)||t.length!==this._length?!1:(0,fI.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,dI.default)(gI.prototype);var St={};Object.defineProperty(St,"__esModule",{value:!0}),St.VarArray=void 0;var _I=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),mI=oi,bI=$r(mI),wI=Pe.exports,$I=$r(wI),EI=rf,OI=$r(EI),AI=N,nf=$r(AI),SI=xe,af=ue,II=R,TI=$r(II);function $r(r){return r&&r.__esModule?r:{default:r}}function xI(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var PI=St.VarArray=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:SI.UnsignedInt.MAX_VALUE;xI(this,r),this._childType=e,this._maxLength=t}return _I(r,[{key:"read",value:function(t){var n=this,i=af.Int.read(t);if(i>this._maxLength)throw new Error("XDR Read Error: Saw "+i+" length VarArray,"+("max allowed is "+this._maxLength));return(0,OI.default)(i,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,nf.default)(t))throw new Error("XDR Write Error: value is not array");if(t.length>this._maxLength)throw new Error("XDR Write Error: Got array of size "+t.length+","+("max allowed is "+this._maxLength));af.Int.write(t.length,n),(0,$I.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,nf.default)(t)||t.length>this._maxLength?!1:(0,bI.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,TI.default)(PI.prototype);var It={};function FI(r){return r===null}var RI=FI;function MI(r){return r===void 0}var Er=MI;Object.defineProperty(It,"__esModule",{value:!0}),It.Option=void 0;var BI=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),UI=RI,of=ci(UI),NI=Er,uf=ci(NI),ff=br,DI=R,CI=ci(DI);function ci(r){return r&&r.__esModule?r:{default:r}}function LI(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var jI=It.Option=function(){function r(e){LI(this,r),this._childType=e}return BI(r,[{key:"read",value:function(t){if(ff.Bool.read(t))return this._childType.read(t)}},{key:"write",value:function(t,n){var i=!((0,of.default)(t)||(0,uf.default)(t));ff.Bool.write(i,n),i&&this._childType.write(t,n)}},{key:"isValid",value:function(t){return(0,of.default)(t)||(0,uf.default)(t)?!0:this._childType.isValid(t)}}]),r}();(0,CI.default)(jI.prototype);var Or={};Object.defineProperty(Or,"__esModule",{value:!0}),Or.Void=void 0;var kI=Er,sf=lf(kI),VI=R,qI=lf(VI);function lf(r){return r&&r.__esModule?r:{default:r}}var GI=Or.Void={read:function(){},write:function(e){if(!(0,sf.default)(e))throw new Error("XDR Write Error: trying to write value to a void slot")},isValid:function(e){return(0,sf.default)(e)}};(0,qI.default)(GI);var Tt={},HI=Tr;function WI(r,e){return HI(e,function(t){return r[t]})}var XI=WI,zI=XI,YI=De;function KI(r){return r==null?[]:zI(r,YI(r))}var ZI=KI;Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.Enum=void 0;var JI=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),QI=Pe.exports,eT=pi(QI),rT=ZI,tT=pi(rT),cf=ue,nT=R,iT=pi(nT);function pi(r){return r&&r.__esModule?r:{default:r}}function aT(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function oT(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function pf(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var uT=Tt.Enum=function(){function r(e,t){pf(this,r),this.name=e,this.value=t}return JI(r,null,[{key:"read",value:function(t){var n=cf.Int.read(t);if(!this._byValue.has(n))throw new Error("XDR Read Error: Unknown "+this.enumName+" member for value "+n);return this._byValue.get(n)}},{key:"write",value:function(t,n){if(!(t instanceof this))throw new Error("XDR Write Error: Unknown "+t+" is not a "+this.enumName);cf.Int.write(t.value,n)}},{key:"isValid",value:function(t){return t instanceof this}},{key:"members",value:function(){return this._members}},{key:"values",value:function(){return(0,tT.default)(this._members)}},{key:"fromName",value:function(t){var n=this._members[t];if(!n)throw new Error(t+" is not a member of "+this.enumName);return n}},{key:"fromValue",value:function(t){var n=this._byValue.get(t);if(!n)throw new Error(t+" is not a value of any member of "+this.enumName);return n}},{key:"create",value:function(t,n,i){var a=function(o){oT(f,o);function f(){return pf(this,f),aT(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(r);return a.enumName=n,t.results[n]=a,a._members={},a._byValue=new Map,(0,eT.default)(i,function(o,f){var s=new a(f,o);a._members[f]=s,a._byValue.set(o,s),a[f]=function(){return s}}),a}}]),r}();(0,iT.default)(uT);var xt={},fT=ni,sT=er;function lT(r,e){var t=-1,n=sT(r)?Array(r.length):[];return fT(r,function(i,a,o){n[++t]=e(i,a,o)}),n}var cT=lT,pT=Tr,hT=Su,yT=cT,dT=N;function vT(r,e){var t=dT(r)?pT:yT;return t(r,hT(e))}var gT=vT;function _T(r){for(var e=-1,t=r==null?0:r.length,n={};++e<t;){var i=r[e];n[i[0]]=i[1]}return n}var mT=_T,Ar={};Object.defineProperty(Ar,"__esModule",{value:!0});var bT=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();function wT(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}Ar.Reference=function(){function r(){wT(this,r)}return bT(r,[{key:"resolve",value:function(){throw new Error("implement resolve in child class")}}]),r}(),Object.defineProperty(xt,"__esModule",{value:!0}),xt.Struct=void 0;var Pt=function(){function r(e,t){var n=[],i=!0,a=!1,o=void 0;try{for(var f=e[Symbol.iterator](),s;!(i=(s=f.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,o=l}finally{try{!i&&f.return&&f.return()}finally{if(a)throw o}}return n}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),$T=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),ET=Pe.exports,hf=Sr(ET),OT=gT,AT=Sr(OT),ST=Er,IT=Sr(ST),TT=mT,xT=Sr(TT),PT=Ar,FT=R,RT=Sr(FT);function Sr(r){return r&&r.__esModule?r:{default:r}}function MT(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function BT(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function yf(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var UT=xt.Struct=function(){function r(e){yf(this,r),this._attributes=e||{}}return $T(r,null,[{key:"read",value:function(t){var n=(0,AT.default)(this._fields,function(i){var a=Pt(i,2),o=a[0],f=a[1],s=f.read(t);return[o,s]});return new this((0,xT.default)(n))}},{key:"write",value:function(t,n){if(!(t instanceof this))throw new Error("XDR Write Error: "+t+" is not a "+this.structName);(0,hf.default)(this._fields,function(i){var a=Pt(i,2),o=a[0],f=a[1],s=t._attributes[o];f.write(s,n)})}},{key:"isValid",value:function(t){return t instanceof this}},{key:"create",value:function(t,n,i){var a=function(o){BT(f,o);function f(){return yf(this,f),MT(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(r);return a.structName=n,t.results[n]=a,a._fields=i.map(function(o){var f=Pt(o,2),s=f[0],l=f[1];return l instanceof PT.Reference&&(l=l.resolve(t)),[s,l]}),(0,hf.default)(a._fields,function(o){var f=Pt(o,1),s=f[0];a.prototype[s]=NT(s)}),a}}]),r}();(0,RT.default)(UT);function NT(r){return function(t){return(0,IT.default)(t)||(this._attributes[r]=t),this._attributes[r]}}var Ft={};Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.Union=void 0;var DT=function(){function r(e,t){var n=[],i=!0,a=!1,o=void 0;try{for(var f=e[Symbol.iterator](),s;!(i=(s=f.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(l){a=!0,o=l}finally{try{!i&&f.return&&f.return()}finally{if(a)throw o}}return n}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),CT=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),LT=Pe.exports,Rt=Bt(LT),jT=Er,df=Bt(jT),kT=Gu,vf=Bt(kT),Mt=Or,hi=Ar,VT=R,qT=Bt(VT);function Bt(r){return r&&r.__esModule?r:{default:r}}function GT(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function HT(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function gf(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var WT=Ft.Union=function(){function r(e,t){gf(this,r),this.set(e,t)}return CT(r,[{key:"set",value:function(t,n){(0,vf.default)(t)&&(t=this.constructor._switchOn.fromName(t)),this._switch=t,this._arm=this.constructor.armForSwitch(this._switch),this._armType=this.constructor.armTypeForArm(this._arm),this._value=n}},{key:"get",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._arm;if(this._arm!==Mt.Void&&this._arm!==t)throw new Error(t+" not set");return this._value}},{key:"switch",value:function(){return this._switch}},{key:"arm",value:function(){return this._arm}},{key:"armType",value:function(){return this._armType}},{key:"value",value:function(){return this._value}}],[{key:"armForSwitch",value:function(t){if(this._switches.has(t))return this._switches.get(t);if(this._defaultArm)return this._defaultArm;throw new Error("Bad union switch: "+t)}},{key:"armTypeForArm",value:function(t){return t===Mt.Void?Mt.Void:this._arms[t]}},{key:"read",value:function(t){var n=this._switchOn.read(t),i=this.armForSwitch(n),a=this.armTypeForArm(i),o=void 0;return(0,df.default)(a)?o=i.read(t):o=a.read(t),new this(n,o)}},{key:"write",value:function(t,n){if(!(t instanceof this))throw new Error("XDR Write Error: "+t+" is not a "+this.unionName);this._switchOn.write(t.switch(),n),t.armType().write(t.value(),n)}},{key:"isValid",value:function(t){return t instanceof this}},{key:"create",value:function(t,n,i){var a=function(f){HT(s,f);function s(){return gf(this,s),GT(this,(s.__proto__||Object.getPrototypeOf(s)).apply(this,arguments))}return s}(r);a.unionName=n,t.results[n]=a,i.switchOn instanceof hi.Reference?a._switchOn=i.switchOn.resolve(t):a._switchOn=i.switchOn,a._switches=new Map,a._arms={},(0,Rt.default)(i.arms,function(f,s){f instanceof hi.Reference&&(f=f.resolve(t)),a._arms[s]=f});var o=i.defaultArm;return o instanceof hi.Reference&&(o=o.resolve(t)),a._defaultArm=o,(0,Rt.default)(i.switches,function(f){var s=DT(f,2),l=s[0],c=s[1];(0,vf.default)(l)&&(l=a._switchOn.fromName(l)),a._switches.set(l,c)}),(0,df.default)(a._switchOn.values)||(0,Rt.default)(a._switchOn.values(),function(f){a[f.name]=function(s){return new a(f,s)},a.prototype[f.name]=function(l){return this.set(f,l)}}),(0,Rt.default)(a._arms,function(f,s){f!==Mt.Void&&(a.prototype[s]=function(){return this.get(s)})}),a}}]),r}();(0,qT.default)(WT),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=ue;Object.keys(e).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return e[h]}})});var t=gt;Object.keys(t).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return t[h]}})});var n=xe;Object.keys(n).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return n[h]}})});var i=_t;Object.keys(i).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return i[h]}})});var a=mt;Object.keys(a).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return a[h]}})});var o=bt;Object.keys(o).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return o[h]}})});var f=wt;Object.keys(f).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return f[h]}})});var s=br;Object.keys(s).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return s[h]}})});var l=$t;Object.keys(l).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return l[h]}})});var c=Et;Object.keys(c).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return c[h]}})});var u=Ot;Object.keys(u).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return u[h]}})});var p=At;Object.keys(p).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return p[h]}})});var d=St;Object.keys(d).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return d[h]}})});var _=It;Object.keys(_).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return _[h]}})});var E=Or;Object.keys(E).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return E[h]}})});var $=Tt;Object.keys($).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return $[h]}})});var b=xt;Object.keys(b).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return b[h]}})});var S=Ft;Object.keys(S).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return S[h]}})})}(ti);var _f={};(function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=function(){function m(v,g){for(var w=0;w<g.length;w++){var O=g[w];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(v,O.key,O)}}return function(v,g,w){return g&&m(v.prototype,g),w&&m(v,w),v}}(),t=Ar;Object.keys(t).forEach(function(m){m==="default"||m==="__esModule"||Object.defineProperty(r,m,{enumerable:!0,get:function(){return t[m]}})}),r.config=_;var n=Er,i=c(n),a=Pe.exports,o=c(a),f=ti,s=l(f);function l(m){if(m&&m.__esModule)return m;var v={};if(m!=null)for(var g in m)Object.prototype.hasOwnProperty.call(m,g)&&(v[g]=m[g]);return v.default=m,v}function c(m){return m&&m.__esModule?m:{default:m}}function u(m,v){if(!(m instanceof v))throw new TypeError("Cannot call a class as a function")}function p(m,v){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:m}function d(m,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);m.prototype=Object.create(v&&v.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(m,v):m.__proto__=v)}function _(m){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(m){var g=new F(v);m(g),g.resolve()}return v}var E=function(m){d(v,m);function v(g){u(this,v);var w=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return w.name=g,w}return e(v,[{key:"resolve",value:function(w){var O=w.definitions[this.name];return O.resolve(w)}}]),v}(t.Reference),$=function(m){d(v,m);function v(g,w){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;u(this,v);var C=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return C.childReference=g,C.length=w,C.variable=O,C}return e(v,[{key:"resolve",value:function(w){var O=this.childReference,C=this.length;return O instanceof t.Reference&&(O=O.resolve(w)),C instanceof t.Reference&&(C=C.resolve(w)),this.variable?new s.VarArray(O,C):new s.Array(O,C)}}]),v}(t.Reference),b=function(m){d(v,m);function v(g){u(this,v);var w=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return w.childReference=g,w.name=g.name,w}return e(v,[{key:"resolve",value:function(w){var O=this.childReference;return O instanceof t.Reference&&(O=O.resolve(w)),new s.Option(O)}}]),v}(t.Reference),S=function(m){d(v,m);function v(g,w){u(this,v);var O=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return O.sizedType=g,O.length=w,O}return e(v,[{key:"resolve",value:function(w){var O=this.length;return O instanceof t.Reference&&(O=O.resolve(w)),new this.sizedType(O)}}]),v}(t.Reference),h=function(){function m(v,g,w){u(this,m),this.constructor=v,this.name=g,this.config=w}return e(m,[{key:"resolve",value:function(g){return this.name in g.results?g.results[this.name]:this.constructor(g,this.name,this.config)}}]),m}();function A(m,v,g){return g instanceof t.Reference&&(g=g.resolve(m)),m.results[v]=g,g}function T(m,v,g){return m.results[v]=g,g}var F=function(){function m(v){u(this,m),this._destination=v,this._definitions={}}return e(m,[{key:"enum",value:function(g,w){var O=new h(s.Enum.create,g,w);this.define(g,O)}},{key:"struct",value:function(g,w){var O=new h(s.Struct.create,g,w);this.define(g,O)}},{key:"union",value:function(g,w){var O=new h(s.Union.create,g,w);this.define(g,O)}},{key:"typedef",value:function(g,w){var O=new h(A,g,w);this.define(g,O)}},{key:"const",value:function(g,w){var O=new h(T,g,w);this.define(g,O)}},{key:"void",value:function(){return s.Void}},{key:"bool",value:function(){return s.Bool}},{key:"int",value:function(){return s.Int}},{key:"hyper",value:function(){return s.Hyper}},{key:"uint",value:function(){return s.UnsignedInt}},{key:"uhyper",value:function(){return s.UnsignedHyper}},{key:"float",value:function(){return s.Float}},{key:"double",value:function(){return s.Double}},{key:"quadruple",value:function(){return s.Quadruple}},{key:"string",value:function(g){return new S(s.String,g)}},{key:"opaque",value:function(g){return new S(s.Opaque,g)}},{key:"varOpaque",value:function(g){return new S(s.VarOpaque,g)}},{key:"array",value:function(g,w){return new $(g,w)}},{key:"varArray",value:function(g,w){return new $(g,w,!0)}},{key:"option",value:function(g){return new b(g)}},{key:"define",value:function(g,w){if((0,i.default)(this._destination[g]))this._definitions[g]=w;else throw new Error("XDRTypes Error:"+g+" is already defined")}},{key:"lookup",value:function(g){return new E(g)}},{key:"resolve",value:function(){var g=this;(0,o.default)(this._definitions,function(w){w.resolve({definitions:g._definitions,results:g._destination})})}}]),m}()})(_f),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=ti;Object.keys(e).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[n]}})});var t=_f;Object.keys(t).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[n]}})})}(uu),Object.defineProperty(pt,"__esModule",{value:!0}),pt.xdr=void 0;const XT=(0,uu.config)(r=>{r.enum("EnvelopeType",{envelopeTypeBundle:0}),r.typedef("Uint32",r.uint()),r.typedef("Uint64",r.uhyper()),r.union("BundleItemExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("BundleItem",[["collectionId",r.lookup("Uint64")],["productId",r.lookup("Uint64")],["variantId",r.lookup("Uint64")],["sku",r.string()],["quantity",r.lookup("Uint32")],["ext",r.lookup("BundleItemExt")]]),r.union("BundleExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("Bundle",[["variantId",r.lookup("Uint64")],["items",r.varArray(r.lookup("BundleItem"),500)],["version",r.lookup("Uint32")],["ext",r.lookup("BundleExt")]]),r.union("BundleEnvelope",{switchOn:r.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeBundle","v1"]],arms:{v1:r.lookup("Bundle")}})});pt.xdr=XT,Object.defineProperty(oe,"__esModule",{value:!0}),oe.decodeToLegacyBoxOrder=oe.encodeLegacyBoxOrder=oe.toBundle=bf=oe.toLineItemProperty=void 0;const Q=pt;function mf(r){let e={variantId:Q.xdr.Uint64.fromString(r.variantId.toString()),version:r.version||Math.floor(Date.now()/1e3),items:r.items.map(n=>new Q.xdr.BundleItem({collectionId:Q.xdr.Uint64.fromString(n.collectionId.toString()),productId:Q.xdr.Uint64.fromString(n.productId.toString()),variantId:Q.xdr.Uint64.fromString(n.variantId.toString()),sku:n.sku||"",quantity:n.quantity,ext:new Q.xdr.BundleItemExt(0)})),ext:new Q.xdr.BundleExt(0)};const t=new Q.xdr.Bundle(e);return Q.xdr.BundleEnvelope.envelopeTypeBundle(t).toXDR("base64")}var bf=oe.toLineItemProperty=mf;function wf(r){const e=Q.xdr.BundleEnvelope.fromXDR(r,"base64").v1();return{variantId:e.variantId().toString(),version:e.version(),items:e.items().map(t=>({collectionId:t.collectionId().toString(),productId:t.productId().toString(),variantId:t.variantId().toString(),sku:t.sku().toString(),quantity:t.quantity()}))}}oe.toBundle=wf;function zT(r,e,t=1){const n={variantId:r.toString(),version:t,items:[]};for(const i in e)if(Object.hasOwnProperty.call(e,i)){const a=e[i];n.items.push({collectionId:a.dsId.toString(),productId:a.pId.toString(),variantId:a.vId.toString(),sku:a.sku||"",quantity:a.qty})}return mf(n)}oe.encodeLegacyBoxOrder=zT;function YT(r){let e={};try{wf(r).items.forEach(n=>{e[n.variantId]={dsId:n.collectionId,pId:Number.parseInt(n.productId),vId:Number.parseInt(n.variantId),sku:n.sku,qty:n.quantity}})}catch{e=JSON.parse(y.from(r,"base64").toString())}return e}oe.decodeToLegacyBoxOrder=YT;const $f="/bundling-storefront-manager";function KT(){return Math.ceil(Date.now()/1e3)}async function ZT(){try{const{timestamp:r}=await ei("get",`${$f}/t`,{headers:{"X-Recharge-App":"storefront-client"}});return r}catch(r){return console.error(`Fetch failed: ${r}. Using client-side date.`),KT()}}const JT=async r=>{const e=Jn();if(!await Ef(r))throw new Error("Bundle selection is invalid.");const t=await ZT(),n=bf({variantId:r.externalVariantId,version:t,items:r.selections.map(i=>({collectionId:i.collectionId,productId:i.externalProductId,variantId:i.externalVariantId,quantity:i.quantity,sku:""}))});try{const i=await ei("post",`${$f}/api/v1/bundles`,{data:{bundle:n},headers:{Origin:`https://${e.storeIdentifier}`}});if(!i.id||i.code!==200)throw new Error(`1: failed generating rb_id: ${JSON.stringify(i)}`);return i.id}catch(i){throw new Error(`2: failed generating rb_id ${i}`)}},Ef=async r=>{try{const e=await au(r.externalProductId);return!!r&&!!e}catch{return console.error("Error fetching bundle settings"),!1}};var QT=Object.freeze({__proto__:null,getBundleId:JT,validateBundle:Ef}),e2=Object.freeze({__proto__:null,login:async()=>{const r=await ei("get","/logged_in_customer_poc");if(r.api_token){const e=new Date;e.setHours(e.getHours()+1),kr.set("recharge-session",r.api_token,{expires:e})}else kr.remove("recharge-session");return!!r.api_token},logout:()=>{kr.remove("recharge-session")}}),r2=Object.freeze({__proto__:null,listSubscriptions:r=>Qn("get","/subscriptions",{query:r})});function t2(r){return Qn("get","/addresses",{query:r})}function n2(r){return Qn("get",`/addresses/${r}`)}var i2=Object.freeze({__proto__:null,listAddresses:t2,getAddress:n2});const a2={get(r,e){return Ie("get",r,e)},post(r,e){return Ie("post",r,e)},put(r,e){return Ie("put",r,e)},delete(r,e){return Ie("delete",r,e)}};function o2(r){var e,t;if(r)return r;if((e=window?.Shopify)!=null&&e.shop)return window.Shopify.shop;let n=window?.domain;if(!n){const i=(t=location?.href.match(/(?:http[s]*:\/\/)*(.*?)\.(?=admin\.rechargeapps\.com)/i))==null?void 0:t[1].replace(/-sp$/,"");i&&(n=`${i}.myshopify.com`)}if(n)return n;throw new Error("No storeIdentifier was passed into init.")}function u2(r={}){const e=r;R1({storeIdentifier:o2(r.storeIdentifier),environment:e.environment?e.environment:"prod",apiKey:e.apiKey?e.apiKey:""}),ou()}const Of={init:u2,api:a2,auth:e2,cdn:q1,bundle:QT,subscription:r2,address:i2};try{Of.init()}catch{}return Of});
23
+ */(function(e,t){typeof fO=="function"&&!0&&r&&r.exports?r.exports=t():(e.dcodeIO=e.dcodeIO||{}).Long=t()})(te,function(){function e(l,u,p){this.low=l|0,this.high=u|0,this.unsigned=!!p}e.__isLong__,Object.defineProperty(e.prototype,"__isLong__",{value:!0,enumerable:!1,configurable:!1}),e.isLong=function(u){return(u&&u.__isLong__)===!0};var t={},n={};e.fromInt=function(u,p){var d,_;return p?(u=u>>>0,0<=u&&u<256&&(_=n[u],_)?_:(d=new e(u,(u|0)<0?-1:0,!0),0<=u&&u<256&&(n[u]=d),d)):(u=u|0,-128<=u&&u<128&&(_=t[u],_)?_:(d=new e(u,u<0?-1:0,!1),-128<=u&&u<128&&(t[u]=d),d))},e.fromNumber=function(u,p){return p=!!p,isNaN(u)||!isFinite(u)?e.ZERO:!p&&u<=-s?e.MIN_VALUE:!p&&u+1>=s?e.MAX_VALUE:p&&u>=f?e.MAX_UNSIGNED_VALUE:u<0?e.fromNumber(-u,p).negate():new e(u%o|0,u/o|0,p)},e.fromBits=function(u,p,d){return new e(u,p,d)},e.fromString=function(u,p,d){if(u.length===0)throw Error("number format error: empty string");if(u==="NaN"||u==="Infinity"||u==="+Infinity"||u==="-Infinity")return e.ZERO;if(typeof p=="number"&&(d=p,p=!1),d=d||10,d<2||36<d)throw Error("radix out of range: "+d);var _;if((_=u.indexOf("-"))>0)throw Error('number format error: interior "-" character: '+u);if(_===0)return e.fromString(u.substring(1),p,d).negate();for(var E=e.fromNumber(Math.pow(d,8)),$=e.ZERO,b=0;b<u.length;b+=8){var S=Math.min(8,u.length-b),h=parseInt(u.substring(b,b+S),d);if(S<8){var A=e.fromNumber(Math.pow(d,S));$=$.multiply(A).add(e.fromNumber(h))}else $=$.multiply(E),$=$.add(e.fromNumber(h))}return $.unsigned=p,$},e.fromValue=function(u){return u instanceof e?u:typeof u=="number"?e.fromNumber(u):typeof u=="string"?e.fromString(u):new e(u.low,u.high,u.unsigned)};var i=1<<16,a=1<<24,o=i*i,f=o*o,s=f/2,c=e.fromInt(a);return e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*o+(this.low>>>0):this.high*o+(this.low>>>0)},e.prototype.toString=function(u){if(u=u||10,u<2||36<u)throw RangeError("radix out of range: "+u);if(this.isZero())return"0";var p;if(this.isNegative())if(this.equals(e.MIN_VALUE)){var d=e.fromNumber(u),_=this.divide(d);return p=_.multiply(d).subtract(this),_.toString(u)+p.toInt().toString(u)}else return"-"+this.negate().toString(u);var E=e.fromNumber(Math.pow(u,6),this.unsigned);p=this;for(var $="";;){var b=p.divide(E),S=p.subtract(b.multiply(E)).toInt()>>>0,h=S.toString(u);if(p=b,p.isZero())return h+$;for(;h.length<6;)h="0"+h;$=""+h+$}},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(e.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var u=this.high!=0?this.high:this.low,p=31;p>0&&(u&1<<p)==0;p--);return this.high!=0?p+33:p+1},e.prototype.isZero=function(){return this.high===0&&this.low===0},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isOdd=function(){return(this.low&1)===1},e.prototype.isEven=function(){return(this.low&1)===0},e.prototype.equals=function(u){return e.isLong(u)||(u=e.fromValue(u)),this.unsigned!==u.unsigned&&this.high>>>31===1&&u.high>>>31===1?!1:this.high===u.high&&this.low===u.low},e.eq=e.prototype.equals,e.prototype.notEquals=function(u){return!this.equals(u)},e.neq=e.prototype.notEquals,e.prototype.lessThan=function(u){return this.compare(u)<0},e.prototype.lt=e.prototype.lessThan,e.prototype.lessThanOrEqual=function(u){return this.compare(u)<=0},e.prototype.lte=e.prototype.lessThanOrEqual,e.prototype.greaterThan=function(u){return this.compare(u)>0},e.prototype.gt=e.prototype.greaterThan,e.prototype.greaterThanOrEqual=function(u){return this.compare(u)>=0},e.prototype.gte=e.prototype.greaterThanOrEqual,e.prototype.compare=function(u){if(e.isLong(u)||(u=e.fromValue(u)),this.equals(u))return 0;var p=this.isNegative(),d=u.isNegative();return p&&!d?-1:!p&&d?1:this.unsigned?u.high>>>0>this.high>>>0||u.high===this.high&&u.low>>>0>this.low>>>0?-1:1:this.subtract(u).isNegative()?-1:1},e.prototype.negate=function(){return!this.unsigned&&this.equals(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=e.prototype.negate,e.prototype.add=function(u){e.isLong(u)||(u=e.fromValue(u));var p=this.high>>>16,d=this.high&65535,_=this.low>>>16,E=this.low&65535,$=u.high>>>16,b=u.high&65535,S=u.low>>>16,h=u.low&65535,A=0,x=0,R=0,m=0;return m+=E+h,R+=m>>>16,m&=65535,R+=_+S,x+=R>>>16,R&=65535,x+=d+b,A+=x>>>16,x&=65535,A+=p+$,A&=65535,e.fromBits(R<<16|m,A<<16|x,this.unsigned)},e.prototype.subtract=function(u){return e.isLong(u)||(u=e.fromValue(u)),this.add(u.negate())},e.prototype.sub=e.prototype.subtract,e.prototype.multiply=function(u){if(this.isZero()||(e.isLong(u)||(u=e.fromValue(u)),u.isZero()))return e.ZERO;if(this.equals(e.MIN_VALUE))return u.isOdd()?e.MIN_VALUE:e.ZERO;if(u.equals(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return u.isNegative()?this.negate().multiply(u.negate()):this.negate().multiply(u).negate();if(u.isNegative())return this.multiply(u.negate()).negate();if(this.lessThan(c)&&u.lessThan(c))return e.fromNumber(this.toNumber()*u.toNumber(),this.unsigned);var p=this.high>>>16,d=this.high&65535,_=this.low>>>16,E=this.low&65535,$=u.high>>>16,b=u.high&65535,S=u.low>>>16,h=u.low&65535,A=0,x=0,R=0,m=0;return m+=E*h,R+=m>>>16,m&=65535,R+=_*h,x+=R>>>16,R&=65535,R+=E*S,x+=R>>>16,R&=65535,x+=d*h,A+=x>>>16,x&=65535,x+=_*S,A+=x>>>16,x&=65535,x+=E*b,A+=x>>>16,x&=65535,A+=p*h+d*S+_*b+E*$,A&=65535,e.fromBits(R<<16|m,A<<16|x,this.unsigned)},e.prototype.mul=e.prototype.multiply,e.prototype.divide=function(u){if(e.isLong(u)||(u=e.fromValue(u)),u.isZero())throw new Error("division by zero");if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var p,d,_;if(this.equals(e.MIN_VALUE)){if(u.equals(e.ONE)||u.equals(e.NEG_ONE))return e.MIN_VALUE;if(u.equals(e.MIN_VALUE))return e.ONE;var E=this.shiftRight(1);return p=E.divide(u).shiftLeft(1),p.equals(e.ZERO)?u.isNegative()?e.ONE:e.NEG_ONE:(d=this.subtract(u.multiply(p)),_=p.add(d.divide(u)),_)}else if(u.equals(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return u.isNegative()?this.negate().divide(u.negate()):this.negate().divide(u).negate();if(u.isNegative())return this.divide(u.negate()).negate();for(_=e.ZERO,d=this;d.greaterThanOrEqual(u);){p=Math.max(1,Math.floor(d.toNumber()/u.toNumber()));for(var $=Math.ceil(Math.log(p)/Math.LN2),b=$<=48?1:Math.pow(2,$-48),S=e.fromNumber(p),h=S.multiply(u);h.isNegative()||h.greaterThan(d);)p-=b,S=e.fromNumber(p,this.unsigned),h=S.multiply(u);S.isZero()&&(S=e.ONE),_=_.add(S),d=d.subtract(h)}return _},e.prototype.div=e.prototype.divide,e.prototype.modulo=function(u){return e.isLong(u)||(u=e.fromValue(u)),this.subtract(this.divide(u).multiply(u))},e.prototype.mod=e.prototype.modulo,e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.and=function(u){return e.isLong(u)||(u=e.fromValue(u)),e.fromBits(this.low&u.low,this.high&u.high,this.unsigned)},e.prototype.or=function(u){return e.isLong(u)||(u=e.fromValue(u)),e.fromBits(this.low|u.low,this.high|u.high,this.unsigned)},e.prototype.xor=function(u){return e.isLong(u)||(u=e.fromValue(u)),e.fromBits(this.low^u.low,this.high^u.high,this.unsigned)},e.prototype.shiftLeft=function(u){return e.isLong(u)&&(u=u.toInt()),(u&=63)===0?this:u<32?e.fromBits(this.low<<u,this.high<<u|this.low>>>32-u,this.unsigned):e.fromBits(0,this.low<<u-32,this.unsigned)},e.prototype.shl=e.prototype.shiftLeft,e.prototype.shiftRight=function(u){return e.isLong(u)&&(u=u.toInt()),(u&=63)===0?this:u<32?e.fromBits(this.low>>>u|this.high<<32-u,this.high>>u,this.unsigned):e.fromBits(this.high>>u-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=e.prototype.shiftRight,e.prototype.shiftRightUnsigned=function(u){if(e.isLong(u)&&(u=u.toInt()),u&=63,u===0)return this;var p=this.high;if(u<32){var d=this.low;return e.fromBits(d>>>u|p<<32-u,p>>>u,this.unsigned)}else return u===32?e.fromBits(p,0,this.unsigned):e.fromBits(p>>>u-32,0,this.unsigned)},e.prototype.shru=e.prototype.shiftRightUnsigned,e.prototype.toSigned=function(){return this.unsigned?new e(this.low,this.high,!1):this},e.prototype.toUnsigned=function(){return this.unsigned?this:new e(this.low,this.high,!0)},e})})(ii),Object.defineProperty(_t,"__esModule",{value:!0}),_t.Hyper=void 0;var sO=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),du=function r(e,t,n){e===null&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,t);if(i===void 0){var a=Object.getPrototypeOf(e);return a===null?void 0:r(a,t,n)}else{if("value"in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(n)}},cO=ii.exports,vr=vu(cO),lO=M,pO=vu(lO);function vu(r){return r&&r.__esModule?r:{default:r}}function hO(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function yO(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function dO(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}var gr=_t.Hyper=function(r){dO(e,r),sO(e,null,[{key:"read",value:function(n){var i=n.readInt32BE(),a=n.readInt32BE();return this.fromBits(a,i)}},{key:"write",value:function(n,i){if(!(n instanceof this))throw new Error("XDR Write Error: "+n+" is not a Hyper");i.writeInt32BE(n.high),i.writeInt32BE(n.low)}},{key:"fromString",value:function(n){if(!/^-?\d+$/.test(n))throw new Error("Invalid hyper string: "+n);var i=du(e.__proto__||Object.getPrototypeOf(e),"fromString",this).call(this,n,!1);return new this(i.low,i.high)}},{key:"fromBits",value:function(n,i){var a=du(e.__proto__||Object.getPrototypeOf(e),"fromBits",this).call(this,n,i,!1);return new this(a.low,a.high)}},{key:"isValid",value:function(n){return n instanceof this}}]);function e(t,n){return hO(this,e),yO(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!1))}return e}(vr.default);(0,pO.default)(gr),gr.MAX_VALUE=new gr(vr.default.MAX_VALUE.low,vr.default.MAX_VALUE.high),gr.MIN_VALUE=new gr(vr.default.MIN_VALUE.low,vr.default.MIN_VALUE.high);var Pe={};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.UnsignedInt=void 0;var vO=yt,gu=_u(vO),gO=M,_O=_u(gO);function _u(r){return r&&r.__esModule?r:{default:r}}var _r=Pe.UnsignedInt={read:function(e){return e.readUInt32BE()},write:function(e,t){if(!(0,gu.default)(e))throw new Error("XDR Write Error: not a number");if(Math.floor(e)!==e)throw new Error("XDR Write Error: not an integer");if(e<0)throw new Error("XDR Write Error: negative number "+e);t.writeUInt32BE(e)},isValid:function(e){return!(0,gu.default)(e)||Math.floor(e)!==e?!1:e>=_r.MIN_VALUE&&e<=_r.MAX_VALUE}};_r.MAX_VALUE=Math.pow(2,32)-1,_r.MIN_VALUE=0,(0,_O.default)(_r);var mt={};Object.defineProperty(mt,"__esModule",{value:!0}),mt.UnsignedHyper=void 0;var mO=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),mu=function r(e,t,n){e===null&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,t);if(i===void 0){var a=Object.getPrototypeOf(e);return a===null?void 0:r(a,t,n)}else{if("value"in i)return i.value;var o=i.get;return o===void 0?void 0:o.call(n)}},bO=ii.exports,mr=bu(bO),wO=M,$O=bu(wO);function bu(r){return r&&r.__esModule?r:{default:r}}function EO(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function OO(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function AO(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}var br=mt.UnsignedHyper=function(r){AO(e,r),mO(e,null,[{key:"read",value:function(n){var i=n.readInt32BE(),a=n.readInt32BE();return this.fromBits(a,i)}},{key:"write",value:function(n,i){if(!(n instanceof this))throw new Error("XDR Write Error: "+n+" is not an UnsignedHyper");i.writeInt32BE(n.high),i.writeInt32BE(n.low)}},{key:"fromString",value:function(n){if(!/^\d+$/.test(n))throw new Error("Invalid hyper string: "+n);var i=mu(e.__proto__||Object.getPrototypeOf(e),"fromString",this).call(this,n,!0);return new this(i.low,i.high)}},{key:"fromBits",value:function(n,i){var a=mu(e.__proto__||Object.getPrototypeOf(e),"fromBits",this).call(this,n,i,!0);return new this(a.low,a.high)}},{key:"isValid",value:function(n){return n instanceof this}}]);function e(t,n){return EO(this,e),OO(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t,n,!0))}return e}(mr.default);(0,$O.default)(br),br.MAX_VALUE=new br(mr.default.MAX_UNSIGNED_VALUE.low,mr.default.MAX_UNSIGNED_VALUE.high),br.MIN_VALUE=new br(mr.default.MIN_VALUE.low,mr.default.MIN_VALUE.high);var bt={};Object.defineProperty(bt,"__esModule",{value:!0}),bt.Float=void 0;var SO=yt,wu=$u(SO),TO=M,IO=$u(TO);function $u(r){return r&&r.__esModule?r:{default:r}}var xO=bt.Float={read:function(e){return e.readFloatBE()},write:function(e,t){if(!(0,wu.default)(e))throw new Error("XDR Write Error: not a number");t.writeFloatBE(e)},isValid:function(e){return(0,wu.default)(e)}};(0,IO.default)(xO);var wt={};Object.defineProperty(wt,"__esModule",{value:!0}),wt.Double=void 0;var PO=yt,Eu=Ou(PO),FO=M,RO=Ou(FO);function Ou(r){return r&&r.__esModule?r:{default:r}}var MO=wt.Double={read:function(e){return e.readDoubleBE()},write:function(e,t){if(!(0,Eu.default)(e))throw new Error("XDR Write Error: not a number");t.writeDoubleBE(e)},isValid:function(e){return(0,Eu.default)(e)}};(0,RO.default)(MO);var $t={};Object.defineProperty($t,"__esModule",{value:!0}),$t.Quadruple=void 0;var BO=M,UO=DO(BO);function DO(r){return r&&r.__esModule?r:{default:r}}var NO=$t.Quadruple={read:function(){throw new Error("XDR Read Error: quadruple not supported")},write:function(){throw new Error("XDR Write Error: quadruple not supported")},isValid:function(){return!1}};(0,UO.default)(NO);var wr={},CO=oe,LO=H,jO="[object Boolean]";function kO(r){return r===!0||r===!1||LO(r)&&CO(r)==jO}var VO=kO;Object.defineProperty(wr,"__esModule",{value:!0}),wr.Bool=void 0;var qO=VO,GO=Su(qO),Au=fe,HO=M,WO=Su(HO);function Su(r){return r&&r.__esModule?r:{default:r}}var zO=wr.Bool={read:function(e){var t=Au.Int.read(e);switch(t){case 0:return!1;case 1:return!0;default:throw new Error("XDR Read Error: Got "+t+" when trying to read a bool")}},write:function(e,t){var n=e?1:0;return Au.Int.write(n,t)},isValid:function(e){return(0,GO.default)(e)}};(0,WO.default)(zO);var Et={},XO=oe,YO=C,KO=H,ZO="[object String]";function JO(r){return typeof r=="string"||!YO(r)&&KO(r)&&XO(r)==ZO}var Tu=JO;Object.defineProperty(Et,"__esModule",{value:!0}),Et.String=void 0;var QO=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),eA=Tu,Iu=ai(eA),rA=C,tA=ai(rA),xu=fe,nA=Pe,Pu=xe,iA=M,aA=ai(iA);function ai(r){return r&&r.__esModule?r:{default:r}}function oA(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var uA=Et.String=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:nA.UnsignedInt.MAX_VALUE;oA(this,r),this._maxLength=e}return QO(r,[{key:"read",value:function(t){var n=xu.Int.read(t);if(n>this._maxLength)throw new Error("XDR Read Error: Saw "+n+" length String,"+("max allowed is "+this._maxLength));var i=(0,Pu.calculatePadding)(n),a=t.slice(n);return(0,Pu.slicePadding)(t,i),a.buffer()}},{key:"readString",value:function(t){return this.read(t).toString("utf8")}},{key:"write",value:function(t,n){if(t.length>this._maxLength)throw new Error("XDR Write Error: Got "+t.length+" bytes,"+("max allows is "+this._maxLength));var i=void 0;(0,Iu.default)(t)?i=y.from(t,"utf8"):i=y.from(t),xu.Int.write(i.length,n),n.writeBufferPadded(i)}},{key:"isValid",value:function(t){var n=void 0;if((0,Iu.default)(t))n=y.from(t,"utf8");else if((0,tA.default)(t)||y.isBuffer(t))n=y.from(t);else return!1;return n.length<=this._maxLength}}]),r}();(0,aA.default)(uA.prototype);var Ot={};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.Opaque=void 0;var fA=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),Fu=xe,sA=M,cA=lA(sA);function lA(r){return r&&r.__esModule?r:{default:r}}function pA(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var hA=Ot.Opaque=function(){function r(e){pA(this,r),this._length=e,this._padding=(0,Fu.calculatePadding)(e)}return fA(r,[{key:"read",value:function(t){var n=t.slice(this._length);return(0,Fu.slicePadding)(t,this._padding),n.buffer()}},{key:"write",value:function(t,n){if(t.length!==this._length)throw new Error("XDR Write Error: Got "+t.length+" bytes, expected "+this._length);n.writeBufferPadded(t)}},{key:"isValid",value:function(t){return y.isBuffer(t)&&t.length===this._length}}]),r}();(0,cA.default)(hA.prototype);var At={};Object.defineProperty(At,"__esModule",{value:!0}),At.VarOpaque=void 0;var yA=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),Ru=fe,dA=Pe,Mu=xe,vA=M,gA=_A(vA);function _A(r){return r&&r.__esModule?r:{default:r}}function mA(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var bA=At.VarOpaque=function(){function r(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:dA.UnsignedInt.MAX_VALUE;mA(this,r),this._maxLength=e}return yA(r,[{key:"read",value:function(t){var n=Ru.Int.read(t);if(n>this._maxLength)throw new Error("XDR Read Error: Saw "+n+" length VarOpaque,"+("max allowed is "+this._maxLength));var i=(0,Mu.calculatePadding)(n),a=t.slice(n);return(0,Mu.slicePadding)(t,i),a.buffer()}},{key:"write",value:function(t,n){if(t.length>this._maxLength)throw new Error("XDR Write Error: Got "+t.length+" bytes,"+("max allows is "+this._maxLength));Ru.Int.write(t.length,n),n.writeBufferPadded(t)}},{key:"isValid",value:function(t){return y.isBuffer(t)&&t.length<=this._maxLength}}]),r}();(0,gA.default)(bA.prototype);var St={},Fe={exports:{}},wA=ct;function $A(r){return typeof r=="function"?r:wA}var Bu=$A,EA=Ma,OA=Qn,AA=Bu,SA=C;function TA(r,e){var t=SA(r)?EA:OA;return t(r,AA(e))}var IA=TA;(function(r){r.exports=IA})(Fe);var xA=/\s/;function PA(r){for(var e=r.length;e--&&xA.test(r.charAt(e)););return e}var FA=PA,RA=FA,MA=/^\s+/;function BA(r){return r&&r.slice(0,RA(r)+1).replace(MA,"")}var UA=BA,DA=UA,Uu=ve,NA=ft,Du=0/0,CA=/^[-+]0x[0-9a-f]+$/i,LA=/^0b[01]+$/i,jA=/^0o[0-7]+$/i,kA=parseInt;function VA(r){if(typeof r=="number")return r;if(NA(r))return Du;if(Uu(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=Uu(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=DA(r);var t=LA.test(r);return t||jA.test(r)?kA(r.slice(2),t?2:8):CA.test(r)?Du:+r}var qA=VA,GA=qA,Nu=1/0,HA=17976931348623157e292;function WA(r){if(!r)return r===0?r:0;if(r=GA(r),r===Nu||r===-Nu){var e=r<0?-1:1;return e*HA}return r===r?r:0}var zA=WA,XA=zA;function YA(r){var e=XA(r),t=e%1;return e===e?t?e-t:e:0}var KA=YA,ZA=Ca,JA=Bu,QA=KA,eS=9007199254740991,oi=4294967295,rS=Math.min;function tS(r,e){if(r=QA(r),r<1||r>eS)return[];var t=oi,n=rS(r,oi);e=JA(e),r-=oi;for(var i=ZA(n,e);++t<r;)e(t);return i}var Cu=tS;Object.defineProperty(St,"__esModule",{value:!0}),St.Array=void 0;var nS=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),iS=ti,aS=$r(iS),oS=Fe.exports,uS=$r(oS),fS=Cu,sS=$r(fS),cS=C,Lu=$r(cS),lS=M,pS=$r(lS);function $r(r){return r&&r.__esModule?r:{default:r}}function hS(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var yS=St.Array=function(){function r(e,t){hS(this,r),this._childType=e,this._length=t}return nS(r,[{key:"read",value:function(t){var n=this;return(0,sS.default)(this._length,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,Lu.default)(t))throw new Error("XDR Write Error: value is not array");if(t.length!==this._length)throw new Error("XDR Write Error: Got array of size "+t.length+","+("expected "+this._length));(0,uS.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,Lu.default)(t)||t.length!==this._length?!1:(0,aS.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,pS.default)(yS.prototype);var Tt={};Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.VarArray=void 0;var dS=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),vS=ti,gS=Er(vS),_S=Fe.exports,mS=Er(_S),bS=Cu,wS=Er(bS),$S=C,ju=Er($S),ES=Pe,ku=fe,OS=M,AS=Er(OS);function Er(r){return r&&r.__esModule?r:{default:r}}function SS(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var TS=Tt.VarArray=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ES.UnsignedInt.MAX_VALUE;SS(this,r),this._childType=e,this._maxLength=t}return dS(r,[{key:"read",value:function(t){var n=this,i=ku.Int.read(t);if(i>this._maxLength)throw new Error("XDR Read Error: Saw "+i+" length VarArray,"+("max allowed is "+this._maxLength));return(0,wS.default)(i,function(){return n._childType.read(t)})}},{key:"write",value:function(t,n){var i=this;if(!(0,ju.default)(t))throw new Error("XDR Write Error: value is not array");if(t.length>this._maxLength)throw new Error("XDR Write Error: Got array of size "+t.length+","+("max allowed is "+this._maxLength));ku.Int.write(t.length,n),(0,mS.default)(t,function(a){return i._childType.write(a,n)})}},{key:"isValid",value:function(t){var n=this;return!(0,ju.default)(t)||t.length>this._maxLength?!1:(0,gS.default)(t,function(i){return n._childType.isValid(i)})}}]),r}();(0,AS.default)(TS.prototype);var It={};function IS(r){return r===null}var xS=IS;function PS(r){return r===void 0}var Or=PS;Object.defineProperty(It,"__esModule",{value:!0}),It.Option=void 0;var FS=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),RS=xS,Vu=ui(RS),MS=Or,qu=ui(MS),Gu=wr,BS=M,US=ui(BS);function ui(r){return r&&r.__esModule?r:{default:r}}function DS(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var NS=It.Option=function(){function r(e){DS(this,r),this._childType=e}return FS(r,[{key:"read",value:function(t){if(Gu.Bool.read(t))return this._childType.read(t)}},{key:"write",value:function(t,n){var i=!((0,Vu.default)(t)||(0,qu.default)(t));Gu.Bool.write(i,n),i&&this._childType.write(t,n)}},{key:"isValid",value:function(t){return(0,Vu.default)(t)||(0,qu.default)(t)?!0:this._childType.isValid(t)}}]),r}();(0,US.default)(NS.prototype);var Ar={};Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.Void=void 0;var CS=Or,Hu=Wu(CS),LS=M,jS=Wu(LS);function Wu(r){return r&&r.__esModule?r:{default:r}}var kS=Ar.Void={read:function(){},write:function(e){if(!(0,Hu.default)(e))throw new Error("XDR Write Error: trying to write value to a void slot")},isValid:function(e){return(0,Hu.default)(e)}};(0,jS.default)(kS);var xt={},VS=Qr;function qS(r,e){return VS(e,function(t){return r[t]})}var GS=qS,HS=GS,WS=Ye;function zS(r){return r==null?[]:HS(r,WS(r))}var XS=zS;Object.defineProperty(xt,"__esModule",{value:!0}),xt.Enum=void 0;var YS=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),KS=Fe.exports,ZS=fi(KS),JS=XS,QS=fi(JS),zu=fe,eT=M,rT=fi(eT);function fi(r){return r&&r.__esModule?r:{default:r}}function tT(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function nT(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function Xu(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var iT=xt.Enum=function(){function r(e,t){Xu(this,r),this.name=e,this.value=t}return YS(r,null,[{key:"read",value:function(t){var n=zu.Int.read(t);if(!this._byValue.has(n))throw new Error("XDR Read Error: Unknown "+this.enumName+" member for value "+n);return this._byValue.get(n)}},{key:"write",value:function(t,n){if(!(t instanceof this))throw new Error("XDR Write Error: Unknown "+t+" is not a "+this.enumName);zu.Int.write(t.value,n)}},{key:"isValid",value:function(t){return t instanceof this}},{key:"members",value:function(){return this._members}},{key:"values",value:function(){return(0,QS.default)(this._members)}},{key:"fromName",value:function(t){var n=this._members[t];if(!n)throw new Error(t+" is not a member of "+this.enumName);return n}},{key:"fromValue",value:function(t){var n=this._byValue.get(t);if(!n)throw new Error(t+" is not a value of any member of "+this.enumName);return n}},{key:"create",value:function(t,n,i){var a=function(o){nT(f,o);function f(){return Xu(this,f),tT(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(r);return a.enumName=n,t.results[n]=a,a._members={},a._byValue=new Map,(0,ZS.default)(i,function(o,f){var s=new a(f,o);a._members[f]=s,a._byValue.set(o,s),a[f]=function(){return s}}),a}}]),r}();(0,rT.default)(iT);var Pt={},aT=Qn,oT=pr;function uT(r,e){var t=-1,n=oT(r)?Array(r.length):[];return aT(r,function(i,a,o){n[++t]=e(i,a,o)}),n}var fT=uT,sT=Qr,cT=su,lT=fT,pT=C;function hT(r,e){var t=pT(r)?sT:lT;return t(r,cT(e))}var yT=hT;function dT(r){for(var e=-1,t=r==null?0:r.length,n={};++e<t;){var i=r[e];n[i[0]]=i[1]}return n}var vT=dT,Sr={};Object.defineProperty(Sr,"__esModule",{value:!0});var gT=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();function _T(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}Sr.Reference=function(){function r(){_T(this,r)}return gT(r,[{key:"resolve",value:function(){throw new Error("implement resolve in child class")}}]),r}(),Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.Struct=void 0;var Ft=function(){function r(e,t){var n=[],i=!0,a=!1,o=void 0;try{for(var f=e[Symbol.iterator](),s;!(i=(s=f.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(c){a=!0,o=c}finally{try{!i&&f.return&&f.return()}finally{if(a)throw o}}return n}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),mT=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),bT=Fe.exports,Yu=Tr(bT),wT=yT,$T=Tr(wT),ET=Or,OT=Tr(ET),AT=vT,ST=Tr(AT),TT=Sr,IT=M,xT=Tr(IT);function Tr(r){return r&&r.__esModule?r:{default:r}}function PT(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function FT(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function Ku(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var RT=Pt.Struct=function(){function r(e){Ku(this,r),this._attributes=e||{}}return mT(r,null,[{key:"read",value:function(t){var n=(0,$T.default)(this._fields,function(i){var a=Ft(i,2),o=a[0],f=a[1],s=f.read(t);return[o,s]});return new this((0,ST.default)(n))}},{key:"write",value:function(t,n){if(!(t instanceof this))throw new Error("XDR Write Error: "+t+" is not a "+this.structName);(0,Yu.default)(this._fields,function(i){var a=Ft(i,2),o=a[0],f=a[1],s=t._attributes[o];f.write(s,n)})}},{key:"isValid",value:function(t){return t instanceof this}},{key:"create",value:function(t,n,i){var a=function(o){FT(f,o);function f(){return Ku(this,f),PT(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}return f}(r);return a.structName=n,t.results[n]=a,a._fields=i.map(function(o){var f=Ft(o,2),s=f[0],c=f[1];return c instanceof TT.Reference&&(c=c.resolve(t)),[s,c]}),(0,Yu.default)(a._fields,function(o){var f=Ft(o,1),s=f[0];a.prototype[s]=MT(s)}),a}}]),r}();(0,xT.default)(RT);function MT(r){return function(t){return(0,OT.default)(t)||(this._attributes[r]=t),this._attributes[r]}}var Rt={};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.Union=void 0;var BT=function(){function r(e,t){var n=[],i=!0,a=!1,o=void 0;try{for(var f=e[Symbol.iterator](),s;!(i=(s=f.next()).done)&&(n.push(s.value),!(t&&n.length===t));i=!0);}catch(c){a=!0,o=c}finally{try{!i&&f.return&&f.return()}finally{if(a)throw o}}return n}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),UT=function(){function r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),DT=Fe.exports,Mt=Ut(DT),NT=Or,Zu=Ut(NT),CT=Tu,Ju=Ut(CT),Bt=Ar,si=Sr,LT=M,jT=Ut(LT);function Ut(r){return r&&r.__esModule?r:{default:r}}function kT(r,e){if(!r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:r}function VT(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(r,e):r.__proto__=e)}function Qu(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var qT=Rt.Union=function(){function r(e,t){Qu(this,r),this.set(e,t)}return UT(r,[{key:"set",value:function(t,n){(0,Ju.default)(t)&&(t=this.constructor._switchOn.fromName(t)),this._switch=t,this._arm=this.constructor.armForSwitch(this._switch),this._armType=this.constructor.armTypeForArm(this._arm),this._value=n}},{key:"get",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this._arm;if(this._arm!==Bt.Void&&this._arm!==t)throw new Error(t+" not set");return this._value}},{key:"switch",value:function(){return this._switch}},{key:"arm",value:function(){return this._arm}},{key:"armType",value:function(){return this._armType}},{key:"value",value:function(){return this._value}}],[{key:"armForSwitch",value:function(t){if(this._switches.has(t))return this._switches.get(t);if(this._defaultArm)return this._defaultArm;throw new Error("Bad union switch: "+t)}},{key:"armTypeForArm",value:function(t){return t===Bt.Void?Bt.Void:this._arms[t]}},{key:"read",value:function(t){var n=this._switchOn.read(t),i=this.armForSwitch(n),a=this.armTypeForArm(i),o=void 0;return(0,Zu.default)(a)?o=i.read(t):o=a.read(t),new this(n,o)}},{key:"write",value:function(t,n){if(!(t instanceof this))throw new Error("XDR Write Error: "+t+" is not a "+this.unionName);this._switchOn.write(t.switch(),n),t.armType().write(t.value(),n)}},{key:"isValid",value:function(t){return t instanceof this}},{key:"create",value:function(t,n,i){var a=function(f){VT(s,f);function s(){return Qu(this,s),kT(this,(s.__proto__||Object.getPrototypeOf(s)).apply(this,arguments))}return s}(r);a.unionName=n,t.results[n]=a,i.switchOn instanceof si.Reference?a._switchOn=i.switchOn.resolve(t):a._switchOn=i.switchOn,a._switches=new Map,a._arms={},(0,Mt.default)(i.arms,function(f,s){f instanceof si.Reference&&(f=f.resolve(t)),a._arms[s]=f});var o=i.defaultArm;return o instanceof si.Reference&&(o=o.resolve(t)),a._defaultArm=o,(0,Mt.default)(i.switches,function(f){var s=BT(f,2),c=s[0],l=s[1];(0,Ju.default)(c)&&(c=a._switchOn.fromName(c)),a._switches.set(c,l)}),(0,Zu.default)(a._switchOn.values)||(0,Mt.default)(a._switchOn.values(),function(f){a[f.name]=function(s){return new a(f,s)},a.prototype[f.name]=function(c){return this.set(f,c)}}),(0,Mt.default)(a._arms,function(f,s){f!==Bt.Void&&(a.prototype[s]=function(){return this.get(s)})}),a}}]),r}();(0,jT.default)(qT),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=fe;Object.keys(e).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return e[h]}})});var t=_t;Object.keys(t).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return t[h]}})});var n=Pe;Object.keys(n).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return n[h]}})});var i=mt;Object.keys(i).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return i[h]}})});var a=bt;Object.keys(a).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return a[h]}})});var o=wt;Object.keys(o).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return o[h]}})});var f=$t;Object.keys(f).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return f[h]}})});var s=wr;Object.keys(s).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return s[h]}})});var c=Et;Object.keys(c).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return c[h]}})});var l=Ot;Object.keys(l).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return l[h]}})});var u=At;Object.keys(u).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return u[h]}})});var p=St;Object.keys(p).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return p[h]}})});var d=Tt;Object.keys(d).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return d[h]}})});var _=It;Object.keys(_).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return _[h]}})});var E=Ar;Object.keys(E).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return E[h]}})});var $=xt;Object.keys($).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return $[h]}})});var b=Pt;Object.keys(b).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return b[h]}})});var S=Rt;Object.keys(S).forEach(function(h){h==="default"||h==="__esModule"||Object.defineProperty(r,h,{enumerable:!0,get:function(){return S[h]}})})}(Jn);var ef={};(function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=function(){function m(v,g){for(var w=0;w<g.length;w++){var O=g[w];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(v,O.key,O)}}return function(v,g,w){return g&&m(v.prototype,g),w&&m(v,w),v}}(),t=Sr;Object.keys(t).forEach(function(m){m==="default"||m==="__esModule"||Object.defineProperty(r,m,{enumerable:!0,get:function(){return t[m]}})}),r.config=_;var n=Or,i=l(n),a=Fe.exports,o=l(a),f=Jn,s=c(f);function c(m){if(m&&m.__esModule)return m;var v={};if(m!=null)for(var g in m)Object.prototype.hasOwnProperty.call(m,g)&&(v[g]=m[g]);return v.default=m,v}function l(m){return m&&m.__esModule?m:{default:m}}function u(m,v){if(!(m instanceof v))throw new TypeError("Cannot call a class as a function")}function p(m,v){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v&&(typeof v=="object"||typeof v=="function")?v:m}function d(m,v){if(typeof v!="function"&&v!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof v);m.prototype=Object.create(v&&v.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),v&&(Object.setPrototypeOf?Object.setPrototypeOf(m,v):m.__proto__=v)}function _(m){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(m){var g=new R(v);m(g),g.resolve()}return v}var E=function(m){d(v,m);function v(g){u(this,v);var w=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return w.name=g,w}return e(v,[{key:"resolve",value:function(w){var O=w.definitions[this.name];return O.resolve(w)}}]),v}(t.Reference),$=function(m){d(v,m);function v(g,w){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;u(this,v);var L=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return L.childReference=g,L.length=w,L.variable=O,L}return e(v,[{key:"resolve",value:function(w){var O=this.childReference,L=this.length;return O instanceof t.Reference&&(O=O.resolve(w)),L instanceof t.Reference&&(L=L.resolve(w)),this.variable?new s.VarArray(O,L):new s.Array(O,L)}}]),v}(t.Reference),b=function(m){d(v,m);function v(g){u(this,v);var w=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return w.childReference=g,w.name=g.name,w}return e(v,[{key:"resolve",value:function(w){var O=this.childReference;return O instanceof t.Reference&&(O=O.resolve(w)),new s.Option(O)}}]),v}(t.Reference),S=function(m){d(v,m);function v(g,w){u(this,v);var O=p(this,(v.__proto__||Object.getPrototypeOf(v)).call(this));return O.sizedType=g,O.length=w,O}return e(v,[{key:"resolve",value:function(w){var O=this.length;return O instanceof t.Reference&&(O=O.resolve(w)),new this.sizedType(O)}}]),v}(t.Reference),h=function(){function m(v,g,w){u(this,m),this.constructor=v,this.name=g,this.config=w}return e(m,[{key:"resolve",value:function(g){return this.name in g.results?g.results[this.name]:this.constructor(g,this.name,this.config)}}]),m}();function A(m,v,g){return g instanceof t.Reference&&(g=g.resolve(m)),m.results[v]=g,g}function x(m,v,g){return m.results[v]=g,g}var R=function(){function m(v){u(this,m),this._destination=v,this._definitions={}}return e(m,[{key:"enum",value:function(g,w){var O=new h(s.Enum.create,g,w);this.define(g,O)}},{key:"struct",value:function(g,w){var O=new h(s.Struct.create,g,w);this.define(g,O)}},{key:"union",value:function(g,w){var O=new h(s.Union.create,g,w);this.define(g,O)}},{key:"typedef",value:function(g,w){var O=new h(A,g,w);this.define(g,O)}},{key:"const",value:function(g,w){var O=new h(x,g,w);this.define(g,O)}},{key:"void",value:function(){return s.Void}},{key:"bool",value:function(){return s.Bool}},{key:"int",value:function(){return s.Int}},{key:"hyper",value:function(){return s.Hyper}},{key:"uint",value:function(){return s.UnsignedInt}},{key:"uhyper",value:function(){return s.UnsignedHyper}},{key:"float",value:function(){return s.Float}},{key:"double",value:function(){return s.Double}},{key:"quadruple",value:function(){return s.Quadruple}},{key:"string",value:function(g){return new S(s.String,g)}},{key:"opaque",value:function(g){return new S(s.Opaque,g)}},{key:"varOpaque",value:function(g){return new S(s.VarOpaque,g)}},{key:"array",value:function(g,w){return new $(g,w)}},{key:"varArray",value:function(g,w){return new $(g,w,!0)}},{key:"option",value:function(g){return new b(g)}},{key:"define",value:function(g,w){if((0,i.default)(this._destination[g]))this._definitions[g]=w;else throw new Error("XDRTypes Error:"+g+" is already defined")}},{key:"lookup",value:function(g){return new E(g)}},{key:"resolve",value:function(){var g=this;(0,o.default)(this._definitions,function(w){w.resolve({definitions:g._definitions,results:g._destination})})}}]),m}()})(ef),function(r){Object.defineProperty(r,"__esModule",{value:!0});var e=Jn;Object.keys(e).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[n]}})});var t=ef;Object.keys(t).forEach(function(n){n==="default"||n==="__esModule"||Object.defineProperty(r,n,{enumerable:!0,get:function(){return t[n]}})})}(Go),Object.defineProperty(ht,"__esModule",{value:!0}),ht.xdr=void 0;const GT=(0,Go.config)(r=>{r.enum("EnvelopeType",{envelopeTypeBundle:0}),r.typedef("Uint32",r.uint()),r.typedef("Uint64",r.uhyper()),r.union("BundleItemExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("BundleItem",[["collectionId",r.lookup("Uint64")],["productId",r.lookup("Uint64")],["variantId",r.lookup("Uint64")],["sku",r.string()],["quantity",r.lookup("Uint32")],["ext",r.lookup("BundleItemExt")]]),r.union("BundleExt",{switchOn:r.int(),switchName:"v",switches:[[0,r.void()]],arms:{}}),r.struct("Bundle",[["variantId",r.lookup("Uint64")],["items",r.varArray(r.lookup("BundleItem"),500)],["version",r.lookup("Uint32")],["ext",r.lookup("BundleExt")]]),r.union("BundleEnvelope",{switchOn:r.lookup("EnvelopeType"),switchName:"type",switches:[["envelopeTypeBundle","v1"]],arms:{v1:r.lookup("Bundle")}})});ht.xdr=GT,Object.defineProperty(ue,"__esModule",{value:!0}),ue.decodeToLegacyBoxOrder=ue.encodeLegacyBoxOrder=ue.toBundle=tf=ue.toLineItemProperty=void 0;const ee=ht;function rf(r){let e={variantId:ee.xdr.Uint64.fromString(r.variantId.toString()),version:r.version||Math.floor(Date.now()/1e3),items:r.items.map(n=>new ee.xdr.BundleItem({collectionId:ee.xdr.Uint64.fromString(n.collectionId.toString()),productId:ee.xdr.Uint64.fromString(n.productId.toString()),variantId:ee.xdr.Uint64.fromString(n.variantId.toString()),sku:n.sku||"",quantity:n.quantity,ext:new ee.xdr.BundleItemExt(0)})),ext:new ee.xdr.BundleExt(0)};const t=new ee.xdr.Bundle(e);return ee.xdr.BundleEnvelope.envelopeTypeBundle(t).toXDR("base64")}var tf=ue.toLineItemProperty=rf;function nf(r){const e=ee.xdr.BundleEnvelope.fromXDR(r,"base64").v1();return{variantId:e.variantId().toString(),version:e.version(),items:e.items().map(t=>({collectionId:t.collectionId().toString(),productId:t.productId().toString(),variantId:t.variantId().toString(),sku:t.sku().toString(),quantity:t.quantity()}))}}ue.toBundle=nf;function HT(r,e,t=1){const n={variantId:r.toString(),version:t,items:[]};for(const i in e)if(Object.hasOwnProperty.call(e,i)){const a=e[i];n.items.push({collectionId:a.dsId.toString(),productId:a.pId.toString(),variantId:a.vId.toString(),sku:a.sku||"",quantity:a.qty})}return rf(n)}ue.encodeLegacyBoxOrder=HT;function WT(r){let e={};try{nf(r).items.forEach(n=>{e[n.variantId]={dsId:n.collectionId,pId:Number.parseInt(n.productId),vId:Number.parseInt(n.variantId),sku:n.sku,qty:n.quantity}})}catch{e=JSON.parse(y.from(r,"base64").toString())}return e}ue.decodeToLegacyBoxOrder=WT;const af="/bundling-storefront-manager";function zT(){return Math.ceil(Date.now()/1e3)}async function XT(){try{const{timestamp:r}=await Tn("get",`${af}/t`,{headers:{"X-Recharge-App":"storefront-client"}});return r}catch(r){return console.error(`Fetch failed: ${r}. Using client-side date.`),zT()}}const YT=async r=>{const e=Sn();if(!await of(r))throw new Error("Bundle selection is invalid.");const t=await XT(),n=tf({variantId:r.externalVariantId,version:t,items:r.selections.map(i=>({collectionId:i.collectionId,productId:i.externalProductId,variantId:i.externalVariantId,quantity:i.quantity,sku:""}))});try{const i=await Tn("post",`${af}/api/v1/bundles`,{data:{bundle:n},headers:{Origin:`https://${e.storeIdentifier}`}});if(!i.id||i.code!==200)throw new Error(`1: failed generating rb_id: ${JSON.stringify(i)}`);return i.id}catch(i){throw new Error(`2: failed generating rb_id ${i}`)}},of=async r=>{try{const e=await Vo(r.externalProductId);return!!r&&!!e}catch{return console.error("Error fetching bundle settings"),!1}};var KT=Object.freeze({__proto__:null,getBundleId:YT,validateBundle:of}),ZT=Object.freeze({__proto__:null,login:async()=>{const r=await Tn("get","/logged_in_customer_poc");if(r.api_token){const e=new Date;e.setHours(e.getHours()+1),Pr.set("recharge-session",r.api_token,{expires:e})}else Pr.remove("recharge-session");return!!r.api_token},logout:()=>{Pr.remove("recharge-session")}}),JT=Object.freeze({__proto__:null,getOnetime:async r=>{const{onetime:e}=await I("get","/onetimes",{id:r});return e},listOnetimes:r=>I("get","/onetimes",{query:r}),createOnetime:async r=>{const{onetime:e}=await I("post","/onetimes",{data:r});return e},updateOnetime:async(r,e)=>{const{onetime:t}=await I("put","/onetimes",{id:r,data:e});return t},deleteOnetime:r=>I("delete","/onetime",{id:r})}),QT=Object.freeze({__proto__:null,getOrder:async r=>{const{order:e}=await I("get","/orders",{id:r});return e},listOrders:r=>I("get","/orders",{query:r})}),e2=Object.freeze({__proto__:null,getSubscription:async r=>{const{subscription:e}=await I("get","/subscriptions",{id:r});return e},listSubscriptions:r=>I("get","/subscriptions",{query:r}),createSubscription:async r=>{const{subscription:e}=await I("post","/subscriptions",{data:r});return e},updateSubscription:async(r,e,t)=>{const{subscription:n}=await I("put","/subscriptions",{id:r,data:e,query:t});return n},updateSubscriptionChargeDate:async(r,e)=>{const{subscription:t}=await I("post",`/subscriptions/${r}/set_next_charge_date`,{data:{date:e}});return t},updateSubscriptionAddress:async(r,e)=>{const{subscription:t}=await I("post",`/subscriptions/${r}/change_address`,{data:{address_id:e}});return t},cancelSubscription:async(r,e)=>{const{subscription:t}=await I("post",`/subscriptions/${r}/cancel`,{data:e});return t},activateSubscription:async r=>{const{subscription:e}=await I("post",`/subscriptions/${r}/activate`);return e}});const r2={get(r,e){return Se("get",r,e)},post(r,e){return Se("post",r,e)},put(r,e){return Se("put",r,e)},delete(r,e){return Se("delete",r,e)}};function t2(r){var e,t;if(r)return r;if((e=window?.Shopify)!=null&&e.shop)return window.Shopify.shop;let n=window?.domain;if(!n){const i=(t=location?.href.match(/(?:http[s]*:\/\/)*(.*?)\.(?=admin\.rechargeapps\.com)/i))==null?void 0:t[1].replace(/-sp$/,"");i&&(n=`${i}.myshopify.com`)}if(n)return n;throw new Error("No storeIdentifier was passed into init.")}function n2(r={}){const e=r;Il({storeIdentifier:t2(r.storeIdentifier),environment:e.environment?e.environment:"prod",apiKey:e.apiKey?e.apiKey:""}),qo()}const uf={init:n2,api:r2,address:ql,auth:ZT,charge:Nw,cdn:Tw,bundle:KT,onetime:JT,order:QT,subscription:e2};try{uf.init()}catch{}return uf});
24
24
  //# sourceMappingURL=recharge-storefront-client.min.js.map