commerce-sdk-isomorphic 4.0.0-nightly-20251013080807 → 4.0.0-nightly-20251015080804
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/helpers.cjs.d.ts +31 -2
- package/lib/helpers.cjs.js +1 -1
- package/lib/helpers.d.ts +31 -2
- package/lib/helpers.js +1 -1
- package/lib/index.cjs.d.ts +93 -6
- package/lib/index.cjs.js +1 -1
- package/lib/index.esm.d.ts +93 -6
- package/lib/index.esm.js +1 -1
- package/lib/shopperBaskets.cjs.js +1 -1
- package/lib/shopperBaskets.js +1 -1
- package/lib/shopperBasketsv2.cjs.js +1 -1
- package/lib/shopperBasketsv2.js +1 -1
- package/lib/shopperConsents.cjs.js +1 -1
- package/lib/shopperConsents.js +1 -1
- package/lib/shopperContext.cjs.js +1 -1
- package/lib/shopperContext.js +1 -1
- package/lib/shopperCustomers.cjs.js +1 -1
- package/lib/shopperCustomers.js +1 -1
- package/lib/shopperExperience.cjs.js +1 -1
- package/lib/shopperExperience.js +1 -1
- package/lib/shopperGiftCertificates.cjs.js +1 -1
- package/lib/shopperGiftCertificates.js +1 -1
- package/lib/shopperLogin.cjs.d.ts +62 -4
- package/lib/shopperLogin.cjs.js +1 -1
- package/lib/shopperLogin.d.ts +62 -4
- package/lib/shopperLogin.js +1 -1
- package/lib/shopperOrders.cjs.js +1 -1
- package/lib/shopperOrders.js +1 -1
- package/lib/shopperProducts.cjs.js +1 -1
- package/lib/shopperProducts.js +1 -1
- package/lib/shopperPromotions.cjs.js +1 -1
- package/lib/shopperPromotions.js +1 -1
- package/lib/shopperSearch.cjs.js +1 -1
- package/lib/shopperSearch.js +1 -1
- package/lib/shopperSeo.cjs.js +1 -1
- package/lib/shopperSeo.js +1 -1
- package/lib/shopperStores.cjs.js +1 -1
- package/lib/shopperStores.js +1 -1
- package/lib/version.cjs.d.ts +1 -1
- package/lib/version.cjs.js +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
package/lib/helpers.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{customRandom as e,urlAlphabet as t}from"nanoid";import r from"seedrandom";var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var i,a,s=function(e){return e&&e.Math==Math&&e},c=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof n&&n)||function(){return this}()||Function("return this")(),u=function(e){try{return!!e()}catch(e){return!0}},f=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l=!u((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),d=Function.prototype.call,h=l?d.bind(d):function(){return d.apply(d,arguments)},p={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,y={f:g&&!p.call({1:2},1)?function(e){var t=g(this,e);return!!t&&t.enumerable}:p},v=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},m=Function.prototype,b=m.bind,w=m.call,k=l&&b.bind(w,w),x=l?function(e){return e&&k(e)}:function(e){return e&&function(){return w.apply(e,arguments)}},_=x({}.toString),I=x("".slice),O=function(e){return I(_(e),8,-1)},C=Object,S=x("".split),P=u((function(){return!C("z").propertyIsEnumerable(0)}))?function(e){return"String"==O(e)?S(e,""):C(e)}:C,T=TypeError,z=function(e){if(null==e)throw T("Can't call method on "+e);return e},E=function(e){return P(z(e))},A=function(e){return"function"==typeof e},j=function(e){return"object"==typeof e?null!==e:A(e)},R=function(e){return A(e)?e:void 0},U=function(e,t){return arguments.length<2?R(c[e]):c[e]&&c[e][t]},L=x({}.isPrototypeOf),q=U("navigator","userAgent")||"",M=c.process,B=c.Deno,F=M&&M.versions||B&&B.version,N=F&&F.v8;N&&(a=(i=N.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!a&&q&&(!(i=q.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=q.match(/Chrome\/(\d+)/))&&(a=+i[1]);var W=a,D=!!Object.getOwnPropertySymbols&&!u((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&W&&W<41})),G=D&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,H=Object,V=G?function(e){return"symbol"==typeof e}:function(e){var t=U("Symbol");return A(t)&&L(t.prototype,H(e))},$=String,Y=function(e){try{return $(e)}catch(e){return"Object"}},J=TypeError,K=function(e){if(A(e))return e;throw J(Y(e)+" is not a function")},Q=function(e,t){var r=e[t];return null==r?void 0:K(r)},X=TypeError,Z=Object.defineProperty,ee=function(e,t){try{Z(c,e,{value:t,configurable:!0,writable:!0})}catch(r){c[e]=t}return t},te=c["__core-js_shared__"]||ee("__core-js_shared__",{}),re=o((function(e){(e.exports=function(e,t){return te[e]||(te[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.23.4",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.4/LICENSE",source:"https://github.com/zloirock/core-js"})})),ne=Object,oe=function(e){return ne(z(e))},ie=x({}.hasOwnProperty),ae=Object.hasOwn||function(e,t){return ie(oe(e),t)},se=0,ce=Math.random(),ue=x(1..toString),fe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ue(++se+ce,36)},le=re("wks"),de=c.Symbol,he=de&&de.for,pe=G?de:de&&de.withoutSetter||fe,ge=function(e){if(!ae(le,e)||!D&&"string"!=typeof le[e]){var t="Symbol."+e;D&&ae(de,e)?le[e]=de[e]:le[e]=G&&he?he(t):pe(t)}return le[e]},ye=TypeError,ve=ge("toPrimitive"),me=function(e,t){if(!j(e)||V(e))return e;var r,n=Q(e,ve);if(n){if(void 0===t&&(t="default"),r=h(n,e,t),!j(r)||V(r))return r;throw ye("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&A(r=e.toString)&&!j(n=h(r,e)))return n;if(A(r=e.valueOf)&&!j(n=h(r,e)))return n;if("string"!==t&&A(r=e.toString)&&!j(n=h(r,e)))return n;throw X("Can't convert object to primitive value")}(e,t)},be=function(e){var t=me(e,"string");return V(t)?t:t+""},we=c.document,ke=j(we)&&j(we.createElement),xe=function(e){return ke?we.createElement(e):{}},_e=!f&&!u((function(){return 7!=Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a})),Ie=Object.getOwnPropertyDescriptor,Oe={f:f?Ie:function(e,t){if(e=E(e),t=be(t),_e)try{return Ie(e,t)}catch(e){}if(ae(e,t))return v(!h(y.f,e,t),e[t])}},Ce=f&&u((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Se=String,Pe=TypeError,Te=function(e){if(j(e))return e;throw Pe(Se(e)+" is not an object")},ze=TypeError,Ee=Object.defineProperty,Ae=Object.getOwnPropertyDescriptor,je={f:f?Ce?function(e,t,r){if(Te(e),t=be(t),Te(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=Ae(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return Ee(e,t,r)}:Ee:function(e,t,r){if(Te(e),t=be(t),Te(r),_e)try{return Ee(e,t,r)}catch(e){}if("get"in r||"set"in r)throw ze("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Re=f?function(e,t,r){return je.f(e,t,v(1,r))}:function(e,t,r){return e[t]=r,e},Ue=Function.prototype,Le=f&&Object.getOwnPropertyDescriptor,qe=ae(Ue,"name"),Me={EXISTS:qe,PROPER:qe&&"something"===function(){}.name,CONFIGURABLE:qe&&(!f||f&&Le(Ue,"name").configurable)},Be=x(Function.toString);A(te.inspectSource)||(te.inspectSource=function(e){return Be(e)});var Fe,Ne,We,De=te.inspectSource,Ge=c.WeakMap,He=A(Ge)&&/native code/.test(De(Ge)),Ve=re("keys"),$e=function(e){return Ve[e]||(Ve[e]=fe(e))},Ye={},Je=c.TypeError,Ke=c.WeakMap;if(He||te.state){var Qe=te.state||(te.state=new Ke),Xe=x(Qe.get),Ze=x(Qe.has),et=x(Qe.set);Fe=function(e,t){if(Ze(Qe,e))throw new Je("Object already initialized");return t.facade=e,et(Qe,e,t),t},Ne=function(e){return Xe(Qe,e)||{}},We=function(e){return Ze(Qe,e)}}else{var tt=$e("state");Ye[tt]=!0,Fe=function(e,t){if(ae(e,tt))throw new Je("Object already initialized");return t.facade=e,Re(e,tt,t),t},Ne=function(e){return ae(e,tt)?e[tt]:{}},We=function(e){return ae(e,tt)}}var rt={set:Fe,get:Ne,has:We,enforce:function(e){return We(e)?Ne(e):Fe(e,{})},getterFor:function(e){return function(t){var r;if(!j(t)||(r=Ne(t)).type!==e)throw Je("Incompatible receiver, "+e+" required");return r}}},nt=o((function(e){var t=Me.CONFIGURABLE,r=rt.enforce,n=rt.get,o=Object.defineProperty,i=f&&!u((function(){return 8!==o((function(){}),"length",{value:8}).length})),a=String(String).split("String"),s=e.exports=function(e,n,s){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!ae(e,"name")||t&&e.name!==n)&&(f?o(e,"name",{value:n,configurable:!0}):e.name=n),i&&s&&ae(s,"arity")&&e.length!==s.arity&&o(e,"length",{value:s.arity});try{s&&ae(s,"constructor")&&s.constructor?f&&o(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var c=r(e);return ae(c,"source")||(c.source=a.join("string"==typeof n?n:"")),e};Function.prototype.toString=s((function(){return A(this)&&n(this).source||De(this)}),"toString")})),ot=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(A(r)&&nt(r,i,n),n.global)o?e[t]=r:ee(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:je.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},it=Math.ceil,at=Math.floor,st=Math.trunc||function(e){var t=+e;return(t>0?at:it)(t)},ct=function(e){var t=+e;return t!=t||0===t?0:st(t)},ut=Math.max,ft=Math.min,lt=function(e,t){var r=ct(e);return r<0?ut(r+t,0):ft(r,t)},dt=Math.min,ht=function(e){return e>0?dt(ct(e),9007199254740991):0},pt=function(e){return ht(e.length)},gt=function(e){return function(t,r,n){var o,i=E(t),a=pt(i),s=lt(n,a);if(e&&r!=r){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},yt={includes:gt(!0),indexOf:gt(!1)},vt=yt.indexOf,mt=x([].push),bt=function(e,t){var r,n=E(e),o=0,i=[];for(r in n)!ae(Ye,r)&&ae(n,r)&&mt(i,r);for(;t.length>o;)ae(n,r=t[o++])&&(~vt(i,r)||mt(i,r));return i},wt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kt=wt.concat("length","prototype"),xt={f:Object.getOwnPropertyNames||function(e){return bt(e,kt)}},_t={f:Object.getOwnPropertySymbols},It=x([].concat),Ot=U("Reflect","ownKeys")||function(e){var t=xt.f(Te(e)),r=_t.f;return r?It(t,r(e)):t},Ct=function(e,t,r){for(var n=Ot(t),o=je.f,i=Oe.f,a=0;a<n.length;a++){var s=n[a];ae(e,s)||r&&ae(r,s)||o(e,s,i(t,s))}},St=/#|\.prototype\./,Pt=function(e,t){var r=zt[Tt(e)];return r==At||r!=Et&&(A(t)?u(t):!!t)},Tt=Pt.normalize=function(e){return String(e).replace(St,".").toLowerCase()},zt=Pt.data={},Et=Pt.NATIVE="N",At=Pt.POLYFILL="P",jt=Pt,Rt=Oe.f,Ut=function(e,t){var r,n,o,i,a,s=e.target,u=e.global,f=e.stat;if(r=u?c:f?c[s]||ee(s,{}):(c[s]||{}).prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(a=Rt(r,n))&&a.value:r[n],!jt(u?n:s+(f?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ct(i,o)}(e.sham||o&&o.sham)&&Re(i,"sham",!0),ot(r,n,i,e)}};function Lt(e){return(Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Ut({global:!0},{globalThis:c});var qt="object"===("undefined"==typeof window?"undefined":Lt(window))&&"object"===Lt(window.document),Mt="object"===("undefined"==typeof process?"undefined":Lt(process))&&"object"===Lt(process.versions)&&"string"==typeof process.versions.node,Bt=qt?window:globalThis,Ft="function"==typeof Bt.fetch,Nt=function(){if(!Ft)throw new Error("Please use Node.js 18+ for native fetch support.");return Bt.fetch}(),Wt=Object.keys||function(e){return bt(e,wt)},Dt=u((function(){Wt(1)}));Ut({target:"Object",stat:!0,forced:Dt},{keys:function(e){return Wt(oe(e))}});var Gt={};Gt[ge("toStringTag")]="z";var Ht,Vt="[object z]"===String(Gt),$t=ge("toStringTag"),Yt=Object,Jt="Arguments"==O(function(){return arguments}()),Kt=Vt?O:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Yt(e),$t))?r:Jt?O(t):"Object"==(n=O(t))&&A(t.callee)?"Arguments":n},Qt=String,Xt=function(e){if("Symbol"===Kt(e))throw TypeError("Cannot convert a Symbol value to a string");return Qt(e)},Zt={f:f&&!Ce?Object.defineProperties:function(e,t){Te(e);for(var r,n=E(t),o=Wt(t),i=o.length,a=0;i>a;)je.f(e,r=o[a++],n[r]);return e}},er=U("document","documentElement"),tr=$e("IE_PROTO"),rr=function(){},nr=function(e){return"<script>"+e+"<\/script>"},or=function(e){e.write(nr("")),e.close();var t=e.parentWindow.Object;return e=null,t},ir=function(){try{Ht=new ActiveXObject("htmlfile")}catch(e){}var e,t;ir="undefined"!=typeof document?document.domain&&Ht?or(Ht):((t=xe("iframe")).style.display="none",er.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(nr("document.F=Object")),e.close(),e.F):or(Ht);for(var r=wt.length;r--;)delete ir.prototype[wt[r]];return ir()};Ye[tr]=!0;var ar=Object.create||function(e,t){var r;return null!==e?(rr.prototype=Te(e),r=new rr,rr.prototype=null,r[tr]=e):r=ir(),void 0===t?r:Zt.f(r,t)},sr=function(e,t,r){var n=be(t);n in e?je.f(e,n,v(0,r)):e[n]=r},cr=Array,ur=Math.max,fr=function(e,t,r){for(var n=pt(e),o=lt(t,n),i=lt(void 0===r?n:r,n),a=cr(ur(i-o,0)),s=0;o<i;o++,s++)sr(a,s,e[o]);return a.length=s,a},lr=xt.f,dr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],hr={f:function(e){return dr&&"Window"==O(e)?function(e){try{return lr(e)}catch(e){return fr(dr)}}(e):lr(E(e))}},pr={f:ge},gr=c,yr=je.f,vr=je.f,mr=ge("toStringTag"),br=function(e,t,r){e&&!r&&(e=e.prototype),e&&!ae(e,mr)&&vr(e,mr,{configurable:!0,value:t})},wr=x(x.bind),kr=function(e,t){return K(e),void 0===t?e:l?wr(e,t):function(){return e.apply(t,arguments)}},xr=Array.isArray||function(e){return"Array"==O(e)},_r=function(){},Ir=[],Or=U("Reflect","construct"),Cr=/^\s*(?:class|function)\b/,Sr=x(Cr.exec),Pr=!Cr.exec(_r),Tr=function(e){if(!A(e))return!1;try{return Or(_r,Ir,e),!0}catch(e){return!1}},zr=function(e){if(!A(e))return!1;switch(Kt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Pr||!!Sr(Cr,De(e))}catch(e){return!0}};zr.sham=!0;var Er=!Or||u((function(){var e;return Tr(Tr.call)||!Tr(Object)||!Tr((function(){e=!0}))||e}))?zr:Tr,Ar=ge("species"),jr=Array,Rr=function(e,t){return new(function(e){var t;return xr(e)&&(t=e.constructor,(Er(t)&&(t===jr||xr(t.prototype))||j(t)&&null===(t=t[Ar]))&&(t=void 0)),void 0===t?jr:t}(e))(0===t?0:t)},Ur=x([].push),Lr=function(e){var t=1==e,r=2==e,n=3==e,o=4==e,i=6==e,a=7==e,s=5==e||i;return function(c,u,f,l){for(var d,h,p=oe(c),g=P(p),y=kr(u,f),v=pt(g),m=0,b=l||Rr,w=t?b(c,v):r||a?b(c,0):void 0;v>m;m++)if((s||m in g)&&(h=y(d=g[m],m,p),e))if(t)w[m]=h;else if(h)switch(e){case 3:return!0;case 5:return d;case 6:return m;case 2:Ur(w,d)}else switch(e){case 4:return!1;case 7:Ur(w,d)}return i?-1:n||o?o:w}},qr={forEach:Lr(0),map:Lr(1),filter:Lr(2),some:Lr(3),every:Lr(4),find:Lr(5),findIndex:Lr(6),filterReject:Lr(7)},Mr=qr.forEach,Br=$e("hidden"),Fr=rt.set,Nr=rt.getterFor("Symbol"),Wr=Object.prototype,Dr=c.Symbol,Gr=Dr&&Dr.prototype,Hr=c.TypeError,Vr=c.QObject,$r=Oe.f,Yr=je.f,Jr=hr.f,Kr=y.f,Qr=x([].push),Xr=re("symbols"),Zr=re("op-symbols"),en=re("wks"),tn=!Vr||!Vr.prototype||!Vr.prototype.findChild,rn=f&&u((function(){return 7!=ar(Yr({},"a",{get:function(){return Yr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=$r(Wr,t);n&&delete Wr[t],Yr(e,t,r),n&&e!==Wr&&Yr(Wr,t,n)}:Yr,nn=function(e,t){var r=Xr[e]=ar(Gr);return Fr(r,{type:"Symbol",tag:e,description:t}),f||(r.description=t),r},on=function(e,t,r){e===Wr&&on(Zr,t,r),Te(e);var n=be(t);return Te(r),ae(Xr,n)?(r.enumerable?(ae(e,Br)&&e[Br][n]&&(e[Br][n]=!1),r=ar(r,{enumerable:v(0,!1)})):(ae(e,Br)||Yr(e,Br,v(1,{})),e[Br][n]=!0),rn(e,n,r)):Yr(e,n,r)},an=function(e,t){Te(e);var r=E(t),n=Wt(r).concat(fn(r));return Mr(n,(function(t){f&&!h(sn,r,t)||on(e,t,r[t])})),e},sn=function(e){var t=be(e),r=h(Kr,this,t);return!(this===Wr&&ae(Xr,t)&&!ae(Zr,t))&&(!(r||!ae(this,t)||!ae(Xr,t)||ae(this,Br)&&this[Br][t])||r)},cn=function(e,t){var r=E(e),n=be(t);if(r!==Wr||!ae(Xr,n)||ae(Zr,n)){var o=$r(r,n);return!o||!ae(Xr,n)||ae(r,Br)&&r[Br][n]||(o.enumerable=!0),o}},un=function(e){var t=Jr(E(e)),r=[];return Mr(t,(function(e){ae(Xr,e)||ae(Ye,e)||Qr(r,e)})),r},fn=function(e){var t=e===Wr,r=Jr(t?Zr:E(e)),n=[];return Mr(r,(function(e){!ae(Xr,e)||t&&!ae(Wr,e)||Qr(n,Xr[e])})),n};D||(Gr=(Dr=function(){if(L(Gr,this))throw Hr("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Xt(arguments[0]):void 0,t=fe(e),r=function(e){this===Wr&&h(r,Zr,e),ae(this,Br)&&ae(this[Br],t)&&(this[Br][t]=!1),rn(this,t,v(1,e))};return f&&tn&&rn(Wr,t,{configurable:!0,set:r}),nn(t,e)}).prototype,ot(Gr,"toString",(function(){return Nr(this).tag})),ot(Dr,"withoutSetter",(function(e){return nn(fe(e),e)})),y.f=sn,je.f=on,Zt.f=an,Oe.f=cn,xt.f=hr.f=un,_t.f=fn,pr.f=function(e){return nn(ge(e),e)},f&&(Yr(Gr,"description",{configurable:!0,get:function(){return Nr(this).description}}),ot(Wr,"propertyIsEnumerable",sn,{unsafe:!0}))),Ut({global:!0,constructor:!0,wrap:!0,forced:!D,sham:!D},{Symbol:Dr}),Mr(Wt(en),(function(e){!function(e){var t=gr.Symbol||(gr.Symbol={});ae(t,e)||yr(t,e,{value:pr.f(e)})}(e)})),Ut({target:"Symbol",stat:!0,forced:!D},{useSetter:function(){tn=!0},useSimple:function(){tn=!1}}),Ut({target:"Object",stat:!0,forced:!D,sham:!f},{create:function(e,t){return void 0===t?ar(e):an(ar(e),t)},defineProperty:on,defineProperties:an,getOwnPropertyDescriptor:cn}),Ut({target:"Object",stat:!0,forced:!D},{getOwnPropertyNames:un}),function(){var e=U("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=ge("toPrimitive");t&&!t[n]&&ot(t,n,(function(e){return h(r,this)}),{arity:1})}(),br(Dr,"Symbol"),Ye[Br]=!0;var ln=D&&!!Symbol.for&&!!Symbol.keyFor,dn=re("string-to-symbol-registry"),hn=re("symbol-to-string-registry");Ut({target:"Symbol",stat:!0,forced:!ln},{for:function(e){var t=Xt(e);if(ae(dn,t))return dn[t];var r=U("Symbol")(t);return dn[t]=r,hn[r]=t,r}});var pn=re("symbol-to-string-registry");Ut({target:"Symbol",stat:!0,forced:!ln},{keyFor:function(e){if(!V(e))throw TypeError(Y(e)+" is not a symbol");if(ae(pn,e))return pn[e]}});var gn=Function.prototype,yn=gn.apply,vn=gn.call,mn="object"==typeof Reflect&&Reflect.apply||(l?vn.bind(yn):function(){return vn.apply(yn,arguments)}),bn=x([].slice),wn=U("JSON","stringify"),kn=x(/./.exec),xn=x("".charAt),_n=x("".charCodeAt),In=x("".replace),On=x(1..toString),Cn=/[\uD800-\uDFFF]/g,Sn=/^[\uD800-\uDBFF]$/,Pn=/^[\uDC00-\uDFFF]$/,Tn=!D||u((function(){var e=U("Symbol")();return"[null]"!=wn([e])||"{}"!=wn({a:e})||"{}"!=wn(Object(e))})),zn=u((function(){return'"\\udf06\\ud834"'!==wn("\udf06\ud834")||'"\\udead"'!==wn("\udead")})),En=function(e,t){var r=bn(arguments),n=t;if((j(t)||void 0!==e)&&!V(e))return xr(t)||(t=function(e,t){if(A(n)&&(t=h(n,this,e,t)),!V(t))return t}),r[1]=t,mn(wn,null,r)},An=function(e,t,r){var n=xn(r,t-1),o=xn(r,t+1);return kn(Sn,e)&&!kn(Pn,o)||kn(Pn,e)&&!kn(Sn,n)?"\\u"+On(_n(e,0),16):e};wn&&Ut({target:"JSON",stat:!0,arity:3,forced:Tn||zn},{stringify:function(e,t,r){var n=bn(arguments),o=mn(Tn?En:wn,null,n);return zn&&"string"==typeof o?In(o,Cn,An):o}});var jn=!D||u((function(){_t.f(1)}));Ut({target:"Object",stat:!0,forced:jn},{getOwnPropertySymbols:function(e){var t=_t.f;return t?t(oe(e)):[]}});var Rn=ge("species"),Un=function(e){return W>=51||!u((function(){var t=[];return(t.constructor={})[Rn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ln=qr.filter,qn=Un("filter");Ut({target:"Array",proto:!0,forced:!qn},{filter:function(e){return Ln(this,e,arguments.length>1?arguments[1]:void 0)}});var Mn=Vt?{}.toString:function(){return"[object "+Kt(this)+"]"};Vt||ot(Object.prototype,"toString",Mn,{unsafe:!0});var Bn=Oe.f,Fn=u((function(){Bn(1)}));Ut({target:"Object",stat:!0,forced:!f||Fn,sham:!f},{getOwnPropertyDescriptor:function(e,t){return Bn(E(e),t)}});var Nn={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Wn=xe("span").classList,Dn=Wn&&Wn.constructor&&Wn.constructor.prototype,Gn=Dn===Object.prototype?void 0:Dn,Hn=function(e,t){var r=[][e];return!!r&&u((function(){r.call(null,t||function(){return 1},1)}))},Vn=qr.forEach,$n=Hn("forEach")?[].forEach:function(e){return Vn(this,e,arguments.length>1?arguments[1]:void 0)},Yn=function(e){if(e&&e.forEach!==$n)try{Re(e,"forEach",$n)}catch(t){e.forEach=$n}};for(var Jn in Nn)Nn[Jn]&&Yn(c[Jn]&&c[Jn].prototype);Yn(Gn),Ut({target:"Object",stat:!0,sham:!f},{getOwnPropertyDescriptors:function(e){for(var t,r,n=E(e),o=Oe.f,i=Ot(n),a={},s=0;i.length>s;)void 0!==(r=o(n,t=i[s++]))&&sr(a,t,r);return a}});var Kn=Zt.f;Ut({target:"Object",stat:!0,forced:Object.defineProperties!==Kn,sham:!f},{defineProperties:Kn});var Qn=je.f;Ut({target:"Object",stat:!0,forced:Object.defineProperty!==Qn,sham:!f},{defineProperty:Qn});var Xn=function(){var e=Te(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Zn=RegExp.prototype,eo=Me.PROPER,to=RegExp.prototype.toString,ro=u((function(){return"/a/b"!=to.call({source:"a",flags:"b"})})),no=eo&&"toString"!=to.name;(ro||no)&&ot(RegExp.prototype,"toString",(function(){var e=Te(this);return"/"+Xt(e.source)+"/"+Xt(function(e){var t=e.flags;return void 0!==t||"flags"in Zn||ae(e,"flags")||!L(Zn,e)?t:h(Xn,e)}(e))}),{unsafe:!0});var oo=je.f,io=ge("unscopables"),ao=Array.prototype;null==ao[io]&&oo(ao,io,{configurable:!0,value:ar(null)});var so,co,uo,fo=function(e){ao[io][e]=!0},lo={},ho=!u((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),po=$e("IE_PROTO"),go=Object,yo=go.prototype,vo=ho?go.getPrototypeOf:function(e){var t=oe(e);if(ae(t,po))return t[po];var r=t.constructor;return A(r)&&t instanceof r?r.prototype:t instanceof go?yo:null},mo=ge("iterator"),bo=!1;[].keys&&("next"in(uo=[].keys())?(co=vo(vo(uo)))!==Object.prototype&&(so=co):bo=!0),(null==so||u((function(){var e={};return so[mo].call(e)!==e})))&&(so={}),A(so[mo])||ot(so,mo,(function(){return this}));var wo={IteratorPrototype:so,BUGGY_SAFARI_ITERATORS:bo},ko=wo.IteratorPrototype,xo=function(){return this},_o=function(e,t,r,n){var o=t+" Iterator";return e.prototype=ar(ko,{next:v(+!n,r)}),br(e,o,!1),lo[o]=xo,e},Io=String,Oo=TypeError,Co=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=x(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return Te(r),function(e){if("object"==typeof e||A(e))return e;throw Oo("Can't set "+Io(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),So=Me.PROPER,Po=Me.CONFIGURABLE,To=wo.IteratorPrototype,zo=wo.BUGGY_SAFARI_ITERATORS,Eo=ge("iterator"),Ao=function(){return this},jo=function(e,t,r,n,o,i,a){_o(r,t,n);var s,c,u,f=function(e){if(e===o&&y)return y;if(!zo&&e in p)return p[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},l=t+" Iterator",d=!1,p=e.prototype,g=p[Eo]||p["@@iterator"]||o&&p[o],y=!zo&&g||f(o),v="Array"==t&&p.entries||g;if(v&&(s=vo(v.call(new e)))!==Object.prototype&&s.next&&(vo(s)!==To&&(Co?Co(s,To):A(s[Eo])||ot(s,Eo,Ao)),br(s,l,!0)),So&&"values"==o&&g&&"values"!==g.name&&(Po?Re(p,"name","values"):(d=!0,y=function(){return h(g,this)})),o)if(c={values:f("values"),keys:i?y:f("keys"),entries:f("entries")},a)for(u in c)(zo||d||!(u in p))&&ot(p,u,c[u]);else Ut({target:t,proto:!0,forced:zo||d},c);return p[Eo]!==y&&ot(p,Eo,y,{name:o}),lo[t]=y,c},Ro=je.f,Uo=rt.set,Lo=rt.getterFor("Array Iterator"),qo=jo(Array,"Array",(function(e,t){Uo(this,{type:"Array Iterator",target:E(e),index:0,kind:t})}),(function(){var e=Lo(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),Mo=lo.Arguments=lo.Array;if(fo("keys"),fo("values"),fo("entries"),f&&"values"!==Mo.name)try{Ro(Mo,"name",{value:"values"})}catch(e){}var Bo=x("".charAt),Fo=x("".charCodeAt),No=x("".slice),Wo=function(e){return function(t,r){var n,o,i=Xt(z(t)),a=ct(r),s=i.length;return a<0||a>=s?e?"":void 0:(n=Fo(i,a))<55296||n>56319||a+1===s||(o=Fo(i,a+1))<56320||o>57343?e?Bo(i,a):n:e?No(i,a,a+2):o-56320+(n-55296<<10)+65536}},Do={codeAt:Wo(!1),charAt:Wo(!0)},Go=Do.charAt,Ho=rt.set,Vo=rt.getterFor("String Iterator");jo(String,"String",(function(e){Ho(this,{type:"String Iterator",string:Xt(e),index:0})}),(function(){var e,t=Vo(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=Go(r,n),t.index+=e.length,{value:e,done:!1})}));var $o=ge("iterator"),Yo=ge("toStringTag"),Jo=qo.values,Ko=function(e,t){if(e){if(e[$o]!==Jo)try{Re(e,$o,Jo)}catch(t){e[$o]=Jo}if(e[Yo]||Re(e,Yo,t),Nn[t])for(var r in qo)if(e[r]!==qo[r])try{Re(e,r,qo[r])}catch(t){e[r]=qo[r]}}};for(var Qo in Nn)Ko(c[Qo]&&c[Qo].prototype,Qo);Ko(Gn,"DOMTokenList");var Xo=ge("iterator"),Zo=!u((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Xo]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),ei=function(e,t,r){return r.get&&nt(r.get,t,{getter:!0}),r.set&&nt(r.set,t,{setter:!0}),je.f(e,t,r)},ti=TypeError,ri=function(e,t){if(L(t,e))return e;throw ti("Incorrect invocation")},ni=Object.assign,oi=Object.defineProperty,ii=x([].concat),ai=!ni||u((function(){if(f&&1!==ni({b:1},ni(oi({},"a",{enumerable:!0,get:function(){oi(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol();return e[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=ni({},e)[r]||"abcdefghijklmnopqrst"!=Wt(ni({},t)).join("")}))?function(e,t){for(var r=oe(e),n=arguments.length,o=1,i=_t.f,a=y.f;n>o;)for(var s,c=P(arguments[o++]),u=i?ii(Wt(c),i(c)):Wt(c),l=u.length,d=0;l>d;)s=u[d++],f&&!h(a,c,s)||(r[s]=c[s]);return r}:ni,si=function(e,t,r){var n,o;Te(e);try{if(!(n=Q(e,"return"))){if("throw"===t)throw r;return r}n=h(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return Te(n),r},ci=function(e,t,r,n){try{return n?t(Te(r)[0],r[1]):t(r)}catch(t){si(e,"throw",t)}},ui=ge("iterator"),fi=Array.prototype,li=function(e){return void 0!==e&&(lo.Array===e||fi[ui]===e)},di=ge("iterator"),hi=function(e){if(null!=e)return Q(e,di)||Q(e,"@@iterator")||lo[Kt(e)]},pi=TypeError,gi=function(e,t){var r=arguments.length<2?hi(e):t;if(K(r))return Te(h(r,e));throw pi(Y(e)+" is not iterable")},yi=Array,vi=function(e){var t=oe(e),r=Er(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=kr(o,n>2?arguments[2]:void 0));var a,s,c,u,f,l,d=hi(t),p=0;if(!d||this===yi&&li(d))for(a=pt(t),s=r?new this(a):yi(a);a>p;p++)l=i?o(t[p],p):t[p],sr(s,p,l);else for(f=(u=gi(t,d)).next,s=r?new this:[];!(c=h(f,u)).done;p++)l=i?ci(u,o,[c.value,p],!0):c.value,sr(s,p,l);return s.length=p,s},mi=/[^\0-\u007E]/,bi=/[.\u3002\uFF0E\uFF61]/g,wi="Overflow: input needs wider integers to process",ki=RangeError,xi=x(bi.exec),_i=Math.floor,Ii=String.fromCharCode,Oi=x("".charCodeAt),Ci=x([].join),Si=x([].push),Pi=x("".replace),Ti=x("".split),zi=x("".toLowerCase),Ei=function(e){return e+22+75*(e<26)},Ai=function(e,t,r){var n=0;for(e=r?_i(e/700):e>>1,e+=_i(e/t);e>455;)e=_i(e/35),n+=36;return _i(n+36*e/(e+38))},ji=function(e){var t,r,n=[],o=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var o=Oi(e,r++);if(o>=55296&&o<=56319&&r<n){var i=Oi(e,r++);56320==(64512&i)?Si(t,((1023&o)<<10)+(1023&i)+65536):(Si(t,o),r--)}else Si(t,o)}return t}(e)).length,i=128,a=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&Si(n,Ii(r));var c=n.length,u=c;for(c&&Si(n,"-");u<o;){var f=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=i&&r<f&&(f=r);var l=u+1;if(f-i>_i((2147483647-a)/l))throw ki(wi);for(a+=(f-i)*l,i=f,t=0;t<e.length;t++){if((r=e[t])<i&&++a>2147483647)throw ki(wi);if(r==i){for(var d=a,h=36;;){var p=h<=s?1:h>=s+26?26:h-s;if(d<p)break;var g=d-p,y=36-p;Si(n,Ii(Ei(p+g%y))),d=_i(g/y),h+=36}Si(n,Ii(Ei(d))),s=Ai(a,l,u==c),a=0,u++}}a++,i++}return Ci(n,"")},Ri=TypeError,Ui=function(e,t){if(e<t)throw Ri("Not enough arguments");return e},Li=function(e,t,r){for(var n in t)ot(e,n,t[n],r);return e},qi=Math.floor,Mi=function(e,t){var r=e.length,n=qi(r/2);return r<8?Bi(e,t):Fi(e,Mi(fr(e,0,n),t),Mi(fr(e,n),t),t)},Bi=function(e,t){for(var r,n,o=e.length,i=1;i<o;){for(n=i,r=e[i];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==i++&&(e[n]=r)}return e},Fi=function(e,t,r,n){for(var o=t.length,i=r.length,a=0,s=0;a<o||s<i;)e[a+s]=a<o&&s<i?n(t[a],r[s])<=0?t[a++]:r[s++]:a<o?t[a++]:r[s++];return e},Ni=Mi,Wi=ge("iterator"),Di=rt.set,Gi=rt.getterFor("URLSearchParams"),Hi=rt.getterFor("URLSearchParamsIterator"),Vi=Object.getOwnPropertyDescriptor,$i=function(e){if(!f)return c[e];var t=Vi(c,e);return t&&t.value},Yi=$i("fetch"),Ji=$i("Request"),Ki=$i("Headers"),Qi=Ji&&Ji.prototype,Xi=Ki&&Ki.prototype,Zi=c.RegExp,ea=c.TypeError,ta=c.decodeURIComponent,ra=c.encodeURIComponent,na=x("".charAt),oa=x([].join),ia=x([].push),aa=x("".replace),sa=x([].shift),ca=x([].splice),ua=x("".split),fa=x("".slice),la=/\+/g,da=Array(4),ha=function(e){return da[e-1]||(da[e-1]=Zi("((?:%[\\da-f]{2}){"+e+"})","gi"))},pa=function(e){try{return ta(e)}catch(t){return e}},ga=function(e){var t=aa(e,la," "),r=4;try{return ta(t)}catch(e){for(;r;)t=aa(t,ha(r--),pa);return t}},ya=/[!'()~]|%20/g,va={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ma=function(e){return va[e]},ba=function(e){return aa(ra(e),ya,ma)},wa=_o((function(e,t){Di(this,{type:"URLSearchParamsIterator",iterator:gi(Gi(e).entries),kind:t})}),"Iterator",(function(){var e=Hi(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),ka=function(e){this.entries=[],this.url=null,void 0!==e&&(j(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===na(e,0)?fa(e,1):e:Xt(e)))};ka.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,o,i,a,s,c=hi(e);if(c)for(r=(t=gi(e,c)).next;!(n=h(r,t)).done;){if(i=(o=gi(Te(n.value))).next,(a=h(i,o)).done||(s=h(i,o)).done||!h(i,o).done)throw ea("Expected sequence with length 2");ia(this.entries,{key:Xt(a.value),value:Xt(s.value)})}else for(var u in e)ae(e,u)&&ia(this.entries,{key:u,value:Xt(e[u])})},parseQuery:function(e){if(e)for(var t,r,n=ua(e,"&"),o=0;o<n.length;)(t=n[o++]).length&&(r=ua(t,"="),ia(this.entries,{key:ga(sa(r)),value:ga(oa(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],ia(r,ba(e.key)+"="+ba(e.value));return oa(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var xa=function(){ri(this,_a);var e=arguments.length>0?arguments[0]:void 0;Di(this,new ka(e))},_a=xa.prototype;if(Li(_a,{append:function(e,t){Ui(arguments.length,2);var r=Gi(this);ia(r.entries,{key:Xt(e),value:Xt(t)}),r.updateURL()},delete:function(e){Ui(arguments.length,1);for(var t=Gi(this),r=t.entries,n=Xt(e),o=0;o<r.length;)r[o].key===n?ca(r,o,1):o++;t.updateURL()},get:function(e){Ui(arguments.length,1);for(var t=Gi(this).entries,r=Xt(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Ui(arguments.length,1);for(var t=Gi(this).entries,r=Xt(e),n=[],o=0;o<t.length;o++)t[o].key===r&&ia(n,t[o].value);return n},has:function(e){Ui(arguments.length,1);for(var t=Gi(this).entries,r=Xt(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Ui(arguments.length,1);for(var r,n=Gi(this),o=n.entries,i=!1,a=Xt(e),s=Xt(t),c=0;c<o.length;c++)(r=o[c]).key===a&&(i?ca(o,c--,1):(i=!0,r.value=s));i||ia(o,{key:a,value:s}),n.updateURL()},sort:function(){var e=Gi(this);Ni(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Gi(this).entries,n=kr(e,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((t=r[o++]).value,t.key,this)},keys:function(){return new wa(this,"keys")},values:function(){return new wa(this,"values")},entries:function(){return new wa(this,"entries")}},{enumerable:!0}),ot(_a,Wi,_a.entries,{name:"entries"}),ot(_a,"toString",(function(){return Gi(this).serialize()}),{enumerable:!0}),br(xa,"URLSearchParams"),Ut({global:!0,constructor:!0,forced:!Zo},{URLSearchParams:xa}),!Zo&&A(Ki)){var Ia=x(Xi.has),Oa=x(Xi.set),Ca=function(e){if(j(e)){var t,r=e.body;if("URLSearchParams"===Kt(r))return t=e.headers?new Ki(e.headers):new Ki,Ia(t,"content-type")||Oa(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),ar(e,{body:v(0,Xt(r)),headers:v(0,t)})}return e};if(A(Yi)&&Ut({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Yi(e,arguments.length>1?Ca(arguments[1]):{})}}),A(Ji)){var Sa=function(e){return ri(this,Qi),new Ji(e,arguments.length>1?Ca(arguments[1]):{})};Qi.constructor=Sa,Sa.prototype=Qi,Ut({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Sa})}}var Pa,Ta={URLSearchParams:xa,getState:Gi},za=Do.codeAt,Ea=rt.set,Aa=rt.getterFor("URL"),ja=Ta.URLSearchParams,Ra=Ta.getState,Ua=c.URL,La=c.TypeError,qa=c.parseInt,Ma=Math.floor,Ba=Math.pow,Fa=x("".charAt),Na=x(/./.exec),Wa=x([].join),Da=x(1..toString),Ga=x([].pop),Ha=x([].push),Va=x("".replace),$a=x([].shift),Ya=x("".split),Ja=x("".slice),Ka=x("".toLowerCase),Qa=x([].unshift),Xa=/[a-z]/i,Za=/[\d+-.a-z]/i,es=/\d/,ts=/^0x/i,rs=/^[0-7]+$/,ns=/^\d+$/,os=/^[\da-f]+$/i,is=/[\0\t\n\r #%/:<>?@[\\\]^|]/,as=/[\0\t\n\r #/:<>?@[\\\]^|]/,ss=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,cs=/[\t\n\r]/g,us=function(e){var t,r,n,o;if("number"==typeof e){for(t=[],r=0;r<4;r++)Qa(t,e%256),e=Ma(e/256);return Wa(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,o=0,i=0;i<8;i++)0!==e[i]?(o>r&&(t=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(t=n,r=o),t}(e),r=0;r<8;r++)o&&0===e[r]||(o&&(o=!1),n===r?(t+=r?":":"::",o=!0):(t+=Da(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},fs={},ls=ai({},fs,{" ":1,'"':1,"<":1,">":1,"`":1}),ds=ai({},ls,{"#":1,"?":1,"{":1,"}":1}),hs=ai({},ds,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ps=function(e,t){var r=za(e,0);return r>32&&r<127&&!ae(t,e)?e:encodeURIComponent(e)},gs={ftp:21,file:null,http:80,https:443,ws:80,wss:443},ys=function(e,t){var r;return 2==e.length&&Na(Xa,Fa(e,0))&&(":"==(r=Fa(e,1))||!t&&"|"==r)},vs=function(e){var t;return e.length>1&&ys(Ja(e,0,2))&&(2==e.length||"/"===(t=Fa(e,2))||"\\"===t||"?"===t||"#"===t)},ms=function(e){return"."===e||"%2e"===Ka(e)},bs={},ws={},ks={},xs={},_s={},Is={},Os={},Cs={},Ss={},Ps={},Ts={},zs={},Es={},As={},js={},Rs={},Us={},Ls={},qs={},Ms={},Bs={},Fs=function(e,t,r){var n,o,i,a=Xt(e);if(t){if(o=this.parse(a))throw La(o);this.searchParams=null}else{if(void 0!==r&&(n=new Fs(r,!0)),o=this.parse(a,null,n))throw La(o);(i=Ra(new ja)).bindURL(this),this.searchParams=i}};Fs.prototype={type:"URL",parse:function(e,t,r){var n,o,i,a,s,c=this,u=t||bs,f=0,l="",d=!1,h=!1,p=!1;for(e=Xt(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=Va(e,ss,"")),e=Va(e,cs,""),n=vi(e);f<=n.length;){switch(o=n[f],u){case bs:if(!o||!Na(Xa,o)){if(t)return"Invalid scheme";u=ks;continue}l+=Ka(o),u=ws;break;case ws:if(o&&(Na(Za,o)||"+"==o||"-"==o||"."==o))l+=Ka(o);else{if(":"!=o){if(t)return"Invalid scheme";l="",u=ks,f=0;continue}if(t&&(c.isSpecial()!=ae(gs,l)||"file"==l&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=l,t)return void(c.isSpecial()&&gs[c.scheme]==c.port&&(c.port=null));l="","file"==c.scheme?u=As:c.isSpecial()&&r&&r.scheme==c.scheme?u=xs:c.isSpecial()?u=Cs:"/"==n[f+1]?(u=_s,f++):(c.cannotBeABaseURL=!0,Ha(c.path,""),u=qs)}break;case ks:if(!r||r.cannotBeABaseURL&&"#"!=o)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==o){c.scheme=r.scheme,c.path=fr(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,u=Bs;break}u="file"==r.scheme?As:Is;continue;case xs:if("/"!=o||"/"!=n[f+1]){u=Is;continue}u=Ss,f++;break;case _s:if("/"==o){u=Ps;break}u=Ls;continue;case Is:if(c.scheme=r.scheme,o==Pa)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=fr(r.path),c.query=r.query;else if("/"==o||"\\"==o&&c.isSpecial())u=Os;else if("?"==o)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=fr(r.path),c.query="",u=Ms;else{if("#"!=o){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=fr(r.path),c.path.length--,u=Ls;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=fr(r.path),c.query=r.query,c.fragment="",u=Bs}break;case Os:if(!c.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,u=Ls;continue}u=Ps}else u=Ss;break;case Cs:if(u=Ss,"/"!=o||"/"!=Fa(l,f+1))continue;f++;break;case Ss:if("/"!=o&&"\\"!=o){u=Ps;continue}break;case Ps:if("@"==o){d&&(l="%40"+l),d=!0,i=vi(l);for(var g=0;g<i.length;g++){var y=i[g];if(":"!=y||p){var v=ps(y,hs);p?c.password+=v:c.username+=v}else p=!0}l=""}else if(o==Pa||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()){if(d&&""==l)return"Invalid authority";f-=vi(l).length+1,l="",u=Ts}else l+=o;break;case Ts:case zs:if(t&&"file"==c.scheme){u=Rs;continue}if(":"!=o||h){if(o==Pa||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()){if(c.isSpecial()&&""==l)return"Invalid host";if(t&&""==l&&(c.includesCredentials()||null!==c.port))return;if(a=c.parseHost(l))return a;if(l="",u=Us,t)return;continue}"["==o?h=!0:"]"==o&&(h=!1),l+=o}else{if(""==l)return"Invalid host";if(a=c.parseHost(l))return a;if(l="",u=Es,t==zs)return}break;case Es:if(!Na(es,o)){if(o==Pa||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()||t){if(""!=l){var m=qa(l,10);if(m>65535)return"Invalid port";c.port=c.isSpecial()&&m===gs[c.scheme]?null:m,l=""}if(t)return;u=Us;continue}return"Invalid port"}l+=o;break;case As:if(c.scheme="file","/"==o||"\\"==o)u=js;else{if(!r||"file"!=r.scheme){u=Ls;continue}if(o==Pa)c.host=r.host,c.path=fr(r.path),c.query=r.query;else if("?"==o)c.host=r.host,c.path=fr(r.path),c.query="",u=Ms;else{if("#"!=o){vs(Wa(fr(n,f),""))||(c.host=r.host,c.path=fr(r.path),c.shortenPath()),u=Ls;continue}c.host=r.host,c.path=fr(r.path),c.query=r.query,c.fragment="",u=Bs}}break;case js:if("/"==o||"\\"==o){u=Rs;break}r&&"file"==r.scheme&&!vs(Wa(fr(n,f),""))&&(ys(r.path[0],!0)?Ha(c.path,r.path[0]):c.host=r.host),u=Ls;continue;case Rs:if(o==Pa||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&ys(l))u=Ls;else if(""==l){if(c.host="",t)return;u=Us}else{if(a=c.parseHost(l))return a;if("localhost"==c.host&&(c.host=""),t)return;l="",u=Us}continue}l+=o;break;case Us:if(c.isSpecial()){if(u=Ls,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=Pa&&(u=Ls,"/"!=o))continue}else c.fragment="",u=Bs;else c.query="",u=Ms;break;case Ls:if(o==Pa||"/"==o||"\\"==o&&c.isSpecial()||!t&&("?"==o||"#"==o)){if(".."===(s=Ka(s=l))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==o||"\\"==o&&c.isSpecial()||Ha(c.path,"")):ms(l)?"/"==o||"\\"==o&&c.isSpecial()||Ha(c.path,""):("file"==c.scheme&&!c.path.length&&ys(l)&&(c.host&&(c.host=""),l=Fa(l,0)+":"),Ha(c.path,l)),l="","file"==c.scheme&&(o==Pa||"?"==o||"#"==o))for(;c.path.length>1&&""===c.path[0];)$a(c.path);"?"==o?(c.query="",u=Ms):"#"==o&&(c.fragment="",u=Bs)}else l+=ps(o,ds);break;case qs:"?"==o?(c.query="",u=Ms):"#"==o?(c.fragment="",u=Bs):o!=Pa&&(c.path[0]+=ps(o,fs));break;case Ms:t||"#"!=o?o!=Pa&&("'"==o&&c.isSpecial()?c.query+="%27":c.query+="#"==o?"%23":ps(o,fs)):(c.fragment="",u=Bs);break;case Bs:o!=Pa&&(c.fragment+=ps(o,ls))}f++}},parseHost:function(e){var t,r,n;if("["==Fa(e,0)){if("]"!=Fa(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,r,n,o,i,a,s,c=[0,0,0,0,0,0,0,0],u=0,f=null,l=0,d=function(){return Fa(e,l)};if(":"==d()){if(":"!=Fa(e,1))return;l+=2,f=++u}for(;d();){if(8==u)return;if(":"!=d()){for(t=r=0;r<4&&Na(os,d());)t=16*t+qa(d(),16),l++,r++;if("."==d()){if(0==r)return;if(l-=r,u>6)return;for(n=0;d();){if(o=null,n>0){if(!("."==d()&&n<4))return;l++}if(!Na(es,d()))return;for(;Na(es,d());){if(i=qa(d(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;l++}c[u]=256*c[u]+o,2!=++n&&4!=n||u++}if(4!=n)return;break}if(":"==d()){if(l++,!d())return}else if(d())return;c[u++]=t}else{if(null!==f)return;l++,f=++u}}if(null!==f)for(a=u-f,u=7;0!=u&&a>0;)s=c[u],c[u--]=c[f+a-1],c[f+--a]=s;else if(8!=u)return;return c}(Ja(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],o=Ti(Pi(zi(e),bi,"."),".");for(t=0;t<o.length;t++)r=o[t],Si(n,xi(mi,r)?"xn--"+ji(r):r);return Ci(n,".")}(e),Na(is,e))return"Invalid host";if(null===(t=function(e){var t,r,n,o,i,a,s,c=Ya(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(o=c[n]))return e;if(i=10,o.length>1&&"0"==Fa(o,0)&&(i=Na(ts,o)?16:8,o=Ja(o,8==i?1:2)),""===o)a=0;else{if(!Na(10==i?ns:8==i?rs:os,o))return e;a=qa(o,i)}Ha(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=Ba(256,5-t))return null}else if(a>255)return null;for(s=Ga(r),n=0;n<r.length;n++)s+=r[n]*Ba(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(Na(as,e))return"Invalid host";for(t="",r=vi(e),n=0;n<r.length;n++)t+=ps(r[n],fs);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return ae(gs,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&ys(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,o=e.host,i=e.port,a=e.path,s=e.query,c=e.fragment,u=t+":";return null!==o?(u+="//",e.includesCredentials()&&(u+=r+(n?":"+n:"")+"@"),u+=us(o),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+Wa(a,"/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},setHref:function(e){var t=this.parse(e);if(t)throw La(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Ns(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+us(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Xt(e)+":",bs)},getUsername:function(){return this.username},setUsername:function(e){var t=vi(Xt(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=ps(t[r],hs)}},getPassword:function(){return this.password},setPassword:function(e){var t=vi(Xt(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=ps(t[r],hs)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?us(e):us(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Ts)},getHostname:function(){var e=this.host;return null===e?"":us(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,zs)},getPort:function(){var e=this.port;return null===e?"":Xt(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Xt(e))?this.port=null:this.parse(e,Es))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Wa(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Us))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Xt(e))?this.query=null:("?"==Fa(e,0)&&(e=Ja(e,1)),this.query="",this.parse(e,Ms)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Xt(e))?("#"==Fa(e,0)&&(e=Ja(e,1)),this.fragment="",this.parse(e,Bs)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Ns=function(e){var t=ri(this,Ws),r=Ui(arguments.length,1)>1?arguments[1]:void 0,n=Ea(t,new Fs(e,!1,r));f||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},Ws=Ns.prototype,Ds=function(e,t){return{get:function(){return Aa(this)[e]()},set:t&&function(e){return Aa(this)[t](e)},configurable:!0,enumerable:!0}};if(f&&(ei(Ws,"href",Ds("serialize","setHref")),ei(Ws,"origin",Ds("getOrigin")),ei(Ws,"protocol",Ds("getProtocol","setProtocol")),ei(Ws,"username",Ds("getUsername","setUsername")),ei(Ws,"password",Ds("getPassword","setPassword")),ei(Ws,"host",Ds("getHost","setHost")),ei(Ws,"hostname",Ds("getHostname","setHostname")),ei(Ws,"port",Ds("getPort","setPort")),ei(Ws,"pathname",Ds("getPathname","setPathname")),ei(Ws,"search",Ds("getSearch","setSearch")),ei(Ws,"searchParams",Ds("getSearchParams")),ei(Ws,"hash",Ds("getHash","setHash"))),ot(Ws,"toJSON",(function(){return Aa(this).serialize()}),{enumerable:!0}),ot(Ws,"toString",(function(){return Aa(this).serialize()}),{enumerable:!0}),Ua){var Gs=Ua.createObjectURL,Hs=Ua.revokeObjectURL;Gs&&ot(Ns,"createObjectURL",kr(Gs,Ua)),Hs&&ot(Ns,"revokeObjectURL",kr(Hs,Ua))}br(Ns,"URL"),Ut({global:!0,constructor:!0,forced:!Zo,sham:!f},{URL:Ns});var Vs,$s,Ys=c.RegExp,Js=u((function(){var e=Ys("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Ks=Js||u((function(){return!Ys("a","y").sticky})),Qs={BROKEN_CARET:Js||u((function(){var e=Ys("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Ks,UNSUPPORTED_Y:Js},Xs=c.RegExp,Zs=u((function(){var e=Xs(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),ec=c.RegExp,tc=u((function(){var e=ec("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),rc=rt.get,nc=re("native-string-replace",String.prototype.replace),oc=RegExp.prototype.exec,ic=oc,ac=x("".charAt),sc=x("".indexOf),cc=x("".replace),uc=x("".slice),fc=($s=/b*/g,h(oc,Vs=/a/,"a"),h(oc,$s,"a"),0!==Vs.lastIndex||0!==$s.lastIndex),lc=Qs.BROKEN_CARET,dc=void 0!==/()??/.exec("")[1];(fc||dc||lc||Zs||tc)&&(ic=function(e){var t,r,n,o,i,a,s,c=this,u=rc(c),f=Xt(e),l=u.raw;if(l)return l.lastIndex=c.lastIndex,t=h(ic,l,f),c.lastIndex=l.lastIndex,t;var d=u.groups,p=lc&&c.sticky,g=h(Xn,c),y=c.source,v=0,m=f;if(p&&(g=cc(g,"y",""),-1===sc(g,"g")&&(g+="g"),m=uc(f,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==ac(f,c.lastIndex-1))&&(y="(?: "+y+")",m=" "+m,v++),r=new RegExp("^(?:"+y+")",g)),dc&&(r=new RegExp("^"+y+"$(?!\\s)",g)),fc&&(n=c.lastIndex),o=h(oc,p?r:c,m),p?o?(o.input=uc(o.input,v),o[0]=uc(o[0],v),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:fc&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),dc&&o&&o.length>1&&h(nc,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&d)for(o.groups=a=ar(null),i=0;i<d.length;i++)a[(s=d[i])[0]]=o[s[1]];return o});var hc=ic;Ut({target:"RegExp",proto:!0,forced:/./.exec!==hc},{exec:hc});var pc=ge("species"),gc=RegExp.prototype,yc=function(e,t,r,n){var o=ge(e),i=!u((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!u((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[pc]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return t=!0,null},r[o](""),!t}));if(!i||!a||r){var s=x(/./[o]),c=t(o,""[e],(function(e,t,r,n,o){var a=x(e),c=t.exec;return c===hc||c===gc.exec?i&&!o?{done:!0,value:s(t,r,n)}:{done:!0,value:a(r,t,n)}:{done:!1}}));ot(String.prototype,e,c[0]),ot(gc,o,c[1])}n&&Re(gc[o],"sham",!0)},vc=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},mc=TypeError,bc=function(e,t){var r=e.exec;if(A(r)){var n=h(r,e,t);return null!==n&&Te(n),n}if("RegExp"===O(e))return h(hc,e,t);throw mc("RegExp#exec called on incompatible receiver")};yc("search",(function(e,t,r){return[function(t){var r=z(this),n=null==t?void 0:Q(t,e);return n?h(n,t,r):new RegExp(t)[e](Xt(r))},function(e){var n=Te(this),o=Xt(e),i=r(t,n,o);if(i.done)return i.value;var a=n.lastIndex;vc(a,0)||(n.lastIndex=0);var s=bc(n,o);return vc(n.lastIndex,a)||(n.lastIndex=a),null===s?-1:s.index}]}));var wc=qr.map,kc=Un("map");Ut({target:"Array",proto:!0,forced:!kc},{map:function(e){return wc(this,e,arguments.length>1?arguments[1]:void 0)}});var xc=ge("iterator"),_c=!1;try{var Ic=0,Oc={next:function(){return{done:!!Ic++}},return:function(){_c=!0}};Oc[xc]=function(){return this},Array.from(Oc,(function(){throw 2}))}catch(e){}var Cc,Sc,Pc,Tc=function(e,t){if(!t&&!_c)return!1;var r=!1;try{var n={};n[xc]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},zc="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Ec=je.f,Ac=rt.enforce,jc=rt.get,Rc=c.Int8Array,Uc=Rc&&Rc.prototype,Lc=c.Uint8ClampedArray,qc=Lc&&Lc.prototype,Mc=Rc&&vo(Rc),Bc=Uc&&vo(Uc),Fc=Object.prototype,Nc=c.TypeError,Wc=ge("toStringTag"),Dc=fe("TYPED_ARRAY_TAG"),Gc=zc&&!!Co&&"Opera"!==Kt(c.opera),Hc=!1,Vc={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},$c={BigInt64Array:8,BigUint64Array:8},Yc=function(e){var t=vo(e);if(j(t)){var r=jc(t);return r&&ae(r,"TypedArrayConstructor")?r.TypedArrayConstructor:Yc(t)}},Jc=function(e){if(!j(e))return!1;var t=Kt(e);return ae(Vc,t)||ae($c,t)};for(Cc in Vc)(Pc=(Sc=c[Cc])&&Sc.prototype)?Ac(Pc).TypedArrayConstructor=Sc:Gc=!1;for(Cc in $c)(Pc=(Sc=c[Cc])&&Sc.prototype)&&(Ac(Pc).TypedArrayConstructor=Sc);if((!Gc||!A(Mc)||Mc===Function.prototype)&&(Mc=function(){throw Nc("Incorrect invocation")},Gc))for(Cc in Vc)c[Cc]&&Co(c[Cc],Mc);if((!Gc||!Bc||Bc===Fc)&&(Bc=Mc.prototype,Gc))for(Cc in Vc)c[Cc]&&Co(c[Cc].prototype,Bc);if(Gc&&vo(qc)!==Bc&&Co(qc,Bc),f&&!ae(Bc,Wc))for(Cc in Hc=!0,Ec(Bc,Wc,{get:function(){return j(this)?this[Dc]:void 0}}),Vc)c[Cc]&&Re(c[Cc],Dc,Cc);var Kc={NATIVE_ARRAY_BUFFER_VIEWS:Gc,TYPED_ARRAY_TAG:Hc&&Dc,aTypedArray:function(e){if(Jc(e))return e;throw Nc("Target is not a typed array")},aTypedArrayConstructor:function(e){if(A(e)&&(!Co||L(Mc,e)))return e;throw Nc(Y(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(f){if(r)for(var o in Vc){var i=c[o];if(i&&ae(i.prototype,e))try{delete i.prototype[e]}catch(r){try{i.prototype[e]=t}catch(e){}}}Bc[e]&&!r||ot(Bc,e,r?t:Gc&&Uc[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,o;if(f){if(Co){if(r)for(n in Vc)if((o=c[n])&&ae(o,e))try{delete o[e]}catch(e){}if(Mc[e]&&!r)return;try{return ot(Mc,e,r?t:Gc&&Mc[e]||t)}catch(e){}}for(n in Vc)!(o=c[n])||o[e]&&!r||ot(o,e,t)}},getTypedArrayConstructor:Yc,isView:function(e){if(!j(e))return!1;var t=Kt(e);return"DataView"===t||ae(Vc,t)||ae($c,t)},isTypedArray:Jc,TypedArray:Mc,TypedArrayPrototype:Bc},Qc=Kc.NATIVE_ARRAY_BUFFER_VIEWS,Xc=c.ArrayBuffer,Zc=c.Int8Array,eu=!Qc||!u((function(){Zc(1)}))||!u((function(){new Zc(-1)}))||!Tc((function(e){new Zc,new Zc(null),new Zc(1.5),new Zc(e)}),!0)||u((function(){return 1!==new Zc(new Xc(2),1,void 0).length})),tu=RangeError,ru=function(e){if(void 0===e)return 0;var t=ct(e),r=ht(t);if(t!==r)throw tu("Wrong length or index");return r},nu=Array,ou=Math.abs,iu=Math.pow,au=Math.floor,su=Math.log,cu=Math.LN2,uu=function(e,t,r){var n,o,i,a=nu(r),s=8*r-t-1,c=(1<<s)-1,u=c>>1,f=23===t?iu(2,-24)-iu(2,-77):0,l=e<0||0===e&&1/e<0?1:0,d=0;for((e=ou(e))!=e||e===1/0?(o=e!=e?1:0,n=c):(n=au(su(e)/cu),e*(i=iu(2,-n))<1&&(n--,i*=2),(e+=n+u>=1?f/i:f*iu(2,1-u))*i>=2&&(n++,i/=2),n+u>=c?(o=0,n=c):n+u>=1?(o=(e*i-1)*iu(2,t),n+=u):(o=e*iu(2,u-1)*iu(2,t),n=0));t>=8;)a[d++]=255&o,o/=256,t-=8;for(n=n<<t|o,s+=t;s>0;)a[d++]=255&n,n/=256,s-=8;return a[--d]|=128*l,a},fu=function(e,t){var r,n=e.length,o=8*n-t-1,i=(1<<o)-1,a=i>>1,s=o-7,c=n-1,u=e[c--],f=127&u;for(u>>=7;s>0;)f=256*f+e[c--],s-=8;for(r=f&(1<<-s)-1,f>>=-s,s+=t;s>0;)r=256*r+e[c--],s-=8;if(0===f)f=1-a;else{if(f===i)return r?NaN:u?-1/0:1/0;r+=iu(2,t),f-=a}return(u?-1:1)*r*iu(2,f-t)},lu=function(e){for(var t=oe(this),r=pt(t),n=arguments.length,o=lt(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,a=void 0===i?r:lt(i,r);a>o;)t[o++]=e;return t},du=xt.f,hu=je.f,pu=Me.PROPER,gu=Me.CONFIGURABLE,yu=rt.get,vu=rt.set,mu=c.ArrayBuffer,bu=mu,wu=bu&&bu.prototype,ku=c.DataView,xu=ku&&ku.prototype,_u=Object.prototype,Iu=c.Array,Ou=c.RangeError,Cu=x(lu),Su=x([].reverse),Pu=uu,Tu=fu,zu=function(e){return[255&e]},Eu=function(e){return[255&e,e>>8&255]},Au=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},ju=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Ru=function(e){return Pu(e,23,4)},Uu=function(e){return Pu(e,52,8)},Lu=function(e,t){hu(e.prototype,t,{get:function(){return yu(this)[t]}})},qu=function(e,t,r,n){var o=ru(r),i=yu(e);if(o+t>i.byteLength)throw Ou("Wrong index");var a=yu(i.buffer).bytes,s=o+i.byteOffset,c=fr(a,s,s+t);return n?c:Su(c)},Mu=function(e,t,r,n,o,i){var a=ru(r),s=yu(e);if(a+t>s.byteLength)throw Ou("Wrong index");for(var c=yu(s.buffer).bytes,u=a+s.byteOffset,f=n(+o),l=0;l<t;l++)c[u+l]=f[i?l:t-l-1]};if(zc){var Bu=pu&&"ArrayBuffer"!==mu.name;if(u((function(){mu(1)}))&&u((function(){new mu(-1)}))&&!u((function(){return new mu,new mu(1.5),new mu(NaN),Bu&&!gu})))Bu&&gu&&Re(mu,"name","ArrayBuffer");else{(bu=function(e){return ri(this,wu),new mu(ru(e))}).prototype=wu;for(var Fu,Nu=du(mu),Wu=0;Nu.length>Wu;)(Fu=Nu[Wu++])in bu||Re(bu,Fu,mu[Fu]);wu.constructor=bu}Co&&vo(xu)!==_u&&Co(xu,_u);var Du=new ku(new bu(2)),Gu=x(xu.setInt8);Du.setInt8(0,2147483648),Du.setInt8(1,2147483649),!Du.getInt8(0)&&Du.getInt8(1)||Li(xu,{setInt8:function(e,t){Gu(this,e,t<<24>>24)},setUint8:function(e,t){Gu(this,e,t<<24>>24)}},{unsafe:!0})}else wu=(bu=function(e){ri(this,wu);var t=ru(e);vu(this,{bytes:Cu(Iu(t),0),byteLength:t}),f||(this.byteLength=t)}).prototype,xu=(ku=function(e,t,r){ri(this,xu),ri(e,wu);var n=yu(e).byteLength,o=ct(t);if(o<0||o>n)throw Ou("Wrong offset");if(o+(r=void 0===r?n-o:ht(r))>n)throw Ou("Wrong length");vu(this,{buffer:e,byteLength:r,byteOffset:o}),f||(this.buffer=e,this.byteLength=r,this.byteOffset=o)}).prototype,f&&(Lu(bu,"byteLength"),Lu(ku,"buffer"),Lu(ku,"byteLength"),Lu(ku,"byteOffset")),Li(xu,{getInt8:function(e){return qu(this,1,e)[0]<<24>>24},getUint8:function(e){return qu(this,1,e)[0]},getInt16:function(e){var t=qu(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=qu(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return ju(qu(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return ju(qu(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Tu(qu(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Tu(qu(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Mu(this,1,e,zu,t)},setUint8:function(e,t){Mu(this,1,e,zu,t)},setInt16:function(e,t){Mu(this,2,e,Eu,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Mu(this,2,e,Eu,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Mu(this,4,e,Au,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Mu(this,4,e,Au,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Mu(this,4,e,Ru,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Mu(this,8,e,Uu,t,arguments.length>2?arguments[2]:void 0)}});br(bu,"ArrayBuffer"),br(ku,"DataView");var Hu={ArrayBuffer:bu,DataView:ku},Vu=Math.floor,$u=Number.isInteger||function(e){return!j(e)&&isFinite(e)&&Vu(e)===e},Yu=RangeError,Ju=RangeError,Ku=function(e,t){var r=function(e){var t=ct(e);if(t<0)throw Yu("The argument can't be less than 0");return t}(e);if(r%t)throw Ju("Wrong offset");return r},Qu=TypeError,Xu=function(e){if(Er(e))return e;throw Qu(Y(e)+" is not a constructor")},Zu=Kc.aTypedArrayConstructor,ef=function(e){var t,r,n,o,i,a,s=Xu(this),c=oe(e),u=arguments.length,f=u>1?arguments[1]:void 0,l=void 0!==f,d=hi(c);if(d&&!li(d))for(a=(i=gi(c,d)).next,c=[];!(o=h(a,i)).done;)c.push(o.value);for(l&&u>2&&(f=kr(f,arguments[2])),r=pt(c),n=new(Zu(s))(r),t=0;r>t;t++)n[t]=l?f(c[t],t):c[t];return n},tf=ge("species"),rf=function(e){var t=U(e),r=je.f;f&&t&&!t[tf]&&r(t,tf,{configurable:!0,get:function(){return this}})};o((function(e){var t=xt.f,r=qr.forEach,n=rt.get,o=rt.set,i=rt.enforce,a=je.f,s=Oe.f,u=Math.round,l=c.RangeError,d=Hu.ArrayBuffer,p=d.prototype,g=Hu.DataView,y=Kc.NATIVE_ARRAY_BUFFER_VIEWS,m=Kc.TYPED_ARRAY_TAG,b=Kc.TypedArray,w=Kc.TypedArrayPrototype,k=Kc.aTypedArrayConstructor,x=Kc.isTypedArray,_=function(e,t){k(e);for(var r=0,n=t.length,o=new e(n);n>r;)o[r]=t[r++];return o},I=function(e,t){a(e,t,{get:function(){return n(this)[t]}})},O=function(e){var t;return L(p,e)||"ArrayBuffer"==(t=Kt(e))||"SharedArrayBuffer"==t},C=function(e,t){return x(e)&&!V(t)&&t in e&&$u(+t)&&t>=0},S=function(e,t){return t=be(t),C(e,t)?v(2,e[t]):s(e,t)},P=function(e,t,r){return t=be(t),!(C(e,t)&&j(r)&&ae(r,"value"))||ae(r,"get")||ae(r,"set")||r.configurable||ae(r,"writable")&&!r.writable||ae(r,"enumerable")&&!r.enumerable?a(e,t,r):(e[t]=r.value,e)};f?(y||(Oe.f=S,je.f=P,I(w,"buffer"),I(w,"byteOffset"),I(w,"byteLength"),I(w,"length")),Ut({target:"Object",stat:!0,forced:!y},{getOwnPropertyDescriptor:S,defineProperty:P}),e.exports=function(e,s,f){var p=e.match(/\d+$/)[0]/8,v=e+(f?"Clamped":"")+"Array",k="get"+e,I="set"+e,C=c[v],S=C,P=S&&S.prototype,T={},z=function(e,t){a(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[k](t*p+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var o=n(e);f&&(r=(r=u(r))<0?0:r>255?255:255&r),o.view[I](t*p+o.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};y?eu&&(S=s((function(e,t,r,n){return ri(e,P),function(e,t,r){var n,o;return Co&&A(n=t.constructor)&&n!==r&&j(o=n.prototype)&&o!==r.prototype&&Co(e,o),e}(j(t)?O(t)?void 0!==n?new C(t,Ku(r,p),n):void 0!==r?new C(t,Ku(r,p)):new C(t):x(t)?_(S,t):h(ef,S,t):new C(ru(t)),e,S)})),Co&&Co(S,b),r(t(C),(function(e){e in S||Re(S,e,C[e])})),S.prototype=P):(S=s((function(e,t,r,n){ri(e,P);var i,a,s,c=0,u=0;if(j(t)){if(!O(t))return x(t)?_(S,t):h(ef,S,t);i=t,u=Ku(r,p);var f=t.byteLength;if(void 0===n){if(f%p)throw l("Wrong length");if((a=f-u)<0)throw l("Wrong length")}else if((a=ht(n)*p)+u>f)throw l("Wrong length");s=a/p}else s=ru(t),i=new d(a=s*p);for(o(e,{buffer:i,byteOffset:u,byteLength:a,length:s,view:new g(i)});c<s;)z(e,c++)})),Co&&Co(S,b),P=S.prototype=ar(w)),P.constructor!==S&&Re(P,"constructor",S),i(P).TypedArrayConstructor=S,m&&Re(P,m,v);var E=S!=C;T[v]=S,Ut({global:!0,constructor:!0,forced:E,sham:!y},T),"BYTES_PER_ELEMENT"in S||Re(S,"BYTES_PER_ELEMENT",p),"BYTES_PER_ELEMENT"in P||Re(P,"BYTES_PER_ELEMENT",p),rf(v)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var nf=TypeError,of=function(e,t){if(!delete e[t])throw nf("Cannot delete property "+Y(t)+" of "+Y(e))},af=Math.min,sf=x([].copyWithin||function(e,t){var r=oe(this),n=pt(r),o=lt(e,n),i=lt(t,n),a=arguments.length>2?arguments[2]:void 0,s=af((void 0===a?n:lt(a,n))-i,n-o),c=1;for(i<o&&o<i+s&&(c=-1,i+=s-1,o+=s-1);s-- >0;)i in r?r[o]=r[i]:of(r,o),o+=c,i+=c;return r}),cf=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("copyWithin",(function(e,t){return sf(cf(this),e,t,arguments.length>2?arguments[2]:void 0)}));var uf=qr.every,ff=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("every",(function(e){return uf(ff(this),e,arguments.length>1?arguments[1]:void 0)}));var lf=TypeError,df=function(e){var t=me(e,"number");if("number"==typeof t)throw lf("Can't convert number to bigint");return BigInt(t)},hf=Kc.aTypedArray,pf=Kc.exportTypedArrayMethod,gf=x("".slice);pf("fill",(function(e){var t=arguments.length;hf(this);var r="Big"===gf(Kt(this),0,3)?df(e):+e;return h(lu,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),u((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var yf=ge("species"),vf=function(e,t){var r,n=Te(e).constructor;return void 0===n||null==(r=Te(n)[yf])?t:Xu(r)},mf=Kc.aTypedArrayConstructor,bf=Kc.getTypedArrayConstructor,wf=function(e){return mf(vf(e,bf(e)))},kf=function(e,t){return function(e,t){for(var r=0,n=pt(t),o=new e(n);n>r;)o[r]=t[r++];return o}(wf(e),t)},xf=qr.filter,_f=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("filter",(function(e){var t=xf(_f(this),e,arguments.length>1?arguments[1]:void 0);return kf(this,t)}));var If=qr.find,Of=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("find",(function(e){return If(Of(this),e,arguments.length>1?arguments[1]:void 0)}));var Cf=qr.findIndex,Sf=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("findIndex",(function(e){return Cf(Sf(this),e,arguments.length>1?arguments[1]:void 0)}));var Pf=qr.forEach,Tf=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("forEach",(function(e){Pf(Tf(this),e,arguments.length>1?arguments[1]:void 0)}));var zf=yt.includes,Ef=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("includes",(function(e){return zf(Ef(this),e,arguments.length>1?arguments[1]:void 0)}));var Af=yt.indexOf,jf=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("indexOf",(function(e){return Af(jf(this),e,arguments.length>1?arguments[1]:void 0)}));var Rf=ge("iterator"),Uf=c.Uint8Array,Lf=x(qo.values),qf=x(qo.keys),Mf=x(qo.entries),Bf=Kc.aTypedArray,Ff=Kc.exportTypedArrayMethod,Nf=Uf&&Uf.prototype,Wf=!u((function(){Nf[Rf].call([1])})),Df=!!Nf&&Nf.values&&Nf[Rf]===Nf.values&&"values"===Nf.values.name,Gf=function(){return Lf(Bf(this))};Ff("entries",(function(){return Mf(Bf(this))}),Wf),Ff("keys",(function(){return qf(Bf(this))}),Wf),Ff("values",Gf,Wf||!Df,{name:"values"}),Ff(Rf,Gf,Wf||!Df,{name:"values"});var Hf=Kc.aTypedArray,Vf=Kc.exportTypedArrayMethod,$f=x([].join);Vf("join",(function(e){return $f(Hf(this),e)}));var Yf=Math.min,Jf=[].lastIndexOf,Kf=!!Jf&&1/[1].lastIndexOf(1,-0)<0,Qf=Hn("lastIndexOf"),Xf=Kf||!Qf?function(e){if(Kf)return mn(Jf,this,arguments)||0;var t=E(this),r=pt(t),n=r-1;for(arguments.length>1&&(n=Yf(n,ct(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:Jf,Zf=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return mn(Xf,Zf(this),t>1?[e,arguments[1]]:[e])}));var el=qr.map,tl=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("map",(function(e){return el(tl(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(wf(e))(t)}))}));var rl=TypeError,nl=function(e){return function(t,r,n,o){K(r);var i=oe(t),a=P(i),s=pt(i),c=e?s-1:0,u=e?-1:1;if(n<2)for(;;){if(c in a){o=a[c],c+=u;break}if(c+=u,e?c<0:s<=c)throw rl("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=u)c in a&&(o=r(o,a[c],c,i));return o}},ol={left:nl(!1),right:nl(!0)},il=ol.left,al=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return il(al(this),e,t,t>1?arguments[1]:void 0)}));var sl=ol.right,cl=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return sl(cl(this),e,t,t>1?arguments[1]:void 0)}));var ul=Kc.aTypedArray,fl=Kc.exportTypedArrayMethod,ll=Math.floor;fl("reverse",(function(){for(var e,t=ul(this).length,r=ll(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var dl=c.RangeError,hl=c.Int8Array,pl=hl&&hl.prototype,gl=pl&&pl.set,yl=Kc.aTypedArray,vl=Kc.exportTypedArrayMethod,ml=!u((function(){var e=new Uint8ClampedArray(2);return h(gl,e,{length:1,0:3},1),3!==e[1]})),bl=ml&&Kc.NATIVE_ARRAY_BUFFER_VIEWS&&u((function(){var e=new hl(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));vl("set",(function(e){yl(this);var t=Ku(arguments.length>1?arguments[1]:void 0,1),r=oe(e);if(ml)return h(gl,this,r,t);var n=this.length,o=pt(r),i=0;if(o+t>n)throw dl("Wrong length");for(;i<o;)this[t+i]=r[i++]}),!ml||bl);var wl=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("slice",(function(e,t){for(var r=bn(wl(this),e,t),n=wf(this),o=0,i=r.length,a=new n(i);i>o;)a[o]=r[o++];return a}),u((function(){new Int8Array(1).slice()})));var kl=qr.some,xl=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("some",(function(e){return kl(xl(this),e,arguments.length>1?arguments[1]:void 0)}));var _l=q.match(/firefox\/(\d+)/i),Il=!!_l&&+_l[1],Ol=/MSIE|Trident/.test(q),Cl=q.match(/AppleWebKit\/(\d+)\./),Sl=!!Cl&&+Cl[1],Pl=Kc.aTypedArray,Tl=Kc.exportTypedArrayMethod,zl=c.Uint16Array,El=zl&&x(zl.prototype.sort),Al=!(!El||u((function(){El(new zl(2),null)}))&&u((function(){El(new zl(2),{})}))),jl=!!El&&!u((function(){if(W)return W<74;if(Il)return Il<67;if(Ol)return!0;if(Sl)return Sl<602;var e,t,r=new zl(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(El(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));Tl("sort",(function(e){return void 0!==e&&K(e),jl?El(this,e):Ni(Pl(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!jl||Al);var Rl=c.Int8Array,Ul=Kc.aTypedArray,Ll=Kc.exportTypedArrayMethod,ql=[].toLocaleString,Ml=!!Rl&&u((function(){ql.call(new Rl(1))}));Ll("toLocaleString",(function(){return mn(ql,Ml?bn(Ul(this)):Ul(this),bn(arguments))}),u((function(){return[1,2].toLocaleString()!=new Rl([1,2]).toLocaleString()}))||!u((function(){Rl.prototype.toLocaleString.call([1,2])})));var Bl=Kc.exportTypedArrayMethod,Fl=c.Uint8Array,Nl=Fl&&Fl.prototype||{},Wl=[].toString,Dl=x([].join);u((function(){Wl.call({})}))&&(Wl=function(){return Dl(this)});var Gl=Nl.toString!=Wl;Bl("toString",Wl,Gl);var Hl=Do.charAt,Vl=function(e,t,r){return t+(r?Hl(e,t).length:1)},$l=Math.floor,Yl=x("".charAt),Jl=x("".replace),Kl=x("".slice),Ql=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Xl=/\$([$&'`]|\d{1,2})/g,Zl=function(e,t,r,n,o,i){var a=r+e.length,s=n.length,c=Xl;return void 0!==o&&(o=oe(o),c=Ql),Jl(i,c,(function(i,c){var u;switch(Yl(c,0)){case"$":return"$";case"&":return e;case"`":return Kl(t,0,r);case"'":return Kl(t,a);case"<":u=o[Kl(c,1,-1)];break;default:var f=+c;if(0===f)return i;if(f>s){var l=$l(f/10);return 0===l?i:l<=s?void 0===n[l-1]?Yl(c,1):n[l-1]+Yl(c,1):i}u=n[f-1]}return void 0===u?"":u}))},ed=ge("replace"),td=Math.max,rd=Math.min,nd=x([].concat),od=x([].push),id=x("".indexOf),ad=x("".slice),sd="$0"==="a".replace(/./,"$0"),cd=!!/./[ed]&&""===/./[ed]("a","$0");yc("replace",(function(e,t,r){var n=cd?"$":"$0";return[function(e,r){var n=z(this),o=null==e?void 0:Q(e,ed);return o?h(o,e,n,r):h(t,Xt(n),e,r)},function(e,o){var i=Te(this),a=Xt(e);if("string"==typeof o&&-1===id(o,n)&&-1===id(o,"$<")){var s=r(t,i,a,o);if(s.done)return s.value}var c=A(o);c||(o=Xt(o));var u=i.global;if(u){var f=i.unicode;i.lastIndex=0}for(var l=[];;){var d=bc(i,a);if(null===d)break;if(od(l,d),!u)break;""===Xt(d[0])&&(i.lastIndex=Vl(a,ht(i.lastIndex),f))}for(var h,p="",g=0,y=0;y<l.length;y++){for(var v=Xt((d=l[y])[0]),m=td(rd(ct(d.index),a.length),0),b=[],w=1;w<d.length;w++)od(b,void 0===(h=d[w])?h:String(h));var k=d.groups;if(c){var x=nd([v],b,m,a);void 0!==k&&od(x,k);var _=Xt(mn(o,void 0,x))}else _=Zl(v,a,m,b,k,o);m>=g&&(p+=ad(a,g,m)+_,g=m+v.length)}return p+ad(a,g)}]}),!!u((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!sd||cd);var ud,fd,ld,dd,hd="process"==O(c.process),pd=/(?:ipad|iphone|ipod).*applewebkit/i.test(q),gd=c.setImmediate,yd=c.clearImmediate,vd=c.process,md=c.Dispatch,bd=c.Function,wd=c.MessageChannel,kd=c.String,xd=0,_d={};try{ud=c.location}catch(e){}var Id=function(e){if(ae(_d,e)){var t=_d[e];delete _d[e],t()}},Od=function(e){return function(){Id(e)}},Cd=function(e){Id(e.data)},Sd=function(e){c.postMessage(kd(e),ud.protocol+"//"+ud.host)};gd&&yd||(gd=function(e){Ui(arguments.length,1);var t=A(e)?e:bd(e),r=bn(arguments,1);return _d[++xd]=function(){mn(t,void 0,r)},fd(xd),xd},yd=function(e){delete _d[e]},hd?fd=function(e){vd.nextTick(Od(e))}:md&&md.now?fd=function(e){md.now(Od(e))}:wd&&!pd?(dd=(ld=new wd).port2,ld.port1.onmessage=Cd,fd=kr(dd.postMessage,dd)):c.addEventListener&&A(c.postMessage)&&!c.importScripts&&ud&&"file:"!==ud.protocol&&!u(Sd)?(fd=Sd,c.addEventListener("message",Cd,!1)):fd="onreadystatechange"in xe("script")?function(e){er.appendChild(xe("script")).onreadystatechange=function(){er.removeChild(this),Id(e)}}:function(e){setTimeout(Od(e),0)});var Pd,Td,zd,Ed,Ad,jd,Rd,Ud,Ld={set:gd,clear:yd},qd=/ipad|iphone|ipod/i.test(q)&&void 0!==c.Pebble,Md=/web0s(?!.*chrome)/i.test(q),Bd=Oe.f,Fd=Ld.set,Nd=c.MutationObserver||c.WebKitMutationObserver,Wd=c.document,Dd=c.process,Gd=c.Promise,Hd=Bd(c,"queueMicrotask"),Vd=Hd&&Hd.value;Vd||(Pd=function(){var e,t;for(hd&&(e=Dd.domain)&&e.exit();Td;){t=Td.fn,Td=Td.next;try{t()}catch(e){throw Td?Ed():zd=void 0,e}}zd=void 0,e&&e.enter()},pd||hd||Md||!Nd||!Wd?!qd&&Gd&&Gd.resolve?((Rd=Gd.resolve(void 0)).constructor=Gd,Ud=kr(Rd.then,Rd),Ed=function(){Ud(Pd)}):hd?Ed=function(){Dd.nextTick(Pd)}:(Fd=kr(Fd,c),Ed=function(){Fd(Pd)}):(Ad=!0,jd=Wd.createTextNode(""),new Nd(Pd).observe(jd,{characterData:!0}),Ed=function(){jd.data=Ad=!Ad}));var $d=Vd||function(e){var t={fn:e,next:void 0};zd&&(zd.next=t),Td||(Td=t,Ed()),zd=t},Yd=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Jd=function(){this.head=null,this.tail=null};Jd.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var Kd=Jd,Qd=c.Promise,Xd="object"==typeof window&&"object"!=typeof Deno;Qd&&Qd.prototype;var Zd,eh,th,rh=ge("species"),nh=!1,oh=A(c.PromiseRejectionEvent),ih={CONSTRUCTOR:jt("Promise",(function(){var e=De(Qd),t=e!==String(Qd);if(!t&&66===W)return!0;if(W>=51&&/native code/.test(e))return!1;var r=new Qd((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[rh]=n,!(nh=r.then((function(){}))instanceof n)||!t&&Xd&&!oh})),REJECTION_EVENT:oh,SUBCLASSING:nh},ah=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=K(t),this.reject=K(r)},sh={f:function(e){return new ah(e)}},ch=Ld.set,uh=ih.CONSTRUCTOR,fh=ih.REJECTION_EVENT,lh=ih.SUBCLASSING,dh=rt.getterFor("Promise"),hh=rt.set,ph=Qd&&Qd.prototype,gh=Qd,yh=ph,vh=c.TypeError,mh=c.document,bh=c.process,wh=sh.f,kh=wh,xh=!!(mh&&mh.createEvent&&c.dispatchEvent),_h=function(e){var t;return!(!j(e)||!A(t=e.then))&&t},Ih=function(e,t){var r,n,o,i=t.value,a=1==t.state,s=a?e.ok:e.fail,c=e.resolve,u=e.reject,f=e.domain;try{s?(a||(2===t.rejection&&Th(t),t.rejection=1),!0===s?r=i:(f&&f.enter(),r=s(i),f&&(f.exit(),o=!0)),r===e.promise?u(vh("Promise-chain cycle")):(n=_h(r))?h(n,r,c,u):c(r)):u(i)}catch(e){f&&!o&&f.exit(),u(e)}},Oh=function(e,t){e.notified||(e.notified=!0,$d((function(){for(var r,n=e.reactions;r=n.get();)Ih(r,e);e.notified=!1,t&&!e.rejection&&Sh(e)})))},Ch=function(e,t,r){var n,o;xh?((n=mh.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),c.dispatchEvent(n)):n={promise:t,reason:r},!fh&&(o=c["on"+e])?o(n):"unhandledrejection"===e&&function(e,t){var r=c.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},Sh=function(e){h(ch,c,(function(){var t,r=e.facade,n=e.value;if(Ph(e)&&(t=Yd((function(){hd?bh.emit("unhandledRejection",n,r):Ch("unhandledrejection",r,n)})),e.rejection=hd||Ph(e)?2:1,t.error))throw t.value}))},Ph=function(e){return 1!==e.rejection&&!e.parent},Th=function(e){h(ch,c,(function(){var t=e.facade;hd?bh.emit("rejectionHandled",t):Ch("rejectionhandled",t,e.value)}))},zh=function(e,t,r){return function(n){e(t,n,r)}},Eh=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Oh(e,!0))},Ah=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw vh("Promise can't be resolved itself");var n=_h(t);n?$d((function(){var r={done:!1};try{h(n,t,zh(Ah,r,e),zh(Eh,r,e))}catch(t){Eh(r,t,e)}})):(e.value=t,e.state=1,Oh(e,!1))}catch(t){Eh({done:!1},t,e)}}};if(uh&&(yh=(gh=function(e){ri(this,yh),K(e),h(Zd,this);var t=dh(this);try{e(zh(Ah,t),zh(Eh,t))}catch(e){Eh(t,e)}}).prototype,(Zd=function(e){hh(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Kd,rejection:!1,state:0,value:void 0})}).prototype=ot(yh,"then",(function(e,t){var r=dh(this),n=wh(vf(this,gh));return r.parent=!0,n.ok=!A(e)||e,n.fail=A(t)&&t,n.domain=hd?bh.domain:void 0,0==r.state?r.reactions.add(n):$d((function(){Ih(n,r)})),n.promise})),eh=function(){var e=new Zd,t=dh(e);this.promise=e,this.resolve=zh(Ah,t),this.reject=zh(Eh,t)},sh.f=wh=function(e){return e===gh||void 0===e?new eh(e):kh(e)},A(Qd)&&ph!==Object.prototype)){th=ph.then,lh||ot(ph,"then",(function(e,t){var r=this;return new gh((function(e,t){h(th,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete ph.constructor}catch(e){}Co&&Co(ph,yh)}Ut({global:!0,constructor:!0,wrap:!0,forced:uh},{Promise:gh}),br(gh,"Promise",!1),rf("Promise");var jh=TypeError,Rh=function(e,t){this.stopped=e,this.result=t},Uh=Rh.prototype,Lh=function(e,t,r){var n,o,i,a,s,c,u,f=r&&r.that,l=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),g=!(!r||!r.INTERRUPTED),y=kr(t,f),v=function(e){return n&&si(n,"normal",e),new Rh(!0,e)},m=function(e){return l?(Te(e),g?y(e[0],e[1],v):y(e[0],e[1])):g?y(e,v):y(e)};if(d)n=e.iterator;else if(p)n=e;else{if(!(o=hi(e)))throw jh(Y(e)+" is not iterable");if(li(o)){for(i=0,a=pt(e);a>i;i++)if((s=m(e[i]))&&L(Uh,s))return s;return new Rh(!1)}n=gi(e,o)}for(c=d?e.next:n.next;!(u=h(c,n)).done;){try{s=m(u.value)}catch(e){si(n,"throw",e)}if("object"==typeof s&&s&&L(Uh,s))return s}return new Rh(!1)},qh=ih.CONSTRUCTOR||!Tc((function(e){Qd.all(e).then(void 0,(function(){}))}));Ut({target:"Promise",stat:!0,forced:qh},{all:function(e){var t=this,r=sh.f(t),n=r.resolve,o=r.reject,i=Yd((function(){var r=K(t.resolve),i=[],a=0,s=1;Lh(e,(function(e){var c=a++,u=!1;s++,h(r,t,e).then((function(e){u||(u=!0,i[c]=e,--s||n(i))}),o)})),--s||n(i)}));return i.error&&o(i.value),r.promise}});var Mh=ih.CONSTRUCTOR,Bh=Qd&&Qd.prototype;if(Ut({target:"Promise",proto:!0,forced:Mh,real:!0},{catch:function(e){return this.then(void 0,e)}}),A(Qd)){var Fh=U("Promise").prototype.catch;Bh.catch!==Fh&&ot(Bh,"catch",Fh,{unsafe:!0})}Ut({target:"Promise",stat:!0,forced:qh},{race:function(e){var t=this,r=sh.f(t),n=r.reject,o=Yd((function(){var o=K(t.resolve);Lh(e,(function(e){h(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}}),Ut({target:"Promise",stat:!0,forced:ih.CONSTRUCTOR},{reject:function(e){var t=sh.f(this);return h(t.reject,void 0,e),t.promise}});var Nh=ih.CONSTRUCTOR;U("Promise"),Ut({target:"Promise",stat:!0,forced:Nh},{resolve:function(e){return function(e,t){if(Te(e),j(t)&&t.constructor===e)return t;var r=sh.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Ut({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Lh(e,(function(e,r){sr(t,e,r)}),{AS_ENTRIES:!0}),t}});var Wh=TypeError,Dh=function(e){if(e>9007199254740991)throw Wh("Maximum allowed index exceeded");return e},Gh=ge("isConcatSpreadable"),Hh=W>=51||!u((function(){var e=[];return e[Gh]=!1,e.concat()[0]!==e})),Vh=Un("concat"),$h=function(e){if(!j(e))return!1;var t=e[Gh];return void 0!==t?!!t:xr(e)};function Yh(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Jh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Qh(e){return function(e){if(Array.isArray(e))return Kh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Kh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Kh(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xh(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function Zh(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Xh(i,n,o,a,s,"next",e)}function s(e){Xh(i,n,o,a,s,"throw",e)}a(void 0)}))}}Ut({target:"Array",proto:!0,arity:1,forced:!Hh||!Vh},{concat:function(e){var t,r,n,o,i,a=oe(this),s=Rr(a,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if($h(i=-1===t?a:arguments[t]))for(o=pt(i),Dh(c+o),r=0;r<o;r++,c++)r in i&&sr(s,c,i[r]);else Dh(c+1),sr(s,c++,i);return s.length=c,s}});var ep=Object.prototype,tp=ep.hasOwnProperty,rp="function"==typeof Symbol?Symbol:{},np=rp.iterator||"@@iterator",op=rp.asyncIterator||"@@asyncIterator",ip=rp.toStringTag||"@@toStringTag";function ap(e,t,r,n){var o=t&&t.prototype instanceof up?t:up,i=Object.create(o.prototype),a=new xp(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return Ip()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=bp(a,r);if(s){if(s===cp)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=sp(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===cp)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,a),i}function sp(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var cp={};function up(){}function fp(){}function lp(){}var dp={};dp[np]=function(){return this};var hp=Object.getPrototypeOf,pp=hp&&hp(hp(_p([])));pp&&pp!==ep&&tp.call(pp,np)&&(dp=pp);var gp=lp.prototype=up.prototype=Object.create(dp);function yp(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function vp(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===fp||"GeneratorFunction"===(t.displayName||t.name))}function mp(e,t){var r;this._invoke=function(n,o){function i(){return new t((function(r,i){!function r(n,o,i,a){var s=sp(e[n],e,o);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&tp.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,a)}),(function(e){r("throw",e,i,a)})):t.resolve(u).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,a)}))}a(s.arg)}(n,o,r,i)}))}return r=r?r.then(i,i):i()}}function bp(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,bp(e,t),"throw"===t.method))return cp;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return cp}var n=sp(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,cp;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,cp):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,cp)}function wp(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function kp(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function xp(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(wp,this),this.reset(!0)}function _p(e){if(e){var t=e[np];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(tp.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:Ip}}function Ip(){return{value:void 0,done:!0}}fp.prototype=gp.constructor=lp,lp.constructor=fp,lp[ip]=fp.displayName="GeneratorFunction",yp(mp.prototype),mp.prototype[op]=function(){return this},yp(gp),gp[ip]="Generator",gp[np]=function(){return this},gp.toString=function(){return"[object Generator]"},xp.prototype={constructor:xp,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(kp),!e)for(var t in this)"t"===t.charAt(0)&&tp.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=tp.call(o,"catchLoc"),s=tp.call(o,"finallyLoc");if(a&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&tp.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,cp):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),cp},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),kp(r),cp}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;kp(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:_p(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),cp}};var Op,Cp={wrap:ap,isGeneratorFunction:vp,AsyncIterator:mp,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,lp):(e.__proto__=lp,ip in e||(e[ip]="GeneratorFunction")),e.prototype=Object.create(gp),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,o){void 0===o&&(o=Promise);var i=new mp(ap(e,t,r,n),o);return vp(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},keys:function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},values:_p},Sp=ge("match"),Pp=TypeError,Tp=function(e){if(function(e){var t;return j(e)&&(void 0!==(t=e[Sp])?!!t:"RegExp"==O(e))}(e))throw Pp("The method doesn't accept regular expressions");return e},zp=ge("match"),Ep=Oe.f,Ap=x("".startsWith),jp=x("".slice),Rp=Math.min,Up=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[zp]=!1,"/./"[e](t)}catch(e){}}return!1}("startsWith"),Lp=!(Up||(Op=Ep(String.prototype,"startsWith"),!Op||Op.writable));function qp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Bp(e,t,r){return t&&Mp(e.prototype,t),r&&Mp(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Np(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fp(Object(r),!0).forEach((function(t){Jh(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ut({target:"String",proto:!0,forced:!Lp&&!Up},{startsWith:function(e){var t=Xt(z(this));Tp(e);var r=ht(Rp(arguments.length>1?arguments[1]:void 0,t.length)),n=Xt(e);return Ap?Ap(t,n,r):jp(t,r,r+n.length)===n}});var Wp=Bp((function e(t){if(qp(this,e),Jh(this,"baseUri",void 0),Jh(this,"proxy",void 0),Jh(this,"headers",void 0),Jh(this,"parameters",void 0),Jh(this,"fetchOptions",void 0),Jh(this,"transformRequest",void 0),Jh(this,"throwOnBadResponse",void 0),this.headers=Np({},t.headers),this.parameters=Np({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Np({credentials:"omit"},t.fetchOptions),this.transformRequest=t.transformRequest||e.defaults.transformRequest,t.baseUri&&(this.baseUri=t.baseUri),t.proxy&&(this.proxy=t.proxy),this.throwOnBadResponse=!!t.throwOnBadResponse}));Jh(Wp,"defaults",{transformRequest:function(e,t){switch(t["Content-Type"]){case"application/json":return JSON.stringify(e);case"application/x-www-form-urlencoded":return new URLSearchParams(e);default:return e}}});var Dp=Function,Gp=x([].concat),Hp=x([].join),Vp={},$p=function(e,t,r){if(!ae(Vp,t)){for(var n=[],o=0;o<t;o++)n[o]="a["+o+"]";Vp[t]=Dp("C,a","return new C("+Hp(n,",")+")")}return Vp[t](e,r)},Yp=l?Dp.bind:function(e){var t=K(this),r=t.prototype,n=bn(arguments,1),o=function(){var r=Gp(n,bn(arguments));return this instanceof o?$p(t,r.length,r):t.apply(e,r)};return j(r)&&(o.prototype=r),o},Jp=U("Reflect","construct"),Kp=Object.prototype,Qp=[].push,Xp=u((function(){function e(){}return!(Jp((function(){}),[],e)instanceof e)})),Zp=!u((function(){Jp((function(){}))})),eg=Xp||Zp;function tg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rg(e,t){return(rg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ng(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rg(e,t)}function og(e,t){if(t&&("object"===Lt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return tg(e)}function ig(e){return(ig=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ag(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function sg(e,t,r){return(sg=ag()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&rg(o,r.prototype),o}).apply(null,arguments)}function cg(e){var t="function"==typeof Map?new Map:void 0;return(cg=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return sg(e,arguments,ig(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),rg(n,e)})(e)}function ug(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ig(e);if(t){var o=ig(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return og(this,r)}}Ut({target:"Reflect",stat:!0,forced:eg,sham:eg},{construct:function(e,t){Xu(e),Te(t);var r=arguments.length<3?e:Xu(arguments[2]);if(Zp&&!Xp)return Jp(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return mn(Qp,n,t),new(mn(Yp,e,n))}var o=r.prototype,i=ar(j(o)?o:Kp),a=mn(e,i,t);return j(a)?a:i}});var fg=function(e){ng(r,cg(Error));var t=ug(r);function r(e){var n;return qp(this,r),Jh(tg(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return Bp(r)}();function lg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lg(Object(r),!0).forEach((function(t){Jh(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lg(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var hg=function(){var e=Zh(Cp.mark((function e(t,r,n,o){var i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=dg(dg({},null==n?void 0:n.headers),null==r?void 0:r.headers),s=dg(dg({},null==n?void 0:n.fetchOptions),{},{headers:a,body:null==r?void 0:r.body,method:null!==(i=null==r?void 0:r.method)&&void 0!==i?i:"GET"}),e.next=4,fetch(t,s);case 4:if(c=e.sent,!o){e.next=7;break}return e.abrupt("return",c);case 7:if(null==n||!n.throwOnBadResponse||c.ok||304===c.status){e.next=11;break}throw new fg(c);case 11:return e.next=13,c.text();case 13:return u=e.sent,e.abrupt("return",u?JSON.parse(u):{});case 15:case"end":return e.stop()}}),e)})));return function(t,r,n,o){return e.apply(this,arguments)}}(),pg=function(e){return e.replace(/%/g,"%25").replace(/,/g,"%2C")};function gg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ig(e);if(t){var o=ig(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return og(this,r)}}yc("match",(function(e,t,r){return[function(t){var r=z(this),n=null==t?void 0:Q(t,e);return n?h(n,t,r):new RegExp(t)[e](Xt(r))},function(e){var n=Te(this),o=Xt(e),i=r(t,n,o);if(i.done)return i.value;if(!n.global)return bc(n,o);var a=n.unicode;n.lastIndex=0;for(var s,c=[],u=0;null!==(s=bc(n,o));){var f=Xt(s[0]);c[u]=f,""===f&&(n.lastIndex=Vl(o,ht(n.lastIndex),a)),u++}return 0===u?null:c}]}));var yg=function(e){ng(r,cg(URL));var t=gg(r);function r(e,n,o){var i;qp(this,r);var a={};return Object.keys((null==o?void 0:o.pathParams)||{}).forEach((function(e){var t,r=null==o||null===(t=o.pathParams)||void 0===t?void 0:t[e];r&&(a[e]=encodeURIComponent(r))})),(i=t.call(this,r.renderTemplateUri("".concat(n,"/").concat(e).replace(/\/\/+/g,"/"),a))).addQueryParams(null==o?void 0:o.queryParams),null!=o&&o.origin&&i.replaceOrigin(null==o?void 0:o.origin),i}return Bp(r,[{key:"replaceOrigin",value:function(e){var t=new URL(e);this.protocol=t.protocol,this.host=t.host,this.pathname="".concat(t.pathname,"/").concat(this.pathname).replace(/\/\/+/g,"/")}},{key:"addQueryParams",value:function(e){var t=this;e&&Object.keys(e).forEach((function(r){var n=e[r];if(Array.isArray(n))if("refine"===r)for(var o=0;o<n.length;o+=1)t.searchParams.append(r,String(n[o]));else t.searchParams.append(r,n.join());else t.searchParams.append(r,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,t){var r=t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e,n=/(\.|%2e|%2E|%252e|%252E)+(\/|%2f|%2F|%252f|%252F)+/g;return r.match(n)&&(console.warn("Path traversal attempt detected. Normalizing url"),r=r.replace(n,"")),r}}]),r}(),vg="commerce-sdk-isomorphic@4.0.0-nightly-20251013080807";function mg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function bg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mg(Object(r),!0).forEach((function(t){Jh(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mg(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var wg=function(){function e(t){qp(this,e),Jh(this,"clientConfig",void 0);var r=bg({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wp(r)}var t,r,n,o,i,a,s,c,u,f,l,d,h,p,g,y;return Bp(e,[{key:"authenticateCustomer",value:(y=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for authenticateCustomer: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:if(u=e.sent,!r){e.next=22;break}return e.abrupt("return",u);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"authorizeCustomer",value:(g=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(a={},void 0===n.redirect_uri){e.next=17;break}a.redirect_uri=n.redirect_uri,e.next=22;break;case 17:if(void 0===o.redirect_uri){e.next=21;break}a.redirect_uri=o.redirect_uri,e.next=22;break;case 21:throw new Error("Missing required query parameter: redirect_uri");case 22:if(void 0===n.response_type){e.next=26;break}a.response_type=n.response_type,e.next=31;break;case 26:if(void 0===o.response_type){e.next=30;break}a.response_type=o.response_type,e.next=31;break;case 30:throw new Error("Missing required query parameter: response_type");case 31:if(void 0===n.client_id){e.next=35;break}a.client_id=n.client_id,e.next=40;break;case 35:if(void 0===o.client_id){e.next=39;break}a.client_id=o.client_id,e.next=40;break;case 39:throw new Error("Missing required query parameter: client_id");case 40:return void 0!==n.scope?a.scope=n.scope:void 0!==o.scope&&(a.scope=o.scope),void 0!==n.state?a.state=n.state:void 0!==o.state&&(a.state=o.state),void 0!==n.usid?a.usid=n.usid:void 0!==o.usid&&(a.usid=o.usid),void 0!==n.hint?a.hint=n.hint:void 0!==o.hint&&(a.hint=o.hint),void 0!==n.channel_id?a.channel_id=n.channel_id:void 0!==o.channel_id&&(a.channel_id=o.channel_id),void 0!==n.code_challenge?a.code_challenge=n.code_challenge:void 0!==o.code_challenge&&(a.code_challenge=o.code_challenge),void 0!==n.ui_locales?a.ui_locales=n.ui_locales:void 0!==o.ui_locales&&(a.ui_locales=o.ui_locales),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for authorizeCustomer: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=53,hg(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 53:if(u=e.sent,!r){e.next=56;break}return e.abrupt("return",u);case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(p=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for authorizePasswordlessCustomer: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getAccessToken",value:(h=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getAccessToken: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getJwksUri",value:(d=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getJwksUri: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:function(){var e=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getPasswordLessAccessToken: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"getPasswordResetToken",value:(l=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getPasswordResetToken: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:if(u=e.sent,!r){e.next=22;break}return e.abrupt("return",u);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(f=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getSessionBridgeAccessToken: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(u=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getTrustedAgentAccessToken: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(c=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(a={},void 0===n.client_id){e.next=17;break}a.client_id=n.client_id,e.next=22;break;case 17:if(void 0===o.client_id){e.next=21;break}a.client_id=o.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.channel_id){e.next=26;break}a.channel_id=n.channel_id,e.next=31;break;case 26:if(void 0===o.channel_id){e.next=30;break}a.channel_id=o.channel_id,e.next=31;break;case 30:throw new Error("Missing required query parameter: channel_id");case 31:if(void 0!==n.code_challenge?a.code_challenge=n.code_challenge:void 0!==o.code_challenge&&(a.code_challenge=o.code_challenge),void 0===n.login_id){e.next=36;break}a.login_id=n.login_id,e.next=41;break;case 36:if(void 0===o.login_id){e.next=40;break}a.login_id=o.login_id,e.next=41;break;case 40:throw new Error("Missing required query parameter: login_id");case 41:if(void 0===n.idp_origin){e.next=45;break}a.idp_origin=n.idp_origin,e.next=50;break;case 45:if(void 0===o.idp_origin){e.next=49;break}a.idp_origin=o.idp_origin,e.next=50;break;case 49:throw new Error("Missing required query parameter: idp_origin");case 50:if(void 0===n.redirect_uri){e.next=54;break}a.redirect_uri=n.redirect_uri,e.next=59;break;case 54:if(void 0===o.redirect_uri){e.next=58;break}a.redirect_uri=o.redirect_uri,e.next=59;break;case 58:throw new Error("Missing required query parameter: redirect_uri");case 59:if(void 0===n.response_type){e.next=63;break}a.response_type=n.response_type,e.next=68;break;case 63:if(void 0===o.response_type){e.next=67;break}a.response_type=o.response_type,e.next=68;break;case 67:throw new Error("Missing required query parameter: response_type");case 68:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getTrustedAgentAuthorizationToken: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=74,hg(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 74:if(u=e.sent,!r){e.next=77;break}return e.abrupt("return",u);case 77:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(s=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getTrustedSystemAccessToken: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getUserInfo",value:(a=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},void 0!==n.channel_id?a.channel_id=n.channel_id:void 0!==o.channel_id&&(a.channel_id=o.channel_id),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getUserInfo: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=20,hg(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 20:return u=e.sent,e.abrupt("return",u);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(i=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getWellknownOpenidConfiguration: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"introspectToken",value:(o=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for introspectToken: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"logoutCustomer",value:(n=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(a={},void 0===n.client_id){e.next=17;break}a.client_id=n.client_id,e.next=22;break;case 17:if(void 0===o.client_id){e.next=21;break}a.client_id=o.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.refresh_token){e.next=26;break}a.refresh_token=n.refresh_token,e.next=31;break;case 26:if(void 0===o.refresh_token){e.next=30;break}a.refresh_token=o.refresh_token,e.next=31;break;case 30:throw new Error("Missing required query parameter: refresh_token");case 31:return void 0!==n.channel_id?a.channel_id=n.channel_id:void 0!==o.channel_id&&(a.channel_id=o.channel_id),void 0!==n.hint?a.hint=n.hint:void 0!==o.hint&&(a.hint=o.hint),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for logoutCustomer: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=39,hg(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 39:return u=e.sent,e.abrupt("return",u);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"resetPassword",value:(r=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for resetPassword: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:if(u=e.sent,!r){e.next=22;break}return e.abrupt("return",u);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"revokeToken",value:(t=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for revokeToken: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();Jh(wg,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1"),Jh(wg,"apiPaths",{authenticateCustomer:"/organizations/{organizationId}/oauth2/login",authorizeCustomer:"/organizations/{organizationId}/oauth2/authorize",authorizePasswordlessCustomer:"/organizations/{organizationId}/oauth2/passwordless/login",getAccessToken:"/organizations/{organizationId}/oauth2/token",getJwksUri:"/organizations/{organizationId}/oauth2/jwks",getPasswordLessAccessToken:"/organizations/{organizationId}/oauth2/passwordless/token",getPasswordResetToken:"/organizations/{organizationId}/oauth2/password/reset",getSessionBridgeAccessToken:"/organizations/{organizationId}/oauth2/session-bridge/token",getTrustedAgentAccessToken:"/organizations/{organizationId}/oauth2/trusted-agent/token",getTrustedAgentAuthorizationToken:"/organizations/{organizationId}/oauth2/trusted-agent/authorize",getTrustedSystemAccessToken:"/organizations/{organizationId}/oauth2/trusted-system/token",getUserInfo:"/organizations/{organizationId}/oauth2/userinfo",getWellknownOpenidConfiguration:"/organizations/{organizationId}/oauth2/.well-known/openid-configuration",introspectToken:"/organizations/{organizationId}/oauth2/introspect",logoutCustomer:"/organizations/{organizationId}/oauth2/logout",resetPassword:"/organizations/{organizationId}/oauth2/password/action",revokeToken:"/organizations/{organizationId}/oauth2/revoke"}),Jh(wg,"paramKeys",{authenticateCustomer:["organizationId","redirect_uri","channel_id","client_id","response_type","state","scope","usid","code_challenge"],authenticateCustomerRequired:["organizationId","redirect_uri","channel_id"],authorizeCustomer:["organizationId","redirect_uri","response_type","client_id","scope","state","usid","hint","channel_id","code_challenge","ui_locales"],authorizeCustomerRequired:["organizationId","redirect_uri","response_type","client_id"],authorizePasswordlessCustomer:["organizationId","user_id","mode","channel_id","locale","usid","callback_uri"],authorizePasswordlessCustomerRequired:["organizationId","user_id","mode","channel_id"],getAccessToken:["organizationId","grant_type","refresh_token","code","usid","redirect_uri","code_verifier","client_id","channel_id","dnt"],getAccessTokenRequired:["organizationId","grant_type"],getJwksUri:["organizationId"],getJwksUriRequired:["organizationId"],getPasswordLessAccessToken:["organizationId","grant_type","hint","pwdless_login_token","client_id","code_verifier"],getPasswordLessAccessTokenRequired:["organizationId","grant_type","hint","pwdless_login_token"],getPasswordResetToken:["organizationId","user_id","mode","channel_id","locale","client_id","code_challenge","callback_uri","idp_name","hint"],getPasswordResetTokenRequired:["organizationId","user_id","mode","channel_id"],getSessionBridgeAccessToken:["organizationId","code","client_id","channel_id","code_verifier","dwsid","grant_type","login_id","dwsgst","dwsrst","usid","dnt"],getSessionBridgeAccessTokenRequired:["organizationId","code","client_id","channel_id","code_verifier","dwsid","grant_type","login_id"],getTrustedAgentAccessToken:["organizationId","client_id","channel_id","code_verifier","grant_type","login_id","idp_origin","agent_id","usid","dnt","state"],getTrustedAgentAccessTokenRequired:["organizationId","client_id","channel_id","code_verifier","grant_type","login_id","idp_origin"],getTrustedAgentAuthorizationToken:["organizationId","client_id","channel_id","login_id","idp_origin","redirect_uri","response_type","code_challenge"],getTrustedAgentAuthorizationTokenRequired:["organizationId","client_id","channel_id","login_id","idp_origin","redirect_uri","response_type"],getTrustedSystemAccessToken:["organizationId","grant_type","hint","login_id","idp_origin","client_id","channel_id","usid","email_id","dnt"],getTrustedSystemAccessTokenRequired:["organizationId","grant_type","hint","login_id","idp_origin","client_id","channel_id"],getUserInfo:["organizationId","channel_id"],getUserInfoRequired:["organizationId"],getWellknownOpenidConfiguration:["organizationId"],getWellknownOpenidConfigurationRequired:["organizationId"],introspectToken:["organizationId","token","token_type_hint"],introspectTokenRequired:["organizationId","token"],logoutCustomer:["organizationId","client_id","refresh_token","channel_id","hint"],logoutCustomerRequired:["organizationId","client_id","refresh_token"],resetPassword:["organizationId","client_id","pwd_action_token","code_verifier","channel_id","new_password","hint"],resetPasswordRequired:["organizationId","client_id","pwd_action_token","code_verifier","channel_id"],revokeToken:["organizationId","token","token_type_hint"],revokeTokenRequired:["organizationId","token"]});var kg=["hint","redirectURI","usid"],xg=["hint","redirectURI","usid"],_g=["dnt","redirectURI","usid"];function Ig(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Og(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ig(Object(r),!0).forEach((function(t){Jh(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ig(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Cg=qt?btoa:function(e){return Buffer.from(e).toString("base64")},Sg=function(e){var t,r,n=new URL(e),o=new URLSearchParams(n.search),i=null!==(t=o.get("usid"))&&void 0!==t?t:"";return{code:null!==(r=o.get("code"))&&void 0!==r?r:"",usid:i}},Pg=function(){return n=r(String(+new Date),{entropy:!0}),e(t,128,(function(e){return new Uint8Array(e).map((function(){return 256*n()}))}))();var n},Tg=function(){var e=Zh(Cp.mark((function e(t){var r,n,o,i,a,s,c;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!qt||!window.crypto){e.next=12;break}return o=new TextEncoder,i=o.encode(t),e.next=7,window.crypto.subtle.digest("SHA-256",i);case 7:a=e.sent,s=btoa(String.fromCharCode.apply(String,Qh(new Uint8Array(a)))),n=r(s),e.next=16;break;case 12:return e.next=14,import("crypto");case 14:c=e.sent,n=r(c.default.createHash("sha256").update(t).digest("base64"));case 16:if(0!==n.length){e.next=18;break}throw new Error("Problem generating code challenge");case 18:return e.abrupt("return",n);case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function zg(e){return Eg.apply(this,arguments)}function Eg(){return(Eg=Zh(Cp.mark((function e(t){var r,n,o,i,a,s,c,u,f,l,d,h,p,g,y,v;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.slasClient,o=t.codeVerifier,i=t.parameters,a=t.privateClient,s={},void 0!==a&&a){e.next=6;break}return e.next=5,Tg(o);case 5:s.codeChallenge=e.sent;case 6:return(c=new wg(n.clientConfig)).clientConfig.fetchOptions=Og(Og({},n.clientConfig.fetchOptions),{},{redirect:qt?"follow":"manual"}),u=i.hint,f=i.redirectURI,l=i.usid,d=Yh(i,kg),h={parameters:Og(Og(Og(Og({},d),{},{client_id:n.clientConfig.parameters.clientId,channel_id:n.clientConfig.parameters.siteId},s.codeChallenge&&{code_challenge:s.codeChallenge}),u&&{hint:u}),{},{organizationId:n.clientConfig.parameters.organizationId,redirect_uri:f,response_type:"code"},l&&{usid:l})},e.next=12,c.authorizeCustomer(h,!0);case 12:if(p=e.sent,g=(null===(r=p.headers)||void 0===r?void 0:r.get("location"))||p.url,y=new URL(g),v=Object.fromEntries(y.searchParams.entries()),!(p.status>=400||v.error)){e.next=18;break}throw new fg(p);case 18:return e.abrupt("return",Og({url:g},Sg(g)));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ag(e){return jg.apply(this,arguments)}function jg(){return(jg=Zh(Cp.mark((function e(t){var r,n,o,i,a,s,c,u,f,l,d,h,p,g;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.slasClient,n=t.parameters,o=t.privateClient,i=void 0!==o&&o,a=n.hint,s=n.redirectURI,c=n.usid,u=Yh(n,xg),f=Pg(),l={},i){e.next=8;break}return e.next=7,Tg(f);case 7:l.codeChallenge=e.sent;case 8:return d=wg.apiPaths.authorizeCustomer,h={organizationId:r.clientConfig.parameters.organizationId,shortCode:r.clientConfig.parameters.shortCode},p=Og(Og(Og({},u),{},{client_id:r.clientConfig.parameters.clientId,channel_id:r.clientConfig.parameters.siteId},l.codeChallenge&&{code_challenge:l.codeChallenge}),{},{hint:a,redirect_uri:s,response_type:"code"},c&&{usid:c}),g=new yg(d,r.clientConfig.baseUri,{pathParams:h,queryParams:p,origin:r.clientConfig.proxy}),e.abrupt("return",{url:g.toString(),codeVerifier:f});case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Rg(e){return Ug.apply(this,arguments)}function Ug(){return(Ug=Zh(Cp.mark((function e(t){var r,n,o,i,a,s,c;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.slasClient,n=t.credentials,o=t.parameters,i=!!n.clientSecret,a=Og(Og(Og({client_id:r.clientConfig.parameters.clientId,channel_id:r.clientConfig.parameters.siteId,code:o.code,organizationId:r.clientConfig.parameters.organizationId},!i&&n.codeVerifier&&{code_verifier:n.codeVerifier}),{},{grant_type:i?"authorization_code":"authorization_code_pkce",redirect_uri:o.redirectURI},void 0!==o.dnt&&{dnt:o.dnt.toString()}),o.usid&&{usid:o.usid}),!n.clientSecret){e.next=7;break}return s="Basic ".concat(Cg("".concat(r.clientConfig.parameters.clientId,":").concat(n.clientSecret))),c={headers:{Authorization:s},body:a},e.abrupt("return",r.getAccessToken(c));case 7:return e.abrupt("return",r.getAccessToken({body:a}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Lg(e){return qg.apply(this,arguments)}function qg(){return(qg=Zh(Cp.mark((function e(t){var r,n,o,i,a;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.slasClient,n=t.parameters,o=t.credentials,r.clientConfig.parameters.siteId){e.next=3;break}throw new Error("Required argument channel_id is not provided through clientConfig.parameters.siteId");case 3:return i="Basic ".concat(Cg("".concat(r.clientConfig.parameters.clientId,":").concat(o.clientSecret))),a={headers:{Authorization:i},body:Og(Og({grant_type:"client_credentials",channel_id:r.clientConfig.parameters.siteId},n.usid&&{usid:n.usid}),void 0!==n.dnt&&{dnt:n.dnt.toString()})},e.abrupt("return",r.getAccessToken(a));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mg(e){return Bg.apply(this,arguments)}function Bg(){return(Bg=Zh(Cp.mark((function e(t){var r,n,o,i,a,s,c,u,f;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.slasClient,n=t.parameters,o=Pg(),i=n.dnt,a=n.redirectURI,s=n.usid,c=Yh(n,_g),e.next=5,zg({slasClient:r,codeVerifier:o,parameters:Og(Og({},c),{},{redirectURI:a,hint:"guest"},s&&{usid:s}),privateClient:!1});case 5:return u=e.sent,f=Og({client_id:r.clientConfig.parameters.clientId,channel_id:r.clientConfig.parameters.siteId,code:u.code,code_verifier:o,grant_type:"authorization_code_pkce",redirect_uri:a,usid:u.usid},void 0!==i&&{dnt:i.toString()}),e.abrupt("return",r.getAccessToken({body:f}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Fg(e){return Ng.apply(this,arguments)}function Ng(){return(Ng=Zh(Cp.mark((function e(t){var r,n,o,i,a,s,c,u,f,l,d,h,p,g,y,v,m,b,w,k,x;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.slasClient,o=t.credentials,i=t.parameters,a=t.body,s=Pg(),e.next=4,Tg(s);case 4:return c=e.sent,(u=new wg(n.clientConfig)).clientConfig.fetchOptions=Og(Og({},n.clientConfig.fetchOptions),{},{redirect:qt?"follow":"manual"}),f="Basic ".concat(Cg("".concat(o.username,":").concat(o.password))),l=i.dnt,d=i.usid,h=i.redirectURI,p={headers:{Authorization:f},parameters:{organizationId:n.clientConfig.parameters.organizationId},body:Og(Og({},a||{}),{},{redirect_uri:h,client_id:n.clientConfig.parameters.clientId,code_challenge:c,channel_id:n.clientConfig.parameters.siteId},d&&{usid:d})},e.next=12,u.authenticateCustomer(p,!0);case 12:if(g=e.sent,y=(null===(r=g.headers)||void 0===r?void 0:r.get("location"))||g.url,v=new URL(y),m=Object.fromEntries(v.searchParams.entries()),!(g.status>=400||m.error)){e.next=18;break}throw new fg(g);case 18:if(b=Sg(y),w=Og({client_id:n.clientConfig.parameters.clientId,channel_id:n.clientConfig.parameters.siteId,code:b.code,code_verifier:s,grant_type:"authorization_code_pkce",organizationId:n.clientConfig.parameters.organizationId,redirect_uri:i.redirectURI,usid:b.usid},void 0!==l&&{dnt:l.toString()}),!o.clientSecret){e.next=24;break}return k="Basic ".concat(Cg("".concat(n.clientConfig.parameters.clientId,":").concat(o.clientSecret))),x={headers:{Authorization:k},body:w},e.abrupt("return",n.getAccessToken(x));case 24:return e.abrupt("return",n.getAccessToken({body:w}));case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wg(e){return Dg.apply(this,arguments)}function Dg(){return(Dg=Zh(Cp.mark((function e(t){var r,n,o,i,a;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.slasClient,n=t.credentials,o=t.parameters,n.clientSecret){e.next=3;break}throw new Error("Required argument client secret is not provided");case 3:if(r.clientConfig.parameters.siteId){e.next=5;break}throw new Error("Required argument channel_id is not provided through clientConfig.parameters.siteId");case 5:if(o.mode){e.next=7;break}throw new Error("Required argument mode is not provided through parameters");case 7:if(o.userid){e.next=9;break}throw new Error("Required argument userid is not provided through parameters");case 9:return i="Basic ".concat(Cg("".concat(r.clientConfig.parameters.clientId,":").concat(n.clientSecret))),a=Og(Og(Og({user_id:o.userid,mode:o.mode},o.locale&&{locale:o.locale}),o.usid&&{usid:o.usid}),{},{channel_id:r.clientConfig.parameters.siteId},o.callbackURI&&{callback_uri:o.callbackURI}),e.abrupt("return",r.authorizePasswordlessCustomer({headers:{Authorization:i},parameters:{organizationId:r.clientConfig.parameters.organizationId},body:a},!0));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Gg(e){return Hg.apply(this,arguments)}function Hg(){return(Hg=Zh(Cp.mark((function e(t){var r,n,o,i,a,s;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.slasClient,n=t.credentials,o=t.parameters,n.clientSecret){e.next=3;break}throw new Error("Required argument client secret is not provided");case 3:if(r.clientConfig.parameters.organizationId){e.next=5;break}throw new Error("Required argument organizationId is not provided through clientConfig.parameters.organizationId");case 5:if(o.pwdlessLoginToken){e.next=7;break}throw new Error("Required argument pwdlessLoginToken is not provided through parameters");case 7:return i=Pg(),a="Basic ".concat(Cg("".concat(r.clientConfig.parameters.clientId,":").concat(n.clientSecret))),s=Og({grant_type:"client_credentials",hint:"pwdless_login",pwdless_login_token:o.pwdlessLoginToken,code_verifier:i},o.dnt&&{dnt:o.dnt}),e.abrupt("return",r.getPasswordLessAccessToken({headers:{Authorization:a},parameters:{organizationId:r.clientConfig.parameters.organizationId},body:s}));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vg(e){var t=e.slasClient,r=e.parameters,n=e.credentials,o=Og({grant_type:"refresh_token",refresh_token:r.refreshToken,client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId},void 0!==r.dnt&&{dnt:r.dnt.toString()});if(n&&n.clientSecret){var i={headers:{Authorization:"Basic ".concat(Cg("".concat(t.clientConfig.parameters.clientId,":").concat(n.clientSecret)))},body:o};return t.getAccessToken(i)}return t.getAccessToken({body:o})}function $g(e){var t=e.slasClient,r=e.parameters;return t.logoutCustomer({headers:{Authorization:"Bearer ".concat(r.accessToken)},parameters:{refresh_token:r.refreshToken,client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId}})}var Yg=qr.find,Jg=!0;"find"in[]&&Array(1).find((function(){Jg=!1})),Ut({target:"Array",proto:!0,forced:Jg},{find:function(e){return Yg(this,e,arguments.length>1?arguments[1]:void 0)}}),fo("find");function Kg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kg(Object(r),!0).forEach((function(t){Jh(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kg(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Xg=function(e){var t=!1;return e&&(t=Boolean(Object.keys(e).find((function(e){return"content-type"===e.toLowerCase()})))),t},Zg=function(){var e=Zh(Cp.mark((function e(t){var r,n,o,i,a,s,c,u,f,l,d,h;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.options,i=t.clientConfig,a=t.rawResponse,s=["apiName","endpointPath","organizationId","shortCode"],c=Qg(Qg({},i.parameters),null==o?void 0:o.customApiPathParameters),s.forEach((function(e){if(!c[e])throw new Error("Missing required property needed in options.customApiPathParameters or clientConfig.parameters: ".concat(e))})),c.apiVersion||(c.apiVersion="v1"),u=i,i.baseUri||(u=Qg(Qg({},i),{},{baseUri:"https://{shortCode}.api.commercecloud.salesforce.com/custom/{apiName}/{apiVersion}"})),f=Boolean(!(null!==(r=o.parameters)&&void 0!==r&&r.siteId)&&(null==i||null===(n=i.parameters)||void 0===n?void 0:n.siteId)),l=Xg(o.headers)||Xg(u.headers),d=o,l&&!f||(d=Qg(Qg({},o),{},{headers:Qg(Qg({},o.headers),!l&&{"Content-Type":"application/json"}),parameters:Qg(Qg({},o.parameters),f&&{siteId:i.parameters.siteId})})),h=new yg("/organizations/{organizationId}/{endpointPath}",u.baseUri,{pathParams:c,queryParams:d.parameters,origin:u.proxy}),e.abrupt("return",hg(h.toString(),d,u,a));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();export{zg as authorize,Ag as authorizeIDP,Wg as authorizePasswordless,Zg as callCustomEndpoint,Pg as createCodeVerifier,hg as doFetch,pg as encodeSCAPISpecialCharacters,Nt as fetch,Tg as generateCodeChallenge,Sg as getCodeAndUsidFromUrl,Gg as getPasswordLessAccessToken,Bt as globalObject,Ft as hasFetchAvailable,qt as isBrowser,Mt as isNode,Mg as loginGuestUser,Lg as loginGuestUserPrivate,Rg as loginIDPUser,Fg as loginRegisteredUserB2C,$g as logout,Vg as refreshAccessToken,Cg as stringToBase64};
|
|
1
|
+
import{customRandom as e,urlAlphabet as t}from"nanoid";import r from"seedrandom";var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var i,a,s=function(e){return e&&e.Math==Math&&e},c=s("object"==typeof globalThis&&globalThis)||s("object"==typeof window&&window)||s("object"==typeof self&&self)||s("object"==typeof n&&n)||function(){return this}()||Function("return this")(),u=function(e){try{return!!e()}catch(e){return!0}},f=!u((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),l=!u((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),d=Function.prototype.call,h=l?d.bind(d):function(){return d.apply(d,arguments)},p={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,y={f:g&&!p.call({1:2},1)?function(e){var t=g(this,e);return!!t&&t.enumerable}:p},v=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},m=Function.prototype,b=m.bind,w=m.call,k=l&&b.bind(w,w),x=l?function(e){return e&&k(e)}:function(e){return e&&function(){return w.apply(e,arguments)}},_=x({}.toString),I=x("".slice),O=function(e){return I(_(e),8,-1)},C=Object,S=x("".split),P=u((function(){return!C("z").propertyIsEnumerable(0)}))?function(e){return"String"==O(e)?S(e,""):C(e)}:C,T=TypeError,z=function(e){if(null==e)throw T("Can't call method on "+e);return e},E=function(e){return P(z(e))},A=function(e){return"function"==typeof e},j=function(e){return"object"==typeof e?null!==e:A(e)},R=function(e){return A(e)?e:void 0},U=function(e,t){return arguments.length<2?R(c[e]):c[e]&&c[e][t]},L=x({}.isPrototypeOf),q=U("navigator","userAgent")||"",M=c.process,B=c.Deno,F=M&&M.versions||B&&B.version,N=F&&F.v8;N&&(a=(i=N.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!a&&q&&(!(i=q.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=q.match(/Chrome\/(\d+)/))&&(a=+i[1]);var W=a,D=!!Object.getOwnPropertySymbols&&!u((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&W&&W<41})),G=D&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,H=Object,V=G?function(e){return"symbol"==typeof e}:function(e){var t=U("Symbol");return A(t)&&L(t.prototype,H(e))},$=String,Y=function(e){try{return $(e)}catch(e){return"Object"}},J=TypeError,K=function(e){if(A(e))return e;throw J(Y(e)+" is not a function")},Q=function(e,t){var r=e[t];return null==r?void 0:K(r)},X=TypeError,Z=Object.defineProperty,ee=function(e,t){try{Z(c,e,{value:t,configurable:!0,writable:!0})}catch(r){c[e]=t}return t},te=c["__core-js_shared__"]||ee("__core-js_shared__",{}),re=o((function(e){(e.exports=function(e,t){return te[e]||(te[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.23.4",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.4/LICENSE",source:"https://github.com/zloirock/core-js"})})),ne=Object,oe=function(e){return ne(z(e))},ie=x({}.hasOwnProperty),ae=Object.hasOwn||function(e,t){return ie(oe(e),t)},se=0,ce=Math.random(),ue=x(1..toString),fe=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ue(++se+ce,36)},le=re("wks"),de=c.Symbol,he=de&&de.for,pe=G?de:de&&de.withoutSetter||fe,ge=function(e){if(!ae(le,e)||!D&&"string"!=typeof le[e]){var t="Symbol."+e;D&&ae(de,e)?le[e]=de[e]:le[e]=G&&he?he(t):pe(t)}return le[e]},ye=TypeError,ve=ge("toPrimitive"),me=function(e,t){if(!j(e)||V(e))return e;var r,n=Q(e,ve);if(n){if(void 0===t&&(t="default"),r=h(n,e,t),!j(r)||V(r))return r;throw ye("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&A(r=e.toString)&&!j(n=h(r,e)))return n;if(A(r=e.valueOf)&&!j(n=h(r,e)))return n;if("string"!==t&&A(r=e.toString)&&!j(n=h(r,e)))return n;throw X("Can't convert object to primitive value")}(e,t)},be=function(e){var t=me(e,"string");return V(t)?t:t+""},we=c.document,ke=j(we)&&j(we.createElement),xe=function(e){return ke?we.createElement(e):{}},_e=!f&&!u((function(){return 7!=Object.defineProperty(xe("div"),"a",{get:function(){return 7}}).a})),Ie=Object.getOwnPropertyDescriptor,Oe={f:f?Ie:function(e,t){if(e=E(e),t=be(t),_e)try{return Ie(e,t)}catch(e){}if(ae(e,t))return v(!h(y.f,e,t),e[t])}},Ce=f&&u((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Se=String,Pe=TypeError,Te=function(e){if(j(e))return e;throw Pe(Se(e)+" is not an object")},ze=TypeError,Ee=Object.defineProperty,Ae=Object.getOwnPropertyDescriptor,je={f:f?Ce?function(e,t,r){if(Te(e),t=be(t),Te(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=Ae(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return Ee(e,t,r)}:Ee:function(e,t,r){if(Te(e),t=be(t),Te(r),_e)try{return Ee(e,t,r)}catch(e){}if("get"in r||"set"in r)throw ze("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Re=f?function(e,t,r){return je.f(e,t,v(1,r))}:function(e,t,r){return e[t]=r,e},Ue=Function.prototype,Le=f&&Object.getOwnPropertyDescriptor,qe=ae(Ue,"name"),Me={EXISTS:qe,PROPER:qe&&"something"===function(){}.name,CONFIGURABLE:qe&&(!f||f&&Le(Ue,"name").configurable)},Be=x(Function.toString);A(te.inspectSource)||(te.inspectSource=function(e){return Be(e)});var Fe,Ne,We,De=te.inspectSource,Ge=c.WeakMap,He=A(Ge)&&/native code/.test(De(Ge)),Ve=re("keys"),$e=function(e){return Ve[e]||(Ve[e]=fe(e))},Ye={},Je=c.TypeError,Ke=c.WeakMap;if(He||te.state){var Qe=te.state||(te.state=new Ke),Xe=x(Qe.get),Ze=x(Qe.has),et=x(Qe.set);Fe=function(e,t){if(Ze(Qe,e))throw new Je("Object already initialized");return t.facade=e,et(Qe,e,t),t},Ne=function(e){return Xe(Qe,e)||{}},We=function(e){return Ze(Qe,e)}}else{var tt=$e("state");Ye[tt]=!0,Fe=function(e,t){if(ae(e,tt))throw new Je("Object already initialized");return t.facade=e,Re(e,tt,t),t},Ne=function(e){return ae(e,tt)?e[tt]:{}},We=function(e){return ae(e,tt)}}var rt={set:Fe,get:Ne,has:We,enforce:function(e){return We(e)?Ne(e):Fe(e,{})},getterFor:function(e){return function(t){var r;if(!j(t)||(r=Ne(t)).type!==e)throw Je("Incompatible receiver, "+e+" required");return r}}},nt=o((function(e){var t=Me.CONFIGURABLE,r=rt.enforce,n=rt.get,o=Object.defineProperty,i=f&&!u((function(){return 8!==o((function(){}),"length",{value:8}).length})),a=String(String).split("String"),s=e.exports=function(e,n,s){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!ae(e,"name")||t&&e.name!==n)&&(f?o(e,"name",{value:n,configurable:!0}):e.name=n),i&&s&&ae(s,"arity")&&e.length!==s.arity&&o(e,"length",{value:s.arity});try{s&&ae(s,"constructor")&&s.constructor?f&&o(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var c=r(e);return ae(c,"source")||(c.source=a.join("string"==typeof n?n:"")),e};Function.prototype.toString=s((function(){return A(this)&&n(this).source||De(this)}),"toString")})),ot=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(A(r)&&nt(r,i,n),n.global)o?e[t]=r:ee(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:je.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},it=Math.ceil,at=Math.floor,st=Math.trunc||function(e){var t=+e;return(t>0?at:it)(t)},ct=function(e){var t=+e;return t!=t||0===t?0:st(t)},ut=Math.max,ft=Math.min,lt=function(e,t){var r=ct(e);return r<0?ut(r+t,0):ft(r,t)},dt=Math.min,ht=function(e){return e>0?dt(ct(e),9007199254740991):0},pt=function(e){return ht(e.length)},gt=function(e){return function(t,r,n){var o,i=E(t),a=pt(i),s=lt(n,a);if(e&&r!=r){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},yt={includes:gt(!0),indexOf:gt(!1)},vt=yt.indexOf,mt=x([].push),bt=function(e,t){var r,n=E(e),o=0,i=[];for(r in n)!ae(Ye,r)&&ae(n,r)&&mt(i,r);for(;t.length>o;)ae(n,r=t[o++])&&(~vt(i,r)||mt(i,r));return i},wt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kt=wt.concat("length","prototype"),xt={f:Object.getOwnPropertyNames||function(e){return bt(e,kt)}},_t={f:Object.getOwnPropertySymbols},It=x([].concat),Ot=U("Reflect","ownKeys")||function(e){var t=xt.f(Te(e)),r=_t.f;return r?It(t,r(e)):t},Ct=function(e,t,r){for(var n=Ot(t),o=je.f,i=Oe.f,a=0;a<n.length;a++){var s=n[a];ae(e,s)||r&&ae(r,s)||o(e,s,i(t,s))}},St=/#|\.prototype\./,Pt=function(e,t){var r=zt[Tt(e)];return r==At||r!=Et&&(A(t)?u(t):!!t)},Tt=Pt.normalize=function(e){return String(e).replace(St,".").toLowerCase()},zt=Pt.data={},Et=Pt.NATIVE="N",At=Pt.POLYFILL="P",jt=Pt,Rt=Oe.f,Ut=function(e,t){var r,n,o,i,a,s=e.target,u=e.global,f=e.stat;if(r=u?c:f?c[s]||ee(s,{}):(c[s]||{}).prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(a=Rt(r,n))&&a.value:r[n],!jt(u?n:s+(f?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ct(i,o)}(e.sham||o&&o.sham)&&Re(i,"sham",!0),ot(r,n,i,e)}};function Lt(e){return(Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Ut({global:!0},{globalThis:c});var qt="object"===("undefined"==typeof window?"undefined":Lt(window))&&"object"===Lt(window.document),Mt="object"===("undefined"==typeof process?"undefined":Lt(process))&&"object"===Lt(process.versions)&&"string"==typeof process.versions.node,Bt=qt?window:globalThis,Ft="function"==typeof Bt.fetch,Nt=function(){if(!Ft)throw new Error("Please use Node.js 18+ for native fetch support.");return Bt.fetch}(),Wt=Object.keys||function(e){return bt(e,wt)},Dt=u((function(){Wt(1)}));Ut({target:"Object",stat:!0,forced:Dt},{keys:function(e){return Wt(oe(e))}});var Gt={};Gt[ge("toStringTag")]="z";var Ht,Vt="[object z]"===String(Gt),$t=ge("toStringTag"),Yt=Object,Jt="Arguments"==O(function(){return arguments}()),Kt=Vt?O:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Yt(e),$t))?r:Jt?O(t):"Object"==(n=O(t))&&A(t.callee)?"Arguments":n},Qt=String,Xt=function(e){if("Symbol"===Kt(e))throw TypeError("Cannot convert a Symbol value to a string");return Qt(e)},Zt={f:f&&!Ce?Object.defineProperties:function(e,t){Te(e);for(var r,n=E(t),o=Wt(t),i=o.length,a=0;i>a;)je.f(e,r=o[a++],n[r]);return e}},er=U("document","documentElement"),tr=$e("IE_PROTO"),rr=function(){},nr=function(e){return"<script>"+e+"<\/script>"},or=function(e){e.write(nr("")),e.close();var t=e.parentWindow.Object;return e=null,t},ir=function(){try{Ht=new ActiveXObject("htmlfile")}catch(e){}var e,t;ir="undefined"!=typeof document?document.domain&&Ht?or(Ht):((t=xe("iframe")).style.display="none",er.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(nr("document.F=Object")),e.close(),e.F):or(Ht);for(var r=wt.length;r--;)delete ir.prototype[wt[r]];return ir()};Ye[tr]=!0;var ar=Object.create||function(e,t){var r;return null!==e?(rr.prototype=Te(e),r=new rr,rr.prototype=null,r[tr]=e):r=ir(),void 0===t?r:Zt.f(r,t)},sr=function(e,t,r){var n=be(t);n in e?je.f(e,n,v(0,r)):e[n]=r},cr=Array,ur=Math.max,fr=function(e,t,r){for(var n=pt(e),o=lt(t,n),i=lt(void 0===r?n:r,n),a=cr(ur(i-o,0)),s=0;o<i;o++,s++)sr(a,s,e[o]);return a.length=s,a},lr=xt.f,dr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],hr={f:function(e){return dr&&"Window"==O(e)?function(e){try{return lr(e)}catch(e){return fr(dr)}}(e):lr(E(e))}},pr={f:ge},gr=c,yr=je.f,vr=je.f,mr=ge("toStringTag"),br=function(e,t,r){e&&!r&&(e=e.prototype),e&&!ae(e,mr)&&vr(e,mr,{configurable:!0,value:t})},wr=x(x.bind),kr=function(e,t){return K(e),void 0===t?e:l?wr(e,t):function(){return e.apply(t,arguments)}},xr=Array.isArray||function(e){return"Array"==O(e)},_r=function(){},Ir=[],Or=U("Reflect","construct"),Cr=/^\s*(?:class|function)\b/,Sr=x(Cr.exec),Pr=!Cr.exec(_r),Tr=function(e){if(!A(e))return!1;try{return Or(_r,Ir,e),!0}catch(e){return!1}},zr=function(e){if(!A(e))return!1;switch(Kt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Pr||!!Sr(Cr,De(e))}catch(e){return!0}};zr.sham=!0;var Er=!Or||u((function(){var e;return Tr(Tr.call)||!Tr(Object)||!Tr((function(){e=!0}))||e}))?zr:Tr,Ar=ge("species"),jr=Array,Rr=function(e,t){return new(function(e){var t;return xr(e)&&(t=e.constructor,(Er(t)&&(t===jr||xr(t.prototype))||j(t)&&null===(t=t[Ar]))&&(t=void 0)),void 0===t?jr:t}(e))(0===t?0:t)},Ur=x([].push),Lr=function(e){var t=1==e,r=2==e,n=3==e,o=4==e,i=6==e,a=7==e,s=5==e||i;return function(c,u,f,l){for(var d,h,p=oe(c),g=P(p),y=kr(u,f),v=pt(g),m=0,b=l||Rr,w=t?b(c,v):r||a?b(c,0):void 0;v>m;m++)if((s||m in g)&&(h=y(d=g[m],m,p),e))if(t)w[m]=h;else if(h)switch(e){case 3:return!0;case 5:return d;case 6:return m;case 2:Ur(w,d)}else switch(e){case 4:return!1;case 7:Ur(w,d)}return i?-1:n||o?o:w}},qr={forEach:Lr(0),map:Lr(1),filter:Lr(2),some:Lr(3),every:Lr(4),find:Lr(5),findIndex:Lr(6),filterReject:Lr(7)},Mr=qr.forEach,Br=$e("hidden"),Fr=rt.set,Nr=rt.getterFor("Symbol"),Wr=Object.prototype,Dr=c.Symbol,Gr=Dr&&Dr.prototype,Hr=c.TypeError,Vr=c.QObject,$r=Oe.f,Yr=je.f,Jr=hr.f,Kr=y.f,Qr=x([].push),Xr=re("symbols"),Zr=re("op-symbols"),en=re("wks"),tn=!Vr||!Vr.prototype||!Vr.prototype.findChild,rn=f&&u((function(){return 7!=ar(Yr({},"a",{get:function(){return Yr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=$r(Wr,t);n&&delete Wr[t],Yr(e,t,r),n&&e!==Wr&&Yr(Wr,t,n)}:Yr,nn=function(e,t){var r=Xr[e]=ar(Gr);return Fr(r,{type:"Symbol",tag:e,description:t}),f||(r.description=t),r},on=function(e,t,r){e===Wr&&on(Zr,t,r),Te(e);var n=be(t);return Te(r),ae(Xr,n)?(r.enumerable?(ae(e,Br)&&e[Br][n]&&(e[Br][n]=!1),r=ar(r,{enumerable:v(0,!1)})):(ae(e,Br)||Yr(e,Br,v(1,{})),e[Br][n]=!0),rn(e,n,r)):Yr(e,n,r)},an=function(e,t){Te(e);var r=E(t),n=Wt(r).concat(fn(r));return Mr(n,(function(t){f&&!h(sn,r,t)||on(e,t,r[t])})),e},sn=function(e){var t=be(e),r=h(Kr,this,t);return!(this===Wr&&ae(Xr,t)&&!ae(Zr,t))&&(!(r||!ae(this,t)||!ae(Xr,t)||ae(this,Br)&&this[Br][t])||r)},cn=function(e,t){var r=E(e),n=be(t);if(r!==Wr||!ae(Xr,n)||ae(Zr,n)){var o=$r(r,n);return!o||!ae(Xr,n)||ae(r,Br)&&r[Br][n]||(o.enumerable=!0),o}},un=function(e){var t=Jr(E(e)),r=[];return Mr(t,(function(e){ae(Xr,e)||ae(Ye,e)||Qr(r,e)})),r},fn=function(e){var t=e===Wr,r=Jr(t?Zr:E(e)),n=[];return Mr(r,(function(e){!ae(Xr,e)||t&&!ae(Wr,e)||Qr(n,Xr[e])})),n};D||(Gr=(Dr=function(){if(L(Gr,this))throw Hr("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Xt(arguments[0]):void 0,t=fe(e),r=function(e){this===Wr&&h(r,Zr,e),ae(this,Br)&&ae(this[Br],t)&&(this[Br][t]=!1),rn(this,t,v(1,e))};return f&&tn&&rn(Wr,t,{configurable:!0,set:r}),nn(t,e)}).prototype,ot(Gr,"toString",(function(){return Nr(this).tag})),ot(Dr,"withoutSetter",(function(e){return nn(fe(e),e)})),y.f=sn,je.f=on,Zt.f=an,Oe.f=cn,xt.f=hr.f=un,_t.f=fn,pr.f=function(e){return nn(ge(e),e)},f&&(Yr(Gr,"description",{configurable:!0,get:function(){return Nr(this).description}}),ot(Wr,"propertyIsEnumerable",sn,{unsafe:!0}))),Ut({global:!0,constructor:!0,wrap:!0,forced:!D,sham:!D},{Symbol:Dr}),Mr(Wt(en),(function(e){!function(e){var t=gr.Symbol||(gr.Symbol={});ae(t,e)||yr(t,e,{value:pr.f(e)})}(e)})),Ut({target:"Symbol",stat:!0,forced:!D},{useSetter:function(){tn=!0},useSimple:function(){tn=!1}}),Ut({target:"Object",stat:!0,forced:!D,sham:!f},{create:function(e,t){return void 0===t?ar(e):an(ar(e),t)},defineProperty:on,defineProperties:an,getOwnPropertyDescriptor:cn}),Ut({target:"Object",stat:!0,forced:!D},{getOwnPropertyNames:un}),function(){var e=U("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=ge("toPrimitive");t&&!t[n]&&ot(t,n,(function(e){return h(r,this)}),{arity:1})}(),br(Dr,"Symbol"),Ye[Br]=!0;var ln=D&&!!Symbol.for&&!!Symbol.keyFor,dn=re("string-to-symbol-registry"),hn=re("symbol-to-string-registry");Ut({target:"Symbol",stat:!0,forced:!ln},{for:function(e){var t=Xt(e);if(ae(dn,t))return dn[t];var r=U("Symbol")(t);return dn[t]=r,hn[r]=t,r}});var pn=re("symbol-to-string-registry");Ut({target:"Symbol",stat:!0,forced:!ln},{keyFor:function(e){if(!V(e))throw TypeError(Y(e)+" is not a symbol");if(ae(pn,e))return pn[e]}});var gn=Function.prototype,yn=gn.apply,vn=gn.call,mn="object"==typeof Reflect&&Reflect.apply||(l?vn.bind(yn):function(){return vn.apply(yn,arguments)}),bn=x([].slice),wn=U("JSON","stringify"),kn=x(/./.exec),xn=x("".charAt),_n=x("".charCodeAt),In=x("".replace),On=x(1..toString),Cn=/[\uD800-\uDFFF]/g,Sn=/^[\uD800-\uDBFF]$/,Pn=/^[\uDC00-\uDFFF]$/,Tn=!D||u((function(){var e=U("Symbol")();return"[null]"!=wn([e])||"{}"!=wn({a:e})||"{}"!=wn(Object(e))})),zn=u((function(){return'"\\udf06\\ud834"'!==wn("\udf06\ud834")||'"\\udead"'!==wn("\udead")})),En=function(e,t){var r=bn(arguments),n=t;if((j(t)||void 0!==e)&&!V(e))return xr(t)||(t=function(e,t){if(A(n)&&(t=h(n,this,e,t)),!V(t))return t}),r[1]=t,mn(wn,null,r)},An=function(e,t,r){var n=xn(r,t-1),o=xn(r,t+1);return kn(Sn,e)&&!kn(Pn,o)||kn(Pn,e)&&!kn(Sn,n)?"\\u"+On(_n(e,0),16):e};wn&&Ut({target:"JSON",stat:!0,arity:3,forced:Tn||zn},{stringify:function(e,t,r){var n=bn(arguments),o=mn(Tn?En:wn,null,n);return zn&&"string"==typeof o?In(o,Cn,An):o}});var jn=!D||u((function(){_t.f(1)}));Ut({target:"Object",stat:!0,forced:jn},{getOwnPropertySymbols:function(e){var t=_t.f;return t?t(oe(e)):[]}});var Rn=ge("species"),Un=function(e){return W>=51||!u((function(){var t=[];return(t.constructor={})[Rn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Ln=qr.filter,qn=Un("filter");Ut({target:"Array",proto:!0,forced:!qn},{filter:function(e){return Ln(this,e,arguments.length>1?arguments[1]:void 0)}});var Mn=Vt?{}.toString:function(){return"[object "+Kt(this)+"]"};Vt||ot(Object.prototype,"toString",Mn,{unsafe:!0});var Bn=Oe.f,Fn=u((function(){Bn(1)}));Ut({target:"Object",stat:!0,forced:!f||Fn,sham:!f},{getOwnPropertyDescriptor:function(e,t){return Bn(E(e),t)}});var Nn={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Wn=xe("span").classList,Dn=Wn&&Wn.constructor&&Wn.constructor.prototype,Gn=Dn===Object.prototype?void 0:Dn,Hn=function(e,t){var r=[][e];return!!r&&u((function(){r.call(null,t||function(){return 1},1)}))},Vn=qr.forEach,$n=Hn("forEach")?[].forEach:function(e){return Vn(this,e,arguments.length>1?arguments[1]:void 0)},Yn=function(e){if(e&&e.forEach!==$n)try{Re(e,"forEach",$n)}catch(t){e.forEach=$n}};for(var Jn in Nn)Nn[Jn]&&Yn(c[Jn]&&c[Jn].prototype);Yn(Gn),Ut({target:"Object",stat:!0,sham:!f},{getOwnPropertyDescriptors:function(e){for(var t,r,n=E(e),o=Oe.f,i=Ot(n),a={},s=0;i.length>s;)void 0!==(r=o(n,t=i[s++]))&&sr(a,t,r);return a}});var Kn=Zt.f;Ut({target:"Object",stat:!0,forced:Object.defineProperties!==Kn,sham:!f},{defineProperties:Kn});var Qn=je.f;Ut({target:"Object",stat:!0,forced:Object.defineProperty!==Qn,sham:!f},{defineProperty:Qn});var Xn=function(){var e=Te(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Zn=RegExp.prototype,eo=Me.PROPER,to=RegExp.prototype.toString,ro=u((function(){return"/a/b"!=to.call({source:"a",flags:"b"})})),no=eo&&"toString"!=to.name;(ro||no)&&ot(RegExp.prototype,"toString",(function(){var e=Te(this);return"/"+Xt(e.source)+"/"+Xt(function(e){var t=e.flags;return void 0!==t||"flags"in Zn||ae(e,"flags")||!L(Zn,e)?t:h(Xn,e)}(e))}),{unsafe:!0});var oo=je.f,io=ge("unscopables"),ao=Array.prototype;null==ao[io]&&oo(ao,io,{configurable:!0,value:ar(null)});var so,co,uo,fo=function(e){ao[io][e]=!0},lo={},ho=!u((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),po=$e("IE_PROTO"),go=Object,yo=go.prototype,vo=ho?go.getPrototypeOf:function(e){var t=oe(e);if(ae(t,po))return t[po];var r=t.constructor;return A(r)&&t instanceof r?r.prototype:t instanceof go?yo:null},mo=ge("iterator"),bo=!1;[].keys&&("next"in(uo=[].keys())?(co=vo(vo(uo)))!==Object.prototype&&(so=co):bo=!0),(null==so||u((function(){var e={};return so[mo].call(e)!==e})))&&(so={}),A(so[mo])||ot(so,mo,(function(){return this}));var wo={IteratorPrototype:so,BUGGY_SAFARI_ITERATORS:bo},ko=wo.IteratorPrototype,xo=function(){return this},_o=function(e,t,r,n){var o=t+" Iterator";return e.prototype=ar(ko,{next:v(+!n,r)}),br(e,o,!1),lo[o]=xo,e},Io=String,Oo=TypeError,Co=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=x(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return Te(r),function(e){if("object"==typeof e||A(e))return e;throw Oo("Can't set "+Io(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),So=Me.PROPER,Po=Me.CONFIGURABLE,To=wo.IteratorPrototype,zo=wo.BUGGY_SAFARI_ITERATORS,Eo=ge("iterator"),Ao=function(){return this},jo=function(e,t,r,n,o,i,a){_o(r,t,n);var s,c,u,f=function(e){if(e===o&&y)return y;if(!zo&&e in p)return p[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},l=t+" Iterator",d=!1,p=e.prototype,g=p[Eo]||p["@@iterator"]||o&&p[o],y=!zo&&g||f(o),v="Array"==t&&p.entries||g;if(v&&(s=vo(v.call(new e)))!==Object.prototype&&s.next&&(vo(s)!==To&&(Co?Co(s,To):A(s[Eo])||ot(s,Eo,Ao)),br(s,l,!0)),So&&"values"==o&&g&&"values"!==g.name&&(Po?Re(p,"name","values"):(d=!0,y=function(){return h(g,this)})),o)if(c={values:f("values"),keys:i?y:f("keys"),entries:f("entries")},a)for(u in c)(zo||d||!(u in p))&&ot(p,u,c[u]);else Ut({target:t,proto:!0,forced:zo||d},c);return p[Eo]!==y&&ot(p,Eo,y,{name:o}),lo[t]=y,c},Ro=je.f,Uo=rt.set,Lo=rt.getterFor("Array Iterator"),qo=jo(Array,"Array",(function(e,t){Uo(this,{type:"Array Iterator",target:E(e),index:0,kind:t})}),(function(){var e=Lo(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),Mo=lo.Arguments=lo.Array;if(fo("keys"),fo("values"),fo("entries"),f&&"values"!==Mo.name)try{Ro(Mo,"name",{value:"values"})}catch(e){}var Bo=x("".charAt),Fo=x("".charCodeAt),No=x("".slice),Wo=function(e){return function(t,r){var n,o,i=Xt(z(t)),a=ct(r),s=i.length;return a<0||a>=s?e?"":void 0:(n=Fo(i,a))<55296||n>56319||a+1===s||(o=Fo(i,a+1))<56320||o>57343?e?Bo(i,a):n:e?No(i,a,a+2):o-56320+(n-55296<<10)+65536}},Do={codeAt:Wo(!1),charAt:Wo(!0)},Go=Do.charAt,Ho=rt.set,Vo=rt.getterFor("String Iterator");jo(String,"String",(function(e){Ho(this,{type:"String Iterator",string:Xt(e),index:0})}),(function(){var e,t=Vo(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=Go(r,n),t.index+=e.length,{value:e,done:!1})}));var $o=ge("iterator"),Yo=ge("toStringTag"),Jo=qo.values,Ko=function(e,t){if(e){if(e[$o]!==Jo)try{Re(e,$o,Jo)}catch(t){e[$o]=Jo}if(e[Yo]||Re(e,Yo,t),Nn[t])for(var r in qo)if(e[r]!==qo[r])try{Re(e,r,qo[r])}catch(t){e[r]=qo[r]}}};for(var Qo in Nn)Ko(c[Qo]&&c[Qo].prototype,Qo);Ko(Gn,"DOMTokenList");var Xo=ge("iterator"),Zo=!u((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Xo]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),ei=function(e,t,r){return r.get&&nt(r.get,t,{getter:!0}),r.set&&nt(r.set,t,{setter:!0}),je.f(e,t,r)},ti=TypeError,ri=function(e,t){if(L(t,e))return e;throw ti("Incorrect invocation")},ni=Object.assign,oi=Object.defineProperty,ii=x([].concat),ai=!ni||u((function(){if(f&&1!==ni({b:1},ni(oi({},"a",{enumerable:!0,get:function(){oi(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol();return e[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=ni({},e)[r]||"abcdefghijklmnopqrst"!=Wt(ni({},t)).join("")}))?function(e,t){for(var r=oe(e),n=arguments.length,o=1,i=_t.f,a=y.f;n>o;)for(var s,c=P(arguments[o++]),u=i?ii(Wt(c),i(c)):Wt(c),l=u.length,d=0;l>d;)s=u[d++],f&&!h(a,c,s)||(r[s]=c[s]);return r}:ni,si=function(e,t,r){var n,o;Te(e);try{if(!(n=Q(e,"return"))){if("throw"===t)throw r;return r}n=h(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return Te(n),r},ci=function(e,t,r,n){try{return n?t(Te(r)[0],r[1]):t(r)}catch(t){si(e,"throw",t)}},ui=ge("iterator"),fi=Array.prototype,li=function(e){return void 0!==e&&(lo.Array===e||fi[ui]===e)},di=ge("iterator"),hi=function(e){if(null!=e)return Q(e,di)||Q(e,"@@iterator")||lo[Kt(e)]},pi=TypeError,gi=function(e,t){var r=arguments.length<2?hi(e):t;if(K(r))return Te(h(r,e));throw pi(Y(e)+" is not iterable")},yi=Array,vi=function(e){var t=oe(e),r=Er(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=kr(o,n>2?arguments[2]:void 0));var a,s,c,u,f,l,d=hi(t),p=0;if(!d||this===yi&&li(d))for(a=pt(t),s=r?new this(a):yi(a);a>p;p++)l=i?o(t[p],p):t[p],sr(s,p,l);else for(f=(u=gi(t,d)).next,s=r?new this:[];!(c=h(f,u)).done;p++)l=i?ci(u,o,[c.value,p],!0):c.value,sr(s,p,l);return s.length=p,s},mi=/[^\0-\u007E]/,bi=/[.\u3002\uFF0E\uFF61]/g,wi="Overflow: input needs wider integers to process",ki=RangeError,xi=x(bi.exec),_i=Math.floor,Ii=String.fromCharCode,Oi=x("".charCodeAt),Ci=x([].join),Si=x([].push),Pi=x("".replace),Ti=x("".split),zi=x("".toLowerCase),Ei=function(e){return e+22+75*(e<26)},Ai=function(e,t,r){var n=0;for(e=r?_i(e/700):e>>1,e+=_i(e/t);e>455;)e=_i(e/35),n+=36;return _i(n+36*e/(e+38))},ji=function(e){var t,r,n=[],o=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var o=Oi(e,r++);if(o>=55296&&o<=56319&&r<n){var i=Oi(e,r++);56320==(64512&i)?Si(t,((1023&o)<<10)+(1023&i)+65536):(Si(t,o),r--)}else Si(t,o)}return t}(e)).length,i=128,a=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&Si(n,Ii(r));var c=n.length,u=c;for(c&&Si(n,"-");u<o;){var f=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=i&&r<f&&(f=r);var l=u+1;if(f-i>_i((2147483647-a)/l))throw ki(wi);for(a+=(f-i)*l,i=f,t=0;t<e.length;t++){if((r=e[t])<i&&++a>2147483647)throw ki(wi);if(r==i){for(var d=a,h=36;;){var p=h<=s?1:h>=s+26?26:h-s;if(d<p)break;var g=d-p,y=36-p;Si(n,Ii(Ei(p+g%y))),d=_i(g/y),h+=36}Si(n,Ii(Ei(d))),s=Ai(a,l,u==c),a=0,u++}}a++,i++}return Ci(n,"")},Ri=TypeError,Ui=function(e,t){if(e<t)throw Ri("Not enough arguments");return e},Li=function(e,t,r){for(var n in t)ot(e,n,t[n],r);return e},qi=Math.floor,Mi=function(e,t){var r=e.length,n=qi(r/2);return r<8?Bi(e,t):Fi(e,Mi(fr(e,0,n),t),Mi(fr(e,n),t),t)},Bi=function(e,t){for(var r,n,o=e.length,i=1;i<o;){for(n=i,r=e[i];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==i++&&(e[n]=r)}return e},Fi=function(e,t,r,n){for(var o=t.length,i=r.length,a=0,s=0;a<o||s<i;)e[a+s]=a<o&&s<i?n(t[a],r[s])<=0?t[a++]:r[s++]:a<o?t[a++]:r[s++];return e},Ni=Mi,Wi=ge("iterator"),Di=rt.set,Gi=rt.getterFor("URLSearchParams"),Hi=rt.getterFor("URLSearchParamsIterator"),Vi=Object.getOwnPropertyDescriptor,$i=function(e){if(!f)return c[e];var t=Vi(c,e);return t&&t.value},Yi=$i("fetch"),Ji=$i("Request"),Ki=$i("Headers"),Qi=Ji&&Ji.prototype,Xi=Ki&&Ki.prototype,Zi=c.RegExp,ea=c.TypeError,ta=c.decodeURIComponent,ra=c.encodeURIComponent,na=x("".charAt),oa=x([].join),ia=x([].push),aa=x("".replace),sa=x([].shift),ca=x([].splice),ua=x("".split),fa=x("".slice),la=/\+/g,da=Array(4),ha=function(e){return da[e-1]||(da[e-1]=Zi("((?:%[\\da-f]{2}){"+e+"})","gi"))},pa=function(e){try{return ta(e)}catch(t){return e}},ga=function(e){var t=aa(e,la," "),r=4;try{return ta(t)}catch(e){for(;r;)t=aa(t,ha(r--),pa);return t}},ya=/[!'()~]|%20/g,va={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},ma=function(e){return va[e]},ba=function(e){return aa(ra(e),ya,ma)},wa=_o((function(e,t){Di(this,{type:"URLSearchParamsIterator",iterator:gi(Gi(e).entries),kind:t})}),"Iterator",(function(){var e=Hi(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),ka=function(e){this.entries=[],this.url=null,void 0!==e&&(j(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===na(e,0)?fa(e,1):e:Xt(e)))};ka.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,o,i,a,s,c=hi(e);if(c)for(r=(t=gi(e,c)).next;!(n=h(r,t)).done;){if(i=(o=gi(Te(n.value))).next,(a=h(i,o)).done||(s=h(i,o)).done||!h(i,o).done)throw ea("Expected sequence with length 2");ia(this.entries,{key:Xt(a.value),value:Xt(s.value)})}else for(var u in e)ae(e,u)&&ia(this.entries,{key:u,value:Xt(e[u])})},parseQuery:function(e){if(e)for(var t,r,n=ua(e,"&"),o=0;o<n.length;)(t=n[o++]).length&&(r=ua(t,"="),ia(this.entries,{key:ga(sa(r)),value:ga(oa(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],ia(r,ba(e.key)+"="+ba(e.value));return oa(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var xa=function(){ri(this,_a);var e=arguments.length>0?arguments[0]:void 0;Di(this,new ka(e))},_a=xa.prototype;if(Li(_a,{append:function(e,t){Ui(arguments.length,2);var r=Gi(this);ia(r.entries,{key:Xt(e),value:Xt(t)}),r.updateURL()},delete:function(e){Ui(arguments.length,1);for(var t=Gi(this),r=t.entries,n=Xt(e),o=0;o<r.length;)r[o].key===n?ca(r,o,1):o++;t.updateURL()},get:function(e){Ui(arguments.length,1);for(var t=Gi(this).entries,r=Xt(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Ui(arguments.length,1);for(var t=Gi(this).entries,r=Xt(e),n=[],o=0;o<t.length;o++)t[o].key===r&&ia(n,t[o].value);return n},has:function(e){Ui(arguments.length,1);for(var t=Gi(this).entries,r=Xt(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Ui(arguments.length,1);for(var r,n=Gi(this),o=n.entries,i=!1,a=Xt(e),s=Xt(t),c=0;c<o.length;c++)(r=o[c]).key===a&&(i?ca(o,c--,1):(i=!0,r.value=s));i||ia(o,{key:a,value:s}),n.updateURL()},sort:function(){var e=Gi(this);Ni(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Gi(this).entries,n=kr(e,arguments.length>1?arguments[1]:void 0),o=0;o<r.length;)n((t=r[o++]).value,t.key,this)},keys:function(){return new wa(this,"keys")},values:function(){return new wa(this,"values")},entries:function(){return new wa(this,"entries")}},{enumerable:!0}),ot(_a,Wi,_a.entries,{name:"entries"}),ot(_a,"toString",(function(){return Gi(this).serialize()}),{enumerable:!0}),br(xa,"URLSearchParams"),Ut({global:!0,constructor:!0,forced:!Zo},{URLSearchParams:xa}),!Zo&&A(Ki)){var Ia=x(Xi.has),Oa=x(Xi.set),Ca=function(e){if(j(e)){var t,r=e.body;if("URLSearchParams"===Kt(r))return t=e.headers?new Ki(e.headers):new Ki,Ia(t,"content-type")||Oa(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),ar(e,{body:v(0,Xt(r)),headers:v(0,t)})}return e};if(A(Yi)&&Ut({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Yi(e,arguments.length>1?Ca(arguments[1]):{})}}),A(Ji)){var Sa=function(e){return ri(this,Qi),new Ji(e,arguments.length>1?Ca(arguments[1]):{})};Qi.constructor=Sa,Sa.prototype=Qi,Ut({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Sa})}}var Pa,Ta={URLSearchParams:xa,getState:Gi},za=Do.codeAt,Ea=rt.set,Aa=rt.getterFor("URL"),ja=Ta.URLSearchParams,Ra=Ta.getState,Ua=c.URL,La=c.TypeError,qa=c.parseInt,Ma=Math.floor,Ba=Math.pow,Fa=x("".charAt),Na=x(/./.exec),Wa=x([].join),Da=x(1..toString),Ga=x([].pop),Ha=x([].push),Va=x("".replace),$a=x([].shift),Ya=x("".split),Ja=x("".slice),Ka=x("".toLowerCase),Qa=x([].unshift),Xa=/[a-z]/i,Za=/[\d+-.a-z]/i,es=/\d/,ts=/^0x/i,rs=/^[0-7]+$/,ns=/^\d+$/,os=/^[\da-f]+$/i,is=/[\0\t\n\r #%/:<>?@[\\\]^|]/,as=/[\0\t\n\r #/:<>?@[\\\]^|]/,ss=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,cs=/[\t\n\r]/g,us=function(e){var t,r,n,o;if("number"==typeof e){for(t=[],r=0;r<4;r++)Qa(t,e%256),e=Ma(e/256);return Wa(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,o=0,i=0;i<8;i++)0!==e[i]?(o>r&&(t=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r&&(t=n,r=o),t}(e),r=0;r<8;r++)o&&0===e[r]||(o&&(o=!1),n===r?(t+=r?":":"::",o=!0):(t+=Da(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},fs={},ls=ai({},fs,{" ":1,'"':1,"<":1,">":1,"`":1}),ds=ai({},ls,{"#":1,"?":1,"{":1,"}":1}),hs=ai({},ds,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),ps=function(e,t){var r=za(e,0);return r>32&&r<127&&!ae(t,e)?e:encodeURIComponent(e)},gs={ftp:21,file:null,http:80,https:443,ws:80,wss:443},ys=function(e,t){var r;return 2==e.length&&Na(Xa,Fa(e,0))&&(":"==(r=Fa(e,1))||!t&&"|"==r)},vs=function(e){var t;return e.length>1&&ys(Ja(e,0,2))&&(2==e.length||"/"===(t=Fa(e,2))||"\\"===t||"?"===t||"#"===t)},ms=function(e){return"."===e||"%2e"===Ka(e)},bs={},ws={},ks={},xs={},_s={},Is={},Os={},Cs={},Ss={},Ps={},Ts={},zs={},Es={},As={},js={},Rs={},Us={},Ls={},qs={},Ms={},Bs={},Fs=function(e,t,r){var n,o,i,a=Xt(e);if(t){if(o=this.parse(a))throw La(o);this.searchParams=null}else{if(void 0!==r&&(n=new Fs(r,!0)),o=this.parse(a,null,n))throw La(o);(i=Ra(new ja)).bindURL(this),this.searchParams=i}};Fs.prototype={type:"URL",parse:function(e,t,r){var n,o,i,a,s,c=this,u=t||bs,f=0,l="",d=!1,h=!1,p=!1;for(e=Xt(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=Va(e,ss,"")),e=Va(e,cs,""),n=vi(e);f<=n.length;){switch(o=n[f],u){case bs:if(!o||!Na(Xa,o)){if(t)return"Invalid scheme";u=ks;continue}l+=Ka(o),u=ws;break;case ws:if(o&&(Na(Za,o)||"+"==o||"-"==o||"."==o))l+=Ka(o);else{if(":"!=o){if(t)return"Invalid scheme";l="",u=ks,f=0;continue}if(t&&(c.isSpecial()!=ae(gs,l)||"file"==l&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=l,t)return void(c.isSpecial()&&gs[c.scheme]==c.port&&(c.port=null));l="","file"==c.scheme?u=As:c.isSpecial()&&r&&r.scheme==c.scheme?u=xs:c.isSpecial()?u=Cs:"/"==n[f+1]?(u=_s,f++):(c.cannotBeABaseURL=!0,Ha(c.path,""),u=qs)}break;case ks:if(!r||r.cannotBeABaseURL&&"#"!=o)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==o){c.scheme=r.scheme,c.path=fr(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,u=Bs;break}u="file"==r.scheme?As:Is;continue;case xs:if("/"!=o||"/"!=n[f+1]){u=Is;continue}u=Ss,f++;break;case _s:if("/"==o){u=Ps;break}u=Ls;continue;case Is:if(c.scheme=r.scheme,o==Pa)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=fr(r.path),c.query=r.query;else if("/"==o||"\\"==o&&c.isSpecial())u=Os;else if("?"==o)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=fr(r.path),c.query="",u=Ms;else{if("#"!=o){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=fr(r.path),c.path.length--,u=Ls;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=fr(r.path),c.query=r.query,c.fragment="",u=Bs}break;case Os:if(!c.isSpecial()||"/"!=o&&"\\"!=o){if("/"!=o){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,u=Ls;continue}u=Ps}else u=Ss;break;case Cs:if(u=Ss,"/"!=o||"/"!=Fa(l,f+1))continue;f++;break;case Ss:if("/"!=o&&"\\"!=o){u=Ps;continue}break;case Ps:if("@"==o){d&&(l="%40"+l),d=!0,i=vi(l);for(var g=0;g<i.length;g++){var y=i[g];if(":"!=y||p){var v=ps(y,hs);p?c.password+=v:c.username+=v}else p=!0}l=""}else if(o==Pa||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()){if(d&&""==l)return"Invalid authority";f-=vi(l).length+1,l="",u=Ts}else l+=o;break;case Ts:case zs:if(t&&"file"==c.scheme){u=Rs;continue}if(":"!=o||h){if(o==Pa||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()){if(c.isSpecial()&&""==l)return"Invalid host";if(t&&""==l&&(c.includesCredentials()||null!==c.port))return;if(a=c.parseHost(l))return a;if(l="",u=Us,t)return;continue}"["==o?h=!0:"]"==o&&(h=!1),l+=o}else{if(""==l)return"Invalid host";if(a=c.parseHost(l))return a;if(l="",u=Es,t==zs)return}break;case Es:if(!Na(es,o)){if(o==Pa||"/"==o||"?"==o||"#"==o||"\\"==o&&c.isSpecial()||t){if(""!=l){var m=qa(l,10);if(m>65535)return"Invalid port";c.port=c.isSpecial()&&m===gs[c.scheme]?null:m,l=""}if(t)return;u=Us;continue}return"Invalid port"}l+=o;break;case As:if(c.scheme="file","/"==o||"\\"==o)u=js;else{if(!r||"file"!=r.scheme){u=Ls;continue}if(o==Pa)c.host=r.host,c.path=fr(r.path),c.query=r.query;else if("?"==o)c.host=r.host,c.path=fr(r.path),c.query="",u=Ms;else{if("#"!=o){vs(Wa(fr(n,f),""))||(c.host=r.host,c.path=fr(r.path),c.shortenPath()),u=Ls;continue}c.host=r.host,c.path=fr(r.path),c.query=r.query,c.fragment="",u=Bs}}break;case js:if("/"==o||"\\"==o){u=Rs;break}r&&"file"==r.scheme&&!vs(Wa(fr(n,f),""))&&(ys(r.path[0],!0)?Ha(c.path,r.path[0]):c.host=r.host),u=Ls;continue;case Rs:if(o==Pa||"/"==o||"\\"==o||"?"==o||"#"==o){if(!t&&ys(l))u=Ls;else if(""==l){if(c.host="",t)return;u=Us}else{if(a=c.parseHost(l))return a;if("localhost"==c.host&&(c.host=""),t)return;l="",u=Us}continue}l+=o;break;case Us:if(c.isSpecial()){if(u=Ls,"/"!=o&&"\\"!=o)continue}else if(t||"?"!=o)if(t||"#"!=o){if(o!=Pa&&(u=Ls,"/"!=o))continue}else c.fragment="",u=Bs;else c.query="",u=Ms;break;case Ls:if(o==Pa||"/"==o||"\\"==o&&c.isSpecial()||!t&&("?"==o||"#"==o)){if(".."===(s=Ka(s=l))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==o||"\\"==o&&c.isSpecial()||Ha(c.path,"")):ms(l)?"/"==o||"\\"==o&&c.isSpecial()||Ha(c.path,""):("file"==c.scheme&&!c.path.length&&ys(l)&&(c.host&&(c.host=""),l=Fa(l,0)+":"),Ha(c.path,l)),l="","file"==c.scheme&&(o==Pa||"?"==o||"#"==o))for(;c.path.length>1&&""===c.path[0];)$a(c.path);"?"==o?(c.query="",u=Ms):"#"==o&&(c.fragment="",u=Bs)}else l+=ps(o,ds);break;case qs:"?"==o?(c.query="",u=Ms):"#"==o?(c.fragment="",u=Bs):o!=Pa&&(c.path[0]+=ps(o,fs));break;case Ms:t||"#"!=o?o!=Pa&&("'"==o&&c.isSpecial()?c.query+="%27":c.query+="#"==o?"%23":ps(o,fs)):(c.fragment="",u=Bs);break;case Bs:o!=Pa&&(c.fragment+=ps(o,ls))}f++}},parseHost:function(e){var t,r,n;if("["==Fa(e,0)){if("]"!=Fa(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,r,n,o,i,a,s,c=[0,0,0,0,0,0,0,0],u=0,f=null,l=0,d=function(){return Fa(e,l)};if(":"==d()){if(":"!=Fa(e,1))return;l+=2,f=++u}for(;d();){if(8==u)return;if(":"!=d()){for(t=r=0;r<4&&Na(os,d());)t=16*t+qa(d(),16),l++,r++;if("."==d()){if(0==r)return;if(l-=r,u>6)return;for(n=0;d();){if(o=null,n>0){if(!("."==d()&&n<4))return;l++}if(!Na(es,d()))return;for(;Na(es,d());){if(i=qa(d(),10),null===o)o=i;else{if(0==o)return;o=10*o+i}if(o>255)return;l++}c[u]=256*c[u]+o,2!=++n&&4!=n||u++}if(4!=n)return;break}if(":"==d()){if(l++,!d())return}else if(d())return;c[u++]=t}else{if(null!==f)return;l++,f=++u}}if(null!==f)for(a=u-f,u=7;0!=u&&a>0;)s=c[u],c[u--]=c[f+a-1],c[f+--a]=s;else if(8!=u)return;return c}(Ja(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],o=Ti(Pi(zi(e),bi,"."),".");for(t=0;t<o.length;t++)r=o[t],Si(n,xi(mi,r)?"xn--"+ji(r):r);return Ci(n,".")}(e),Na(is,e))return"Invalid host";if(null===(t=function(e){var t,r,n,o,i,a,s,c=Ya(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(o=c[n]))return e;if(i=10,o.length>1&&"0"==Fa(o,0)&&(i=Na(ts,o)?16:8,o=Ja(o,8==i?1:2)),""===o)a=0;else{if(!Na(10==i?ns:8==i?rs:os,o))return e;a=qa(o,i)}Ha(r,a)}for(n=0;n<t;n++)if(a=r[n],n==t-1){if(a>=Ba(256,5-t))return null}else if(a>255)return null;for(s=Ga(r),n=0;n<r.length;n++)s+=r[n]*Ba(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(Na(as,e))return"Invalid host";for(t="",r=vi(e),n=0;n<r.length;n++)t+=ps(r[n],fs);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return ae(gs,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&ys(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,o=e.host,i=e.port,a=e.path,s=e.query,c=e.fragment,u=t+":";return null!==o?(u+="//",e.includesCredentials()&&(u+=r+(n?":"+n:"")+"@"),u+=us(o),null!==i&&(u+=":"+i)):"file"==t&&(u+="//"),u+=e.cannotBeABaseURL?a[0]:a.length?"/"+Wa(a,"/"):"",null!==s&&(u+="?"+s),null!==c&&(u+="#"+c),u},setHref:function(e){var t=this.parse(e);if(t)throw La(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Ns(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+us(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Xt(e)+":",bs)},getUsername:function(){return this.username},setUsername:function(e){var t=vi(Xt(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=ps(t[r],hs)}},getPassword:function(){return this.password},setPassword:function(e){var t=vi(Xt(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=ps(t[r],hs)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?us(e):us(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Ts)},getHostname:function(){var e=this.host;return null===e?"":us(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,zs)},getPort:function(){var e=this.port;return null===e?"":Xt(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Xt(e))?this.port=null:this.parse(e,Es))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Wa(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Us))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Xt(e))?this.query=null:("?"==Fa(e,0)&&(e=Ja(e,1)),this.query="",this.parse(e,Ms)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Xt(e))?("#"==Fa(e,0)&&(e=Ja(e,1)),this.fragment="",this.parse(e,Bs)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Ns=function(e){var t=ri(this,Ws),r=Ui(arguments.length,1)>1?arguments[1]:void 0,n=Ea(t,new Fs(e,!1,r));f||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},Ws=Ns.prototype,Ds=function(e,t){return{get:function(){return Aa(this)[e]()},set:t&&function(e){return Aa(this)[t](e)},configurable:!0,enumerable:!0}};if(f&&(ei(Ws,"href",Ds("serialize","setHref")),ei(Ws,"origin",Ds("getOrigin")),ei(Ws,"protocol",Ds("getProtocol","setProtocol")),ei(Ws,"username",Ds("getUsername","setUsername")),ei(Ws,"password",Ds("getPassword","setPassword")),ei(Ws,"host",Ds("getHost","setHost")),ei(Ws,"hostname",Ds("getHostname","setHostname")),ei(Ws,"port",Ds("getPort","setPort")),ei(Ws,"pathname",Ds("getPathname","setPathname")),ei(Ws,"search",Ds("getSearch","setSearch")),ei(Ws,"searchParams",Ds("getSearchParams")),ei(Ws,"hash",Ds("getHash","setHash"))),ot(Ws,"toJSON",(function(){return Aa(this).serialize()}),{enumerable:!0}),ot(Ws,"toString",(function(){return Aa(this).serialize()}),{enumerable:!0}),Ua){var Gs=Ua.createObjectURL,Hs=Ua.revokeObjectURL;Gs&&ot(Ns,"createObjectURL",kr(Gs,Ua)),Hs&&ot(Ns,"revokeObjectURL",kr(Hs,Ua))}br(Ns,"URL"),Ut({global:!0,constructor:!0,forced:!Zo,sham:!f},{URL:Ns});var Vs,$s,Ys=c.RegExp,Js=u((function(){var e=Ys("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Ks=Js||u((function(){return!Ys("a","y").sticky})),Qs={BROKEN_CARET:Js||u((function(){var e=Ys("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Ks,UNSUPPORTED_Y:Js},Xs=c.RegExp,Zs=u((function(){var e=Xs(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),ec=c.RegExp,tc=u((function(){var e=ec("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),rc=rt.get,nc=re("native-string-replace",String.prototype.replace),oc=RegExp.prototype.exec,ic=oc,ac=x("".charAt),sc=x("".indexOf),cc=x("".replace),uc=x("".slice),fc=($s=/b*/g,h(oc,Vs=/a/,"a"),h(oc,$s,"a"),0!==Vs.lastIndex||0!==$s.lastIndex),lc=Qs.BROKEN_CARET,dc=void 0!==/()??/.exec("")[1];(fc||dc||lc||Zs||tc)&&(ic=function(e){var t,r,n,o,i,a,s,c=this,u=rc(c),f=Xt(e),l=u.raw;if(l)return l.lastIndex=c.lastIndex,t=h(ic,l,f),c.lastIndex=l.lastIndex,t;var d=u.groups,p=lc&&c.sticky,g=h(Xn,c),y=c.source,v=0,m=f;if(p&&(g=cc(g,"y",""),-1===sc(g,"g")&&(g+="g"),m=uc(f,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==ac(f,c.lastIndex-1))&&(y="(?: "+y+")",m=" "+m,v++),r=new RegExp("^(?:"+y+")",g)),dc&&(r=new RegExp("^"+y+"$(?!\\s)",g)),fc&&(n=c.lastIndex),o=h(oc,p?r:c,m),p?o?(o.input=uc(o.input,v),o[0]=uc(o[0],v),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:fc&&o&&(c.lastIndex=c.global?o.index+o[0].length:n),dc&&o&&o.length>1&&h(nc,o[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&d)for(o.groups=a=ar(null),i=0;i<d.length;i++)a[(s=d[i])[0]]=o[s[1]];return o});var hc=ic;Ut({target:"RegExp",proto:!0,forced:/./.exec!==hc},{exec:hc});var pc=ge("species"),gc=RegExp.prototype,yc=function(e,t,r,n){var o=ge(e),i=!u((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!u((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[pc]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return t=!0,null},r[o](""),!t}));if(!i||!a||r){var s=x(/./[o]),c=t(o,""[e],(function(e,t,r,n,o){var a=x(e),c=t.exec;return c===hc||c===gc.exec?i&&!o?{done:!0,value:s(t,r,n)}:{done:!0,value:a(r,t,n)}:{done:!1}}));ot(String.prototype,e,c[0]),ot(gc,o,c[1])}n&&Re(gc[o],"sham",!0)},vc=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t},mc=TypeError,bc=function(e,t){var r=e.exec;if(A(r)){var n=h(r,e,t);return null!==n&&Te(n),n}if("RegExp"===O(e))return h(hc,e,t);throw mc("RegExp#exec called on incompatible receiver")};yc("search",(function(e,t,r){return[function(t){var r=z(this),n=null==t?void 0:Q(t,e);return n?h(n,t,r):new RegExp(t)[e](Xt(r))},function(e){var n=Te(this),o=Xt(e),i=r(t,n,o);if(i.done)return i.value;var a=n.lastIndex;vc(a,0)||(n.lastIndex=0);var s=bc(n,o);return vc(n.lastIndex,a)||(n.lastIndex=a),null===s?-1:s.index}]}));var wc=qr.map,kc=Un("map");Ut({target:"Array",proto:!0,forced:!kc},{map:function(e){return wc(this,e,arguments.length>1?arguments[1]:void 0)}});var xc=ge("iterator"),_c=!1;try{var Ic=0,Oc={next:function(){return{done:!!Ic++}},return:function(){_c=!0}};Oc[xc]=function(){return this},Array.from(Oc,(function(){throw 2}))}catch(e){}var Cc,Sc,Pc,Tc=function(e,t){if(!t&&!_c)return!1;var r=!1;try{var n={};n[xc]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},zc="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Ec=je.f,Ac=rt.enforce,jc=rt.get,Rc=c.Int8Array,Uc=Rc&&Rc.prototype,Lc=c.Uint8ClampedArray,qc=Lc&&Lc.prototype,Mc=Rc&&vo(Rc),Bc=Uc&&vo(Uc),Fc=Object.prototype,Nc=c.TypeError,Wc=ge("toStringTag"),Dc=fe("TYPED_ARRAY_TAG"),Gc=zc&&!!Co&&"Opera"!==Kt(c.opera),Hc=!1,Vc={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},$c={BigInt64Array:8,BigUint64Array:8},Yc=function(e){var t=vo(e);if(j(t)){var r=jc(t);return r&&ae(r,"TypedArrayConstructor")?r.TypedArrayConstructor:Yc(t)}},Jc=function(e){if(!j(e))return!1;var t=Kt(e);return ae(Vc,t)||ae($c,t)};for(Cc in Vc)(Pc=(Sc=c[Cc])&&Sc.prototype)?Ac(Pc).TypedArrayConstructor=Sc:Gc=!1;for(Cc in $c)(Pc=(Sc=c[Cc])&&Sc.prototype)&&(Ac(Pc).TypedArrayConstructor=Sc);if((!Gc||!A(Mc)||Mc===Function.prototype)&&(Mc=function(){throw Nc("Incorrect invocation")},Gc))for(Cc in Vc)c[Cc]&&Co(c[Cc],Mc);if((!Gc||!Bc||Bc===Fc)&&(Bc=Mc.prototype,Gc))for(Cc in Vc)c[Cc]&&Co(c[Cc].prototype,Bc);if(Gc&&vo(qc)!==Bc&&Co(qc,Bc),f&&!ae(Bc,Wc))for(Cc in Hc=!0,Ec(Bc,Wc,{get:function(){return j(this)?this[Dc]:void 0}}),Vc)c[Cc]&&Re(c[Cc],Dc,Cc);var Kc={NATIVE_ARRAY_BUFFER_VIEWS:Gc,TYPED_ARRAY_TAG:Hc&&Dc,aTypedArray:function(e){if(Jc(e))return e;throw Nc("Target is not a typed array")},aTypedArrayConstructor:function(e){if(A(e)&&(!Co||L(Mc,e)))return e;throw Nc(Y(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(f){if(r)for(var o in Vc){var i=c[o];if(i&&ae(i.prototype,e))try{delete i.prototype[e]}catch(r){try{i.prototype[e]=t}catch(e){}}}Bc[e]&&!r||ot(Bc,e,r?t:Gc&&Uc[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,o;if(f){if(Co){if(r)for(n in Vc)if((o=c[n])&&ae(o,e))try{delete o[e]}catch(e){}if(Mc[e]&&!r)return;try{return ot(Mc,e,r?t:Gc&&Mc[e]||t)}catch(e){}}for(n in Vc)!(o=c[n])||o[e]&&!r||ot(o,e,t)}},getTypedArrayConstructor:Yc,isView:function(e){if(!j(e))return!1;var t=Kt(e);return"DataView"===t||ae(Vc,t)||ae($c,t)},isTypedArray:Jc,TypedArray:Mc,TypedArrayPrototype:Bc},Qc=Kc.NATIVE_ARRAY_BUFFER_VIEWS,Xc=c.ArrayBuffer,Zc=c.Int8Array,eu=!Qc||!u((function(){Zc(1)}))||!u((function(){new Zc(-1)}))||!Tc((function(e){new Zc,new Zc(null),new Zc(1.5),new Zc(e)}),!0)||u((function(){return 1!==new Zc(new Xc(2),1,void 0).length})),tu=RangeError,ru=function(e){if(void 0===e)return 0;var t=ct(e),r=ht(t);if(t!==r)throw tu("Wrong length or index");return r},nu=Array,ou=Math.abs,iu=Math.pow,au=Math.floor,su=Math.log,cu=Math.LN2,uu=function(e,t,r){var n,o,i,a=nu(r),s=8*r-t-1,c=(1<<s)-1,u=c>>1,f=23===t?iu(2,-24)-iu(2,-77):0,l=e<0||0===e&&1/e<0?1:0,d=0;for((e=ou(e))!=e||e===1/0?(o=e!=e?1:0,n=c):(n=au(su(e)/cu),e*(i=iu(2,-n))<1&&(n--,i*=2),(e+=n+u>=1?f/i:f*iu(2,1-u))*i>=2&&(n++,i/=2),n+u>=c?(o=0,n=c):n+u>=1?(o=(e*i-1)*iu(2,t),n+=u):(o=e*iu(2,u-1)*iu(2,t),n=0));t>=8;)a[d++]=255&o,o/=256,t-=8;for(n=n<<t|o,s+=t;s>0;)a[d++]=255&n,n/=256,s-=8;return a[--d]|=128*l,a},fu=function(e,t){var r,n=e.length,o=8*n-t-1,i=(1<<o)-1,a=i>>1,s=o-7,c=n-1,u=e[c--],f=127&u;for(u>>=7;s>0;)f=256*f+e[c--],s-=8;for(r=f&(1<<-s)-1,f>>=-s,s+=t;s>0;)r=256*r+e[c--],s-=8;if(0===f)f=1-a;else{if(f===i)return r?NaN:u?-1/0:1/0;r+=iu(2,t),f-=a}return(u?-1:1)*r*iu(2,f-t)},lu=function(e){for(var t=oe(this),r=pt(t),n=arguments.length,o=lt(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,a=void 0===i?r:lt(i,r);a>o;)t[o++]=e;return t},du=xt.f,hu=je.f,pu=Me.PROPER,gu=Me.CONFIGURABLE,yu=rt.get,vu=rt.set,mu=c.ArrayBuffer,bu=mu,wu=bu&&bu.prototype,ku=c.DataView,xu=ku&&ku.prototype,_u=Object.prototype,Iu=c.Array,Ou=c.RangeError,Cu=x(lu),Su=x([].reverse),Pu=uu,Tu=fu,zu=function(e){return[255&e]},Eu=function(e){return[255&e,e>>8&255]},Au=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},ju=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Ru=function(e){return Pu(e,23,4)},Uu=function(e){return Pu(e,52,8)},Lu=function(e,t){hu(e.prototype,t,{get:function(){return yu(this)[t]}})},qu=function(e,t,r,n){var o=ru(r),i=yu(e);if(o+t>i.byteLength)throw Ou("Wrong index");var a=yu(i.buffer).bytes,s=o+i.byteOffset,c=fr(a,s,s+t);return n?c:Su(c)},Mu=function(e,t,r,n,o,i){var a=ru(r),s=yu(e);if(a+t>s.byteLength)throw Ou("Wrong index");for(var c=yu(s.buffer).bytes,u=a+s.byteOffset,f=n(+o),l=0;l<t;l++)c[u+l]=f[i?l:t-l-1]};if(zc){var Bu=pu&&"ArrayBuffer"!==mu.name;if(u((function(){mu(1)}))&&u((function(){new mu(-1)}))&&!u((function(){return new mu,new mu(1.5),new mu(NaN),Bu&&!gu})))Bu&&gu&&Re(mu,"name","ArrayBuffer");else{(bu=function(e){return ri(this,wu),new mu(ru(e))}).prototype=wu;for(var Fu,Nu=du(mu),Wu=0;Nu.length>Wu;)(Fu=Nu[Wu++])in bu||Re(bu,Fu,mu[Fu]);wu.constructor=bu}Co&&vo(xu)!==_u&&Co(xu,_u);var Du=new ku(new bu(2)),Gu=x(xu.setInt8);Du.setInt8(0,2147483648),Du.setInt8(1,2147483649),!Du.getInt8(0)&&Du.getInt8(1)||Li(xu,{setInt8:function(e,t){Gu(this,e,t<<24>>24)},setUint8:function(e,t){Gu(this,e,t<<24>>24)}},{unsafe:!0})}else wu=(bu=function(e){ri(this,wu);var t=ru(e);vu(this,{bytes:Cu(Iu(t),0),byteLength:t}),f||(this.byteLength=t)}).prototype,xu=(ku=function(e,t,r){ri(this,xu),ri(e,wu);var n=yu(e).byteLength,o=ct(t);if(o<0||o>n)throw Ou("Wrong offset");if(o+(r=void 0===r?n-o:ht(r))>n)throw Ou("Wrong length");vu(this,{buffer:e,byteLength:r,byteOffset:o}),f||(this.buffer=e,this.byteLength=r,this.byteOffset=o)}).prototype,f&&(Lu(bu,"byteLength"),Lu(ku,"buffer"),Lu(ku,"byteLength"),Lu(ku,"byteOffset")),Li(xu,{getInt8:function(e){return qu(this,1,e)[0]<<24>>24},getUint8:function(e){return qu(this,1,e)[0]},getInt16:function(e){var t=qu(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=qu(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return ju(qu(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return ju(qu(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Tu(qu(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Tu(qu(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Mu(this,1,e,zu,t)},setUint8:function(e,t){Mu(this,1,e,zu,t)},setInt16:function(e,t){Mu(this,2,e,Eu,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Mu(this,2,e,Eu,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Mu(this,4,e,Au,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Mu(this,4,e,Au,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Mu(this,4,e,Ru,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Mu(this,8,e,Uu,t,arguments.length>2?arguments[2]:void 0)}});br(bu,"ArrayBuffer"),br(ku,"DataView");var Hu={ArrayBuffer:bu,DataView:ku},Vu=Math.floor,$u=Number.isInteger||function(e){return!j(e)&&isFinite(e)&&Vu(e)===e},Yu=RangeError,Ju=RangeError,Ku=function(e,t){var r=function(e){var t=ct(e);if(t<0)throw Yu("The argument can't be less than 0");return t}(e);if(r%t)throw Ju("Wrong offset");return r},Qu=TypeError,Xu=function(e){if(Er(e))return e;throw Qu(Y(e)+" is not a constructor")},Zu=Kc.aTypedArrayConstructor,ef=function(e){var t,r,n,o,i,a,s=Xu(this),c=oe(e),u=arguments.length,f=u>1?arguments[1]:void 0,l=void 0!==f,d=hi(c);if(d&&!li(d))for(a=(i=gi(c,d)).next,c=[];!(o=h(a,i)).done;)c.push(o.value);for(l&&u>2&&(f=kr(f,arguments[2])),r=pt(c),n=new(Zu(s))(r),t=0;r>t;t++)n[t]=l?f(c[t],t):c[t];return n},tf=ge("species"),rf=function(e){var t=U(e),r=je.f;f&&t&&!t[tf]&&r(t,tf,{configurable:!0,get:function(){return this}})};o((function(e){var t=xt.f,r=qr.forEach,n=rt.get,o=rt.set,i=rt.enforce,a=je.f,s=Oe.f,u=Math.round,l=c.RangeError,d=Hu.ArrayBuffer,p=d.prototype,g=Hu.DataView,y=Kc.NATIVE_ARRAY_BUFFER_VIEWS,m=Kc.TYPED_ARRAY_TAG,b=Kc.TypedArray,w=Kc.TypedArrayPrototype,k=Kc.aTypedArrayConstructor,x=Kc.isTypedArray,_=function(e,t){k(e);for(var r=0,n=t.length,o=new e(n);n>r;)o[r]=t[r++];return o},I=function(e,t){a(e,t,{get:function(){return n(this)[t]}})},O=function(e){var t;return L(p,e)||"ArrayBuffer"==(t=Kt(e))||"SharedArrayBuffer"==t},C=function(e,t){return x(e)&&!V(t)&&t in e&&$u(+t)&&t>=0},S=function(e,t){return t=be(t),C(e,t)?v(2,e[t]):s(e,t)},P=function(e,t,r){return t=be(t),!(C(e,t)&&j(r)&&ae(r,"value"))||ae(r,"get")||ae(r,"set")||r.configurable||ae(r,"writable")&&!r.writable||ae(r,"enumerable")&&!r.enumerable?a(e,t,r):(e[t]=r.value,e)};f?(y||(Oe.f=S,je.f=P,I(w,"buffer"),I(w,"byteOffset"),I(w,"byteLength"),I(w,"length")),Ut({target:"Object",stat:!0,forced:!y},{getOwnPropertyDescriptor:S,defineProperty:P}),e.exports=function(e,s,f){var p=e.match(/\d+$/)[0]/8,v=e+(f?"Clamped":"")+"Array",k="get"+e,I="set"+e,C=c[v],S=C,P=S&&S.prototype,T={},z=function(e,t){a(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[k](t*p+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var o=n(e);f&&(r=(r=u(r))<0?0:r>255?255:255&r),o.view[I](t*p+o.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};y?eu&&(S=s((function(e,t,r,n){return ri(e,P),function(e,t,r){var n,o;return Co&&A(n=t.constructor)&&n!==r&&j(o=n.prototype)&&o!==r.prototype&&Co(e,o),e}(j(t)?O(t)?void 0!==n?new C(t,Ku(r,p),n):void 0!==r?new C(t,Ku(r,p)):new C(t):x(t)?_(S,t):h(ef,S,t):new C(ru(t)),e,S)})),Co&&Co(S,b),r(t(C),(function(e){e in S||Re(S,e,C[e])})),S.prototype=P):(S=s((function(e,t,r,n){ri(e,P);var i,a,s,c=0,u=0;if(j(t)){if(!O(t))return x(t)?_(S,t):h(ef,S,t);i=t,u=Ku(r,p);var f=t.byteLength;if(void 0===n){if(f%p)throw l("Wrong length");if((a=f-u)<0)throw l("Wrong length")}else if((a=ht(n)*p)+u>f)throw l("Wrong length");s=a/p}else s=ru(t),i=new d(a=s*p);for(o(e,{buffer:i,byteOffset:u,byteLength:a,length:s,view:new g(i)});c<s;)z(e,c++)})),Co&&Co(S,b),P=S.prototype=ar(w)),P.constructor!==S&&Re(P,"constructor",S),i(P).TypedArrayConstructor=S,m&&Re(P,m,v);var E=S!=C;T[v]=S,Ut({global:!0,constructor:!0,forced:E,sham:!y},T),"BYTES_PER_ELEMENT"in S||Re(S,"BYTES_PER_ELEMENT",p),"BYTES_PER_ELEMENT"in P||Re(P,"BYTES_PER_ELEMENT",p),rf(v)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var nf=TypeError,of=function(e,t){if(!delete e[t])throw nf("Cannot delete property "+Y(t)+" of "+Y(e))},af=Math.min,sf=x([].copyWithin||function(e,t){var r=oe(this),n=pt(r),o=lt(e,n),i=lt(t,n),a=arguments.length>2?arguments[2]:void 0,s=af((void 0===a?n:lt(a,n))-i,n-o),c=1;for(i<o&&o<i+s&&(c=-1,i+=s-1,o+=s-1);s-- >0;)i in r?r[o]=r[i]:of(r,o),o+=c,i+=c;return r}),cf=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("copyWithin",(function(e,t){return sf(cf(this),e,t,arguments.length>2?arguments[2]:void 0)}));var uf=qr.every,ff=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("every",(function(e){return uf(ff(this),e,arguments.length>1?arguments[1]:void 0)}));var lf=TypeError,df=function(e){var t=me(e,"number");if("number"==typeof t)throw lf("Can't convert number to bigint");return BigInt(t)},hf=Kc.aTypedArray,pf=Kc.exportTypedArrayMethod,gf=x("".slice);pf("fill",(function(e){var t=arguments.length;hf(this);var r="Big"===gf(Kt(this),0,3)?df(e):+e;return h(lu,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),u((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var yf=ge("species"),vf=function(e,t){var r,n=Te(e).constructor;return void 0===n||null==(r=Te(n)[yf])?t:Xu(r)},mf=Kc.aTypedArrayConstructor,bf=Kc.getTypedArrayConstructor,wf=function(e){return mf(vf(e,bf(e)))},kf=function(e,t){return function(e,t){for(var r=0,n=pt(t),o=new e(n);n>r;)o[r]=t[r++];return o}(wf(e),t)},xf=qr.filter,_f=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("filter",(function(e){var t=xf(_f(this),e,arguments.length>1?arguments[1]:void 0);return kf(this,t)}));var If=qr.find,Of=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("find",(function(e){return If(Of(this),e,arguments.length>1?arguments[1]:void 0)}));var Cf=qr.findIndex,Sf=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("findIndex",(function(e){return Cf(Sf(this),e,arguments.length>1?arguments[1]:void 0)}));var Pf=qr.forEach,Tf=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("forEach",(function(e){Pf(Tf(this),e,arguments.length>1?arguments[1]:void 0)}));var zf=yt.includes,Ef=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("includes",(function(e){return zf(Ef(this),e,arguments.length>1?arguments[1]:void 0)}));var Af=yt.indexOf,jf=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("indexOf",(function(e){return Af(jf(this),e,arguments.length>1?arguments[1]:void 0)}));var Rf=ge("iterator"),Uf=c.Uint8Array,Lf=x(qo.values),qf=x(qo.keys),Mf=x(qo.entries),Bf=Kc.aTypedArray,Ff=Kc.exportTypedArrayMethod,Nf=Uf&&Uf.prototype,Wf=!u((function(){Nf[Rf].call([1])})),Df=!!Nf&&Nf.values&&Nf[Rf]===Nf.values&&"values"===Nf.values.name,Gf=function(){return Lf(Bf(this))};Ff("entries",(function(){return Mf(Bf(this))}),Wf),Ff("keys",(function(){return qf(Bf(this))}),Wf),Ff("values",Gf,Wf||!Df,{name:"values"}),Ff(Rf,Gf,Wf||!Df,{name:"values"});var Hf=Kc.aTypedArray,Vf=Kc.exportTypedArrayMethod,$f=x([].join);Vf("join",(function(e){return $f(Hf(this),e)}));var Yf=Math.min,Jf=[].lastIndexOf,Kf=!!Jf&&1/[1].lastIndexOf(1,-0)<0,Qf=Hn("lastIndexOf"),Xf=Kf||!Qf?function(e){if(Kf)return mn(Jf,this,arguments)||0;var t=E(this),r=pt(t),n=r-1;for(arguments.length>1&&(n=Yf(n,ct(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:Jf,Zf=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return mn(Xf,Zf(this),t>1?[e,arguments[1]]:[e])}));var el=qr.map,tl=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("map",(function(e){return el(tl(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(wf(e))(t)}))}));var rl=TypeError,nl=function(e){return function(t,r,n,o){K(r);var i=oe(t),a=P(i),s=pt(i),c=e?s-1:0,u=e?-1:1;if(n<2)for(;;){if(c in a){o=a[c],c+=u;break}if(c+=u,e?c<0:s<=c)throw rl("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=u)c in a&&(o=r(o,a[c],c,i));return o}},ol={left:nl(!1),right:nl(!0)},il=ol.left,al=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return il(al(this),e,t,t>1?arguments[1]:void 0)}));var sl=ol.right,cl=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return sl(cl(this),e,t,t>1?arguments[1]:void 0)}));var ul=Kc.aTypedArray,fl=Kc.exportTypedArrayMethod,ll=Math.floor;fl("reverse",(function(){for(var e,t=ul(this).length,r=ll(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var dl=c.RangeError,hl=c.Int8Array,pl=hl&&hl.prototype,gl=pl&&pl.set,yl=Kc.aTypedArray,vl=Kc.exportTypedArrayMethod,ml=!u((function(){var e=new Uint8ClampedArray(2);return h(gl,e,{length:1,0:3},1),3!==e[1]})),bl=ml&&Kc.NATIVE_ARRAY_BUFFER_VIEWS&&u((function(){var e=new hl(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));vl("set",(function(e){yl(this);var t=Ku(arguments.length>1?arguments[1]:void 0,1),r=oe(e);if(ml)return h(gl,this,r,t);var n=this.length,o=pt(r),i=0;if(o+t>n)throw dl("Wrong length");for(;i<o;)this[t+i]=r[i++]}),!ml||bl);var wl=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("slice",(function(e,t){for(var r=bn(wl(this),e,t),n=wf(this),o=0,i=r.length,a=new n(i);i>o;)a[o]=r[o++];return a}),u((function(){new Int8Array(1).slice()})));var kl=qr.some,xl=Kc.aTypedArray;(0,Kc.exportTypedArrayMethod)("some",(function(e){return kl(xl(this),e,arguments.length>1?arguments[1]:void 0)}));var _l=q.match(/firefox\/(\d+)/i),Il=!!_l&&+_l[1],Ol=/MSIE|Trident/.test(q),Cl=q.match(/AppleWebKit\/(\d+)\./),Sl=!!Cl&&+Cl[1],Pl=Kc.aTypedArray,Tl=Kc.exportTypedArrayMethod,zl=c.Uint16Array,El=zl&&x(zl.prototype.sort),Al=!(!El||u((function(){El(new zl(2),null)}))&&u((function(){El(new zl(2),{})}))),jl=!!El&&!u((function(){if(W)return W<74;if(Il)return Il<67;if(Ol)return!0;if(Sl)return Sl<602;var e,t,r=new zl(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(El(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));Tl("sort",(function(e){return void 0!==e&&K(e),jl?El(this,e):Ni(Pl(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!jl||Al);var Rl=c.Int8Array,Ul=Kc.aTypedArray,Ll=Kc.exportTypedArrayMethod,ql=[].toLocaleString,Ml=!!Rl&&u((function(){ql.call(new Rl(1))}));Ll("toLocaleString",(function(){return mn(ql,Ml?bn(Ul(this)):Ul(this),bn(arguments))}),u((function(){return[1,2].toLocaleString()!=new Rl([1,2]).toLocaleString()}))||!u((function(){Rl.prototype.toLocaleString.call([1,2])})));var Bl=Kc.exportTypedArrayMethod,Fl=c.Uint8Array,Nl=Fl&&Fl.prototype||{},Wl=[].toString,Dl=x([].join);u((function(){Wl.call({})}))&&(Wl=function(){return Dl(this)});var Gl=Nl.toString!=Wl;Bl("toString",Wl,Gl);var Hl=Do.charAt,Vl=function(e,t,r){return t+(r?Hl(e,t).length:1)},$l=Math.floor,Yl=x("".charAt),Jl=x("".replace),Kl=x("".slice),Ql=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Xl=/\$([$&'`]|\d{1,2})/g,Zl=function(e,t,r,n,o,i){var a=r+e.length,s=n.length,c=Xl;return void 0!==o&&(o=oe(o),c=Ql),Jl(i,c,(function(i,c){var u;switch(Yl(c,0)){case"$":return"$";case"&":return e;case"`":return Kl(t,0,r);case"'":return Kl(t,a);case"<":u=o[Kl(c,1,-1)];break;default:var f=+c;if(0===f)return i;if(f>s){var l=$l(f/10);return 0===l?i:l<=s?void 0===n[l-1]?Yl(c,1):n[l-1]+Yl(c,1):i}u=n[f-1]}return void 0===u?"":u}))},ed=ge("replace"),td=Math.max,rd=Math.min,nd=x([].concat),od=x([].push),id=x("".indexOf),ad=x("".slice),sd="$0"==="a".replace(/./,"$0"),cd=!!/./[ed]&&""===/./[ed]("a","$0");yc("replace",(function(e,t,r){var n=cd?"$":"$0";return[function(e,r){var n=z(this),o=null==e?void 0:Q(e,ed);return o?h(o,e,n,r):h(t,Xt(n),e,r)},function(e,o){var i=Te(this),a=Xt(e);if("string"==typeof o&&-1===id(o,n)&&-1===id(o,"$<")){var s=r(t,i,a,o);if(s.done)return s.value}var c=A(o);c||(o=Xt(o));var u=i.global;if(u){var f=i.unicode;i.lastIndex=0}for(var l=[];;){var d=bc(i,a);if(null===d)break;if(od(l,d),!u)break;""===Xt(d[0])&&(i.lastIndex=Vl(a,ht(i.lastIndex),f))}for(var h,p="",g=0,y=0;y<l.length;y++){for(var v=Xt((d=l[y])[0]),m=td(rd(ct(d.index),a.length),0),b=[],w=1;w<d.length;w++)od(b,void 0===(h=d[w])?h:String(h));var k=d.groups;if(c){var x=nd([v],b,m,a);void 0!==k&&od(x,k);var _=Xt(mn(o,void 0,x))}else _=Zl(v,a,m,b,k,o);m>=g&&(p+=ad(a,g,m)+_,g=m+v.length)}return p+ad(a,g)}]}),!!u((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!sd||cd);var ud,fd,ld,dd,hd="process"==O(c.process),pd=/(?:ipad|iphone|ipod).*applewebkit/i.test(q),gd=c.setImmediate,yd=c.clearImmediate,vd=c.process,md=c.Dispatch,bd=c.Function,wd=c.MessageChannel,kd=c.String,xd=0,_d={};try{ud=c.location}catch(e){}var Id=function(e){if(ae(_d,e)){var t=_d[e];delete _d[e],t()}},Od=function(e){return function(){Id(e)}},Cd=function(e){Id(e.data)},Sd=function(e){c.postMessage(kd(e),ud.protocol+"//"+ud.host)};gd&&yd||(gd=function(e){Ui(arguments.length,1);var t=A(e)?e:bd(e),r=bn(arguments,1);return _d[++xd]=function(){mn(t,void 0,r)},fd(xd),xd},yd=function(e){delete _d[e]},hd?fd=function(e){vd.nextTick(Od(e))}:md&&md.now?fd=function(e){md.now(Od(e))}:wd&&!pd?(dd=(ld=new wd).port2,ld.port1.onmessage=Cd,fd=kr(dd.postMessage,dd)):c.addEventListener&&A(c.postMessage)&&!c.importScripts&&ud&&"file:"!==ud.protocol&&!u(Sd)?(fd=Sd,c.addEventListener("message",Cd,!1)):fd="onreadystatechange"in xe("script")?function(e){er.appendChild(xe("script")).onreadystatechange=function(){er.removeChild(this),Id(e)}}:function(e){setTimeout(Od(e),0)});var Pd,Td,zd,Ed,Ad,jd,Rd,Ud,Ld={set:gd,clear:yd},qd=/ipad|iphone|ipod/i.test(q)&&void 0!==c.Pebble,Md=/web0s(?!.*chrome)/i.test(q),Bd=Oe.f,Fd=Ld.set,Nd=c.MutationObserver||c.WebKitMutationObserver,Wd=c.document,Dd=c.process,Gd=c.Promise,Hd=Bd(c,"queueMicrotask"),Vd=Hd&&Hd.value;Vd||(Pd=function(){var e,t;for(hd&&(e=Dd.domain)&&e.exit();Td;){t=Td.fn,Td=Td.next;try{t()}catch(e){throw Td?Ed():zd=void 0,e}}zd=void 0,e&&e.enter()},pd||hd||Md||!Nd||!Wd?!qd&&Gd&&Gd.resolve?((Rd=Gd.resolve(void 0)).constructor=Gd,Ud=kr(Rd.then,Rd),Ed=function(){Ud(Pd)}):hd?Ed=function(){Dd.nextTick(Pd)}:(Fd=kr(Fd,c),Ed=function(){Fd(Pd)}):(Ad=!0,jd=Wd.createTextNode(""),new Nd(Pd).observe(jd,{characterData:!0}),Ed=function(){jd.data=Ad=!Ad}));var $d=Vd||function(e){var t={fn:e,next:void 0};zd&&(zd.next=t),Td||(Td=t,Ed()),zd=t},Yd=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Jd=function(){this.head=null,this.tail=null};Jd.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var Kd=Jd,Qd=c.Promise,Xd="object"==typeof window&&"object"!=typeof Deno;Qd&&Qd.prototype;var Zd,eh,th,rh=ge("species"),nh=!1,oh=A(c.PromiseRejectionEvent),ih={CONSTRUCTOR:jt("Promise",(function(){var e=De(Qd),t=e!==String(Qd);if(!t&&66===W)return!0;if(W>=51&&/native code/.test(e))return!1;var r=new Qd((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[rh]=n,!(nh=r.then((function(){}))instanceof n)||!t&&Xd&&!oh})),REJECTION_EVENT:oh,SUBCLASSING:nh},ah=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=K(t),this.reject=K(r)},sh={f:function(e){return new ah(e)}},ch=Ld.set,uh=ih.CONSTRUCTOR,fh=ih.REJECTION_EVENT,lh=ih.SUBCLASSING,dh=rt.getterFor("Promise"),hh=rt.set,ph=Qd&&Qd.prototype,gh=Qd,yh=ph,vh=c.TypeError,mh=c.document,bh=c.process,wh=sh.f,kh=wh,xh=!!(mh&&mh.createEvent&&c.dispatchEvent),_h=function(e){var t;return!(!j(e)||!A(t=e.then))&&t},Ih=function(e,t){var r,n,o,i=t.value,a=1==t.state,s=a?e.ok:e.fail,c=e.resolve,u=e.reject,f=e.domain;try{s?(a||(2===t.rejection&&Th(t),t.rejection=1),!0===s?r=i:(f&&f.enter(),r=s(i),f&&(f.exit(),o=!0)),r===e.promise?u(vh("Promise-chain cycle")):(n=_h(r))?h(n,r,c,u):c(r)):u(i)}catch(e){f&&!o&&f.exit(),u(e)}},Oh=function(e,t){e.notified||(e.notified=!0,$d((function(){for(var r,n=e.reactions;r=n.get();)Ih(r,e);e.notified=!1,t&&!e.rejection&&Sh(e)})))},Ch=function(e,t,r){var n,o;xh?((n=mh.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),c.dispatchEvent(n)):n={promise:t,reason:r},!fh&&(o=c["on"+e])?o(n):"unhandledrejection"===e&&function(e,t){var r=c.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},Sh=function(e){h(ch,c,(function(){var t,r=e.facade,n=e.value;if(Ph(e)&&(t=Yd((function(){hd?bh.emit("unhandledRejection",n,r):Ch("unhandledrejection",r,n)})),e.rejection=hd||Ph(e)?2:1,t.error))throw t.value}))},Ph=function(e){return 1!==e.rejection&&!e.parent},Th=function(e){h(ch,c,(function(){var t=e.facade;hd?bh.emit("rejectionHandled",t):Ch("rejectionhandled",t,e.value)}))},zh=function(e,t,r){return function(n){e(t,n,r)}},Eh=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Oh(e,!0))},Ah=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw vh("Promise can't be resolved itself");var n=_h(t);n?$d((function(){var r={done:!1};try{h(n,t,zh(Ah,r,e),zh(Eh,r,e))}catch(t){Eh(r,t,e)}})):(e.value=t,e.state=1,Oh(e,!1))}catch(t){Eh({done:!1},t,e)}}};if(uh&&(yh=(gh=function(e){ri(this,yh),K(e),h(Zd,this);var t=dh(this);try{e(zh(Ah,t),zh(Eh,t))}catch(e){Eh(t,e)}}).prototype,(Zd=function(e){hh(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Kd,rejection:!1,state:0,value:void 0})}).prototype=ot(yh,"then",(function(e,t){var r=dh(this),n=wh(vf(this,gh));return r.parent=!0,n.ok=!A(e)||e,n.fail=A(t)&&t,n.domain=hd?bh.domain:void 0,0==r.state?r.reactions.add(n):$d((function(){Ih(n,r)})),n.promise})),eh=function(){var e=new Zd,t=dh(e);this.promise=e,this.resolve=zh(Ah,t),this.reject=zh(Eh,t)},sh.f=wh=function(e){return e===gh||void 0===e?new eh(e):kh(e)},A(Qd)&&ph!==Object.prototype)){th=ph.then,lh||ot(ph,"then",(function(e,t){var r=this;return new gh((function(e,t){h(th,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete ph.constructor}catch(e){}Co&&Co(ph,yh)}Ut({global:!0,constructor:!0,wrap:!0,forced:uh},{Promise:gh}),br(gh,"Promise",!1),rf("Promise");var jh=TypeError,Rh=function(e,t){this.stopped=e,this.result=t},Uh=Rh.prototype,Lh=function(e,t,r){var n,o,i,a,s,c,u,f=r&&r.that,l=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),p=!(!r||!r.IS_ITERATOR),g=!(!r||!r.INTERRUPTED),y=kr(t,f),v=function(e){return n&&si(n,"normal",e),new Rh(!0,e)},m=function(e){return l?(Te(e),g?y(e[0],e[1],v):y(e[0],e[1])):g?y(e,v):y(e)};if(d)n=e.iterator;else if(p)n=e;else{if(!(o=hi(e)))throw jh(Y(e)+" is not iterable");if(li(o)){for(i=0,a=pt(e);a>i;i++)if((s=m(e[i]))&&L(Uh,s))return s;return new Rh(!1)}n=gi(e,o)}for(c=d?e.next:n.next;!(u=h(c,n)).done;){try{s=m(u.value)}catch(e){si(n,"throw",e)}if("object"==typeof s&&s&&L(Uh,s))return s}return new Rh(!1)},qh=ih.CONSTRUCTOR||!Tc((function(e){Qd.all(e).then(void 0,(function(){}))}));Ut({target:"Promise",stat:!0,forced:qh},{all:function(e){var t=this,r=sh.f(t),n=r.resolve,o=r.reject,i=Yd((function(){var r=K(t.resolve),i=[],a=0,s=1;Lh(e,(function(e){var c=a++,u=!1;s++,h(r,t,e).then((function(e){u||(u=!0,i[c]=e,--s||n(i))}),o)})),--s||n(i)}));return i.error&&o(i.value),r.promise}});var Mh=ih.CONSTRUCTOR,Bh=Qd&&Qd.prototype;if(Ut({target:"Promise",proto:!0,forced:Mh,real:!0},{catch:function(e){return this.then(void 0,e)}}),A(Qd)){var Fh=U("Promise").prototype.catch;Bh.catch!==Fh&&ot(Bh,"catch",Fh,{unsafe:!0})}Ut({target:"Promise",stat:!0,forced:qh},{race:function(e){var t=this,r=sh.f(t),n=r.reject,o=Yd((function(){var o=K(t.resolve);Lh(e,(function(e){h(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}}),Ut({target:"Promise",stat:!0,forced:ih.CONSTRUCTOR},{reject:function(e){var t=sh.f(this);return h(t.reject,void 0,e),t.promise}});var Nh=ih.CONSTRUCTOR;U("Promise"),Ut({target:"Promise",stat:!0,forced:Nh},{resolve:function(e){return function(e,t){if(Te(e),j(t)&&t.constructor===e)return t;var r=sh.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Ut({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Lh(e,(function(e,r){sr(t,e,r)}),{AS_ENTRIES:!0}),t}});var Wh=TypeError,Dh=function(e){if(e>9007199254740991)throw Wh("Maximum allowed index exceeded");return e},Gh=ge("isConcatSpreadable"),Hh=W>=51||!u((function(){var e=[];return e[Gh]=!1,e.concat()[0]!==e})),Vh=Un("concat"),$h=function(e){if(!j(e))return!1;var t=e[Gh];return void 0!==t?!!t:xr(e)};function Yh(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Jh(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kh(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Qh(e){return function(e){if(Array.isArray(e))return Kh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Kh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Kh(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xh(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function Zh(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Xh(i,n,o,a,s,"next",e)}function s(e){Xh(i,n,o,a,s,"throw",e)}a(void 0)}))}}Ut({target:"Array",proto:!0,arity:1,forced:!Hh||!Vh},{concat:function(e){var t,r,n,o,i,a=oe(this),s=Rr(a,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if($h(i=-1===t?a:arguments[t]))for(o=pt(i),Dh(c+o),r=0;r<o;r++,c++)r in i&&sr(s,c,i[r]);else Dh(c+1),sr(s,c++,i);return s.length=c,s}});var ep=Object.prototype,tp=ep.hasOwnProperty,rp="function"==typeof Symbol?Symbol:{},np=rp.iterator||"@@iterator",op=rp.asyncIterator||"@@asyncIterator",ip=rp.toStringTag||"@@toStringTag";function ap(e,t,r,n){var o=t&&t.prototype instanceof up?t:up,i=Object.create(o.prototype),a=new xp(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return Ip()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var s=bp(a,r);if(s){if(s===cp)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=sp(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===cp)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,a),i}function sp(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var cp={};function up(){}function fp(){}function lp(){}var dp={};dp[np]=function(){return this};var hp=Object.getPrototypeOf,pp=hp&&hp(hp(_p([])));pp&&pp!==ep&&tp.call(pp,np)&&(dp=pp);var gp=lp.prototype=up.prototype=Object.create(dp);function yp(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function vp(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===fp||"GeneratorFunction"===(t.displayName||t.name))}function mp(e,t){var r;this._invoke=function(n,o){function i(){return new t((function(r,i){!function r(n,o,i,a){var s=sp(e[n],e,o);if("throw"!==s.type){var c=s.arg,u=c.value;return u&&"object"==typeof u&&tp.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,i,a)}),(function(e){r("throw",e,i,a)})):t.resolve(u).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,a)}))}a(s.arg)}(n,o,r,i)}))}return r=r?r.then(i,i):i()}}function bp(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,bp(e,t),"throw"===t.method))return cp;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return cp}var n=sp(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,cp;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,cp):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,cp)}function wp(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function kp(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function xp(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(wp,this),this.reset(!0)}function _p(e){if(e){var t=e[np];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(tp.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:Ip}}function Ip(){return{value:void 0,done:!0}}fp.prototype=gp.constructor=lp,lp.constructor=fp,lp[ip]=fp.displayName="GeneratorFunction",yp(mp.prototype),mp.prototype[op]=function(){return this},yp(gp),gp[ip]="Generator",gp[np]=function(){return this},gp.toString=function(){return"[object Generator]"},xp.prototype={constructor:xp,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(kp),!e)for(var t in this)"t"===t.charAt(0)&&tp.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var a=tp.call(o,"catchLoc"),s=tp.call(o,"finallyLoc");if(a&&s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&tp.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,cp):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),cp},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),kp(r),cp}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;kp(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:_p(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),cp}};var Op,Cp={wrap:ap,isGeneratorFunction:vp,AsyncIterator:mp,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,lp):(e.__proto__=lp,ip in e||(e[ip]="GeneratorFunction")),e.prototype=Object.create(gp),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,o){void 0===o&&(o=Promise);var i=new mp(ap(e,t,r,n),o);return vp(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},keys:function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},values:_p},Sp=ge("match"),Pp=TypeError,Tp=function(e){if(function(e){var t;return j(e)&&(void 0!==(t=e[Sp])?!!t:"RegExp"==O(e))}(e))throw Pp("The method doesn't accept regular expressions");return e},zp=ge("match"),Ep=Oe.f,Ap=x("".startsWith),jp=x("".slice),Rp=Math.min,Up=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[zp]=!1,"/./"[e](t)}catch(e){}}return!1}("startsWith"),Lp=!(Up||(Op=Ep(String.prototype,"startsWith"),!Op||Op.writable));function qp(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mp(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Bp(e,t,r){return t&&Mp(e.prototype,t),r&&Mp(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Fp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Np(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fp(Object(r),!0).forEach((function(t){Jh(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fp(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ut({target:"String",proto:!0,forced:!Lp&&!Up},{startsWith:function(e){var t=Xt(z(this));Tp(e);var r=ht(Rp(arguments.length>1?arguments[1]:void 0,t.length)),n=Xt(e);return Ap?Ap(t,n,r):jp(t,r,r+n.length)===n}});var Wp=Bp((function e(t){if(qp(this,e),Jh(this,"baseUri",void 0),Jh(this,"proxy",void 0),Jh(this,"headers",void 0),Jh(this,"parameters",void 0),Jh(this,"fetchOptions",void 0),Jh(this,"transformRequest",void 0),Jh(this,"throwOnBadResponse",void 0),this.headers=Np({},t.headers),this.parameters=Np({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Np({credentials:"omit"},t.fetchOptions),this.transformRequest=t.transformRequest||e.defaults.transformRequest,t.baseUri&&(this.baseUri=t.baseUri),t.proxy&&(this.proxy=t.proxy),this.throwOnBadResponse=!!t.throwOnBadResponse}));Jh(Wp,"defaults",{transformRequest:function(e,t){switch(t["Content-Type"]){case"application/json":return JSON.stringify(e);case"application/x-www-form-urlencoded":return new URLSearchParams(e);default:return e}}});var Dp=Function,Gp=x([].concat),Hp=x([].join),Vp={},$p=function(e,t,r){if(!ae(Vp,t)){for(var n=[],o=0;o<t;o++)n[o]="a["+o+"]";Vp[t]=Dp("C,a","return new C("+Hp(n,",")+")")}return Vp[t](e,r)},Yp=l?Dp.bind:function(e){var t=K(this),r=t.prototype,n=bn(arguments,1),o=function(){var r=Gp(n,bn(arguments));return this instanceof o?$p(t,r.length,r):t.apply(e,r)};return j(r)&&(o.prototype=r),o},Jp=U("Reflect","construct"),Kp=Object.prototype,Qp=[].push,Xp=u((function(){function e(){}return!(Jp((function(){}),[],e)instanceof e)})),Zp=!u((function(){Jp((function(){}))})),eg=Xp||Zp;function tg(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rg(e,t){return(rg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ng(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rg(e,t)}function og(e,t){if(t&&("object"===Lt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return tg(e)}function ig(e){return(ig=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ag(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function sg(e,t,r){return(sg=ag()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&rg(o,r.prototype),o}).apply(null,arguments)}function cg(e){var t="function"==typeof Map?new Map:void 0;return(cg=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return sg(e,arguments,ig(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),rg(n,e)})(e)}function ug(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ig(e);if(t){var o=ig(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return og(this,r)}}Ut({target:"Reflect",stat:!0,forced:eg,sham:eg},{construct:function(e,t){Xu(e),Te(t);var r=arguments.length<3?e:Xu(arguments[2]);if(Zp&&!Xp)return Jp(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return mn(Qp,n,t),new(mn(Yp,e,n))}var o=r.prototype,i=ar(j(o)?o:Kp),a=mn(e,i,t);return j(a)?a:i}});var fg=function(e){ng(r,cg(Error));var t=ug(r);function r(e){var n;return qp(this,r),Jh(tg(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return Bp(r)}();function lg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lg(Object(r),!0).forEach((function(t){Jh(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lg(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var hg=function(){var e=Zh(Cp.mark((function e(t,r,n,o){var i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=dg(dg({},null==n?void 0:n.headers),null==r?void 0:r.headers),s=dg(dg({},null==n?void 0:n.fetchOptions),{},{headers:a,body:null==r?void 0:r.body,method:null!==(i=null==r?void 0:r.method)&&void 0!==i?i:"GET"}),e.next=4,fetch(t,s);case 4:if(c=e.sent,!o){e.next=7;break}return e.abrupt("return",c);case 7:if(null==n||!n.throwOnBadResponse||c.ok||304===c.status){e.next=11;break}throw new fg(c);case 11:return e.next=13,c.text();case 13:return u=e.sent,e.abrupt("return",u?JSON.parse(u):{});case 15:case"end":return e.stop()}}),e)})));return function(t,r,n,o){return e.apply(this,arguments)}}(),pg=function(e){return e.replace(/%/g,"%25").replace(/,/g,"%2C")};function gg(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=ig(e);if(t){var o=ig(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return og(this,r)}}yc("match",(function(e,t,r){return[function(t){var r=z(this),n=null==t?void 0:Q(t,e);return n?h(n,t,r):new RegExp(t)[e](Xt(r))},function(e){var n=Te(this),o=Xt(e),i=r(t,n,o);if(i.done)return i.value;if(!n.global)return bc(n,o);var a=n.unicode;n.lastIndex=0;for(var s,c=[],u=0;null!==(s=bc(n,o));){var f=Xt(s[0]);c[u]=f,""===f&&(n.lastIndex=Vl(o,ht(n.lastIndex),a)),u++}return 0===u?null:c}]}));var yg=function(e){ng(r,cg(URL));var t=gg(r);function r(e,n,o){var i;qp(this,r);var a={};return Object.keys((null==o?void 0:o.pathParams)||{}).forEach((function(e){var t,r=null==o||null===(t=o.pathParams)||void 0===t?void 0:t[e];r&&(a[e]=encodeURIComponent(r))})),(i=t.call(this,r.renderTemplateUri("".concat(n,"/").concat(e).replace(/\/\/+/g,"/"),a))).addQueryParams(null==o?void 0:o.queryParams),null!=o&&o.origin&&i.replaceOrigin(null==o?void 0:o.origin),i}return Bp(r,[{key:"replaceOrigin",value:function(e){var t=new URL(e);this.protocol=t.protocol,this.host=t.host,this.pathname="".concat(t.pathname,"/").concat(this.pathname).replace(/\/\/+/g,"/")}},{key:"addQueryParams",value:function(e){var t=this;e&&Object.keys(e).forEach((function(r){var n=e[r];if(Array.isArray(n))if("refine"===r)for(var o=0;o<n.length;o+=1)t.searchParams.append(r,String(n[o]));else t.searchParams.append(r,n.join());else t.searchParams.append(r,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,t){var r=t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e,n=/(\.|%2e|%2E|%252e|%252E)+(\/|%2f|%2F|%252f|%252F)+/g;return r.match(n)&&(console.warn("Path traversal attempt detected. Normalizing url"),r=r.replace(n,"")),r}}]),r}(),vg="commerce-sdk-isomorphic@4.0.0-nightly-20251015080804";function mg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function bg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mg(Object(r),!0).forEach((function(t){Jh(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mg(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var wg=function(){function e(t){qp(this,e),Jh(this,"clientConfig",void 0);var r=bg({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wp(r)}var t,r,n,o,i,a,s,c,u,f,l,d,h,p,g,y;return Bp(e,[{key:"authenticateCustomer",value:(y=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for authenticateCustomer: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:if(u=e.sent,!r){e.next=22;break}return e.abrupt("return",u);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"authorizeCustomer",value:(g=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(a={},void 0===n.redirect_uri){e.next=17;break}a.redirect_uri=n.redirect_uri,e.next=22;break;case 17:if(void 0===o.redirect_uri){e.next=21;break}a.redirect_uri=o.redirect_uri,e.next=22;break;case 21:throw new Error("Missing required query parameter: redirect_uri");case 22:if(void 0===n.response_type){e.next=26;break}a.response_type=n.response_type,e.next=31;break;case 26:if(void 0===o.response_type){e.next=30;break}a.response_type=o.response_type,e.next=31;break;case 30:throw new Error("Missing required query parameter: response_type");case 31:if(void 0===n.client_id){e.next=35;break}a.client_id=n.client_id,e.next=40;break;case 35:if(void 0===o.client_id){e.next=39;break}a.client_id=o.client_id,e.next=40;break;case 39:throw new Error("Missing required query parameter: client_id");case 40:return void 0!==n.scope?a.scope=n.scope:void 0!==o.scope&&(a.scope=o.scope),void 0!==n.state?a.state=n.state:void 0!==o.state&&(a.state=o.state),void 0!==n.usid?a.usid=n.usid:void 0!==o.usid&&(a.usid=o.usid),void 0!==n.hint?a.hint=n.hint:void 0!==o.hint&&(a.hint=o.hint),void 0!==n.channel_id?a.channel_id=n.channel_id:void 0!==o.channel_id&&(a.channel_id=o.channel_id),void 0!==n.code_challenge?a.code_challenge=n.code_challenge:void 0!==o.code_challenge&&(a.code_challenge=o.code_challenge),void 0!==n.ui_locales?a.ui_locales=n.ui_locales:void 0!==o.ui_locales&&(a.ui_locales=o.ui_locales),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for authorizeCustomer: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=53,hg(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 53:if(u=e.sent,!r){e.next=56;break}return e.abrupt("return",u);case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(p=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},void 0!==n.register_customer?a.register_customer=n.register_customer:void 0!==o.register_customer&&(a.register_customer=o.register_customer),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for authorizePasswordlessCustomer: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=20,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 20:return u=e.sent,e.abrupt("return",u);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getAccessToken",value:(h=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getAccessToken: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getJwksUri",value:(d=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getJwksUri: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:function(){var e=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getPasswordLessAccessToken: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"getPasswordResetToken",value:(l=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getPasswordResetToken: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:if(u=e.sent,!r){e.next=22;break}return e.abrupt("return",u);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(f=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getSessionBridgeAccessToken: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(u=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getTrustedAgentAccessToken: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(c=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(a={},void 0===n.client_id){e.next=17;break}a.client_id=n.client_id,e.next=22;break;case 17:if(void 0===o.client_id){e.next=21;break}a.client_id=o.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.channel_id){e.next=26;break}a.channel_id=n.channel_id,e.next=31;break;case 26:if(void 0===o.channel_id){e.next=30;break}a.channel_id=o.channel_id,e.next=31;break;case 30:throw new Error("Missing required query parameter: channel_id");case 31:if(void 0!==n.code_challenge?a.code_challenge=n.code_challenge:void 0!==o.code_challenge&&(a.code_challenge=o.code_challenge),void 0===n.login_id){e.next=36;break}a.login_id=n.login_id,e.next=41;break;case 36:if(void 0===o.login_id){e.next=40;break}a.login_id=o.login_id,e.next=41;break;case 40:throw new Error("Missing required query parameter: login_id");case 41:if(void 0===n.idp_origin){e.next=45;break}a.idp_origin=n.idp_origin,e.next=50;break;case 45:if(void 0===o.idp_origin){e.next=49;break}a.idp_origin=o.idp_origin,e.next=50;break;case 49:throw new Error("Missing required query parameter: idp_origin");case 50:if(void 0===n.redirect_uri){e.next=54;break}a.redirect_uri=n.redirect_uri,e.next=59;break;case 54:if(void 0===o.redirect_uri){e.next=58;break}a.redirect_uri=o.redirect_uri,e.next=59;break;case 58:throw new Error("Missing required query parameter: redirect_uri");case 59:if(void 0===n.response_type){e.next=63;break}a.response_type=n.response_type,e.next=68;break;case 63:if(void 0===o.response_type){e.next=67;break}a.response_type=o.response_type,e.next=68;break;case 67:throw new Error("Missing required query parameter: response_type");case 68:return Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getTrustedAgentAuthorizationToken: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=74,hg(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 74:if(u=e.sent,!r){e.next=77;break}return e.abrupt("return",u);case 77:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(s=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getTrustedSystemAccessToken: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getUserInfo",value:(a=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},void 0!==n.channel_id?a.channel_id=n.channel_id:void 0!==o.channel_id&&(a.channel_id=o.channel_id),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getUserInfo: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=20,hg(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 20:return u=e.sent,e.abrupt("return",u);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(i=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for getWellknownOpenidConfiguration: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"introspectToken",value:(o=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for introspectToken: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"logoutCustomer",value:(n=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(a={},void 0===n.client_id){e.next=17;break}a.client_id=n.client_id,e.next=22;break;case 17:if(void 0===o.client_id){e.next=21;break}a.client_id=o.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.refresh_token){e.next=26;break}a.refresh_token=n.refresh_token,e.next=31;break;case 26:if(void 0===o.refresh_token){e.next=30;break}a.refresh_token=o.refresh_token,e.next=31;break;case 30:throw new Error("Missing required query parameter: refresh_token");case 31:return void 0!==n.channel_id?a.channel_id=n.channel_id:void 0!==o.channel_id&&(a.channel_id=o.channel_id),void 0!==n.hint?a.hint=n.hint:void 0!==o.hint&&(a.hint=o.hint),Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for logoutCustomer: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=39,hg(s.toString(),{method:"GET",headers:c},this.clientConfig,r);case 39:return u=e.sent,e.abrupt("return",u);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"resetPassword",value:(r=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for resetPassword: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:if(u=e.sent,!r){e.next=22;break}return e.abrupt("return",u);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"revokeToken",value:(t=Zh(Cp.mark((function e(t,r){var n,o,i,a,s,c,u;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},o=this.clientConfig.parameters,i={shortCode:o.shortCode},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===o.organizationId){e.next=11;break}i.organizationId=o.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return a={},Object.keys(n).forEach((function(e){var t=n[e];void 0===t||!e.startsWith("c_")&&(e in a||e in i)||(e.startsWith("c_")||console.warn("Found unknown parameter for revokeToken: ".concat(e,", adding as query parameter anyway")),a[e]=t)})),s=new yg("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:i,queryParams:a,origin:this.clientConfig.proxy}),c=bg(bg({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),qt||(c["user-agent"]=[c["user-agent"],vg].join(" ")),e.next=19,hg(s.toString(),{method:"POST",headers:c,body:this.clientConfig.transformRequest(null==t?void 0:t.body,c)},this.clientConfig,r);case 19:return u=e.sent,e.abrupt("return",u);case 21:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();Jh(wg,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/v1"),Jh(wg,"apiPaths",{authenticateCustomer:"/organizations/{organizationId}/oauth2/login",authorizeCustomer:"/organizations/{organizationId}/oauth2/authorize",authorizePasswordlessCustomer:"/organizations/{organizationId}/oauth2/passwordless/login",getAccessToken:"/organizations/{organizationId}/oauth2/token",getJwksUri:"/organizations/{organizationId}/oauth2/jwks",getPasswordLessAccessToken:"/organizations/{organizationId}/oauth2/passwordless/token",getPasswordResetToken:"/organizations/{organizationId}/oauth2/password/reset",getSessionBridgeAccessToken:"/organizations/{organizationId}/oauth2/session-bridge/token",getTrustedAgentAccessToken:"/organizations/{organizationId}/oauth2/trusted-agent/token",getTrustedAgentAuthorizationToken:"/organizations/{organizationId}/oauth2/trusted-agent/authorize",getTrustedSystemAccessToken:"/organizations/{organizationId}/oauth2/trusted-system/token",getUserInfo:"/organizations/{organizationId}/oauth2/userinfo",getWellknownOpenidConfiguration:"/organizations/{organizationId}/oauth2/.well-known/openid-configuration",introspectToken:"/organizations/{organizationId}/oauth2/introspect",logoutCustomer:"/organizations/{organizationId}/oauth2/logout",resetPassword:"/organizations/{organizationId}/oauth2/password/action",revokeToken:"/organizations/{organizationId}/oauth2/revoke"}),Jh(wg,"paramKeys",{authenticateCustomer:["organizationId","redirect_uri","channel_id","client_id","response_type","state","scope","usid","code_challenge"],authenticateCustomerRequired:["organizationId","redirect_uri","channel_id"],authorizeCustomer:["organizationId","redirect_uri","response_type","client_id","scope","state","usid","hint","channel_id","code_challenge","ui_locales"],authorizeCustomerRequired:["organizationId","redirect_uri","response_type","client_id"],authorizePasswordlessCustomer:["organizationId","user_id","mode","channel_id","register_customer","locale","usid","callback_uri","last_name","email","first_name","phone_number"],authorizePasswordlessCustomerRequired:["organizationId","user_id","mode","channel_id"],getAccessToken:["organizationId","grant_type","refresh_token","code","usid","redirect_uri","code_verifier","client_id","channel_id","dnt"],getAccessTokenRequired:["organizationId","grant_type"],getJwksUri:["organizationId"],getJwksUriRequired:["organizationId"],getPasswordLessAccessToken:["organizationId","grant_type","hint","pwdless_login_token","client_id","code_verifier"],getPasswordLessAccessTokenRequired:["organizationId","grant_type","hint","pwdless_login_token"],getPasswordResetToken:["organizationId","user_id","mode","channel_id","locale","client_id","code_challenge","callback_uri","idp_name","hint"],getPasswordResetTokenRequired:["organizationId","user_id","mode","channel_id"],getSessionBridgeAccessToken:["organizationId","code","client_id","channel_id","code_verifier","dwsid","grant_type","login_id","dwsgst","dwsrst","usid","dnt"],getSessionBridgeAccessTokenRequired:["organizationId","code","client_id","channel_id","code_verifier","dwsid","grant_type","login_id"],getTrustedAgentAccessToken:["organizationId","client_id","channel_id","code_verifier","grant_type","login_id","idp_origin","agent_id","usid","dnt","state"],getTrustedAgentAccessTokenRequired:["organizationId","client_id","channel_id","code_verifier","grant_type","login_id","idp_origin"],getTrustedAgentAuthorizationToken:["organizationId","client_id","channel_id","login_id","idp_origin","redirect_uri","response_type","code_challenge"],getTrustedAgentAuthorizationTokenRequired:["organizationId","client_id","channel_id","login_id","idp_origin","redirect_uri","response_type"],getTrustedSystemAccessToken:["organizationId","grant_type","hint","login_id","idp_origin","client_id","channel_id","usid","email_id","dnt"],getTrustedSystemAccessTokenRequired:["organizationId","grant_type","hint","login_id","idp_origin","client_id","channel_id"],getUserInfo:["organizationId","channel_id"],getUserInfoRequired:["organizationId"],getWellknownOpenidConfiguration:["organizationId"],getWellknownOpenidConfigurationRequired:["organizationId"],introspectToken:["organizationId","token","token_type_hint"],introspectTokenRequired:["organizationId","token"],logoutCustomer:["organizationId","client_id","refresh_token","channel_id","hint"],logoutCustomerRequired:["organizationId","client_id","refresh_token"],resetPassword:["organizationId","client_id","pwd_action_token","code_verifier","channel_id","new_password","hint"],resetPasswordRequired:["organizationId","client_id","pwd_action_token","code_verifier","channel_id"],revokeToken:["organizationId","token","token_type_hint"],revokeTokenRequired:["organizationId","token"]});var kg=["hint","redirectURI","usid"],xg=["hint","redirectURI","usid"],_g=["dnt","redirectURI","usid"];function Ig(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Og(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ig(Object(r),!0).forEach((function(t){Jh(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ig(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Cg=qt?btoa:function(e){return Buffer.from(e).toString("base64")},Sg=function(e){var t,r,n=new URL(e),o=new URLSearchParams(n.search),i=null!==(t=o.get("usid"))&&void 0!==t?t:"";return{code:null!==(r=o.get("code"))&&void 0!==r?r:"",usid:i}},Pg=function(){return n=r(String(+new Date),{entropy:!0}),e(t,128,(function(e){return new Uint8Array(e).map((function(){return 256*n()}))}))();var n},Tg=function(){var e=Zh(Cp.mark((function e(t){var r,n,o,i,a,s,c;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!qt||!window.crypto){e.next=12;break}return o=new TextEncoder,i=o.encode(t),e.next=7,window.crypto.subtle.digest("SHA-256",i);case 7:a=e.sent,s=btoa(String.fromCharCode.apply(String,Qh(new Uint8Array(a)))),n=r(s),e.next=16;break;case 12:return e.next=14,import("crypto");case 14:c=e.sent,n=r(c.default.createHash("sha256").update(t).digest("base64"));case 16:if(0!==n.length){e.next=18;break}throw new Error("Problem generating code challenge");case 18:return e.abrupt("return",n);case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function zg(e){return Eg.apply(this,arguments)}function Eg(){return(Eg=Zh(Cp.mark((function e(t){var r,n,o,i,a,s,c,u,f,l,d,h,p,g,y,v;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.slasClient,o=t.codeVerifier,i=t.parameters,a=t.privateClient,s={},void 0!==a&&a){e.next=6;break}return e.next=5,Tg(o);case 5:s.codeChallenge=e.sent;case 6:return(c=new wg(n.clientConfig)).clientConfig.fetchOptions=Og(Og({},n.clientConfig.fetchOptions),{},{redirect:qt?"follow":"manual"}),u=i.hint,f=i.redirectURI,l=i.usid,d=Yh(i,kg),h={parameters:Og(Og(Og(Og({},d),{},{client_id:n.clientConfig.parameters.clientId,channel_id:n.clientConfig.parameters.siteId},s.codeChallenge&&{code_challenge:s.codeChallenge}),u&&{hint:u}),{},{organizationId:n.clientConfig.parameters.organizationId,redirect_uri:f,response_type:"code"},l&&{usid:l})},e.next=12,c.authorizeCustomer(h,!0);case 12:if(p=e.sent,g=(null===(r=p.headers)||void 0===r?void 0:r.get("location"))||p.url,y=new URL(g),v=Object.fromEntries(y.searchParams.entries()),!(p.status>=400||v.error)){e.next=18;break}throw new fg(p);case 18:return e.abrupt("return",Og({url:g},Sg(g)));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ag(e){return jg.apply(this,arguments)}function jg(){return(jg=Zh(Cp.mark((function e(t){var r,n,o,i,a,s,c,u,f,l,d,h,p,g;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.slasClient,n=t.parameters,o=t.privateClient,i=void 0!==o&&o,a=n.hint,s=n.redirectURI,c=n.usid,u=Yh(n,xg),f=Pg(),l={},i){e.next=8;break}return e.next=7,Tg(f);case 7:l.codeChallenge=e.sent;case 8:return d=wg.apiPaths.authorizeCustomer,h={organizationId:r.clientConfig.parameters.organizationId,shortCode:r.clientConfig.parameters.shortCode},p=Og(Og(Og({},u),{},{client_id:r.clientConfig.parameters.clientId,channel_id:r.clientConfig.parameters.siteId},l.codeChallenge&&{code_challenge:l.codeChallenge}),{},{hint:a,redirect_uri:s,response_type:"code"},c&&{usid:c}),g=new yg(d,r.clientConfig.baseUri,{pathParams:h,queryParams:p,origin:r.clientConfig.proxy}),e.abrupt("return",{url:g.toString(),codeVerifier:f});case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Rg(e){return Ug.apply(this,arguments)}function Ug(){return(Ug=Zh(Cp.mark((function e(t){var r,n,o,i,a,s,c;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.slasClient,n=t.credentials,o=t.parameters,i=!!n.clientSecret,a=Og(Og(Og({client_id:r.clientConfig.parameters.clientId,channel_id:r.clientConfig.parameters.siteId,code:o.code,organizationId:r.clientConfig.parameters.organizationId},!i&&n.codeVerifier&&{code_verifier:n.codeVerifier}),{},{grant_type:i?"authorization_code":"authorization_code_pkce",redirect_uri:o.redirectURI},void 0!==o.dnt&&{dnt:o.dnt.toString()}),o.usid&&{usid:o.usid}),!n.clientSecret){e.next=7;break}return s="Basic ".concat(Cg("".concat(r.clientConfig.parameters.clientId,":").concat(n.clientSecret))),c={headers:{Authorization:s},body:a},e.abrupt("return",r.getAccessToken(c));case 7:return e.abrupt("return",r.getAccessToken({body:a}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Lg(e){return qg.apply(this,arguments)}function qg(){return(qg=Zh(Cp.mark((function e(t){var r,n,o,i,a;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.slasClient,n=t.parameters,o=t.credentials,r.clientConfig.parameters.siteId){e.next=3;break}throw new Error("Required argument channel_id is not provided through clientConfig.parameters.siteId");case 3:return i="Basic ".concat(Cg("".concat(r.clientConfig.parameters.clientId,":").concat(o.clientSecret))),a={headers:{Authorization:i},body:Og(Og({grant_type:"client_credentials",channel_id:r.clientConfig.parameters.siteId},n.usid&&{usid:n.usid}),void 0!==n.dnt&&{dnt:n.dnt.toString()})},e.abrupt("return",r.getAccessToken(a));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mg(e){return Bg.apply(this,arguments)}function Bg(){return(Bg=Zh(Cp.mark((function e(t){var r,n,o,i,a,s,c,u,f;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.slasClient,n=t.parameters,o=Pg(),i=n.dnt,a=n.redirectURI,s=n.usid,c=Yh(n,_g),e.next=5,zg({slasClient:r,codeVerifier:o,parameters:Og(Og({},c),{},{redirectURI:a,hint:"guest"},s&&{usid:s}),privateClient:!1});case 5:return u=e.sent,f=Og({client_id:r.clientConfig.parameters.clientId,channel_id:r.clientConfig.parameters.siteId,code:u.code,code_verifier:o,grant_type:"authorization_code_pkce",redirect_uri:a,usid:u.usid},void 0!==i&&{dnt:i.toString()}),e.abrupt("return",r.getAccessToken({body:f}));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Fg(e){return Ng.apply(this,arguments)}function Ng(){return(Ng=Zh(Cp.mark((function e(t){var r,n,o,i,a,s,c,u,f,l,d,h,p,g,y,v,m,b,w,k,x;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.slasClient,o=t.credentials,i=t.parameters,a=t.body,s=Pg(),e.next=4,Tg(s);case 4:return c=e.sent,(u=new wg(n.clientConfig)).clientConfig.fetchOptions=Og(Og({},n.clientConfig.fetchOptions),{},{redirect:qt?"follow":"manual"}),f="Basic ".concat(Cg("".concat(o.username,":").concat(o.password))),l=i.dnt,d=i.usid,h=i.redirectURI,p={headers:{Authorization:f},parameters:{organizationId:n.clientConfig.parameters.organizationId},body:Og(Og({},a||{}),{},{redirect_uri:h,client_id:n.clientConfig.parameters.clientId,code_challenge:c,channel_id:n.clientConfig.parameters.siteId},d&&{usid:d})},e.next=12,u.authenticateCustomer(p,!0);case 12:if(g=e.sent,y=(null===(r=g.headers)||void 0===r?void 0:r.get("location"))||g.url,v=new URL(y),m=Object.fromEntries(v.searchParams.entries()),!(g.status>=400||m.error)){e.next=18;break}throw new fg(g);case 18:if(b=Sg(y),w=Og({client_id:n.clientConfig.parameters.clientId,channel_id:n.clientConfig.parameters.siteId,code:b.code,code_verifier:s,grant_type:"authorization_code_pkce",organizationId:n.clientConfig.parameters.organizationId,redirect_uri:i.redirectURI,usid:b.usid},void 0!==l&&{dnt:l.toString()}),!o.clientSecret){e.next=24;break}return k="Basic ".concat(Cg("".concat(n.clientConfig.parameters.clientId,":").concat(o.clientSecret))),x={headers:{Authorization:k},body:w},e.abrupt("return",n.getAccessToken(x));case 24:return e.abrupt("return",n.getAccessToken({body:w}));case 25:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wg(e){return Dg.apply(this,arguments)}function Dg(){return(Dg=Zh(Cp.mark((function e(t){var r,n,o,i,a;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.slasClient,n=t.credentials,o=t.parameters,n.clientSecret){e.next=3;break}throw new Error("Required argument client secret is not provided");case 3:if(r.clientConfig.parameters.siteId){e.next=5;break}throw new Error("Required argument channel_id is not provided through clientConfig.parameters.siteId");case 5:if(o.mode){e.next=7;break}throw new Error("Required argument mode is not provided through parameters");case 7:if(o.userid){e.next=9;break}throw new Error("Required argument userid is not provided through parameters");case 9:return i="Basic ".concat(Cg("".concat(r.clientConfig.parameters.clientId,":").concat(n.clientSecret))),a=Og(Og(Og({user_id:o.userid,mode:o.mode},o.locale&&{locale:o.locale}),o.usid&&{usid:o.usid}),{},{channel_id:r.clientConfig.parameters.siteId},o.callbackURI&&{callback_uri:o.callbackURI}),e.abrupt("return",r.authorizePasswordlessCustomer({headers:{Authorization:i},parameters:{organizationId:r.clientConfig.parameters.organizationId},body:a},!0));case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Gg(e){return Hg.apply(this,arguments)}function Hg(){return(Hg=Zh(Cp.mark((function e(t){var r,n,o,i,a,s;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.slasClient,n=t.credentials,o=t.parameters,n.clientSecret){e.next=3;break}throw new Error("Required argument client secret is not provided");case 3:if(r.clientConfig.parameters.organizationId){e.next=5;break}throw new Error("Required argument organizationId is not provided through clientConfig.parameters.organizationId");case 5:if(o.pwdlessLoginToken){e.next=7;break}throw new Error("Required argument pwdlessLoginToken is not provided through parameters");case 7:return i=Pg(),a="Basic ".concat(Cg("".concat(r.clientConfig.parameters.clientId,":").concat(n.clientSecret))),s=Og({grant_type:"client_credentials",hint:"pwdless_login",pwdless_login_token:o.pwdlessLoginToken,code_verifier:i},o.dnt&&{dnt:o.dnt}),e.abrupt("return",r.getPasswordLessAccessToken({headers:{Authorization:a},parameters:{organizationId:r.clientConfig.parameters.organizationId},body:s}));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Vg(e){var t=e.slasClient,r=e.parameters,n=e.credentials,o=Og({grant_type:"refresh_token",refresh_token:r.refreshToken,client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId},void 0!==r.dnt&&{dnt:r.dnt.toString()});if(n&&n.clientSecret){var i={headers:{Authorization:"Basic ".concat(Cg("".concat(t.clientConfig.parameters.clientId,":").concat(n.clientSecret)))},body:o};return t.getAccessToken(i)}return t.getAccessToken({body:o})}function $g(e){var t=e.slasClient,r=e.parameters;return t.logoutCustomer({headers:{Authorization:"Bearer ".concat(r.accessToken)},parameters:{refresh_token:r.refreshToken,client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId}})}var Yg=qr.find,Jg=!0;"find"in[]&&Array(1).find((function(){Jg=!1})),Ut({target:"Array",proto:!0,forced:Jg},{find:function(e){return Yg(this,e,arguments.length>1?arguments[1]:void 0)}}),fo("find");function Kg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kg(Object(r),!0).forEach((function(t){Jh(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kg(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Xg=function(e){var t=!1;return e&&(t=Boolean(Object.keys(e).find((function(e){return"content-type"===e.toLowerCase()})))),t},Zg=function(){var e=Zh(Cp.mark((function e(t){var r,n,o,i,a,s,c,u,f,l,d,h;return Cp.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.options,i=t.clientConfig,a=t.rawResponse,s=["apiName","endpointPath","organizationId","shortCode"],c=Qg(Qg({},i.parameters),null==o?void 0:o.customApiPathParameters),s.forEach((function(e){if(!c[e])throw new Error("Missing required property needed in options.customApiPathParameters or clientConfig.parameters: ".concat(e))})),c.apiVersion||(c.apiVersion="v1"),u=i,i.baseUri||(u=Qg(Qg({},i),{},{baseUri:"https://{shortCode}.api.commercecloud.salesforce.com/custom/{apiName}/{apiVersion}"})),f=Boolean(!(null!==(r=o.parameters)&&void 0!==r&&r.siteId)&&(null==i||null===(n=i.parameters)||void 0===n?void 0:n.siteId)),l=Xg(o.headers)||Xg(u.headers),d=o,l&&!f||(d=Qg(Qg({},o),{},{headers:Qg(Qg({},o.headers),!l&&{"Content-Type":"application/json"}),parameters:Qg(Qg({},o.parameters),f&&{siteId:i.parameters.siteId})})),h=new yg("/organizations/{organizationId}/{endpointPath}",u.baseUri,{pathParams:c,queryParams:d.parameters,origin:u.proxy}),e.abrupt("return",hg(h.toString(),d,u,a));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();export{zg as authorize,Ag as authorizeIDP,Wg as authorizePasswordless,Zg as callCustomEndpoint,Pg as createCodeVerifier,hg as doFetch,pg as encodeSCAPISpecialCharacters,Nt as fetch,Tg as generateCodeChallenge,Sg as getCodeAndUsidFromUrl,Gg as getPasswordLessAccessToken,Bt as globalObject,Ft as hasFetchAvailable,qt as isBrowser,Mt as isNode,Mg as loginGuestUser,Lg as loginGuestUserPrivate,Rg as loginIDPUser,Fg as loginRegisteredUserB2C,$g as logout,Vg as refreshAccessToken,Cg as stringToBase64};
|