onairos 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/({status +0 -0
  2. package/console.error(error)) +0 -0
  3. package/dist/423.onairos.bundle.js +2 -0
  4. package/dist/423.onairos.bundle.js.map +1 -0
  5. package/dist/423.onairos.native.js +1 -0
  6. package/dist/874.onairos.bundle.js +2 -0
  7. package/dist/874.onairos.bundle.js.LICENSE.txt +22 -0
  8. package/dist/RSA.js +52 -0
  9. package/dist/backButton.js +24 -0
  10. package/dist/components/AuthButtons.js +48 -0
  11. package/dist/components/GoogleButton.js +111 -0
  12. package/dist/components/Notification.js +32 -0
  13. package/dist/components/OnairosAppButton.js +84 -0
  14. package/dist/components/OthentButton.js +91 -0
  15. package/dist/components/SecuritySetup.js +150 -0
  16. package/dist/components/SignUp.js +125 -0
  17. package/dist/components/TestTelegramButton.js +60 -0
  18. package/dist/components/UniversalOnboarding.js +444 -0
  19. package/dist/components/utils/oauthHelper.js +102 -0
  20. package/dist/deepLink.js +49 -0
  21. package/dist/getPin.js +25 -0
  22. package/dist/hooks/useAccountInfo.js +87 -0
  23. package/dist/icons/Avatar.png +0 -0
  24. package/dist/icons/Sentiment.png +0 -0
  25. package/dist/icons/Trait.png +0 -0
  26. package/dist/iframe/DataRequestPage.js +273 -0
  27. package/dist/iframe/OnairosButtonIntegration.md +148 -0
  28. package/dist/iframe/components/Box.js +86 -0
  29. package/dist/iframe/components/IndividualConnection.js +66 -0
  30. package/dist/iframe/dataRequestHandler.js +147 -0
  31. package/dist/iframe/data_request_iframe.html +27 -0
  32. package/dist/iframe/data_request_page.js +55 -0
  33. package/dist/iframe/icons/Avatar.png +1 -0
  34. package/dist/iframe/icons/Avatar2.png +1 -0
  35. package/dist/iframe/icons/Sentiment.png +1 -0
  36. package/dist/iframe/icons/Trait.png +1 -0
  37. package/dist/iframe/utils/api.js +81 -0
  38. package/dist/iframe.bundle.js +1 -1
  39. package/dist/iframe.bundle.js.map +1 -1
  40. package/dist/index.js +12 -0
  41. package/dist/main.bundle.js +2 -0
  42. package/dist/main.bundle.js.map +1 -0
  43. package/dist/mobile/MobileDataRequestPage.js +178 -0
  44. package/dist/mobile/components/MobileBox.js +71 -0
  45. package/dist/mobile/components/MobileIndividualConnection.js +54 -0
  46. package/dist/mobile/shims/browser-apis.js +84 -0
  47. package/dist/mobile/shims/lucide-shim.js +93 -0
  48. package/dist/onairos.bundle.js +1 -1
  49. package/dist/onairos.bundle.js.LICENSE.txt +9 -0
  50. package/dist/onairos.bundle.js.map +1 -1
  51. package/dist/onairos.esm.js +12 -16689
  52. package/dist/onairos.js +21 -0
  53. package/dist/onairos.native.js +1 -0
  54. package/dist/onairos.umd.js +31795 -48
  55. package/dist/onairos.umd.js.map +1 -1
  56. package/dist/onairosButton.js +1066 -0
  57. package/dist/onairosOld.js +208 -0
  58. package/dist/othent-kms.js +2 -0
  59. package/dist/othent-kms.js.map +1 -0
  60. package/dist/overlay/CheckBox.js +58 -0
  61. package/dist/overlay/IndividualConnection copy.js +80 -0
  62. package/dist/overlay/IndividualConnection.js +62 -0
  63. package/dist/overlay/IndividualConnectionNew.js +68 -0
  64. package/dist/overlay/box.js +78 -0
  65. package/dist/overlay/boxNew.js +33 -0
  66. package/dist/overlay/overlay.js +399 -0
  67. package/dist/sha256.js +2 -0
  68. package/dist/sha256.js.map +1 -0
  69. package/dist/utils/biometrics.js +31 -0
  70. package/dist/utils/deepLinking.js +36 -0
  71. package/onairosOLD.jsx +150 -0
  72. package/package.json +18 -22
  73. package/rollup.config.js +39 -83
  74. package/src/components/DataRequest.js +177 -0
  75. package/src/components/EmailAuth.js +235 -0
  76. package/src/components/Notification.jsx +21 -0
  77. package/src/components/PinSetup.js +210 -0
  78. package/src/components/SecuritySetup.js +29 -12
  79. package/src/components/UniversalOnboarding.js +13 -5
  80. package/src/components/UniversalOnboarding.jsx +43 -0
  81. package/src/iframe/DataRequestPage.jsx +253 -277
  82. package/src/index.js +7 -21
  83. package/src/mobile/MobileDataRequestPage.jsx +183 -183
  84. package/src/onairosButton.jsx +258 -910
  85. package/src/overlay/IndividualConnection copy.js +86 -0
  86. package/src/overlay/IndividualConnectionNew.jsx +78 -0
  87. package/test-simplified-flow.html +234 -0
  88. package/webpack.config.js +84 -128
  89. package/{ +0 -0
  90. package/debug-overlay.html +0 -226
  91. package/dist/onairos.cjs.js +0 -16698
  92. package/dist/onairos.cjs.js.map +0 -1
  93. package/dist/onairos.esm.js.map +0 -1
  94. package/dist/static/bda86be94804562cc74d.png +0 -0
  95. package/simple-overlay-demo.html +0 -253
  96. package/src/components/OthentButton.jsx +0 -82
  97. package/src/icons/OnairosBlack.png +0 -0
  98. package/src/icons/OnairosWhite.png +0 -0
  99. package/test-button.html +0 -83
  100. package/test-component.jsx +0 -77
  101. package/test-overlay-fixed.html +0 -246
  102. package/test-overlay.html +0 -99
package/({status ADDED
File without changes
File without changes
@@ -0,0 +1,2 @@
1
+ (this.webpackChunkonairos=this.webpackChunkonairos||[]).push([[423],{249:function(t,n,e){var i;t.exports=(i=i||function(t,n){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==e.g&&e.g.crypto&&(i=e.g.crypto),!i)try{i=e(480)}catch(t){}var r=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(n){var e;return t.prototype=n,e=new t,t.prototype=null,e}}(),s={},a=s.lib={},c=a.Base={extend:function(t){var n=o(this);return t&&n.mixIn(t),n.hasOwnProperty("init")&&this.init!==n.init||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},u=a.WordArray=c.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=e!=n?e:4*t.length},toString:function(t){return(t||h).stringify(this)},concat:function(t){var n=this.words,e=t.words,i=this.sigBytes,r=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o<r;o++){var s=e[o>>>2]>>>24-o%4*8&255;n[i+o>>>2]|=s<<24-(i+o)%4*8}else for(var a=0;a<r;a+=4)n[i+a>>>2]=e[a>>>2];return this.sigBytes+=r,this},clamp:function(){var n=this.words,e=this.sigBytes;n[e>>>2]&=4294967295<<32-e%4*8,n.length=t.ceil(e/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var n=[],e=0;e<t;e+=4)n.push(r());return new u.init(n,t)}}),f=s.enc={},h=f.Hex={stringify:function(t){for(var n=t.words,e=t.sigBytes,i=[],r=0;r<e;r++){var o=n[r>>>2]>>>24-r%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var n=t.length,e=[],i=0;i<n;i+=2)e[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new u.init(e,n/2)}},p=f.Latin1={stringify:function(t){for(var n=t.words,e=t.sigBytes,i=[],r=0;r<e;r++){var o=n[r>>>2]>>>24-r%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var n=t.length,e=[],i=0;i<n;i++)e[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new u.init(e,n)}},d=f.Utf8={stringify:function(t){try{return decodeURIComponent(escape(p.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return p.parse(unescape(encodeURIComponent(t)))}},l=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(n){var e,i=this._data,r=i.words,o=i.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=n?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*s,f=t.min(4*c,o);if(c){for(var h=0;h<c;h+=s)this._doProcessBlock(r,h);e=r.splice(0,c),i.sigBytes-=f}return new u.init(e,f)},clone:function(){var t=c.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),y=(a.Hasher=l.extend({cfg:c.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(n,e){return new t.init(e).finalize(n)}},_createHmacHelper:function(t){return function(n,e){return new y.HMAC.init(t,e).finalize(n)}}}),s.algo={});return s}(Math),i)},153:function(t,n,e){var i;t.exports=(i=e(249),function(t){var n=i,e=n.lib,r=e.WordArray,o=e.Hasher,s=n.algo,a=[],c=[];!function(){function n(n){for(var e=t.sqrt(n),i=2;i<=e;i++)if(!(n%i))return!1;return!0}function e(t){return 4294967296*(t-(0|t))|0}for(var i=2,r=0;r<64;)n(i)&&(r<8&&(a[r]=e(t.pow(i,.5))),c[r]=e(t.pow(i,1/3)),r++),i++}();var u=[],f=s.SHA256=o.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(t,n){for(var e=this._hash.words,i=e[0],r=e[1],o=e[2],s=e[3],a=e[4],f=e[5],h=e[6],p=e[7],d=0;d<64;d++){if(d<16)u[d]=0|t[n+d];else{var l=u[d-15],y=(l<<25|l>>>7)^(l<<14|l>>>18)^l>>>3,g=u[d-2],w=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;u[d]=y+u[d-7]+w+u[d-16]}var v=i&r^i&o^r&o,_=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),m=p+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&f^~a&h)+c[d]+u[d];p=h,h=f,f=a,a=s+m|0,s=o,o=r,r=i,i=m+(_+v)|0}e[0]=e[0]+i|0,e[1]=e[1]+r|0,e[2]=e[2]+o|0,e[3]=e[3]+s|0,e[4]=e[4]+a|0,e[5]=e[5]+f|0,e[6]=e[6]+h|0,e[7]=e[7]+p|0},_doFinalize:function(){var n=this._data,e=n.words,i=8*this._nDataBytes,r=8*n.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=t.floor(i/4294967296),e[15+(r+64>>>9<<4)]=i,n.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});n.SHA256=o._createHelper(f),n.HmacSHA256=o._createHmacHelper(f)}(Math),i.SHA256)},480:()=>{}}]);
2
+ //# sourceMappingURL=423.onairos.bundle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"423.onairos.bundle.js","mappings":"yFAAE,IAoBGA,EAjBHC,EAAOC,SAiBJF,EAAWA,GAAa,SAAUG,EAAMC,GAExC,IAAIC,EA4BJ,GAzBsB,oBAAXC,QAA0BA,OAAOD,SACxCA,EAASC,OAAOD,QAIA,oBAATE,MAAwBA,KAAKF,SACpCA,EAASE,KAAKF,QAIQ,oBAAfG,YAA8BA,WAAWH,SAChDA,EAASG,WAAWH,SAInBA,GAA4B,oBAAXC,QAA0BA,OAAOG,WACnDJ,EAASC,OAAOG,WAIfJ,QAA4B,IAAX,EAAAK,GAA0B,EAAAA,EAAOL,SACnDA,EAAS,EAAAK,EAAOL,SAIfA,EACD,IACIA,EAAS,EAAQ,IACrB,CAAE,MAAOM,GAAM,CAQnB,IAAIC,EAAwB,WACxB,GAAIP,EAAQ,CAER,GAAsC,mBAA3BA,EAAOQ,gBACd,IACI,OAAOR,EAAOQ,gBAAgB,IAAIC,YAAY,IAAI,EACtD,CAAE,MAAOH,GAAM,CAInB,GAAkC,mBAAvBN,EAAOU,YACd,IACI,OAAOV,EAAOU,YAAY,GAAGC,aACjC,CAAE,MAAOL,GAAM,CAEvB,CAEA,MAAM,IAAIM,MAAM,sEACpB,EAMIC,EAASC,OAAOD,QAAW,WAC3B,SAASE,IAAK,CAEd,OAAO,SAAUC,GACb,IAAIC,EAQJ,OANAF,EAAEG,UAAYF,EAEdC,EAAU,IAAIF,EAEdA,EAAEG,UAAY,KAEPD,CACX,CACJ,CAd8B,GAmB1BE,EAAI,CAAC,EAKLC,EAAQD,EAAEE,IAAM,CAAC,EAKjBC,EAAOF,EAAME,KAGN,CAmBHC,OAAQ,SAAUC,GAEd,IAAIP,EAAUJ,EAAOY,MAoBrB,OAjBID,GACAP,EAAQS,MAAMF,GAIbP,EAAQU,eAAe,SAAWF,KAAKG,OAASX,EAAQW,OACzDX,EAAQW,KAAO,WACXX,EAAQY,OAAOD,KAAKE,MAAML,KAAMM,UACpC,GAIJd,EAAQW,KAAKV,UAAYD,EAGzBA,EAAQY,OAASJ,KAEVR,CACX,EAcAJ,OAAQ,WACJ,IAAImB,EAAWP,KAAKF,SAGpB,OAFAS,EAASJ,KAAKE,MAAME,EAAUD,WAEvBC,CACX,EAcAJ,KAAM,WACN,EAaAF,MAAO,SAAUO,GACb,IAAK,IAAIC,KAAgBD,EACjBA,EAAWN,eAAeO,KAC1BT,KAAKS,GAAgBD,EAAWC,IAKpCD,EAAWN,eAAe,cAC1BF,KAAKU,SAAWF,EAAWE,SAEnC,EAWAC,MAAO,WACH,OAAOX,KAAKG,KAAKV,UAAUK,OAAOE,KACtC,GAUJY,EAAYjB,EAAMiB,UAAYf,EAAKC,OAAO,CAa1CK,KAAM,SAAUU,EAAOC,GACnBD,EAAQb,KAAKa,MAAQA,GAAS,GAG1Bb,KAAKc,SADLA,GAAYxC,EACIwC,EAEe,EAAfD,EAAME,MAE9B,EAeAL,SAAU,SAAUM,GAChB,OAAQA,GAAWC,GAAKC,UAAUlB,KACtC,EAaAmB,OAAQ,SAAUC,GAEd,IAAIC,EAAYrB,KAAKa,MACjBS,EAAYF,EAAUP,MACtBU,EAAevB,KAAKc,SACpBU,EAAeJ,EAAUN,SAM7B,GAHAd,KAAKyB,QAGDF,EAAe,EAEf,IAAK,IAAIG,EAAI,EAAGA,EAAIF,EAAcE,IAAK,CACnC,IAAIC,EAAYL,EAAUI,IAAM,KAAQ,GAAMA,EAAI,EAAK,EAAM,IAC7DL,EAAWE,EAAeG,IAAO,IAAMC,GAAa,IAAOJ,EAAeG,GAAK,EAAK,CACxF,MAGA,IAAK,IAAIE,EAAI,EAAGA,EAAIJ,EAAcI,GAAK,EACnCP,EAAWE,EAAeK,IAAO,GAAKN,EAAUM,IAAM,GAM9D,OAHA5B,KAAKc,UAAYU,EAGVxB,IACX,EASAyB,MAAO,WAEH,IAAIZ,EAAQb,KAAKa,MACbC,EAAWd,KAAKc,SAGpBD,EAAMC,IAAa,IAAM,YAAe,GAAMA,EAAW,EAAK,EAC9DD,EAAME,OAAS1C,EAAKwD,KAAKf,EAAW,EACxC,EAWAH,MAAO,WACH,IAAIA,EAAQd,EAAKc,MAAMmB,KAAK9B,MAG5B,OAFAW,EAAME,MAAQb,KAAKa,MAAMkB,MAAM,GAExBpB,CACX,EAeAqB,OAAQ,SAAUC,GAGd,IAFA,IAAIpB,EAAQ,GAEHa,EAAI,EAAGA,EAAIO,EAAQP,GAAK,EAC7Bb,EAAMqB,KAAKpD,KAGf,OAAO,IAAI8B,EAAUT,KAAKU,EAAOoB,EACrC,IAMAE,EAAQzC,EAAE0C,IAAM,CAAC,EAKjBnB,EAAMkB,EAAMlB,IAAM,CAclBC,UAAW,SAAUE,GAOjB,IALA,IAAIP,EAAQO,EAAUP,MAClBC,EAAWM,EAAUN,SAGrBuB,EAAW,GACNX,EAAI,EAAGA,EAAIZ,EAAUY,IAAK,CAC/B,IAAIY,EAAQzB,EAAMa,IAAM,KAAQ,GAAMA,EAAI,EAAK,EAAM,IACrDW,EAASH,MAAMI,IAAS,GAAG5B,SAAS,KACpC2B,EAASH,MAAa,GAAPI,GAAa5B,SAAS,IACzC,CAEA,OAAO2B,EAASE,KAAK,GACzB,EAeAC,MAAO,SAAUC,GAMb,IAJA,IAAIC,EAAeD,EAAO1B,OAGtBF,EAAQ,GACHa,EAAI,EAAGA,EAAIgB,EAAchB,GAAK,EACnCb,EAAMa,IAAM,IAAMiB,SAASF,EAAOG,OAAOlB,EAAG,GAAI,KAAQ,GAAMA,EAAI,EAAK,EAG3E,OAAO,IAAId,EAAUT,KAAKU,EAAO6B,EAAe,EACpD,GAMAG,EAASV,EAAMU,OAAS,CAcxB3B,UAAW,SAAUE,GAOjB,IALA,IAAIP,EAAQO,EAAUP,MAClBC,EAAWM,EAAUN,SAGrBgC,EAAc,GACTpB,EAAI,EAAGA,EAAIZ,EAAUY,IAAK,CAC/B,IAAIY,EAAQzB,EAAMa,IAAM,KAAQ,GAAMA,EAAI,EAAK,EAAM,IACrDoB,EAAYZ,KAAKa,OAAOC,aAAaV,GACzC,CAEA,OAAOQ,EAAYP,KAAK,GAC5B,EAeAC,MAAO,SAAUS,GAMb,IAJA,IAAIC,EAAkBD,EAAUlC,OAG5BF,EAAQ,GACHa,EAAI,EAAGA,EAAIwB,EAAiBxB,IACjCb,EAAMa,IAAM,KAAiC,IAA1BuB,EAAUE,WAAWzB,KAAe,GAAMA,EAAI,EAAK,EAG1E,OAAO,IAAId,EAAUT,KAAKU,EAAOqC,EACrC,GAMAE,EAAOjB,EAAMiB,KAAO,CAcpBlC,UAAW,SAAUE,GACjB,IACI,OAAOiC,mBAAmBC,OAAOT,EAAO3B,UAAUE,IACtD,CAAE,MAAOmC,GACL,MAAM,IAAIpE,MAAM,uBACpB,CACJ,EAeAqD,MAAO,SAAUgB,GACb,OAAOX,EAAOL,MAAMiB,SAASC,mBAAmBF,IACpD,GAUAG,EAAyBhE,EAAMgE,uBAAyB9D,EAAKC,OAAO,CAQpE8D,MAAO,WAEH5D,KAAK6D,MAAQ,IAAIjD,EAAUT,KAC3BH,KAAK8D,YAAc,CACvB,EAYAC,QAAS,SAAUC,GAEI,iBAARA,IACPA,EAAOZ,EAAKZ,MAAMwB,IAItBhE,KAAK6D,MAAM1C,OAAO6C,GAClBhE,KAAK8D,aAAeE,EAAKlD,QAC7B,EAgBAmD,SAAU,SAAUC,GAChB,IAAIC,EAGAH,EAAOhE,KAAK6D,MACZO,EAAYJ,EAAKnD,MACjBwD,EAAeL,EAAKlD,SACpBwD,EAAYtE,KAAKsE,UAIjBC,EAAeF,GAHc,EAAZC,GAcjBE,GARAD,EAFAL,EAEe7F,EAAKwD,KAAK0C,GAIVlG,EAAKoG,KAAoB,EAAfF,GAAoBvE,KAAK0E,eAAgB,IAIrCJ,EAG7BK,EAActG,EAAKuG,IAAkB,EAAdJ,EAAiBH,GAG5C,GAAIG,EAAa,CACb,IAAK,IAAIK,EAAS,EAAGA,EAASL,EAAaK,GAAUP,EAEjDtE,KAAK8E,gBAAgBV,EAAWS,GAIpCV,EAAiBC,EAAUW,OAAO,EAAGP,GACrCR,EAAKlD,UAAY6D,CACrB,CAGA,OAAO,IAAI/D,EAAUT,KAAKgE,EAAgBQ,EAC9C,EAWAhE,MAAO,WACH,IAAIA,EAAQd,EAAKc,MAAMmB,KAAK9B,MAG5B,OAFAW,EAAMkD,MAAQ7D,KAAK6D,MAAMlD,QAElBA,CACX,EAEA+D,eAAgB,IA2IhBM,GAnISrF,EAAMsF,OAAStB,EAAuB7D,OAAO,CAItDoF,IAAKrF,EAAKC,SAWVK,KAAM,SAAU+E,GAEZlF,KAAKkF,IAAMlF,KAAKkF,IAAIpF,OAAOoF,GAG3BlF,KAAK4D,OACT,EASAA,MAAO,WAEHD,EAAuBC,MAAM9B,KAAK9B,MAGlCA,KAAKmF,UACT,EAcAC,OAAQ,SAAUC,GAQd,OANArF,KAAK+D,QAAQsB,GAGbrF,KAAKiE,WAGEjE,IACX,EAgBAsF,SAAU,SAAUD,GAShB,OAPIA,GACArF,KAAK+D,QAAQsB,GAINrF,KAAKuF,aAGpB,EAEAjB,UAAW,GAeXkB,cAAe,SAAUC,GACrB,OAAO,SAAUC,EAASR,GACtB,OAAO,IAAIO,EAAOtF,KAAK+E,GAAKI,SAASI,EACzC,CACJ,EAeAC,kBAAmB,SAAUF,GACzB,OAAO,SAAUC,EAASE,GACtB,OAAO,IAAIZ,EAAOa,KAAK1F,KAAKsF,EAAQG,GAAKN,SAASI,EACtD,CACJ,IAMShG,EAAEoG,KAAO,CAAC,GAEvB,OAAOpG,CACX,CA7wB2B,CA6wBzBrB,MAGKH,E,sBCpyBN,IAagBA,EAVhBC,EAAOC,SAUSF,EAVmB,EAAQ,KAY3C,SAAUG,GAEP,IAAIqB,EAAIxB,EACJyB,EAAQD,EAAEE,IACVgB,EAAYjB,EAAMiB,UAClBqE,EAAStF,EAAMsF,OACfD,EAAStF,EAAEoG,KAGXC,EAAI,GACJC,EAAI,IAGP,WACG,SAASC,EAAQC,GAEb,IADA,IAAIC,EAAQ9H,EAAK+H,KAAKF,GACbG,EAAS,EAAGA,GAAUF,EAAOE,IAClC,KAAMH,EAAIG,GACN,OAAO,EAIf,OAAO,CACX,CAEA,SAASC,EAAkBJ,GACvB,OAAwB,YAAfA,GAAS,EAAJA,IAAyB,CAC3C,CAIA,IAFA,IAAIA,EAAI,EACJK,EAAS,EACNA,EAAS,IACRN,EAAQC,KACJK,EAAS,IACTR,EAAEQ,GAAUD,EAAkBjI,EAAKmI,IAAIN,EAAG,MAE9CF,EAAEO,GAAUD,EAAkBjI,EAAKmI,IAAIN,EAAG,EAAI,IAE9CK,KAGJL,GAER,CA9BA,GAiCA,IAAIO,EAAI,GAKJC,EAAS1B,EAAO0B,OAASzB,EAAOnF,OAAO,CACvCqF,SAAU,WACNnF,KAAK2G,MAAQ,IAAI/F,EAAUT,KAAK4F,EAAEhE,MAAM,GAC5C,EAEA+C,gBAAiB,SAAU8B,EAAG/B,GAe1B,IAbA,IAAIkB,EAAI/F,KAAK2G,MAAM9F,MAGfgG,EAAId,EAAE,GACNe,EAAIf,EAAE,GACNgB,EAAIhB,EAAE,GACNiB,EAAIjB,EAAE,GACNxC,EAAIwC,EAAE,GACNkB,EAAIlB,EAAE,GACNnH,EAAImH,EAAE,GACNmB,EAAInB,EAAE,GAGDrE,EAAI,EAAGA,EAAI,GAAIA,IAAK,CACzB,GAAIA,EAAI,GACJ+E,EAAE/E,GAAqB,EAAhBkF,EAAE/B,EAASnD,OACf,CACH,IAAIyF,EAAUV,EAAE/E,EAAI,IAChB0F,GAAYD,GAAW,GAAOA,IAAY,IAC9BA,GAAW,GAAOA,IAAY,IAC9BA,IAAY,EAExBE,EAAUZ,EAAE/E,EAAI,GAChB4F,GAAYD,GAAW,GAAOA,IAAY,KAC9BA,GAAW,GAAOA,IAAY,IAC9BA,IAAY,GAE5BZ,EAAE/E,GAAK0F,EAASX,EAAE/E,EAAI,GAAK4F,EAASb,EAAE/E,EAAI,GAC9C,CAEA,IACI6F,EAAOV,EAAIC,EAAMD,EAAIE,EAAMD,EAAIC,EAE/BS,GAAWX,GAAK,GAAOA,IAAM,IAAQA,GAAK,GAAOA,IAAM,KAASA,GAAK,GAAOA,IAAM,IAGlFY,EAAKP,IAFM3D,GAAK,GAAOA,IAAM,IAAQA,GAAK,GAAOA,IAAM,KAASA,GAAK,EAAOA,IAAM,MAJ3EA,EAAI0D,GAAO1D,EAAI3E,GAMCoH,EAAEtE,GAAK+E,EAAE/E,GAGpCwF,EAAItI,EACJA,EAAIqI,EACJA,EAAI1D,EACJA,EAAKyD,EAAIS,EAAM,EACfT,EAAID,EACJA,EAAID,EACJA,EAAID,EACJA,EAAKY,GATID,EAASD,GASF,CACpB,CAGAxB,EAAE,GAAMA,EAAE,GAAKc,EAAK,EACpBd,EAAE,GAAMA,EAAE,GAAKe,EAAK,EACpBf,EAAE,GAAMA,EAAE,GAAKgB,EAAK,EACpBhB,EAAE,GAAMA,EAAE,GAAKiB,EAAK,EACpBjB,EAAE,GAAMA,EAAE,GAAKxC,EAAK,EACpBwC,EAAE,GAAMA,EAAE,GAAKkB,EAAK,EACpBlB,EAAE,GAAMA,EAAE,GAAKnH,EAAK,EACpBmH,EAAE,GAAMA,EAAE,GAAKmB,EAAK,CACxB,EAEA3B,YAAa,WAET,IAAIvB,EAAOhE,KAAK6D,MACZO,EAAYJ,EAAKnD,MAEjB6G,EAAgC,EAAnB1H,KAAK8D,YAClB6D,EAA4B,EAAhB3D,EAAKlD,SAYrB,OATAsD,EAAUuD,IAAc,IAAM,KAAS,GAAKA,EAAY,GACxDvD,EAA4C,IAA/BuD,EAAY,KAAQ,GAAM,IAAWtJ,EAAKuJ,MAAMF,EAAa,YAC1EtD,EAA4C,IAA/BuD,EAAY,KAAQ,GAAM,IAAWD,EAClD1D,EAAKlD,SAA8B,EAAnBsD,EAAUrD,OAG1Bf,KAAKiE,WAGEjE,KAAK2G,KAChB,EAEAhG,MAAO,WACH,IAAIA,EAAQsE,EAAOtE,MAAMmB,KAAK9B,MAG9B,OAFAW,EAAMgG,MAAQ3G,KAAK2G,MAAMhG,QAElBA,CACX,IAiBJjB,EAAEgH,OAASzB,EAAOO,cAAckB,GAgBhChH,EAAEmI,WAAa5C,EAAOU,kBAAkBe,EAC5C,CAlLA,CAkLErI,MAGKH,EAASwI,O","sources":["webpack://onairos/./node_modules/crypto-js/core.js","webpack://onairos/./node_modules/crypto-js/sha256.js"],"sourcesContent":[";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory();\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\troot.CryptoJS = factory();\n\t}\n}(this, function () {\n\n\t/*globals window, global, require*/\n\n\t/**\n\t * CryptoJS core components.\n\t */\n\tvar CryptoJS = CryptoJS || (function (Math, undefined) {\n\n\t var crypto;\n\n\t // Native crypto from window (Browser)\n\t if (typeof window !== 'undefined' && window.crypto) {\n\t crypto = window.crypto;\n\t }\n\n\t // Native crypto in web worker (Browser)\n\t if (typeof self !== 'undefined' && self.crypto) {\n\t crypto = self.crypto;\n\t }\n\n\t // Native crypto from worker\n\t if (typeof globalThis !== 'undefined' && globalThis.crypto) {\n\t crypto = globalThis.crypto;\n\t }\n\n\t // Native (experimental IE 11) crypto from window (Browser)\n\t if (!crypto && typeof window !== 'undefined' && window.msCrypto) {\n\t crypto = window.msCrypto;\n\t }\n\n\t // Native crypto from global (NodeJS)\n\t if (!crypto && typeof global !== 'undefined' && global.crypto) {\n\t crypto = global.crypto;\n\t }\n\n\t // Native crypto import via require (NodeJS)\n\t if (!crypto && typeof require === 'function') {\n\t try {\n\t crypto = require('crypto');\n\t } catch (err) {}\n\t }\n\n\t /*\n\t * Cryptographically secure pseudorandom number generator\n\t *\n\t * As Math.random() is cryptographically not safe to use\n\t */\n\t var cryptoSecureRandomInt = function () {\n\t if (crypto) {\n\t // Use getRandomValues method (Browser)\n\t if (typeof crypto.getRandomValues === 'function') {\n\t try {\n\t return crypto.getRandomValues(new Uint32Array(1))[0];\n\t } catch (err) {}\n\t }\n\n\t // Use randomBytes method (NodeJS)\n\t if (typeof crypto.randomBytes === 'function') {\n\t try {\n\t return crypto.randomBytes(4).readInt32LE();\n\t } catch (err) {}\n\t }\n\t }\n\n\t throw new Error('Native crypto module could not be used to get secure random number.');\n\t };\n\n\t /*\n\t * Local polyfill of Object.create\n\n\t */\n\t var create = Object.create || (function () {\n\t function F() {}\n\n\t return function (obj) {\n\t var subtype;\n\n\t F.prototype = obj;\n\n\t subtype = new F();\n\n\t F.prototype = null;\n\n\t return subtype;\n\t };\n\t }());\n\n\t /**\n\t * CryptoJS namespace.\n\t */\n\t var C = {};\n\n\t /**\n\t * Library namespace.\n\t */\n\t var C_lib = C.lib = {};\n\n\t /**\n\t * Base object for prototypal inheritance.\n\t */\n\t var Base = C_lib.Base = (function () {\n\n\n\t return {\n\t /**\n\t * Creates a new object that inherits from this object.\n\t *\n\t * @param {Object} overrides Properties to copy into the new object.\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * field: 'value',\n\t *\n\t * method: function () {\n\t * }\n\t * });\n\t */\n\t extend: function (overrides) {\n\t // Spawn\n\t var subtype = create(this);\n\n\t // Augment\n\t if (overrides) {\n\t subtype.mixIn(overrides);\n\t }\n\n\t // Create default initializer\n\t if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {\n\t subtype.init = function () {\n\t subtype.$super.init.apply(this, arguments);\n\t };\n\t }\n\n\t // Initializer's prototype is the subtype object\n\t subtype.init.prototype = subtype;\n\n\t // Reference supertype\n\t subtype.$super = this;\n\n\t return subtype;\n\t },\n\n\t /**\n\t * Extends this object and runs the init method.\n\t * Arguments to create() will be passed to init().\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var instance = MyType.create();\n\t */\n\t create: function () {\n\t var instance = this.extend();\n\t instance.init.apply(instance, arguments);\n\n\t return instance;\n\t },\n\n\t /**\n\t * Initializes a newly created object.\n\t * Override this method to add some logic when your objects are created.\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * init: function () {\n\t * // ...\n\t * }\n\t * });\n\t */\n\t init: function () {\n\t },\n\n\t /**\n\t * Copies properties into this object.\n\t *\n\t * @param {Object} properties The properties to mix in.\n\t *\n\t * @example\n\t *\n\t * MyType.mixIn({\n\t * field: 'value'\n\t * });\n\t */\n\t mixIn: function (properties) {\n\t for (var propertyName in properties) {\n\t if (properties.hasOwnProperty(propertyName)) {\n\t this[propertyName] = properties[propertyName];\n\t }\n\t }\n\n\t // IE won't copy toString using the loop above\n\t if (properties.hasOwnProperty('toString')) {\n\t this.toString = properties.toString;\n\t }\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = instance.clone();\n\t */\n\t clone: function () {\n\t return this.init.prototype.extend(this);\n\t }\n\t };\n\t }());\n\n\t /**\n\t * An array of 32-bit words.\n\t *\n\t * @property {Array} words The array of 32-bit words.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var WordArray = C_lib.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of 32-bit words.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.create();\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 4;\n\t }\n\t },\n\n\t /**\n\t * Converts this word array to a string.\n\t *\n\t * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\n\t *\n\t * @return {string} The stringified word array.\n\t *\n\t * @example\n\t *\n\t * var string = wordArray + '';\n\t * var string = wordArray.toString();\n\t * var string = wordArray.toString(CryptoJS.enc.Utf8);\n\t */\n\t toString: function (encoder) {\n\t return (encoder || Hex).stringify(this);\n\t },\n\n\t /**\n\t * Concatenates a word array to this word array.\n\t *\n\t * @param {WordArray} wordArray The word array to append.\n\t *\n\t * @return {WordArray} This word array.\n\t *\n\t * @example\n\t *\n\t * wordArray1.concat(wordArray2);\n\t */\n\t concat: function (wordArray) {\n\t // Shortcuts\n\t var thisWords = this.words;\n\t var thatWords = wordArray.words;\n\t var thisSigBytes = this.sigBytes;\n\t var thatSigBytes = wordArray.sigBytes;\n\n\t // Clamp excess bits\n\t this.clamp();\n\n\t // Concat\n\t if (thisSigBytes % 4) {\n\t // Copy one byte at a time\n\t for (var i = 0; i < thatSigBytes; i++) {\n\t var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);\n\t }\n\t } else {\n\t // Copy one word at a time\n\t for (var j = 0; j < thatSigBytes; j += 4) {\n\t thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2];\n\t }\n\t }\n\t this.sigBytes += thatSigBytes;\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Removes insignificant bits.\n\t *\n\t * @example\n\t *\n\t * wordArray.clamp();\n\t */\n\t clamp: function () {\n\t // Shortcuts\n\t var words = this.words;\n\t var sigBytes = this.sigBytes;\n\n\t // Clamp\n\t words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);\n\t words.length = Math.ceil(sigBytes / 4);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = wordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone.words = this.words.slice(0);\n\n\t return clone;\n\t },\n\n\t /**\n\t * Creates a word array filled with random bytes.\n\t *\n\t * @param {number} nBytes The number of random bytes to generate.\n\t *\n\t * @return {WordArray} The random word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.random(16);\n\t */\n\t random: function (nBytes) {\n\t var words = [];\n\n\t for (var i = 0; i < nBytes; i += 4) {\n\t words.push(cryptoSecureRandomInt());\n\t }\n\n\t return new WordArray.init(words, nBytes);\n\t }\n\t });\n\n\t /**\n\t * Encoder namespace.\n\t */\n\t var C_enc = C.enc = {};\n\n\t /**\n\t * Hex encoding strategy.\n\t */\n\t var Hex = C_enc.Hex = {\n\t /**\n\t * Converts a word array to a hex string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The hex string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.enc.Hex.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var hexChars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t hexChars.push((bite >>> 4).toString(16));\n\t hexChars.push((bite & 0x0f).toString(16));\n\t }\n\n\t return hexChars.join('');\n\t },\n\n\t /**\n\t * Converts a hex string to a word array.\n\t *\n\t * @param {string} hexStr The hex string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Hex.parse(hexString);\n\t */\n\t parse: function (hexStr) {\n\t // Shortcut\n\t var hexStrLength = hexStr.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < hexStrLength; i += 2) {\n\t words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);\n\t }\n\n\t return new WordArray.init(words, hexStrLength / 2);\n\t }\n\t };\n\n\t /**\n\t * Latin1 encoding strategy.\n\t */\n\t var Latin1 = C_enc.Latin1 = {\n\t /**\n\t * Converts a word array to a Latin1 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Latin1 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var latin1Chars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t latin1Chars.push(String.fromCharCode(bite));\n\t }\n\n\t return latin1Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Latin1 string to a word array.\n\t *\n\t * @param {string} latin1Str The Latin1 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\n\t */\n\t parse: function (latin1Str) {\n\t // Shortcut\n\t var latin1StrLength = latin1Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < latin1StrLength; i++) {\n\t words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);\n\t }\n\n\t return new WordArray.init(words, latin1StrLength);\n\t }\n\t };\n\n\t /**\n\t * UTF-8 encoding strategy.\n\t */\n\t var Utf8 = C_enc.Utf8 = {\n\t /**\n\t * Converts a word array to a UTF-8 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-8 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t try {\n\t return decodeURIComponent(escape(Latin1.stringify(wordArray)));\n\t } catch (e) {\n\t throw new Error('Malformed UTF-8 data');\n\t }\n\t },\n\n\t /**\n\t * Converts a UTF-8 string to a word array.\n\t *\n\t * @param {string} utf8Str The UTF-8 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\n\t */\n\t parse: function (utf8Str) {\n\t return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\n\t }\n\t };\n\n\t /**\n\t * Abstract buffered block algorithm template.\n\t *\n\t * The property blockSize must be implemented in a concrete subtype.\n\t *\n\t * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\n\t */\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\n\t /**\n\t * Resets this block algorithm's data buffer to its initial state.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm.reset();\n\t */\n\t reset: function () {\n\t // Initial values\n\t this._data = new WordArray.init();\n\t this._nDataBytes = 0;\n\t },\n\n\t /**\n\t * Adds new data to this block algorithm's buffer.\n\t *\n\t * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm._append('data');\n\t * bufferedBlockAlgorithm._append(wordArray);\n\t */\n\t _append: function (data) {\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof data == 'string') {\n\t data = Utf8.parse(data);\n\t }\n\n\t // Append\n\t this._data.concat(data);\n\t this._nDataBytes += data.sigBytes;\n\t },\n\n\t /**\n\t * Processes available data blocks.\n\t *\n\t * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\n\t *\n\t * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\n\t *\n\t * @return {WordArray} The processed data.\n\t *\n\t * @example\n\t *\n\t * var processedData = bufferedBlockAlgorithm._process();\n\t * var processedData = bufferedBlockAlgorithm._process(!!'flush');\n\t */\n\t _process: function (doFlush) {\n\t var processedWords;\n\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var dataSigBytes = data.sigBytes;\n\t var blockSize = this.blockSize;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count blocks ready\n\t var nBlocksReady = dataSigBytes / blockSizeBytes;\n\t if (doFlush) {\n\t // Round up to include partial blocks\n\t nBlocksReady = Math.ceil(nBlocksReady);\n\t } else {\n\t // Round down to include only full blocks,\n\t // less the number of blocks that must remain in the buffer\n\t nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\n\t }\n\n\t // Count words ready\n\t var nWordsReady = nBlocksReady * blockSize;\n\n\t // Count bytes ready\n\t var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\n\n\t // Process blocks\n\t if (nWordsReady) {\n\t for (var offset = 0; offset < nWordsReady; offset += blockSize) {\n\t // Perform concrete-algorithm logic\n\t this._doProcessBlock(dataWords, offset);\n\t }\n\n\t // Remove processed words\n\t processedWords = dataWords.splice(0, nWordsReady);\n\t data.sigBytes -= nBytesReady;\n\t }\n\n\t // Return processed words\n\t return new WordArray.init(processedWords, nBytesReady);\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = bufferedBlockAlgorithm.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone._data = this._data.clone();\n\n\t return clone;\n\t },\n\n\t _minBufferSize: 0\n\t });\n\n\t /**\n\t * Abstract hasher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\n\t */\n\t var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Initializes a newly created hasher.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\n\t *\n\t * @example\n\t *\n\t * var hasher = CryptoJS.algo.SHA256.create();\n\t */\n\t init: function (cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this hasher to its initial state.\n\t *\n\t * @example\n\t *\n\t * hasher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-hasher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Updates this hasher with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {Hasher} This hasher.\n\t *\n\t * @example\n\t *\n\t * hasher.update('message');\n\t * hasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t // Append\n\t this._append(messageUpdate);\n\n\t // Update the hash\n\t this._process();\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the hash computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @example\n\t *\n\t * var hash = hasher.finalize();\n\t * var hash = hasher.finalize('message');\n\t * var hash = hasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Final message update\n\t if (messageUpdate) {\n\t this._append(messageUpdate);\n\t }\n\n\t // Perform concrete-hasher logic\n\t var hash = this._doFinalize();\n\n\t return hash;\n\t },\n\n\t blockSize: 512/32,\n\n\t /**\n\t * Creates a shortcut function to a hasher's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to create a helper for.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHelper: function (hasher) {\n\t return function (message, cfg) {\n\t return new hasher.init(cfg).finalize(message);\n\t };\n\t },\n\n\t /**\n\t * Creates a shortcut function to the HMAC's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to use in this HMAC helper.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHmacHelper: function (hasher) {\n\t return function (message, key) {\n\t return new C_algo.HMAC.init(hasher, key).finalize(message);\n\t };\n\t }\n\t });\n\n\t /**\n\t * Algorithm namespace.\n\t */\n\t var C_algo = C.algo = {};\n\n\t return C;\n\t}(Math));\n\n\n\treturn CryptoJS;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Initialization and round constants tables\n\t var H = [];\n\t var K = [];\n\n\t // Compute constants\n\t (function () {\n\t function isPrime(n) {\n\t var sqrtN = Math.sqrt(n);\n\t for (var factor = 2; factor <= sqrtN; factor++) {\n\t if (!(n % factor)) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t }\n\n\t function getFractionalBits(n) {\n\t return ((n - (n | 0)) * 0x100000000) | 0;\n\t }\n\n\t var n = 2;\n\t var nPrime = 0;\n\t while (nPrime < 64) {\n\t if (isPrime(n)) {\n\t if (nPrime < 8) {\n\t H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));\n\t }\n\t K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));\n\n\t nPrime++;\n\t }\n\n\t n++;\n\t }\n\t }());\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-256 hash algorithm.\n\t */\n\t var SHA256 = C_algo.SHA256 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init(H.slice(0));\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\t var f = H[5];\n\t var g = H[6];\n\t var h = H[7];\n\n\t // Computation\n\t for (var i = 0; i < 64; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var gamma0x = W[i - 15];\n\t var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^\n\t ((gamma0x << 14) | (gamma0x >>> 18)) ^\n\t (gamma0x >>> 3);\n\n\t var gamma1x = W[i - 2];\n\t var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^\n\t ((gamma1x << 13) | (gamma1x >>> 19)) ^\n\t (gamma1x >>> 10);\n\n\t W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];\n\t }\n\n\t var ch = (e & f) ^ (~e & g);\n\t var maj = (a & b) ^ (a & c) ^ (b & c);\n\n\t var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22));\n\t var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25));\n\n\t var t1 = h + sigma1 + ch + K[i] + W[i];\n\t var t2 = sigma0 + maj;\n\n\t h = g;\n\t g = f;\n\t f = e;\n\t e = (d + t1) | 0;\n\t d = c;\n\t c = b;\n\t b = a;\n\t a = (t1 + t2) | 0;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t H[5] = (H[5] + f) | 0;\n\t H[6] = (H[6] + g) | 0;\n\t H[7] = (H[7] + h) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA256('message');\n\t * var hash = CryptoJS.SHA256(wordArray);\n\t */\n\t C.SHA256 = Hasher._createHelper(SHA256);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA256(message, key);\n\t */\n\t C.HmacSHA256 = Hasher._createHmacHelper(SHA256);\n\t}(Math));\n\n\n\treturn CryptoJS.SHA256;\n\n}));"],"names":["CryptoJS","module","exports","Math","undefined","crypto","window","self","globalThis","msCrypto","g","err","cryptoSecureRandomInt","getRandomValues","Uint32Array","randomBytes","readInt32LE","Error","create","Object","F","obj","subtype","prototype","C","C_lib","lib","Base","extend","overrides","this","mixIn","hasOwnProperty","init","$super","apply","arguments","instance","properties","propertyName","toString","clone","WordArray","words","sigBytes","length","encoder","Hex","stringify","concat","wordArray","thisWords","thatWords","thisSigBytes","thatSigBytes","clamp","i","thatByte","j","ceil","call","slice","random","nBytes","push","C_enc","enc","hexChars","bite","join","parse","hexStr","hexStrLength","parseInt","substr","Latin1","latin1Chars","String","fromCharCode","latin1Str","latin1StrLength","charCodeAt","Utf8","decodeURIComponent","escape","e","utf8Str","unescape","encodeURIComponent","BufferedBlockAlgorithm","reset","_data","_nDataBytes","_append","data","_process","doFlush","processedWords","dataWords","dataSigBytes","blockSize","nBlocksReady","nWordsReady","max","_minBufferSize","nBytesReady","min","offset","_doProcessBlock","splice","C_algo","Hasher","cfg","_doReset","update","messageUpdate","finalize","_doFinalize","_createHelper","hasher","message","_createHmacHelper","key","HMAC","algo","H","K","isPrime","n","sqrtN","sqrt","factor","getFractionalBits","nPrime","pow","W","SHA256","_hash","M","a","b","c","d","f","h","gamma0x","gamma0","gamma1x","gamma1","maj","sigma0","t1","nBitsTotal","nBitsLeft","floor","HmacSHA256"],"sourceRoot":""}
@@ -0,0 +1 @@
1
+ (this.webpackChunkOnairos=this.webpackChunkOnairos||[]).push([[423],{249:function(t,n,e){var i;t.exports=(i=i||function(t,n){var i;if("undefined"!=typeof window&&window.crypto&&(i=window.crypto),"undefined"!=typeof self&&self.crypto&&(i=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(i=globalThis.crypto),!i&&"undefined"!=typeof window&&window.msCrypto&&(i=window.msCrypto),!i&&void 0!==e.g&&e.g.crypto&&(i=e.g.crypto),!i)try{i=e(480)}catch(t){}var r=function(){if(i){if("function"==typeof i.getRandomValues)try{return i.getRandomValues(new Uint32Array(1))[0]}catch(t){}if("function"==typeof i.randomBytes)try{return i.randomBytes(4).readInt32LE()}catch(t){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function t(){}return function(n){var e;return t.prototype=n,e=new t,t.prototype=null,e}}(),s={},a=s.lib={},c=a.Base={extend:function(t){var n=o(this);return t&&n.mixIn(t),n.hasOwnProperty("init")&&this.init!==n.init||(n.init=function(){n.$super.init.apply(this,arguments)}),n.init.prototype=n,n.$super=this,n},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n]);t.hasOwnProperty("toString")&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},u=a.WordArray=c.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=e!=n?e:4*t.length},toString:function(t){return(t||h).stringify(this)},concat:function(t){var n=this.words,e=t.words,i=this.sigBytes,r=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o<r;o++){var s=e[o>>>2]>>>24-o%4*8&255;n[i+o>>>2]|=s<<24-(i+o)%4*8}else for(var a=0;a<r;a+=4)n[i+a>>>2]=e[a>>>2];return this.sigBytes+=r,this},clamp:function(){var n=this.words,e=this.sigBytes;n[e>>>2]&=4294967295<<32-e%4*8,n.length=t.ceil(e/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var n=[],e=0;e<t;e+=4)n.push(r());return new u.init(n,t)}}),f=s.enc={},h=f.Hex={stringify:function(t){for(var n=t.words,e=t.sigBytes,i=[],r=0;r<e;r++){var o=n[r>>>2]>>>24-r%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join("")},parse:function(t){for(var n=t.length,e=[],i=0;i<n;i+=2)e[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new u.init(e,n/2)}},p=f.Latin1={stringify:function(t){for(var n=t.words,e=t.sigBytes,i=[],r=0;r<e;r++){var o=n[r>>>2]>>>24-r%4*8&255;i.push(String.fromCharCode(o))}return i.join("")},parse:function(t){for(var n=t.length,e=[],i=0;i<n;i++)e[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new u.init(e,n)}},d=f.Utf8={stringify:function(t){try{return decodeURIComponent(escape(p.stringify(t)))}catch(t){throw new Error("Malformed UTF-8 data")}},parse:function(t){return p.parse(unescape(encodeURIComponent(t)))}},l=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(t){"string"==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(n){var e,i=this._data,r=i.words,o=i.sigBytes,s=this.blockSize,a=o/(4*s),c=(a=n?t.ceil(a):t.max((0|a)-this._minBufferSize,0))*s,f=t.min(4*c,o);if(c){for(var h=0;h<c;h+=s)this._doProcessBlock(r,h);e=r.splice(0,c),i.sigBytes-=f}return new u.init(e,f)},clone:function(){var t=c.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),y=(a.Hasher=l.extend({cfg:c.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(n,e){return new t.init(e).finalize(n)}},_createHmacHelper:function(t){return function(n,e){return new y.HMAC.init(t,e).finalize(n)}}}),s.algo={});return s}(Math),i)},153:function(t,n,e){var i;t.exports=(i=e(249),function(t){var n=i,e=n.lib,r=e.WordArray,o=e.Hasher,s=n.algo,a=[],c=[];!function(){function n(n){for(var e=t.sqrt(n),i=2;i<=e;i++)if(!(n%i))return!1;return!0}function e(t){return 4294967296*(t-(0|t))|0}for(var i=2,r=0;r<64;)n(i)&&(r<8&&(a[r]=e(t.pow(i,.5))),c[r]=e(t.pow(i,1/3)),r++),i++}();var u=[],f=s.SHA256=o.extend({_doReset:function(){this._hash=new r.init(a.slice(0))},_doProcessBlock:function(t,n){for(var e=this._hash.words,i=e[0],r=e[1],o=e[2],s=e[3],a=e[4],f=e[5],h=e[6],p=e[7],d=0;d<64;d++){if(d<16)u[d]=0|t[n+d];else{var l=u[d-15],y=(l<<25|l>>>7)^(l<<14|l>>>18)^l>>>3,g=u[d-2],w=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;u[d]=y+u[d-7]+w+u[d-16]}var v=i&r^i&o^r&o,_=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),m=p+((a<<26|a>>>6)^(a<<21|a>>>11)^(a<<7|a>>>25))+(a&f^~a&h)+c[d]+u[d];p=h,h=f,f=a,a=s+m|0,s=o,o=r,r=i,i=m+(_+v)|0}e[0]=e[0]+i|0,e[1]=e[1]+r|0,e[2]=e[2]+o|0,e[3]=e[3]+s|0,e[4]=e[4]+a|0,e[5]=e[5]+f|0,e[6]=e[6]+h|0,e[7]=e[7]+p|0},_doFinalize:function(){var n=this._data,e=n.words,i=8*this._nDataBytes,r=8*n.sigBytes;return e[r>>>5]|=128<<24-r%32,e[14+(r+64>>>9<<4)]=t.floor(i/4294967296),e[15+(r+64>>>9<<4)]=i,n.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=o.clone.call(this);return t._hash=this._hash.clone(),t}});n.SHA256=o._createHelper(f),n.HmacSHA256=o._createHmacHelper(f)}(Math),i.SHA256)},480:()=>{}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 874.onairos.bundle.js.LICENSE.txt */
2
+ (this.webpackChunkonairos=this.webpackChunkonairos||[]).push([[874],{742:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],c=o[1],u=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,c)),f=0,h=c>0?s-4:s;for(r=0;r<h;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],u[f++]=e>>16&255,u[f++]=e>>8&255,u[f++]=255&e;return 2===c&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[f++]=255&e),1===c&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e),u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(c(t,a,a+s>u?u:a+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,n){for(var i,o,s=[],a=e;a<n;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},764:(t,e,r)=>{"use strict";const n=r(742),i=r(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.lW=c,e.h2=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|g(t,e);let n=a(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(V(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return l(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(V(t,ArrayBuffer)||t&&V(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(V(t,SharedArrayBuffer)||t&&V(t.buffer,SharedArrayBuffer)))return d(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return c.from(n,e,r);const i=function(t){if(c.isBuffer(t)){const e=0|p(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||G(t.length)?a(0):l(t):"Buffer"===t.type&&Array.isArray(t.data)?l(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return f(t),a(t<0?0:0|p(t))}function l(t){const e=t.length<0?0:0|p(t.length),r=a(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function d(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,c.prototype),n}function p(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function g(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||V(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return J(t).length;default:if(i)return n?-1:H(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,r);case"utf8":case"utf-8":return I(this,e,r);case"ascii":return O(this,e,r);case"latin1":case"binary":return _(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function w(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),G(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){let o,s=1,a=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;o<a;o++)if(u(t,o)===u(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===c)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){let r=!0;for(let n=0;n<c;n++)if(u(t,o+n)!==u(e,n)){r=!1;break}if(r)return o}return-1}function v(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=e.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(e.substr(2*s,2),16);if(G(n))return s;t[r+s]=n}return s}function E(t,e,r,n){return X(H(e,t.length-r),t,r,n)}function S(t,e,r,n){return X(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function A(t,e,r,n){return X(J(e),t,r,n)}function k(t,e,r,n){return X(function(t,e){let r,n,i;const o=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function I(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i<r;){const e=t[i];let o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,a,c;switch(s){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(c=(31&e)<<6|63&r,c>127&&(o=c));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(c=(15&e)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){const e=t.length;if(e<=B)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=B));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(t,e,r){return function(t,e,r){return f(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},c.allocUnsafe=function(t){return h(t)},c.allocUnsafeSlow=function(t){return h(t)},c.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==c.prototype},c.compare=function(t,e){if(V(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),V(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=c.allocUnsafe(e);let i=0;for(r=0;r<t.length;++r){let e=t[r];if(V(e,Uint8Array))i+e.length>n.length?(c.isBuffer(e)||(e=c.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},c.byteLength=g,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)w(this,e,e+1);return this},c.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)w(this,e,e+3),w(this,e+1,e+2);return this},c.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)w(this,e,e+7),w(this,e+1,e+6),w(this,e+2,e+5),w(this,e+3,e+4);return this},c.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?I(this,0,t):y.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){let t="";const r=e.h2;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(t,e,r,n,i){if(V(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(o,s),u=this.slice(n,i),f=t.slice(e,r);for(let t=0;t<a;++t)if(u[t]!==f[t]){o=u[t],s=f[t];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return v(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":case"latin1":case"binary":return S(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const B=4096;function O(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function _(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function R(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=Y[t[n]];return i}function U(t,e,r){const n=t.slice(e,r);let i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function L(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,r,n,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function P(t,e,r,n,i){K(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function x(t,e,r,n,i){K(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function j(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(t,e,r,n,o){return e=+e,r>>>=0,o||j(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function D(t,e,r,n,o){return e=+e,r>>>=0,o||j(t,0,r,8),i.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||L(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readBigUInt64LE=q((function(t){W(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),c.prototype.readBigUInt64BE=q((function(t){W(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),c.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||L(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return t>>>=0,e||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||L(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){t>>>=0,e||L(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readBigInt64LE=q((function(t){W(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),c.prototype.readBigInt64BE=q((function(t){W(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||$(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),c.prototype.readFloatLE=function(t,e){return t>>>=0,e||L(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||L(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||L(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||L(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||C(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||C(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigUInt64LE=q((function(t,e=0){return P(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=q((function(t,e=0){return x(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);C(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);C(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigInt64LE=q((function(t,e=0){return P(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=q((function(t,e=0){return x(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return D(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return D(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{const o=c.isBuffer(t)?t:c.from(t,n),s=o.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%s]}return this};const z={};function F(t,e,r){z[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function M(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function K(t,e,r,n,i,o){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new z.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){W(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||$(e,t.length-(r+1))}(n,i,o)}function W(t,e){if("number"!=typeof t)throw new z.ERR_INVALID_ARG_TYPE(e,"number",t)}function $(t,e,r){if(Math.floor(t)!==t)throw W(t,r),new z.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new z.ERR_BUFFER_OUT_OF_BOUNDS;throw new z.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=M(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=M(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);const Z=/[^+/0-9A-Za-z-_]/g;function H(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function J(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(Z,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function X(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function V(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function G(t){return t!=t}const Y=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function q(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},645:(t,e)=>{e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,f=-7,h=r?i-1:0,l=r?-1:1,d=t[e+h];for(h+=l,o=d&(1<<-f)-1,d>>=-f,f+=a;f>0;o=256*o+t[e+h],h+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+h],h+=l,f-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=u}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,f=(1<<u)-1,h=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+h>=1?l/c:l*Math.pow(2,1-h))*c>=2&&(s++,c/=2),s+h>=f?(a=0,s=f):s+h>=1?(a=(e*c-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+d]=255&s,d+=p,s/=256,u-=8);t[r+d-p]|=128*g}},981:(t,e,r)=>{"use strict";r.r(e),r.d(e,{connect:()=>$r,decrypt:()=>Zr,disconnect:()=>Hr,dispatch:()=>sn,encrypt:()=>Jr,getActiveKey:()=>Xr,getActivePublicKey:()=>Vr,getWalletNames:()=>Gr,sign:()=>Qr,signMessage:()=>an,signature:()=>qr,verifyMessage:()=>cn});var n={};r.r(n),r.d(n,{hasBrowserEnv:()=>te,hasStandardBrowserEnv:()=>ee,hasStandardBrowserWebWorkerEnv:()=>ne});class i extends Error{}function o(t,e){if("string"!=typeof t)throw new i("Invalid token specified: must be a string");e||(e={});const r=!0===e.header?0:1,n=t.split(".")[r];if("string"!=typeof n)throw new i(`Invalid token specified: missing part #${r+1}`);let o;try{o=function(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(t){return decodeURIComponent(atob(t).replace(/(.)/g,((t,e)=>{let r=e.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(e)}catch(t){return atob(e)}}(n)}catch(t){throw new i(`Invalid token specified: invalid base64 for part #${r+1} (${t.message})`)}try{return JSON.parse(o)}catch(t){throw new i(`Invalid token specified: invalid json for part #${r+1} (${t.message})`)}}function s(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]])}return r}i.prototype.name="InvalidTokenError","function"==typeof SuppressedError&&SuppressedError;var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self?self:{};function c(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function u(t,e){return t(e={exports:{}},e.exports),e.exports}var f=u((function(t,e){Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){var t=this;this.locked=new Map,this.addToLocked=function(e,r){var n=t.locked.get(e);void 0===n?void 0===r?t.locked.set(e,[]):t.locked.set(e,[r]):void 0!==r&&(n.unshift(r),t.locked.set(e,n))},this.isLocked=function(e){return t.locked.has(e)},this.lock=function(e){return new Promise((function(r,n){t.isLocked(e)?t.addToLocked(e,r):(t.addToLocked(e),r())}))},this.unlock=function(e){var r=t.locked.get(e);if(void 0!==r&&0!==r.length){var n=r.pop();t.locked.set(e,r),void 0!==n&&setTimeout(n,0)}else t.locked.delete(e)}}return t.getInstance=function(){return void 0===t.instance&&(t.instance=new t),t.instance},t}();e.default=function(){return r.getInstance()}}));c(f);var h=c(u((function(t,e){var r=a&&a.__awaiter||function(t,e,r,n){return new(r||(r=Promise))((function(i,o){function s(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){t.done?i(t.value):new r((function(e){e(t.value)})).then(s,a)}c((n=n.apply(t,e||[])).next())}))},n=a&&a.__generator||function(t,e){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},i=a;Object.defineProperty(e,"__esModule",{value:!0});var o="browser-tabs-lock-key",s={key:function(t){return r(i,void 0,void 0,(function(){return n(this,(function(t){throw new Error("Unsupported")}))}))},getItem:function(t){return r(i,void 0,void 0,(function(){return n(this,(function(t){throw new Error("Unsupported")}))}))},clear:function(){return r(i,void 0,void 0,(function(){return n(this,(function(t){return[2,window.localStorage.clear()]}))}))},removeItem:function(t){return r(i,void 0,void 0,(function(){return n(this,(function(t){throw new Error("Unsupported")}))}))},setItem:function(t,e){return r(i,void 0,void 0,(function(){return n(this,(function(t){throw new Error("Unsupported")}))}))},keySync:function(t){return window.localStorage.key(t)},getItemSync:function(t){return window.localStorage.getItem(t)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(t){return window.localStorage.removeItem(t)},setItemSync:function(t,e){return window.localStorage.setItem(t,e)}};function c(t){return new Promise((function(e){return setTimeout(e,t)}))}function u(t){for(var e="",r=0;r<t;r++)e+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"[Math.floor(61*Math.random())];return e}var h=function(){function t(e){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+u(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=e,void 0===t.waiters&&(t.waiters=[])}return t.prototype.acquireLock=function(e,i){return void 0===i&&(i=5e3),r(this,void 0,void 0,(function(){var r,a,f,h,l,d,p;return n(this,(function(n){switch(n.label){case 0:r=Date.now()+u(4),a=Date.now()+i,f=o+"-"+e,h=void 0===this.storageHandler?s:this.storageHandler,n.label=1;case 1:return Date.now()<a?[4,c(30)]:[3,8];case 2:return n.sent(),null!==h.getItemSync(f)?[3,5]:(l=this.id+"-"+e+"-"+r,[4,c(Math.floor(25*Math.random()))]);case 3:return n.sent(),h.setItemSync(f,JSON.stringify({id:this.id,iat:r,timeoutKey:l,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,c(30)];case 4:return n.sent(),null!==(d=h.getItemSync(f))&&(p=JSON.parse(d)).id===this.id&&p.iat===r?(this.acquiredIatSet.add(r),this.refreshLockWhileAcquired(f,r),[2,!0]):[3,7];case 5:return t.lockCorrector(void 0===this.storageHandler?s:this.storageHandler),[4,this.waitForSomethingToChange(a)];case 6:n.sent(),n.label=7;case 7:return r=Date.now()+u(4),[3,1];case 8:return[2,!1]}}))}))},t.prototype.refreshLockWhileAcquired=function(t,e){return r(this,void 0,void 0,(function(){var i=this;return n(this,(function(o){return setTimeout((function(){return r(i,void 0,void 0,(function(){var r,i,o;return n(this,(function(n){switch(n.label){case 0:return[4,f.default().lock(e)];case 1:return n.sent(),this.acquiredIatSet.has(e)?(r=void 0===this.storageHandler?s:this.storageHandler,null===(i=r.getItemSync(t))?(f.default().unlock(e),[2]):((o=JSON.parse(i)).timeRefreshed=Date.now(),r.setItemSync(t,JSON.stringify(o)),f.default().unlock(e),this.refreshLockWhileAcquired(t,e),[2])):(f.default().unlock(e),[2])}}))}))}),1e3),[2]}))}))},t.prototype.waitForSomethingToChange=function(e){return r(this,void 0,void 0,(function(){return n(this,(function(r){switch(r.label){case 0:return[4,new Promise((function(r){var n=!1,i=Date.now(),o=!1;function s(){if(o||(window.removeEventListener("storage",s),t.removeFromWaiting(s),clearTimeout(a),o=!0),!n){n=!0;var e=50-(Date.now()-i);e>0?setTimeout(r,e):r(null)}}window.addEventListener("storage",s),t.addToWaiting(s);var a=setTimeout(s,Math.max(0,e-Date.now()))}))];case 1:return r.sent(),[2]}}))}))},t.addToWaiting=function(e){this.removeFromWaiting(e),void 0!==t.waiters&&t.waiters.push(e)},t.removeFromWaiting=function(e){void 0!==t.waiters&&(t.waiters=t.waiters.filter((function(t){return t!==e})))},t.notifyWaiters=function(){void 0!==t.waiters&&t.waiters.slice().forEach((function(t){return t()}))},t.prototype.releaseLock=function(t){return r(this,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,this.releaseLock__private__(t)];case 1:return[2,e.sent()]}}))}))},t.prototype.releaseLock__private__=function(e){return r(this,void 0,void 0,(function(){var r,i,a,c;return n(this,(function(n){switch(n.label){case 0:return r=void 0===this.storageHandler?s:this.storageHandler,i=o+"-"+e,null===(a=r.getItemSync(i))?[2]:(c=JSON.parse(a)).id!==this.id?[3,2]:[4,f.default().lock(c.iat)];case 1:n.sent(),this.acquiredIatSet.delete(c.iat),r.removeItemSync(i),f.default().unlock(c.iat),t.notifyWaiters(),n.label=2;case 2:return[2]}}))}))},t.lockCorrector=function(e){for(var r=Date.now()-5e3,n=e,i=[],s=0;;){var a=n.keySync(s);if(null===a)break;i.push(a),s++}for(var c=!1,u=0;u<i.length;u++){var f=i[u];if(f.includes(o)){var h=n.getItemSync(f);if(null!==h){var l=JSON.parse(h);(void 0===l.timeRefreshed&&l.timeAcquired<r||void 0!==l.timeRefreshed&&l.timeRefreshed<r)&&(n.removeItemSync(f),c=!0)}}}c&&t.notifyWaiters()},t.waiters=void 0,t}();e.default=h})));const l={timeoutInSeconds:60},d={name:"auth0-spa-js",version:"2.1.3"},p=()=>Date.now();class g extends Error{constructor(t,e){super(e),this.error=t,this.error_description=e,Object.setPrototypeOf(this,g.prototype)}static fromPayload({error:t,error_description:e}){return new g(t,e)}}class y extends g{constructor(t,e,r,n=null){super(t,e),this.state=r,this.appState=n,Object.setPrototypeOf(this,y.prototype)}}class w extends g{constructor(){super("timeout","Timeout"),Object.setPrototypeOf(this,w.prototype)}}class m extends w{constructor(t){super(),this.popup=t,Object.setPrototypeOf(this,m.prototype)}}class b extends g{constructor(t){super("cancelled","Popup closed"),this.popup=t,Object.setPrototypeOf(this,b.prototype)}}class v extends g{constructor(t,e,r){super(t,e),this.mfa_token=r,Object.setPrototypeOf(this,v.prototype)}}class E extends g{constructor(t,e){super("missing_refresh_token",`Missing Refresh Token (audience: '${S(t,["default"])}', scope: '${S(e)}')`),this.audience=t,this.scope=e,Object.setPrototypeOf(this,E.prototype)}}function S(t,e=[]){return t&&!e.includes(t)?t:""}const A=()=>window.crypto,k=()=>{let t="";return Array.from(A().getRandomValues(new Uint8Array(43))).forEach((e=>t+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~."[e%66])),t},T=t=>btoa(t),I=t=>{var{clientId:e}=t,r=s(t,["clientId"]);return new URLSearchParams((t=>Object.keys(t).filter((e=>void 0!==t[e])).reduce(((e,r)=>Object.assign(Object.assign({},e),{[r]:t[r]})),{}))(Object.assign({client_id:e},r))).toString()},B=t=>(t=>decodeURIComponent(atob(t).split("").map((t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2))).join("")))(t.replace(/_/g,"/").replace(/-/g,"+")),O=async(t,e)=>{const r=await fetch(t,e);return{ok:r.ok,json:await r.json()}},_=async(t,e,r,n,i,o,s=1e4)=>i?(async(t,e,r,n,i,o,s)=>{return a={auth:{audience:e,scope:r},timeout:i,fetchUrl:t,fetchOptions:n,useFormData:s},c=o,new Promise((function(t,e){const r=new MessageChannel;r.port1.onmessage=function(n){n.data.error?e(new Error(n.data.error)):t(n.data),r.port1.close()},c.postMessage(a,[r.port2])}));var a,c})(t,e,r,n,s,i,o):(async(t,e,r)=>{const n=new AbortController;let i;return e.signal=n.signal,Promise.race([O(t,e),new Promise(((t,e)=>{i=setTimeout((()=>{n.abort(),e(new Error("Timeout when executing 'fetch'"))}),r)}))]).finally((()=>{clearTimeout(i)}))})(t,n,s);async function R(t,e){var{baseUrl:r,timeout:n,audience:i,scope:o,auth0Client:a,useFormData:c}=t,u=s(t,["baseUrl","timeout","audience","scope","auth0Client","useFormData"]);const f=c?I(u):JSON.stringify(u);return await async function(t,e,r,n,i,o,a){let c,u=null;for(let s=0;s<3;s++)try{c=await _(t,r,n,i,o,a,e),u=null;break}catch(t){u=t}if(u)throw u;const f=c.json,{error:h,error_description:l}=f,d=s(f,["error","error_description"]),{ok:p}=c;if(!p){const e=l||`HTTP error. Unable to fetch ${t}`;if("mfa_required"===h)throw new v(h,e,d.mfa_token);if("missing_refresh_token"===h)throw new E(r,n);throw new g(h||"request_error",e)}return d}(`${r}/oauth/token`,n,i||"default",o,{method:"POST",body:f,headers:{"Content-Type":c?"application/x-www-form-urlencoded":"application/json","Auth0-Client":btoa(JSON.stringify(a||d))}},e,c)}const U=(...t)=>{return(e=t.filter(Boolean).join(" ").trim().split(/\s+/),Array.from(new Set(e))).join(" ");var e};class L{constructor(t,e="@@auth0spajs@@",r){this.prefix=e,this.suffix=r,this.clientId=t.clientId,this.scope=t.scope,this.audience=t.audience}toKey(){return[this.prefix,this.clientId,this.audience,this.scope,this.suffix].filter(Boolean).join("::")}static fromKey(t){const[e,r,n,i]=t.split("::");return new L({clientId:r,scope:i,audience:n},e)}static fromCacheEntry(t){const{scope:e,audience:r,client_id:n}=t;return new L({scope:e,audience:r,clientId:n})}}class C{set(t,e){localStorage.setItem(t,JSON.stringify(e))}get(t){const e=window.localStorage.getItem(t);if(e)try{return JSON.parse(e)}catch(t){return}}remove(t){localStorage.removeItem(t)}allKeys(){return Object.keys(window.localStorage).filter((t=>t.startsWith("@@auth0spajs@@")))}}class P{constructor(){this.enclosedCache=function(){let t={};return{set(e,r){t[e]=r},get(e){const r=t[e];if(r)return r},remove(e){delete t[e]},allKeys:()=>Object.keys(t)}}()}}class x{constructor(t,e,r){this.cache=t,this.keyManifest=e,this.nowProvider=r||p}async setIdToken(t,e,r){var n;const i=this.getIdTokenCacheKey(t);await this.cache.set(i,{id_token:e,decodedToken:r}),await(null===(n=this.keyManifest)||void 0===n?void 0:n.add(i))}async getIdToken(t){const e=await this.cache.get(this.getIdTokenCacheKey(t.clientId));if(!e&&t.scope&&t.audience){const e=await this.get(t);if(!e)return;if(!e.id_token||!e.decodedToken)return;return{id_token:e.id_token,decodedToken:e.decodedToken}}if(e)return{id_token:e.id_token,decodedToken:e.decodedToken}}async get(t,e=0){var r;let n=await this.cache.get(t.toKey());if(!n){const e=await this.getCacheKeys();if(!e)return;const r=this.matchExistingCacheKey(t,e);r&&(n=await this.cache.get(r))}if(!n)return;const i=await this.nowProvider(),o=Math.floor(i/1e3);return n.expiresAt-e<o?n.body.refresh_token?(n.body={refresh_token:n.body.refresh_token},await this.cache.set(t.toKey(),n),n.body):(await this.cache.remove(t.toKey()),void await(null===(r=this.keyManifest)||void 0===r?void 0:r.remove(t.toKey()))):n.body}async set(t){var e;const r=new L({clientId:t.client_id,scope:t.scope,audience:t.audience}),n=await this.wrapCacheEntry(t);await this.cache.set(r.toKey(),n),await(null===(e=this.keyManifest)||void 0===e?void 0:e.add(r.toKey()))}async clear(t){var e;const r=await this.getCacheKeys();r&&(await r.filter((e=>!t||e.includes(t))).reduce((async(t,e)=>{await t,await this.cache.remove(e)}),Promise.resolve()),await(null===(e=this.keyManifest)||void 0===e?void 0:e.clear()))}async wrapCacheEntry(t){const e=await this.nowProvider();return{body:t,expiresAt:Math.floor(e/1e3)+t.expires_in}}async getCacheKeys(){var t;return this.keyManifest?null===(t=await this.keyManifest.get())||void 0===t?void 0:t.keys:this.cache.allKeys?this.cache.allKeys():void 0}getIdTokenCacheKey(t){return new L({clientId:t},"@@auth0spajs@@","@@user@@").toKey()}matchExistingCacheKey(t,e){return e.filter((e=>{var r;const n=L.fromKey(e),i=new Set(n.scope&&n.scope.split(" ")),o=(null===(r=t.scope)||void 0===r?void 0:r.split(" "))||[],s=n.scope&&o.reduce(((t,e)=>t&&i.has(e)),!0);return"@@auth0spajs@@"===n.prefix&&n.clientId===t.clientId&&n.audience===t.audience&&s}))[0]}}class j{constructor(t,e,r){this.storage=t,this.clientId=e,this.cookieDomain=r,this.storageKey=`a0.spajs.txs.${this.clientId}`}create(t){this.storage.save(this.storageKey,t,{daysUntilExpire:1,cookieDomain:this.cookieDomain})}get(){return this.storage.get(this.storageKey)}remove(){this.storage.remove(this.storageKey,{cookieDomain:this.cookieDomain})}}const N=t=>"number"==typeof t,D=["iss","aud","exp","nbf","iat","jti","azp","nonce","auth_time","at_hash","c_hash","acr","amr","sub_jwk","cnf","sip_from_tag","sip_date","sip_callid","sip_cseq_num","sip_via_branch","orig","dest","mky","events","toe","txn","rph","sid","vot","vtm"];var z=u((function(t,e){var r=a&&a.__assign||function(){return r=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},r.apply(this,arguments)};function n(t,e){if(!e)return"";var r="; "+t;return!0===e?r:r+"="+e}function i(t,e,r){return encodeURIComponent(t).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/\(/g,"%28").replace(/\)/g,"%29")+"="+encodeURIComponent(e).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent)+function(t){if("number"==typeof t.expires){var e=new Date;e.setMilliseconds(e.getMilliseconds()+864e5*t.expires),t.expires=e}return n("Expires",t.expires?t.expires.toUTCString():"")+n("Domain",t.domain)+n("Path",t.path)+n("Secure",t.secure)+n("SameSite",t.sameSite)}(r)}function o(t){for(var e={},r=t?t.split("; "):[],n=/(%[\dA-F]{2})+/gi,i=0;i<r.length;i++){var o=r[i].split("="),s=o.slice(1).join("=");'"'===s.charAt(0)&&(s=s.slice(1,-1));try{e[o[0].replace(n,decodeURIComponent)]=s.replace(n,decodeURIComponent)}catch(t){}}return e}function s(){return o(document.cookie)}function c(t,e,n){document.cookie=i(t,e,r({path:"/"},n))}e.__esModule=!0,e.encode=i,e.parse=o,e.getAll=s,e.get=function(t){return s()[t]},e.set=c,e.remove=function(t,e){c(t,"",r(r({},e),{expires:-1}))}}));c(z),z.encode,z.parse,z.getAll;var F=z.get,M=z.set,K=z.remove;const W={get(t){const e=F(t);if(void 0!==e)return JSON.parse(e)},save(t,e,r){let n={};"https:"===window.location.protocol&&(n={secure:!0,sameSite:"none"}),(null==r?void 0:r.daysUntilExpire)&&(n.expires=r.daysUntilExpire),(null==r?void 0:r.cookieDomain)&&(n.domain=r.cookieDomain),M(t,JSON.stringify(e),n)},remove(t,e){let r={};(null==e?void 0:e.cookieDomain)&&(r.domain=e.cookieDomain),K(t,r)}},$={get:t=>W.get(t)||W.get(`_legacy_${t}`),save(t,e,r){let n={};"https:"===window.location.protocol&&(n={secure:!0}),(null==r?void 0:r.daysUntilExpire)&&(n.expires=r.daysUntilExpire),(null==r?void 0:r.cookieDomain)&&(n.domain=r.cookieDomain),M(`_legacy_${t}`,JSON.stringify(e),n),W.save(t,e,r)},remove(t,e){let r={};(null==e?void 0:e.cookieDomain)&&(r.domain=e.cookieDomain),K(t,r),W.remove(t,e),W.remove(`_legacy_${t}`,e)}},Z={get(t){if("undefined"==typeof sessionStorage)return;const e=sessionStorage.getItem(t);return null!=e?JSON.parse(e):void 0},save(t,e){sessionStorage.setItem(t,JSON.stringify(e))},remove(t){sessionStorage.removeItem(t)}};var H,J=function(t){return H=H||function(t,e,r){var n=function(t,e){var r=atob(t);return r}("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo="),i=n.indexOf("\n",10)+1,o=n.substring(i)+"",s=new Blob([o],{type:"application/javascript"});return URL.createObjectURL(s)}(),new Worker(H,t)};const X={};class V{constructor(t,e){this.cache=t,this.clientId=e,this.manifestKey=this.createManifestKeyFrom(this.clientId)}async add(t){var e;const r=new Set((null===(e=await this.cache.get(this.manifestKey))||void 0===e?void 0:e.keys)||[]);r.add(t),await this.cache.set(this.manifestKey,{keys:[...r]})}async remove(t){const e=await this.cache.get(this.manifestKey);if(e){const r=new Set(e.keys);return r.delete(t),r.size>0?await this.cache.set(this.manifestKey,{keys:[...r]}):await this.cache.remove(this.manifestKey)}}get(){return this.cache.get(this.manifestKey)}clear(){return this.cache.remove(this.manifestKey)}createManifestKeyFrom(t){return`@@auth0spajs@@::${t}`}}const G={memory:()=>(new P).enclosedCache,localstorage:()=>new C},Y=t=>G[t],q=t=>{const{openUrl:e,onRedirect:r}=t,n=s(t,["openUrl","onRedirect"]);return Object.assign(Object.assign({},n),{openUrl:!1===e||e?e:r})},Q=new h;class tt{constructor(t){let e,r;if(this.userCache=(new P).enclosedCache,this.defaultOptions={authorizationParams:{scope:"openid profile email"},useRefreshTokensFallback:!1,useFormData:!0},this._releaseLockOnPageHide=async()=>{await Q.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)},this.options=Object.assign(Object.assign(Object.assign({},this.defaultOptions),t),{authorizationParams:Object.assign(Object.assign({},this.defaultOptions.authorizationParams),t.authorizationParams)}),"undefined"!=typeof window&&(()=>{if(!A())throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");if(void 0===A().subtle)throw new Error("\n auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.\n ")})(),t.cache&&t.cacheLocation&&console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."),t.cache)r=t.cache;else{if(e=t.cacheLocation||"memory",!Y(e))throw new Error(`Invalid cache location "${e}"`);r=Y(e)()}this.httpTimeoutMs=t.httpTimeoutInSeconds?1e3*t.httpTimeoutInSeconds:1e4,this.cookieStorage=!1===t.legacySameSiteCookie?W:$,this.orgHintCookieName=`auth0.${this.options.clientId}.organization_hint`,this.isAuthenticatedCookieName=(t=>`auth0.${this.options.clientId}.is.authenticated`)(),this.sessionCheckExpiryDays=t.sessionCheckExpiryDays||1;const n=t.useCookiesForTransactions?this.cookieStorage:Z;var i;this.scope=U("openid",this.options.authorizationParams.scope,this.options.useRefreshTokens?"offline_access":""),this.transactionManager=new j(n,this.options.clientId,this.options.cookieDomain),this.nowProvider=this.options.nowProvider||p,this.cacheManager=new x(r,r.allKeys?void 0:new V(r,this.options.clientId),this.nowProvider),this.domainUrl=(i=this.options.domain,/^https?:\/\//.test(i)?i:`https://${i}`),this.tokenIssuer=((t,e)=>t?t.startsWith("https://")?t:`https://${t}/`:`${e}/`)(this.options.issuer,this.domainUrl),"undefined"!=typeof window&&window.Worker&&this.options.useRefreshTokens&&"memory"===e&&(this.options.workerUrl?this.worker=new Worker(this.options.workerUrl):this.worker=new J)}_url(t){const e=encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client||d)));return`${this.domainUrl}${t}&auth0Client=${e}`}_authorizeUrl(t){return this._url(`/authorize?${I(t)}`)}async _verifyIdToken(t,e,r){const n=await this.nowProvider();return(t=>{if(!t.id_token)throw new Error("ID token is required but missing");const e=(t=>{const e=t.split("."),[r,n,i]=e;if(3!==e.length||!r||!n||!i)throw new Error("ID token could not be decoded");const o=JSON.parse(B(n)),s={__raw:t},a={};return Object.keys(o).forEach((t=>{s[t]=o[t],D.includes(t)||(a[t]=o[t])})),{encoded:{header:r,payload:n,signature:i},header:JSON.parse(B(r)),claims:s,user:a}})(t.id_token);if(!e.claims.iss)throw new Error("Issuer (iss) claim must be a string present in the ID token");if(e.claims.iss!==t.iss)throw new Error(`Issuer (iss) claim mismatch in the ID token; expected "${t.iss}", found "${e.claims.iss}"`);if(!e.user.sub)throw new Error("Subject (sub) claim must be a string present in the ID token");if("RS256"!==e.header.alg)throw new Error(`Signature algorithm of "${e.header.alg}" is not supported. Expected the ID token to be signed with "RS256".`);if(!e.claims.aud||"string"!=typeof e.claims.aud&&!Array.isArray(e.claims.aud))throw new Error("Audience (aud) claim must be a string or array of strings present in the ID token");if(Array.isArray(e.claims.aud)){if(!e.claims.aud.includes(t.aud))throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${t.aud}" but was not one of "${e.claims.aud.join(", ")}"`);if(e.claims.aud.length>1){if(!e.claims.azp)throw new Error("Authorized Party (azp) claim must be a string present in the ID token when Audience (aud) claim has multiple values");if(e.claims.azp!==t.aud)throw new Error(`Authorized Party (azp) claim mismatch in the ID token; expected "${t.aud}", found "${e.claims.azp}"`)}}else if(e.claims.aud!==t.aud)throw new Error(`Audience (aud) claim mismatch in the ID token; expected "${t.aud}" but found "${e.claims.aud}"`);if(t.nonce){if(!e.claims.nonce)throw new Error("Nonce (nonce) claim must be a string present in the ID token");if(e.claims.nonce!==t.nonce)throw new Error(`Nonce (nonce) claim mismatch in the ID token; expected "${t.nonce}", found "${e.claims.nonce}"`)}if(t.max_age&&!N(e.claims.auth_time))throw new Error("Authentication Time (auth_time) claim must be a number present in the ID token when Max Age (max_age) is specified");if(null==e.claims.exp||!N(e.claims.exp))throw new Error("Expiration Time (exp) claim must be a number present in the ID token");if(!N(e.claims.iat))throw new Error("Issued At (iat) claim must be a number present in the ID token");const r=t.leeway||60,n=new Date(t.now||Date.now()),i=new Date(0);if(i.setUTCSeconds(e.claims.exp+r),n>i)throw new Error(`Expiration Time (exp) claim error in the ID token; current time (${n}) is after expiration time (${i})`);if(null!=e.claims.nbf&&N(e.claims.nbf)){const t=new Date(0);if(t.setUTCSeconds(e.claims.nbf-r),n<t)throw new Error(`Not Before time (nbf) claim in the ID token indicates that this token can't be used just yet. Current time (${n}) is before ${t}`)}if(null!=e.claims.auth_time&&N(e.claims.auth_time)){const i=new Date(0);if(i.setUTCSeconds(parseInt(e.claims.auth_time)+t.max_age+r),n>i)throw new Error(`Authentication Time (auth_time) claim in the ID token indicates that too much time has passed since the last end-user authentication. Current time (${n}) is after last auth at ${i}`)}if(t.organization){const r=t.organization.trim();if(r.startsWith("org_")){const t=r;if(!e.claims.org_id)throw new Error("Organization ID (org_id) claim must be a string present in the ID token");if(t!==e.claims.org_id)throw new Error(`Organization ID (org_id) claim mismatch in the ID token; expected "${t}", found "${e.claims.org_id}"`)}else{const t=r.toLowerCase();if(!e.claims.org_name)throw new Error("Organization Name (org_name) claim must be a string present in the ID token");if(t!==e.claims.org_name)throw new Error(`Organization Name (org_name) claim mismatch in the ID token; expected "${t}", found "${e.claims.org_name}"`)}}return e})({iss:this.tokenIssuer,aud:this.options.clientId,id_token:t,nonce:e,organization:r,leeway:this.options.leeway,max_age:(i=this.options.authorizationParams.max_age,"string"!=typeof i?i:parseInt(i,10)||void 0),now:n});var i}_processOrgHint(t){t?this.cookieStorage.save(this.orgHintCookieName,t,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}):this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain})}async _prepareAuthorizeUrl(t,e,r){const n=T(k()),i=T(k()),o=k(),s=(t=>{const e=new Uint8Array(t);return(t=>{const e={"+":"-","/":"_","=":""};return t.replace(/[+/=]/g,(t=>e[t]))})(window.btoa(String.fromCharCode(...Array.from(e))))})(await(async t=>{const e=A().subtle.digest({name:"SHA-256"},(new TextEncoder).encode(t));return await e})(o)),a=((t,e,r,n,i,o,s,a)=>Object.assign(Object.assign(Object.assign({client_id:t.clientId},t.authorizationParams),r),{scope:U(e,r.scope),response_type:"code",response_mode:a||"query",state:n,nonce:i,redirect_uri:s||t.authorizationParams.redirect_uri,code_challenge:o,code_challenge_method:"S256"}))(this.options,this.scope,t,n,i,s,t.redirect_uri||this.options.authorizationParams.redirect_uri||r,null==e?void 0:e.response_mode),c=this._authorizeUrl(a);return{nonce:i,code_verifier:o,scope:a.scope,audience:a.audience||"default",redirect_uri:a.redirect_uri,state:n,url:c}}async loginWithPopup(t,e){var r;if(t=t||{},!(e=e||{}).popup&&(e.popup=(t=>{const e=window.screenX+(window.innerWidth-400)/2,r=window.screenY+(window.innerHeight-600)/2;return window.open("","auth0:authorize:popup",`left=${e},top=${r},width=400,height=600,resizable,scrollbars=yes,status=1`)})(),!e.popup))throw new Error("Unable to open a popup for loginWithPopup - window.open returned `null`");const n=await this._prepareAuthorizeUrl(t.authorizationParams||{},{response_mode:"web_message"},window.location.origin);e.popup.location.href=n.url;const i=await(t=>new Promise(((e,r)=>{let n;const i=setInterval((()=>{t.popup&&t.popup.closed&&(clearInterval(i),clearTimeout(o),window.removeEventListener("message",n,!1),r(new b(t.popup)))}),1e3),o=setTimeout((()=>{clearInterval(i),r(new m(t.popup)),window.removeEventListener("message",n,!1)}),1e3*(t.timeoutInSeconds||60));n=function(s){if(s.data&&"authorization_response"===s.data.type){if(clearTimeout(o),clearInterval(i),window.removeEventListener("message",n,!1),t.popup.close(),s.data.response.error)return r(g.fromPayload(s.data.response));e(s.data.response)}},window.addEventListener("message",n)})))(Object.assign(Object.assign({},e),{timeoutInSeconds:e.timeoutInSeconds||this.options.authorizeTimeoutInSeconds||60}));if(n.state!==i.state)throw new g("state_mismatch","Invalid state");const o=(null===(r=t.authorizationParams)||void 0===r?void 0:r.organization)||this.options.authorizationParams.organization;await this._requestToken({audience:n.audience,scope:n.scope,code_verifier:n.code_verifier,grant_type:"authorization_code",code:i.code,redirect_uri:n.redirect_uri},{nonceIn:n.nonce,organization:o})}async getUser(){var t;const e=await this._getIdTokenFromCache();return null===(t=null==e?void 0:e.decodedToken)||void 0===t?void 0:t.user}async getIdTokenClaims(){var t;const e=await this._getIdTokenFromCache();return null===(t=null==e?void 0:e.decodedToken)||void 0===t?void 0:t.claims}async loginWithRedirect(t={}){var e;const r=q(t),{openUrl:n,fragment:i,appState:o}=r,a=s(r,["openUrl","fragment","appState"]),c=(null===(e=a.authorizationParams)||void 0===e?void 0:e.organization)||this.options.authorizationParams.organization,u=await this._prepareAuthorizeUrl(a.authorizationParams||{}),{url:f}=u,h=s(u,["url"]);this.transactionManager.create(Object.assign(Object.assign(Object.assign({},h),{appState:o}),c&&{organization:c}));const l=i?`${f}#${i}`:f;n?await n(l):window.location.assign(l)}async handleRedirectCallback(t=window.location.href){const e=t.split("?").slice(1);if(0===e.length)throw new Error("There are no query params available for parsing.");const{state:r,code:n,error:i,error_description:o}=(t=>{t.indexOf("#")>-1&&(t=t.substring(0,t.indexOf("#")));const e=new URLSearchParams(t);return{state:e.get("state"),code:e.get("code")||void 0,error:e.get("error")||void 0,error_description:e.get("error_description")||void 0}})(e.join("")),s=this.transactionManager.get();if(!s)throw new g("missing_transaction","Invalid state");if(this.transactionManager.remove(),i)throw new y(i,o||i,r,s.appState);if(!s.code_verifier||s.state&&s.state!==r)throw new g("state_mismatch","Invalid state");const a=s.organization,c=s.nonce,u=s.redirect_uri;return await this._requestToken(Object.assign({audience:s.audience,scope:s.scope,code_verifier:s.code_verifier,grant_type:"authorization_code",code:n},u?{redirect_uri:u}:{}),{nonceIn:c,organization:a}),{appState:s.appState}}async checkSession(t){if(!this.cookieStorage.get(this.isAuthenticatedCookieName)){if(!this.cookieStorage.get("auth0.is.authenticated"))return;this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove("auth0.is.authenticated")}try{await this.getTokenSilently(t)}catch(t){}}async getTokenSilently(t={}){var e;const r=Object.assign(Object.assign({cacheMode:"on"},t),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),t.authorizationParams),{scope:U(this.scope,null===(e=t.authorizationParams)||void 0===e?void 0:e.scope)})}),n=await((t,e)=>{let r=X[e];return r||(r=t().finally((()=>{delete X[e],r=null})),X[e]=r),r})((()=>this._getTokenSilently(r)),`${this.options.clientId}::${r.authorizationParams.audience}::${r.authorizationParams.scope}`);return t.detailedResponse?n:null==n?void 0:n.access_token}async _getTokenSilently(t){const{cacheMode:e}=t,r=s(t,["cacheMode"]);if("off"!==e){const t=await this._getEntryFromCache({scope:r.authorizationParams.scope,audience:r.authorizationParams.audience||"default",clientId:this.options.clientId});if(t)return t}if("cache-only"!==e){if(!await(async(t,e=3)=>{for(let r=0;r<e;r++)if(await t())return!0;return!1})((()=>Q.acquireLock("auth0.lock.getTokenSilently",5e3)),10))throw new w;try{if(window.addEventListener("pagehide",this._releaseLockOnPageHide),"off"!==e){const t=await this._getEntryFromCache({scope:r.authorizationParams.scope,audience:r.authorizationParams.audience||"default",clientId:this.options.clientId});if(t)return t}const t=this.options.useRefreshTokens?await this._getTokenUsingRefreshToken(r):await this._getTokenFromIFrame(r),{id_token:n,access_token:i,oauthTokenScope:o,expires_in:s}=t;return Object.assign(Object.assign({id_token:n,access_token:i},o?{scope:o}:null),{expires_in:s})}finally{await Q.releaseLock("auth0.lock.getTokenSilently"),window.removeEventListener("pagehide",this._releaseLockOnPageHide)}}}async getTokenWithPopup(t={},e={}){var r;const n=Object.assign(Object.assign({},t),{authorizationParams:Object.assign(Object.assign(Object.assign({},this.options.authorizationParams),t.authorizationParams),{scope:U(this.scope,null===(r=t.authorizationParams)||void 0===r?void 0:r.scope)})});return e=Object.assign(Object.assign({},l),e),await this.loginWithPopup(n,e),(await this.cacheManager.get(new L({scope:n.authorizationParams.scope,audience:n.authorizationParams.audience||"default",clientId:this.options.clientId}))).access_token}async isAuthenticated(){return!!await this.getUser()}_buildLogoutUrl(t){null!==t.clientId?t.clientId=t.clientId||this.options.clientId:delete t.clientId;const e=t.logoutParams||{},{federated:r}=e,n=s(e,["federated"]),i=r?"&federated":"";return this._url(`/v2/logout?${I(Object.assign({clientId:t.clientId},n))}`)+i}async logout(t={}){const e=q(t),{openUrl:r}=e,n=s(e,["openUrl"]);null===t.clientId?await this.cacheManager.clear():await this.cacheManager.clear(t.clientId||this.options.clientId),this.cookieStorage.remove(this.orgHintCookieName,{cookieDomain:this.options.cookieDomain}),this.cookieStorage.remove(this.isAuthenticatedCookieName,{cookieDomain:this.options.cookieDomain}),this.userCache.remove("@@user@@");const i=this._buildLogoutUrl(n);r?await r(i):!1!==r&&window.location.assign(i)}async _getTokenFromIFrame(t){const e=Object.assign(Object.assign({},t.authorizationParams),{prompt:"none"}),r=this.cookieStorage.get(this.orgHintCookieName);r&&!e.organization&&(e.organization=r);const{url:n,state:i,nonce:o,code_verifier:s,redirect_uri:a,scope:c,audience:u}=await this._prepareAuthorizeUrl(e,{response_mode:"web_message"},window.location.origin);try{if(window.crossOriginIsolated)throw new g("login_required","The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");const r=t.timeoutInSeconds||this.options.authorizeTimeoutInSeconds,f=await((t,e,r=60)=>new Promise(((n,i)=>{const o=window.document.createElement("iframe");o.setAttribute("width","0"),o.setAttribute("height","0"),o.style.display="none";const s=()=>{window.document.body.contains(o)&&(window.document.body.removeChild(o),window.removeEventListener("message",a,!1))};let a;const c=setTimeout((()=>{i(new w),s()}),1e3*r);a=function(t){if(t.origin!=e)return;if(!t.data||"authorization_response"!==t.data.type)return;const r=t.source;r&&r.close(),t.data.response.error?i(g.fromPayload(t.data.response)):n(t.data.response),clearTimeout(c),window.removeEventListener("message",a,!1),setTimeout(s,2e3)},window.addEventListener("message",a,!1),window.document.body.appendChild(o),o.setAttribute("src",t)})))(n,this.domainUrl,r);if(i!==f.state)throw new g("state_mismatch","Invalid state");const h=await this._requestToken(Object.assign(Object.assign({},t.authorizationParams),{code_verifier:s,code:f.code,grant_type:"authorization_code",redirect_uri:a,timeout:t.authorizationParams.timeout||this.httpTimeoutMs}),{nonceIn:o,organization:e.organization});return Object.assign(Object.assign({},h),{scope:c,oauthTokenScope:h.scope,audience:u})}catch(t){throw"login_required"===t.error&&this.logout({openUrl:!1}),t}}async _getTokenUsingRefreshToken(t){const e=await this.cacheManager.get(new L({scope:t.authorizationParams.scope,audience:t.authorizationParams.audience||"default",clientId:this.options.clientId}));if(!(e&&e.refresh_token||this.worker)){if(this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(t);throw new E(t.authorizationParams.audience||"default",t.authorizationParams.scope)}const r=t.authorizationParams.redirect_uri||this.options.authorizationParams.redirect_uri||window.location.origin,n="number"==typeof t.timeoutInSeconds?1e3*t.timeoutInSeconds:null;try{const i=await this._requestToken(Object.assign(Object.assign(Object.assign({},t.authorizationParams),{grant_type:"refresh_token",refresh_token:e&&e.refresh_token,redirect_uri:r}),n&&{timeout:n}));return Object.assign(Object.assign({},i),{scope:t.authorizationParams.scope,oauthTokenScope:i.scope,audience:t.authorizationParams.audience||"default"})}catch(e){if((e.message.indexOf("Missing Refresh Token")>-1||e.message&&e.message.indexOf("invalid refresh token")>-1)&&this.options.useRefreshTokensFallback)return await this._getTokenFromIFrame(t);throw e}}async _saveEntryInCache(t){const{id_token:e,decodedToken:r}=t,n=s(t,["id_token","decodedToken"]);this.userCache.set("@@user@@",{id_token:e,decodedToken:r}),await this.cacheManager.setIdToken(this.options.clientId,t.id_token,t.decodedToken),await this.cacheManager.set(n)}async _getIdTokenFromCache(){const t=this.options.authorizationParams.audience||"default",e=await this.cacheManager.getIdToken(new L({clientId:this.options.clientId,audience:t,scope:this.scope})),r=this.userCache.get("@@user@@");return e&&e.id_token===(null==r?void 0:r.id_token)?r:(this.userCache.set("@@user@@",e),e)}async _getEntryFromCache({scope:t,audience:e,clientId:r}){const n=await this.cacheManager.get(new L({scope:t,audience:e,clientId:r}),60);if(n&&n.access_token){const{access_token:t,oauthTokenScope:e,expires_in:r}=n,i=await this._getIdTokenFromCache();return i&&Object.assign(Object.assign({id_token:i.id_token,access_token:t},e?{scope:e}:null),{expires_in:r})}}async _requestToken(t,e){const{nonceIn:r,organization:n}=e||{},i=await R(Object.assign({baseUrl:this.domainUrl,client_id:this.options.clientId,auth0Client:this.options.auth0Client,useFormData:this.options.useFormData,timeout:this.httpTimeoutMs},t),this.worker),o=await this._verifyIdToken(i.id_token,r,n);return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({},i),{decodedToken:o,scope:t.scope,audience:t.audience||"default"}),i.scope?{oauthTokenScope:i.scope}:null),{client_id:this.options.clientId})),this.cookieStorage.save(this.isAuthenticatedCookieName,!0,{daysUntilExpire:this.sessionCheckExpiryDays,cookieDomain:this.options.cookieDomain}),this._processOrgHint(n||o.claims.org_id),Object.assign(Object.assign({},i),{decodedToken:o})}}function et(t,e){return function(){return t.apply(e,arguments)}}const{toString:rt}=Object.prototype,{getPrototypeOf:nt}=Object,it=(ot=Object.create(null),t=>{const e=rt.call(t);return ot[e]||(ot[e]=e.slice(8,-1).toLowerCase())});var ot;const st=t=>(t=t.toLowerCase(),e=>it(e)===t),at=t=>e=>typeof e===t,{isArray:ct}=Array,ut=at("undefined"),ft=st("ArrayBuffer"),ht=at("string"),lt=at("function"),dt=at("number"),pt=t=>null!==t&&"object"==typeof t,gt=t=>{if("object"!==it(t))return!1;const e=nt(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},yt=st("Date"),wt=st("File"),mt=st("Blob"),bt=st("FileList"),vt=st("URLSearchParams");function Et(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let n,i;if("object"!=typeof t&&(t=[t]),ct(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{const i=r?Object.getOwnPropertyNames(t):Object.keys(t),o=i.length;let s;for(n=0;n<o;n++)s=i[n],e.call(null,t[s],s,t)}}function St(t,e){e=e.toLowerCase();const r=Object.keys(t);let n,i=r.length;for(;i-- >0;)if(n=r[i],e===n.toLowerCase())return n;return null}const At="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,kt=t=>!ut(t)&&t!==At,Tt=(It="undefined"!=typeof Uint8Array&&nt(Uint8Array),t=>It&&t instanceof It);var It;const Bt=st("HTMLFormElement"),Ot=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),_t=st("RegExp"),Rt=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};Et(r,((r,i)=>{let o;!1!==(o=e(r,i,t))&&(n[i]=o||r)})),Object.defineProperties(t,n)},Ut="abcdefghijklmnopqrstuvwxyz",Lt="0123456789",Ct={DIGIT:Lt,ALPHA:Ut,ALPHA_DIGIT:Ut+Ut.toUpperCase()+Lt},Pt=st("AsyncFunction"),xt={isArray:ct,isArrayBuffer:ft,isBuffer:function(t){return null!==t&&!ut(t)&&null!==t.constructor&&!ut(t.constructor)&&lt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||lt(t.append)&&("formdata"===(e=it(t))||"object"===e&&lt(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&ft(t.buffer),e},isString:ht,isNumber:dt,isBoolean:t=>!0===t||!1===t,isObject:pt,isPlainObject:gt,isUndefined:ut,isDate:yt,isFile:wt,isBlob:mt,isRegExp:_t,isFunction:lt,isStream:t=>pt(t)&&lt(t.pipe),isURLSearchParams:vt,isTypedArray:Tt,isFileList:bt,forEach:Et,merge:function t(){const{caseless:e}=kt(this)&&this||{},r={},n=(n,i)=>{const o=e&&St(r,i)||i;gt(r[o])&&gt(n)?r[o]=t(r[o],n):gt(n)?r[o]=t({},n):ct(n)?r[o]=n.slice():r[o]=n};for(let t=0,e=arguments.length;t<e;t++)arguments[t]&&Et(arguments[t],n);return r},extend:(t,e,r,{allOwnKeys:n}={})=>(Et(e,((e,n)=>{r&&lt(e)?t[n]=et(e,r):t[n]=e}),{allOwnKeys:n}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,n)=>{let i,o,s;const a={};if(e=e||{},null==t)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)s=i[o],n&&!n(s,t,e)||a[s]||(e[s]=t[s],a[s]=!0);t=!1!==r&&nt(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:it,kindOfTest:st,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return-1!==n&&n===r},toArray:t=>{if(!t)return null;if(ct(t))return t;let e=t.length;if(!dt(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let n;for(;(n=r.next())&&!n.done;){const r=n.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const n=[];for(;null!==(r=t.exec(e));)n.push(r);return n},isHTMLForm:Bt,hasOwnProperty:Ot,hasOwnProp:Ot,reduceDescriptors:Rt,freezeMethods:t=>{Rt(t,((e,r)=>{if(lt(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=t[r];lt(n)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(t,e)=>{const r={},n=t=>{t.forEach((t=>{r[t]=!0}))};return ct(t)?n(t):n(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:St,global:At,isContextDefined:kt,ALPHABET:Ct,generateString:(t=16,e=Ct.ALPHA_DIGIT)=>{let r="";const{length:n}=e;for(;t--;)r+=e[Math.random()*n|0];return r},isSpecCompliantForm:function(t){return!!(t&&lt(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),r=(t,n)=>{if(pt(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[n]=t;const i=ct(t)?[]:{};return Et(t,((t,e)=>{const o=r(t,n+1);!ut(o)&&(i[e]=o)})),e[n]=void 0,i}}return t};return r(t,0)},isAsyncFn:Pt,isThenable:t=>t&&(pt(t)||lt(t))&&lt(t.then)&&lt(t.catch)};function jt(t,e,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i)}xt.inherits(jt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:xt.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Nt=jt.prototype,Dt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{Dt[t]={value:t}})),Object.defineProperties(jt,Dt),Object.defineProperty(Nt,"isAxiosError",{value:!0}),jt.from=(t,e,r,n,i,o)=>{const s=Object.create(Nt);return xt.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),jt.call(s,t.message,e,r,n,i),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};const zt=jt;function Ft(t){return xt.isPlainObject(t)||xt.isArray(t)}function Mt(t){return xt.endsWith(t,"[]")?t.slice(0,-2):t}function Kt(t,e,r){return t?t.concat(e).map((function(t,e){return t=Mt(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const Wt=xt.toFlatObject(xt,{},null,(function(t){return/^is[A-Z]/.test(t)})),$t=function(t,e,r){if(!xt.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const n=(r=xt.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!xt.isUndefined(e[t])}))).metaTokens,i=r.visitor||u,o=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&xt.isSpecCompliantForm(e);if(!xt.isFunction(i))throw new TypeError("visitor must be a function");function c(t){if(null===t)return"";if(xt.isDate(t))return t.toISOString();if(!a&&xt.isBlob(t))throw new zt("Blob is not supported. Use a Buffer instead.");return xt.isArrayBuffer(t)||xt.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Buffer.from(t):t}function u(t,r,i){let a=t;if(t&&!i&&"object"==typeof t)if(xt.endsWith(r,"{}"))r=n?r:r.slice(0,-2),t=JSON.stringify(t);else if(xt.isArray(t)&&function(t){return xt.isArray(t)&&!t.some(Ft)}(t)||(xt.isFileList(t)||xt.endsWith(r,"[]"))&&(a=xt.toArray(t)))return r=Mt(r),a.forEach((function(t,n){!xt.isUndefined(t)&&null!==t&&e.append(!0===s?Kt([r],n,o):null===s?r:r+"[]",c(t))})),!1;return!!Ft(t)||(e.append(Kt(i,r,o),c(t)),!1)}const f=[],h=Object.assign(Wt,{defaultVisitor:u,convertValue:c,isVisitable:Ft});if(!xt.isObject(t))throw new TypeError("data must be an object");return function t(r,n){if(!xt.isUndefined(r)){if(-1!==f.indexOf(r))throw Error("Circular reference detected in "+n.join("."));f.push(r),xt.forEach(r,(function(r,o){!0===(!(xt.isUndefined(r)||null===r)&&i.call(e,r,xt.isString(o)?o.trim():o,n,h))&&t(r,n?n.concat(o):[o])})),f.pop()}}(t),e};function Zt(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function Ht(t,e){this._pairs=[],t&&$t(t,this,e)}const Jt=Ht.prototype;Jt.append=function(t,e){this._pairs.push([t,e])},Jt.toString=function(t){const e=t?function(e){return t.call(this,e,Zt)}:Zt;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};const Xt=Ht;function Vt(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Gt(t,e,r){if(!e)return t;const n=r&&r.encode||Vt,i=r&&r.serialize;let o;if(o=i?i(e,r):xt.isURLSearchParams(e)?e.toString():new Xt(e,r).toString(n),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}const Yt=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){xt.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},qt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Qt={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Xt,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},te="undefined"!=typeof window&&"undefined"!=typeof document,ee=(re="undefined"!=typeof navigator&&navigator.product,te&&["ReactNative","NativeScript","NS"].indexOf(re)<0);var re;const ne="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ie={...n,...Qt},oe=function(t){function e(t,r,n,i){let o=t[i++];if("__proto__"===o)return!0;const s=Number.isFinite(+o),a=i>=t.length;return o=!o&&xt.isArray(n)?n.length:o,a?(xt.hasOwnProp(n,o)?n[o]=[n[o],r]:n[o]=r,!s):(n[o]&&xt.isObject(n[o])||(n[o]=[]),e(t,r,n[o],i)&&xt.isArray(n[o])&&(n[o]=function(t){const e={},r=Object.keys(t);let n;const i=r.length;let o;for(n=0;n<i;n++)o=r[n],e[o]=t[o];return e}(n[o])),!s)}if(xt.isFormData(t)&&xt.isFunction(t.entries)){const r={};return xt.forEachEntry(t,((t,n)=>{e(function(t){return xt.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),n,r,0)})),r}return null},se={transitional:qt,adapter:["xhr","http"],transformRequest:[function(t,e){const r=e.getContentType()||"",n=r.indexOf("application/json")>-1,i=xt.isObject(t);if(i&&xt.isHTMLForm(t)&&(t=new FormData(t)),xt.isFormData(t))return n&&n?JSON.stringify(oe(t)):t;if(xt.isArrayBuffer(t)||xt.isBuffer(t)||xt.isStream(t)||xt.isFile(t)||xt.isBlob(t))return t;if(xt.isArrayBufferView(t))return t.buffer;if(xt.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return $t(t,new ie.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,n){return ie.isNode&&xt.isBuffer(t)?(this.append(e,t.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=xt.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return $t(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return i||n?(e.setContentType("application/json",!1),function(t,e,r){if(xt.isString(t))try{return(0,JSON.parse)(t),xt.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(0,JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||se.transitional,r=e&&e.forcedJSONParsing,n="json"===this.responseType;if(t&&xt.isString(t)&&(r&&!this.responseType||n)){const r=!(e&&e.silentJSONParsing)&&n;try{return JSON.parse(t)}catch(t){if(r){if("SyntaxError"===t.name)throw zt.from(t,zt.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ie.classes.FormData,Blob:ie.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};xt.forEach(["delete","get","head","post","put","patch"],(t=>{se.headers[t]={}}));const ae=se,ce=xt.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ue=Symbol("internals");function fe(t){return t&&String(t).trim().toLowerCase()}function he(t){return!1===t||null==t?t:xt.isArray(t)?t.map(he):String(t)}function le(t,e,r,n,i){return xt.isFunction(n)?n.call(this,e,r):(i&&(e=r),xt.isString(e)?xt.isString(n)?-1!==e.indexOf(n):xt.isRegExp(n)?n.test(e):void 0:void 0)}class de{constructor(t){t&&this.set(t)}set(t,e,r){const n=this;function i(t,e,r){const i=fe(e);if(!i)throw new Error("header name must be a non-empty string");const o=xt.findKey(n,i);(!o||void 0===n[o]||!0===r||void 0===r&&!1!==n[o])&&(n[o||e]=he(t))}const o=(t,e)=>xt.forEach(t,((t,r)=>i(t,r,e)));return xt.isPlainObject(t)||t instanceof this.constructor?o(t,e):xt.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?o((t=>{const e={};let r,n,i;return t&&t.split("\n").forEach((function(t){i=t.indexOf(":"),r=t.substring(0,i).trim().toLowerCase(),n=t.substring(i+1).trim(),!r||e[r]&&ce[r]||("set-cookie"===r?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)})),e})(t),e):null!=t&&i(e,t,r),this}get(t,e){if(t=fe(t)){const r=xt.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}(t);if(xt.isFunction(e))return e.call(this,t,r);if(xt.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=fe(t)){const r=xt.findKey(this,t);return!(!r||void 0===this[r]||e&&!le(0,this[r],r,e))}return!1}delete(t,e){const r=this;let n=!1;function i(t){if(t=fe(t)){const i=xt.findKey(r,t);!i||e&&!le(0,r[i],i,e)||(delete r[i],n=!0)}}return xt.isArray(t)?t.forEach(i):i(t),n}clear(t){const e=Object.keys(this);let r=e.length,n=!1;for(;r--;){const i=e[r];t&&!le(0,this[i],i,t,!0)||(delete this[i],n=!0)}return n}normalize(t){const e=this,r={};return xt.forEach(this,((n,i)=>{const o=xt.findKey(r,i);if(o)return e[o]=he(n),void delete e[i];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,r)=>e.toUpperCase()+r))}(i):String(i).trim();s!==i&&delete e[i],e[s]=he(n),r[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return xt.forEach(this,((r,n)=>{null!=r&&!1!==r&&(e[n]=t&&xt.isArray(r)?r.join(", "):r)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach((t=>r.set(t))),r}static accessor(t){const e=(this[ue]=this[ue]={accessors:{}}).accessors,r=this.prototype;function n(t){const n=fe(t);e[n]||(function(t,e){const r=xt.toCamelCase(" "+e);["get","set","has"].forEach((n=>{Object.defineProperty(t,n+r,{value:function(t,r,i){return this[n].call(this,e,t,r,i)},configurable:!0})}))}(r,t),e[n]=!0)}return xt.isArray(t)?t.forEach(n):n(t),this}}de.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),xt.reduceDescriptors(de.prototype,(({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}})),xt.freezeMethods(de);const pe=de;function ge(t,e){const r=this||ae,n=e||r,i=pe.from(n.headers);let o=n.data;return xt.forEach(t,(function(t){o=t.call(r,o,i.normalize(),e?e.status:void 0)})),i.normalize(),o}function ye(t){return!(!t||!t.__CANCEL__)}function we(t,e,r){zt.call(this,null==t?"canceled":t,zt.ERR_CANCELED,e,r),this.name="CanceledError"}xt.inherits(we,zt,{__CANCEL__:!0});const me=we,be=ie.hasStandardBrowserEnv?{write(t,e,r,n,i,o){const s=[t+"="+encodeURIComponent(e)];xt.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),xt.isString(n)&&s.push("path="+n),xt.isString(i)&&s.push("domain="+i),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function ve(t,e){return t&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)?function(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}const Ee=ie.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let r;function n(r){let n=r;return t&&(e.setAttribute("href",n),n=e.href),e.setAttribute("href",n),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return r=n(window.location.href),function(t){const e=xt.isString(t)?n(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0};function Se(t,e){let r=0;const n=function(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const c=Date.now(),u=n[s];i||(i=c),r[o]=a,n[o]=c;let f=s,h=0;for(;f!==o;)h+=r[f++],f%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),c-i<e)return;const l=u&&c-u;return l?Math.round(1e3*h/l):void 0}}(50,250);return i=>{const o=i.loaded,s=i.lengthComputable?i.total:void 0,a=o-r,c=n(a);r=o;const u={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&o<=s?(s-o)/c:void 0,event:i};u[e?"download":"upload"]=!0,t(u)}}const Ae={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){let n=t.data;const i=pe.from(t.headers).normalize();let o,s,{responseType:a,withXSRFToken:c}=t;function u(){t.cancelToken&&t.cancelToken.unsubscribe(o),t.signal&&t.signal.removeEventListener("abort",o)}if(xt.isFormData(n))if(ie.hasStandardBrowserEnv||ie.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if(!1!==(s=i.getContentType())){const[t,...e]=s?s.split(";").map((t=>t.trim())).filter(Boolean):[];i.setContentType([t||"multipart/form-data",...e].join("; "))}let f=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",r=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(e+":"+r))}const h=ve(t.baseURL,t.url);function l(){if(!f)return;const n=pe.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());!function(t,e,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?e(new zt("Request failed with status code "+r.status,[zt.ERR_BAD_REQUEST,zt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t),u()}),(function(t){r(t),u()}),{data:a&&"text"!==a&&"json"!==a?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:n,config:t,request:f}),f=null}if(f.open(t.method.toUpperCase(),Gt(h,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,"onloadend"in f?f.onloadend=l:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(l)},f.onabort=function(){f&&(r(new zt("Request aborted",zt.ECONNABORTED,t,f)),f=null)},f.onerror=function(){r(new zt("Network Error",zt.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const n=t.transitional||qt;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new zt(e,n.clarifyTimeoutError?zt.ETIMEDOUT:zt.ECONNABORTED,t,f)),f=null},ie.hasStandardBrowserEnv&&(c&&xt.isFunction(c)&&(c=c(t)),c||!1!==c&&Ee(h))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&be.read(t.xsrfCookieName);e&&i.set(t.xsrfHeaderName,e)}void 0===n&&i.setContentType(null),"setRequestHeader"in f&&xt.forEach(i.toJSON(),(function(t,e){f.setRequestHeader(e,t)})),xt.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),a&&"json"!==a&&(f.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&f.addEventListener("progress",Se(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",Se(t.onUploadProgress)),(t.cancelToken||t.signal)&&(o=e=>{f&&(r(!e||e.type?new me(null,t,f):e),f.abort(),f=null)},t.cancelToken&&t.cancelToken.subscribe(o),t.signal&&(t.signal.aborted?o():t.signal.addEventListener("abort",o)));const d=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(h);d&&-1===ie.protocols.indexOf(d)?r(new zt("Unsupported protocol "+d+":",zt.ERR_BAD_REQUEST,t)):f.send(n||null)}))}};xt.forEach(Ae,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const ke=t=>`- ${t}`,Te=t=>xt.isFunction(t)||null===t||!1===t,Ie=t=>{t=xt.isArray(t)?t:[t];const{length:e}=t;let r,n;const i={};for(let o=0;o<e;o++){let e;if(r=t[o],n=r,!Te(r)&&(n=Ae[(e=String(r)).toLowerCase()],void 0===n))throw new zt(`Unknown adapter '${e}'`);if(n)break;i[e||"#"+o]=n}if(!n){const t=Object.entries(i).map((([t,e])=>`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));let r=e?t.length>1?"since :\n"+t.map(ke).join("\n"):" "+ke(t[0]):"as no adapter specified";throw new zt("There is no suitable adapter to dispatch the request "+r,"ERR_NOT_SUPPORT")}return n};function Be(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new me(null,t)}function Oe(t){return Be(t),t.headers=pe.from(t.headers),t.data=ge.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ie(t.adapter||ae.adapter)(t).then((function(e){return Be(t),e.data=ge.call(t,t.transformResponse,e),e.headers=pe.from(e.headers),e}),(function(e){return ye(e)||(Be(t),e&&e.response&&(e.response.data=ge.call(t,t.transformResponse,e.response),e.response.headers=pe.from(e.response.headers))),Promise.reject(e)}))}const _e=t=>t instanceof pe?t.toJSON():t;function Re(t,e){e=e||{};const r={};function n(t,e,r){return xt.isPlainObject(t)&&xt.isPlainObject(e)?xt.merge.call({caseless:r},t,e):xt.isPlainObject(e)?xt.merge({},e):xt.isArray(e)?e.slice():e}function i(t,e,r){return xt.isUndefined(e)?xt.isUndefined(t)?void 0:n(void 0,t,r):n(t,e,r)}function o(t,e){if(!xt.isUndefined(e))return n(void 0,e)}function s(t,e){return xt.isUndefined(e)?xt.isUndefined(t)?void 0:n(void 0,t):n(void 0,e)}function a(r,i,o){return o in e?n(r,i):o in t?n(void 0,r):void 0}const c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e)=>i(_e(t),_e(e),!0)};return xt.forEach(Object.keys(Object.assign({},t,e)),(function(n){const o=c[n]||i,s=o(t[n],e[n],n);xt.isUndefined(s)&&o!==a||(r[n]=s)})),r}const Ue={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{Ue[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));const Le={};Ue.transitional=function(t,e,r){function n(t,e){return"[Axios v1.6.5] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,i,o)=>{if(!1===t)throw new zt(n(i," has been removed"+(e?" in "+e:"")),zt.ERR_DEPRECATED);return e&&!Le[i]&&(Le[i]=!0,console.warn(n(i," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,i,o)}};const Ce={assertOptions:function(t,e,r){if("object"!=typeof t)throw new zt("options must be an object",zt.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const o=n[i],s=e[o];if(s){const e=t[o],r=void 0===e||s(e,o,t);if(!0!==r)throw new zt("option "+o+" must be "+r,zt.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new zt("Unknown option "+o,zt.ERR_BAD_OPTION)}},validators:Ue},Pe=Ce.validators;class xe{constructor(t){this.defaults=t,this.interceptors={request:new Yt,response:new Yt}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=Re(this.defaults,e);const{transitional:r,paramsSerializer:n,headers:i}=e;void 0!==r&&Ce.assertOptions(r,{silentJSONParsing:Pe.transitional(Pe.boolean),forcedJSONParsing:Pe.transitional(Pe.boolean),clarifyTimeoutError:Pe.transitional(Pe.boolean)},!1),null!=n&&(xt.isFunction(n)?e.paramsSerializer={serialize:n}:Ce.assertOptions(n,{encode:Pe.function,serialize:Pe.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=i&&xt.merge(i.common,i[e.method]);i&&xt.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete i[t]})),e.headers=pe.concat(o,i);const s=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const c=[];let u;this.interceptors.response.forEach((function(t){c.push(t.fulfilled,t.rejected)}));let f,h=0;if(!a){const t=[Oe.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,c),f=t.length,u=Promise.resolve(e);h<f;)u=u.then(t[h++],t[h++]);return u}f=s.length;let l=e;for(h=0;h<f;){const t=s[h++],e=s[h++];try{l=t(l)}catch(t){e.call(this,t);break}}try{u=Oe.call(this,l)}catch(t){return Promise.reject(t)}for(h=0,f=c.length;h<f;)u=u.then(c[h++],c[h++]);return u}getUri(t){return Gt(ve((t=Re(this.defaults,t)).baseURL,t.url),t.params,t.paramsSerializer)}}xt.forEach(["delete","get","head","options"],(function(t){xe.prototype[t]=function(e,r){return this.request(Re(r||{},{method:t,url:e,data:(r||{}).data}))}})),xt.forEach(["post","put","patch"],(function(t){function e(e){return function(r,n,i){return this.request(Re(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}xe.prototype[t]=e(),xe.prototype[t+"Form"]=e(!0)}));const je=xe;class Ne{constructor(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");let e;this.promise=new Promise((function(t){e=t}));const r=this;this.promise.then((t=>{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null})),this.promise.then=t=>{let e;const n=new Promise((t=>{r.subscribe(t),e=t})).then(t);return n.cancel=function(){r.unsubscribe(e)},n},t((function(t,n,i){r.reason||(r.reason=new me(t,n,i),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;const e=new Ne((function(e){t=e}));return{token:e,cancel:t}}}const De=Ne,ze={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ze).forEach((([t,e])=>{ze[e]=t}));const Fe=ze,Me=function t(e){const r=new je(e),n=et(je.prototype.request,r);return xt.extend(n,je.prototype,r,{allOwnKeys:!0}),xt.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return t(Re(e,r))},n}(ae);Me.Axios=je,Me.CanceledError=me,Me.CancelToken=De,Me.isCancel=ye,Me.VERSION="1.6.5",Me.toFormData=$t,Me.AxiosError=zt,Me.Cancel=Me.CanceledError,Me.all=function(t){return Promise.all(t)},Me.spread=function(t){return function(e){return t.apply(null,e)}},Me.isAxiosError=function(t){return xt.isObject(t)&&!0===t.isAxiosError},Me.mergeConfig=Re,Me.AxiosHeaders=pe,Me.formToJSON=t=>oe(xt.isHTMLForm(t)?new FormData(t):t),Me.getAdapter=Ie,Me.HttpStatusCode=Fe,Me.default=Me;const Ke=Me;var We=r(742),$e=r(764),Ze=Object.create,He=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,Xe=Object.getOwnPropertyNames,Ve=Object.getPrototypeOf,Ge=Object.prototype.hasOwnProperty,Ye=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),qe=(t,e,r)=>(r=null!=t?Ze(Ve(t)):{},((t,e,r,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let r of Xe(e))!Ge.call(t,r)&&undefined!==r&&He(t,r,{get:()=>e[r],enumerable:!(n=Je(e,r))||n.enumerable});return t})(!e&&t&&t.__esModule?r:He(r,"default",{value:t,enumerable:!0}),t)),Qe=Ye((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){var e=t.length,r=e%4;if(!r)return t;var n=e,i=4-r,o=e+i,s=Buffer.alloc(o);for(s.write(t);i--;)s.write("=",n++);return s.toString()}})),tr=Ye((t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Qe();function r(t,e){return void 0===e&&(e="utf8"),Buffer.isBuffer(t)?i(t.toString("base64")):i(Buffer.from(t,e).toString("base64"))}function n(t){return t=t.toString(),e.default(t).replace(/\-/g,"+").replace(/_/g,"/")}function i(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}var o=r;o.encode=r,o.decode=function(t,e){return void 0===e&&(e="utf8"),Buffer.from(n(t),"base64").toString(e)},o.toBase64=n,o.fromBase64=i,o.toBuffer=function(t){return Buffer.from(n(t),"base64")},t.default=o})),er=Ye(((t,e)=>{e.exports=tr().default,e.exports.default=e.exports})),rr=Ye((t=>{t.byteLength=function(t){var e=s(t),r=e[0],n=e[1];return 3*(r+n)/4-n},t.toByteArray=function(t){var e,r,o=s(t),a=o[0],c=o[1],u=new i(function(t,e,r){return 3*(e+r)/4-r}(0,a,c)),f=0,h=c>0?a-4:a;for(r=0;r<h;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],u[f++]=e>>16&255,u[f++]=e>>8&255,u[f++]=255&e;return 2===c&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[f++]=255&e),1===c&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e),u},t.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(c(t,a,a+s>u?u:a+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};var e,r=[],n=[],i=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(e=0;e<64;++e)r[e]=o[e],n[o.charCodeAt(e)]=e;function s(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function a(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function c(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(a(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63})),nr=Ye((t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.b64UrlDecode=t.b64UrlEncode=t.bufferTob64Url=t.bufferTob64=t.b64UrlToBuffer=t.stringToB64Url=t.stringToBuffer=t.bufferToString=t.b64UrlToString=t.concatBuffers=void 0;var e=rr();function r(t){return new TextDecoder("utf-8",{fatal:!0}).decode(t)}function n(t){return(new TextEncoder).encode(t)}function i(t){return new Uint8Array(e.toByteArray(c(t)))}function o(t){return e.fromByteArray(new Uint8Array(t))}function s(t){return a(o(t))}function a(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}function c(t){let e;return e=(t=t.replace(/\-/g,"+").replace(/\_/g,"/")).length%4==0?0:4-t.length%4,t.concat("=".repeat(e))}t.concatBuffers=function(t){let e=0;for(let r=0;r<t.length;r++)e+=t[r].byteLength;let r=new Uint8Array(e),n=0;r.set(new Uint8Array(t[0]),n),n+=t[0].byteLength;for(let e=1;e<t.length;e++)r.set(new Uint8Array(t[e]),n),n+=t[e].byteLength;return r},t.b64UrlToString=function(t){return r(i(t))},t.bufferToString=r,t.stringToBuffer=n,t.stringToB64Url=function(t){return s(n(t))},t.b64UrlToBuffer=i,t.bufferTob64=o,t.bufferTob64Url=s,t.b64UrlEncode=a,t.b64UrlDecode=c})),ir=Ye((t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=nr();t.default=class{keyLength=4096;publicExponent=65537;hashAlgorithm="sha256";driver;constructor(){if(!this.detectWebCrypto())throw new Error("SubtleCrypto not available!");this.driver=crypto.subtle}async generateJWK(){let t=await this.driver.generateKey({name:"RSA-PSS",modulusLength:4096,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign"]),e=await this.driver.exportKey("jwk",t.privateKey);return{kty:e.kty,e:e.e,n:e.n,d:e.d,p:e.p,q:e.q,dp:e.dp,dq:e.dq,qi:e.qi}}async sign(t,e,{saltLength:r}={}){let n=await this.driver.sign({name:"RSA-PSS",saltLength:32},await this.jwkToCryptoKey(t),e);return new Uint8Array(n)}async hash(t,e="SHA-256"){let r=await this.driver.digest(e,t);return new Uint8Array(r)}async verify(t,e,r){let n={kty:"RSA",e:"AQAB",n:t},i=await this.jwkToPublicCryptoKey(n),o=await this.driver.digest("SHA-256",e),s=await this.driver.verify({name:"RSA-PSS",saltLength:0},i,r,e),a=await this.driver.verify({name:"RSA-PSS",saltLength:32},i,r,e),c=await this.driver.verify({name:"RSA-PSS",saltLength:Math.ceil((i.algorithm.modulusLength-1)/8)-o.byteLength-2},i,r,e);return s||a||c}async jwkToCryptoKey(t){return this.driver.importKey("jwk",t,{name:"RSA-PSS",hash:{name:"SHA-256"}},!1,["sign"])}async jwkToPublicCryptoKey(t){return this.driver.importKey("jwk",t,{name:"RSA-PSS",hash:{name:"SHA-256"}},!1,["verify"])}detectWebCrypto(){if(typeof crypto>"u")return!1;let t=crypto?.subtle;return void 0!==t&&["generateKey","importKey","exportKey","digest","sign"].every((e=>"function"==typeof t[e]))}async encrypt(t,r,n){let i=await this.driver.importKey("raw","string"==typeof r?e.stringToBuffer(r):r,{name:"PBKDF2",length:32},!1,["deriveKey"]),o=await this.driver.deriveKey({name:"PBKDF2",salt:n?e.stringToBuffer(n):e.stringToBuffer("salt"),iterations:1e5,hash:"SHA-256"},i,{name:"AES-CBC",length:256},!1,["encrypt","decrypt"]),s=new Uint8Array(16);crypto.getRandomValues(s);let a=await this.driver.encrypt({name:"AES-CBC",iv:s},o,t);return e.concatBuffers([s,a])}async decrypt(t,r,n){let i=await this.driver.importKey("raw","string"==typeof r?e.stringToBuffer(r):r,{name:"PBKDF2",length:32},!1,["deriveKey"]),o=await this.driver.deriveKey({name:"PBKDF2",salt:n?e.stringToBuffer(n):e.stringToBuffer("salt"),iterations:1e5,hash:"SHA-256"},i,{name:"AES-CBC",length:256},!1,["encrypt","decrypt"]),s=t.slice(0,16),a=await this.driver.decrypt({name:"AES-CBC",iv:s},o,t.slice(16));return e.concatBuffers([a])}}})),or=Ye((t=>{t.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,u=c>>1,f=-7,h=r?i-1:0,l=r?-1:1,d=t[e+h];for(h+=l,o=d&(1<<-f)-1,d>>=-f,f+=a;f>0;o=256*o+t[e+h],h+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+h],h+=l,f-=8);if(0===o)o=1-u;else{if(o===c)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=u}return(d?-1:1)*s*Math.pow(2,o-n)},t.write=function(t,e,r,n,i,o){var s,a,c,u=8*o-i-1,f=(1<<u)-1,h=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+h>=1?l/c:l*Math.pow(2,1-h))*c>=2&&(s++,c/=2),s+h>=f?(a=0,s=f):s+h>=1?(a=(e*c-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+d]=255&s,d+=p,s/=256,u-=8);t[r+d-p]|=128*g}})),sr=Ye((t=>{var e=rr(),r=or(),n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=s,t.SlowBuffer=function(t){return+t!=t&&(t=0),s.alloc(+t)},t.INSPECT_MAX_BYTES=50;var i=2147483647;function o(t){if(t>i)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,s.prototype),e}function s(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return u(t)}return a(t,e,r)}function a(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!s.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=0|d(t,e),n=o(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(J(t,Uint8Array)){let e=new Uint8Array(t);return h(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(J(t,ArrayBuffer)||t&&J(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(J(t,SharedArrayBuffer)||t&&J(t.buffer,SharedArrayBuffer)))return h(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return s.from(n,e,r);let i=function(t){if(s.isBuffer(t)){let e=0|l(t.length),r=o(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||X(t.length)?o(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(i)return i;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return s.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u(t){return c(t),o(t<0?0:0|l(t))}function f(t){let e=t.length<0?0:0|l(t.length),r=o(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,s.prototype),n}function l(t){if(t>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|t}function d(t,e){if(s.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||J(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return $(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Z(t).length;default:if(i)return n?-1:$(t).length;e=(""+e).toLowerCase(),i=!0}}function p(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return O(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return B(this,e,r);case"base64":return A(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){let n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),X(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=s.from(e,n)),s.isBuffer(e))return 0===e.length?-1:w(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):w(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function w(t,e,r,n,i){let o,s=1,a=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;o<a;o++)if(u(t,o)===u(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===c)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){let r=!0;for(let n=0;n<c;n++)if(u(t,o+n)!==u(e,n)){r=!1;break}if(r)return o}return-1}function m(t,e,r,n){r=Number(r)||0;let i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;let o,s=e.length;for(n>s/2&&(n=s/2),o=0;o<n;++o){let n=parseInt(e.substr(2*o,2),16);if(X(n))return o;t[r+o]=n}return o}function b(t,e,r,n){return H($(e,t.length-r),t,r,n)}function v(t,e,r,n){return H(function(t){let e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function E(t,e,r,n){return H(Z(e),t,r,n)}function S(t,e,r,n){return H(function(t,e){let r,n,i,o=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function A(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function k(t,e,r){r=Math.min(t.length,r);let n=[],i=e;for(;i<r;){let e=t[i],o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,a,c;switch(s){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(c=(31&e)<<6|63&r,c>127&&(o=c));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(c=(15&e)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){let e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=T));return r}(n)}t.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=function(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch{return!1}}(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(t,e,r){return a(t,e,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(t,e,r){return function(t,e,r){return c(t),t<=0?o(t):void 0!==e?"string"==typeof r?o(t).fill(e,r):o(t).fill(e):o(t)}(t,e,r)},s.allocUnsafe=function(t){return u(t)},s.allocUnsafeSlow=function(t){return u(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==s.prototype},s.compare=function(t,e){if(J(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),J(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;let n=s.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){let e=t[r];if(J(e,Uint8Array))i+e.length>n.length?(s.isBuffer(e)||(e=s.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!s.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},s.byteLength=d,s.prototype._isBuffer=!0,s.prototype.swap16=function(){let t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)g(this,e,e+1);return this},s.prototype.swap32=function(){let t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},s.prototype.swap64=function(){let t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},s.prototype.toString=function(){let t=this.length;return 0===t?"":0===arguments.length?k(this,0,t):p.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){let e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(t,e,r,n,i){if(J(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),c=Math.min(o,a),u=this.slice(n,i),f=t.slice(e,r);for(let t=0;t<c;++t)if(u[t]!==f[t]){o=u[t],a=f[t];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},s.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},s.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},s.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}let i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return b(this,t,e,r);case"ascii":case"latin1":case"binary":return v(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function I(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function B(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function O(t,e,r){let n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=V[t[n]];return i}function _(t,e,r){let n=t.slice(e,r),i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function R(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function U(t,e,r,n,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function L(t,e,r,n,i){F(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function C(t,e,r,n,i){F(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function P(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function x(t,e,n,i,o){return e=+e,n>>>=0,o||P(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function j(t,e,n,i,o){return e=+e,n>>>=0,o||P(t,0,n,8),r.write(t,e,n,i,52,8),n+8}s.prototype.slice=function(t,e){let r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);let n=this.subarray(t,e);return Object.setPrototypeOf(n,s.prototype),n},s.prototype.readUintLE=s.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},s.prototype.readUintBE=s.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},s.prototype.readUint8=s.prototype.readUInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),this[t]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readBigUInt64LE=G((function(t){M(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&K(t,this.length-8);let n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),s.prototype.readBigUInt64BE=G((function(t){M(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&K(t,this.length-8);let n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),s.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},s.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||R(t,2,this.length);let r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt16BE=function(t,e){t>>>=0,e||R(t,2,this.length);let r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readBigInt64LE=G((function(t){M(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&K(t,this.length-8);let n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),s.prototype.readBigInt64BE=G((function(t){M(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&K(t,this.length-8);let n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)})),s.prototype.readFloatLE=function(t,e){return t>>>=0,e||R(t,4,this.length),r.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||R(t,4,this.length),r.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||R(t,8,this.length),r.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||R(t,8,this.length),r.read(this,t,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||U(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||U(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigUInt64LE=G((function(t,e=0){return L(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeBigUInt64BE=G((function(t,e=0){return C(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),s.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){let n=Math.pow(2,8*r-1);U(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},s.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){let n=Math.pow(2,8*r-1);U(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},s.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||U(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeBigInt64LE=G((function(t,e=0){return L(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeBigInt64BE=G((function(t,e=0){return C(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),s.prototype.writeFloatLE=function(t,e,r){return x(this,t,e,!0,r)},s.prototype.writeFloatBE=function(t,e,r){return x(this,t,e,!1,r)},s.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},s.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},s.prototype.copy=function(t,e,r,n){if(!s.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),!n&&0!==n&&(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r||0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);let i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},s.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!s.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){let e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{let o=s.isBuffer(t)?t:s.from(t,n),a=o.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%a]}return this};var N={};function D(t,e,r){N[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function z(t){let e="",r=t.length,n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function F(t,e,r,n,i,o){if(t>r||t<e){let n,i="bigint"==typeof e?"n":"";throw n=o>3?0===e||e===BigInt(0)?`>= 0${i} and < 2${i} ** ${8*(o+1)}${i}`:`>= -(2${i} ** ${8*(o+1)-1}${i}) and < 2 ** ${8*(o+1)-1}${i}`:`>= ${e}${i} and <= ${r}${i}`,new N.ERR_OUT_OF_RANGE("value",n,t)}!function(t,e,r){M(e,"offset"),(void 0===t[e]||void 0===t[e+r])&&K(e,t.length-(r+1))}(n,i,o)}function M(t,e){if("number"!=typeof t)throw new N.ERR_INVALID_ARG_TYPE(e,"number",t)}function K(t,e,r){throw Math.floor(t)!==t?(M(t,r),new N.ERR_OUT_OF_RANGE(r||"offset","an integer",t)):e<0?new N.ERR_BUFFER_OUT_OF_BOUNDS:new N.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}D("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),D("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),D("ERR_OUT_OF_RANGE",(function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=z(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n}),RangeError);var W=/[^+/0-9A-Za-z-_]/g;function $(t,e){e=e||1/0;let r,n=t.length,i=null,o=[];for(let s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function Z(t){return e.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function J(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function X(t){return t!=t}var V=function(){let t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function G(t){return typeof BigInt>"u"?Y:t}function Y(){throw new Error("BigInt not supported")}})),ar=Ye(((t,e)=>{typeof window<"u"?(window.global=window,global.fetch=window.fetch,e.exports={Buffer:sr().Buffer,Crypto:window.crypto}):e.exports={Buffer:sr().Buffer,Crypto:crypto}})),cr={};((t,e)=>{for(var r in e)He(t,r,{get:e[r],enumerable:!0})})(cr,{AVSCTap:()=>Tr,ArweaveSigner:()=>Er,DataItem:()=>xr,MAX_TAG_BYTES:()=>Cr,MIN_BINARY_SIZE:()=>Pr,SIG_CONFIG:()=>vr,SignatureConfig:()=>gr,Signer:()=>ur,createData:()=>Nr,deserializeTags:()=>Or,indexToType:()=>Sr,serializeTags:()=>Ir,tagsExceedLimit:()=>Br});var ur=class{signer;publicKey;signatureType;signatureLength;ownerLength;pem;static verify(t,e,r,n){throw new Error("You must implement verify method on child")}},fr=qe(er(),1),hr=qe(nr(),1);async function lr(t){if(Array.isArray(t)){let e=(0,hr.concatBuffers)([(0,hr.stringToBuffer)("list"),(0,hr.stringToBuffer)(t.length.toString())]);return await dr(t,await br().hash(e,"SHA-384"))}let e=t,r=(0,hr.concatBuffers)([(0,hr.stringToBuffer)("blob"),(0,hr.stringToBuffer)(e.byteLength.toString())]),n=(0,hr.concatBuffers)([await br().hash(r,"SHA-384"),await br().hash(e,"SHA-384")]);return await br().hash(n,"SHA-384")}async function dr(t,e){if(t.length<1)return e;let r=(0,hr.concatBuffers)([e,await lr(t[0])]),n=await br().hash(r,"SHA-384");return await dr(t.slice(1),n)}var pr,gr,yr=qe(ir(),1),wr=yr.default.default?yr.default.default:yr.default,mr=class extends wr{getPublicKey(t){throw new Error("Unimplemented")}};function br(){return pr??=new mr}!function(t){t[t.ARWEAVE=1]="ARWEAVE",t[t.ED25519=2]="ED25519",t[t.ETHEREUM=3]="ETHEREUM",t[t.SOLANA=4]="SOLANA",t[t.INJECTEDAPTOS=5]="INJECTEDAPTOS",t[t.MULTIAPTOS=6]="MULTIAPTOS",t[t.TYPEDETHEREUM=7]="TYPEDETHEREUM"}(gr||(gr={}));var vr={[gr.ARWEAVE]:{sigLength:512,pubLength:512,sigName:"arweave"},[gr.ED25519]:{sigLength:64,pubLength:32,sigName:"ed25519"},[gr.ETHEREUM]:{sigLength:65,pubLength:65,sigName:"ethereum"},[gr.SOLANA]:{sigLength:64,pubLength:32,sigName:"solana"},[gr.INJECTEDAPTOS]:{sigLength:64,pubLength:32,sigName:"injectedAptos"},[gr.MULTIAPTOS]:{sigLength:2052,pubLength:1025,sigName:"multiAptos"},[gr.TYPEDETHEREUM]:{sigLength:65,pubLength:42,sigName:"typedEthereum"}},Er=class{signatureType=1;ownerLength=vr[1].pubLength;signatureLength=vr[1].sigLength;jwk;pk;constructor(t){this.pk=t.n,this.jwk=t}get publicKey(){return fr.default.toBuffer(this.pk)}sign(t){return br().sign(this.jwk,t)}static async verify(t,e,r){return await br().verify(t,e,r)}},Sr={1:Er},Ar=qe(er(),1);async function kr(t){return lr([(0,hr.stringToBuffer)("dataitem"),(0,hr.stringToBuffer)("1"),(0,hr.stringToBuffer)(t.signatureType.toString()),t.rawOwner,t.rawTarget,t.rawAnchor,t.rawTags,t.rawData])}var Tr=class{buf;pos;constructor(t=Buffer.alloc(Cr),e=0){this.buf=t,this.pos=e}writeTags(t){if(!Array.isArray(t))throw new Error("input must be array");let e,r=t.length;if(r)for(this.writeLong(r),e=0;e<r;e++){let r=t[e];if(void 0===r?.name||void 0===r?.value)throw new Error(`Invalid tag format for ${r}, expected {name:string, value: string}`);this.writeString(r.name),this.writeString(r.value)}this.writeLong(0)}toBuffer(){let t=Buffer.alloc(this.pos);if(this.pos>this.buf.length)throw new Error(`Too many tag bytes (${this.pos} > ${this.buf.length})`);return this.buf.copy(t,0,0,this.pos),t}tagsExceedLimit(){return this.pos>this.buf.length}writeLong(t){let e,r,n=this.buf;if(t>=-1073741824&&t<1073741824){r=t>=0?t<<1:~t<<1|1;do{n[this.pos]=127&r,r>>=7}while(r&&(n[this.pos++]|=128))}else{e=t>=0?2*t:2*-t-1;do{n[this.pos]=127&e,e/=128}while(e>=1&&(n[this.pos++]|=128))}this.pos++,this.buf=n}writeString(t){let e=Buffer.byteLength(t),r=this.buf;this.writeLong(e);let n=this.pos;if(this.pos+=e,!(this.pos>r.length)){if(e>64)this.buf.write(t,this.pos-e,e,"utf8");else{let i,o,s,a;for(i=0,o=e;i<o;i++)s=t.charCodeAt(i),s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):55296==(64512&s)&&56320==(64512&(a=t.charCodeAt(i+1)))?(s=65536+((1023&s)<<10)+(1023&a),i++,r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}this.buf=r}}readLong(){let t,e,r,n,i=0,o=0,s=this.buf;do{t=s[this.pos++],e=128&t,i|=(127&t)<<o,o+=7}while(e&&o<28);if(e){r=i,n=268435456;do{t=s[this.pos++],r+=(127&t)*n,n*=128}while(128&t);return(r%2?-(r+1):r)/2}return i>>1^-(1&i)}skipLong(){let t=this.buf;for(;128&t[this.pos++];);}readTags(){let t,e=[];for(;t=this.readLong();)for(t<0&&(t=-t,this.skipLong());t--;){let t=this.readString(),r=this.readString();e.push({name:t,value:r})}return e}readString(){let t=this.readLong(),e=this.pos,r=this.buf;if(this.pos+=t,!(this.pos>r.length))return this.buf.slice(e,e+t).toString()}};function Ir(t){let e=new Tr;return e.writeTags(t),e.toBuffer()}function Br(t){let e=new Tr;return e.writeTags(t),e.tagsExceedLimit()}function Or(t){return new Tr(t).readTags()}function _r(t){let e=0;for(let r=t.length-1;r>=0;r--)e=256*e+t[r];return e}function Rr(t){let e=[0,0,0,0,0,0,0,0];for(let r=0;r<e.length;r++){let n=255&t;e[r]=n,t=(t-n)/256}return Uint8Array.from(e)}var Ur=qe(ar(),1),Lr=qe(sr(),1),Cr=4096,Pr=80,xr=class{binary;_id;constructor(t){this.binary=t}static isDataItem(t){return void 0!==t.binary}get signatureType(){let t=_r(this.binary.subarray(0,2));if(void 0!==gr?.[t])return t;throw new Error("Unknown signature type: "+t)}async isValid(){return xr.verify(this.binary)}get id(){return(async()=>Ar.default.encode(await this.rawId))()}set id(t){this._id=Ar.default.toBuffer(t)}get rawId(){return(async()=>Lr.Buffer.from(await Ur.Crypto.subtle.digest("SHA-256",this.rawSignature)))()}set rawId(t){this._id=t}get rawSignature(){return this.binary.subarray(2,2+this.signatureLength)}get signature(){return Ar.default.encode(this.rawSignature)}set rawOwner(t){if(t.byteLength!=this.ownerLength)throw new Error(`Expected raw owner (pubkey) to be ${this.ownerLength} bytes, got ${t.byteLength} bytes.`);this.binary.set(t,2+this.signatureLength)}get rawOwner(){return this.binary.subarray(2+this.signatureLength,2+this.signatureLength+this.ownerLength)}get signatureLength(){return vr[this.signatureType].sigLength}get owner(){return Ar.default.encode(this.rawOwner)}get ownerLength(){return vr[this.signatureType].pubLength}get rawTarget(){let t=this.getTargetStart();return 1==this.binary[t]?this.binary.subarray(t+1,t+33):Lr.Buffer.alloc(0)}get target(){return Ar.default.encode(this.rawTarget)}get rawAnchor(){let t=this.getAnchorStart();return 1==this.binary[t]?this.binary.subarray(t+1,t+33):Lr.Buffer.alloc(0)}get anchor(){return this.rawAnchor.toString()}get rawTags(){let t=this.getTagsStart(),e=_r(this.binary.subarray(t+8,t+16));return this.binary.subarray(t+16,t+16+e)}get tags(){let t=this.getTagsStart();if(0==_r(this.binary.subarray(t,t+8)))return[];let e=_r(this.binary.subarray(t+8,t+16));return Or(Lr.Buffer.from(this.binary.subarray(t+16,t+16+e)))}get tagsB64Url(){return this.tags.map((t=>({name:Ar.default.encode(t.name),value:Ar.default.encode(t.value)})))}getStartOfData(){let t=this.getTagsStart();return t+16+_r(this.binary.subarray(t+8,t+16))}get rawData(){let t=this.getTagsStart(),e=t+16+_r(this.binary.subarray(t+8,t+16));return this.binary.subarray(e,this.binary.length)}get data(){return Ar.default.encode(this.rawData)}getRaw(){return this.binary}async sign(t){return this._id=await async function(t,e){let{signature:r,id:n}=await async function(t,e){let r=await kr(t),n=await e.sign(r),i=await br().hash(n);return{signature:Buffer.from(n),id:Buffer.from(i)}}(t,e);return t.getRaw().set(r,2),n}(this,t),this.rawId}async setSignature(t){this.binary.set(t,2),this._id=Lr.Buffer.from(await br().hash(t))}isSigned(){return(this._id?.length??0)>0}toJSON(){return{signature:this.signature,owner:this.owner,target:this.target,tags:this.tags.map((t=>({name:Ar.default.encode(t.name),value:Ar.default.encode(t.value)}))),data:this.data}}static async verify(t){if(t.byteLength<Pr)return!1;let e=new xr(t),r=e.signatureType,n=e.getTagsStart(),i=_r(t.subarray(n,n+8)),o=_r(t.subarray(n+8,n+16));if(o>Cr)return!1;if(i>0)try{if(Or(Lr.Buffer.from(t.subarray(n+16,n+16+o))).length!==i)return!1}catch{return!1}let s=Sr[r],a=await kr(e);return await s.verify(e.rawOwner,a,e.rawSignature)}async getSignatureData(){return kr(this)}getTagsStart(){let t=this.getTargetStart(),e=t+(1==this.binary[t]?33:1);return e+=1==this.binary[e]?33:1,e}getTargetStart(){return 2+this.signatureLength+this.ownerLength}getAnchorStart(){let t=this.getTargetStart()+1;return t+=1==this.binary[this.getTargetStart()]?32:0,t}},jr=qe(er(),1);function Nr(t,e,r){let n=e.publicKey,i=r?.target?jr.default.toBuffer(r.target):null,o=1+(i?.byteLength??0),s=r?.anchor?Buffer.from(r.anchor):null,a=1+(s?.byteLength??0),c=(r?.tags?.length??0)>0?Ir(r.tags):null,u=16+(c?c.byteLength:0),f=Buffer.from(t),h=f.byteLength,l=2+e.signatureLength+e.ownerLength+o+a+u+h,d=Buffer.alloc(l);if(d.set(function(t){if(t>29)throw new Error("Short too long");let e=[0,0];for(let r=0;r<e.length;r++){let n=255&t;e[r]=n,t=(t-n)/256}return Uint8Array.from(e)}(e.signatureType),0),d.set(new Uint8Array(e.signatureLength).fill(0),2),n.byteLength!==e.ownerLength)throw new Error(`Owner must be ${e.ownerLength} bytes, but was incorrectly ${n.byteLength}`);d.set(n,2+e.signatureLength);let p=2+e.signatureLength+e.ownerLength;if(d[p]=i?1:0,i){if(32!==i.byteLength)throw new Error(`Target must be 32 bytes but was incorrectly ${i.byteLength}`);d.set(i,p+1)}let g=p+o,y=g+1;if(d[g]=s?1:0,s){if(y+=s.byteLength,32!==s.byteLength)throw new Error("Anchor must be 32 bytes");d.set(s,g+1)}d.set(Rr(r?.tags?.length??0),y);let w=Rr(c?.byteLength??0);d.set(w,y+8),c&&d.set(c,y+16);let m=y+u;return d.set(f,m),new xr(d)}var Dr={...cr};globalThis.arbundles??=Dr;var zr=()=>async function(t){const e=new tt(t);return await e.checkSession(),e}({domain:"auth.othent.io",clientId:"uXkRmJoIa0NfzYgYEDAgj6Rss4wR1tIc",authorizationParams:{redirect_uri:window.location.origin}});function Fr(t,e){return t.getTokenSilently({detailedResponse:!0,authorizationParams:e,cacheMode:"off"})}var Mr=Ke.create({baseURL:"https://kms-server.othent.io"});async function Kr(t){const e=await zr(),r={transaction_input:JSON.stringify({othentFunction:"KMS",data:t})};return(await Fr(e,r)).id_token}async function Wr(){const t=localStorage.getItem("id_token");if(!t)throw new Error("Error retrieving session id_token.");const e=o(t);return delete e.nonce,delete e.sid,delete e.aud,delete e.iss,delete e.iat,delete e.exp,delete e.updated_at,e}async function $r(){const t=await async function(){const t=await zr(),e=await t.isAuthenticated(),r={authorizationParams:{transaction_input:JSON.stringify({othentFunction:"KMS"}),redirect_uri:window.location.origin}},n=async e=>{await t.loginWithPopup(e);const r={transaction_input:JSON.stringify({othentFunction:"KMS"})},n=await Fr(t,r),i=o(n.id_token);return localStorage.setItem("id_token",n.id_token),{encoded:n.id_token,decoded:i}},i=async t=>(["nonce","sid","aud","iss","iat","exp","updated_at"].forEach((e=>delete t[e])),t);if(e){const{decoded:t}=await n(r);return i(t)}try{const{decoded:t}=await n(r);return i(t)}catch(t){throw new Error(`${t}`)}}();if("KMS"===t.authSystem&&t.owner&&t.walletAddress)return t;{await async function(){const t=await Kr({data:null});try{const e=(await Mr.post("/create-user",{encodedData:t})).data.data;if(!e)throw new Error("Error creating user on server.");return e}catch(t){throw new Error("Error creating user on server.")}}();const t=await async function(){const t=await zr(),e={transaction_input:JSON.stringify({othentFunction:"KMS"})};return(await Fr(t,e)).id_token}();return localStorage.setItem("id_token",JSON.stringify(t)),await Wr()}}async function Zr(t){const e=await Wr(),r=await async function(t,e){const r=await Kr({ciphertext:t,keyName:e});try{const t=(await Mr.post("/decrypt",{encodedData:r})).data.data;if(!t)throw new Error("Error decrypting on server.");return t}catch(t){throw new Error("Error decrypting on server.")}}(t,e.sub);return r}async function Hr(){return await async function(){const t=await zr();return await t.logout({logoutParams:{returnTo:window.location.origin}}),{response:"User logged out"}}(),null}async function Jr(t){const e=await Wr(),r=await async function(t,e){const r=await Kr({plaintext:t,keyName:e});try{const t=(await Mr.post("/encrypt",{encodedData:r})).data.data;if(!t)throw new Error("Error encrypting on server.");return t}catch(t){throw new Error("Error encrypting on server.")}}(t,e.sub);return r}async function Xr(){return(await Wr()).walletAddress}async function Vr(){return(await Wr()).owner}async function Gr(){return(await Wr()).email}function Yr(t){return e=function(t){return We.fromByteArray(new Uint8Array(t))}(t),e.replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"");var e}async function qr(t){const e=await Wr(),r=await async function(t,e){const r=await Kr({data:t,keyName:e});try{const t=(await Mr.post("/sign",{encodedData:r})).data.data;if(!t)throw new Error("Error signing data on server.");return t}catch(t){throw new Error("Error signing data on server.")}}(t,e.sub);return $e.lW.from(r.data)}async function Qr(t){const e=await Vr();t.setOwner(e);const r=await t.getSignatureData(),n=await qr(r);let i=await async function(t,e="SHA-256"){let r=await crypto.subtle.digest(e,t);return new Uint8Array(r)}(n);return t.setSignature({id:Yr(i),owner:e,signature:Yr(n)}),t}function tn(t,e="utf8"){return $e.lW.isBuffer(t)?rn(t.toString("base64")):rn($e.lW.from(t,e).toString("base64"))}function en(t){return function(t){let e=t.length,r=e%4;if(!r)return t;let n=e,i=4-r,o=e+i,s=$e.lW.alloc(o);for(s.write(t);i--;)s.write("=",n++);return s.toString()}(t=t.toString()).replace(/\-/g,"+").replace(/_/g,"/")}function rn(t){return t.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function nn(t){return $e.lW.from(en(t),"base64")}var on=tn;async function sn(t,e,r){const n=await Wr(),i=t.get("data",{decode:!0,string:!1}),o=t.get("tags").map((t=>({name:t.get("name",{decode:!0,string:!0}),value:t.get("value",{decode:!0,string:!0})}))),s={publicKey:(a=n.owner,nn(a)),signatureType:1,signatureLength:512,ownerLength:512,sign:async function(t){return await qr(t)},verify:null};var a;const c=Nr(i,s,{tags:o});try{await c.sign(s)}catch(t){console.log(t)}try{e||(e="https://turbo.ardrive.io");const t=await fetch(`${e}/tx`,{method:"POST",headers:{"Content-Type":"application/octet-stream"},body:$e.lW.from(c.getRaw())});if(t.status>=400)throw new Error(`Error uploading DataItem: ${t.status} ${t.statusText}`);return{id:await c.id}}catch(e){await Qr(t);const n=await r.transactions.getUploader(t);for(;!n.isComplete;)await n.uploadChunk();return{id:t.id}}}async function an(t,e={hashAlgorithm:"SHA-256"}){const r=new Uint8Array(t),n=new Uint8Array(await crypto.subtle.digest(e.hashAlgorithm,r)),i=await qr(n);return Array.from(new Uint8Array(i))}async function cn(t,e,r,n={hashAlgorithm:"SHA-256"}){const i=new Uint8Array(t),o=new Uint8Array(e),s=new Uint8Array(await crypto.subtle.digest(n.hashAlgorithm,i)),a={e:"AQAB",ext:!0,kty:"RSA",n:r},c=await crypto.subtle.importKey("jwk",a,{name:"RSA-PSS",hash:n.hashAlgorithm},!1,["verify"]);return await crypto.subtle.verify({name:"RSA-PSS",saltLength:32},c,o,s)}on.encode=tn,on.decode=function(t,e="utf8"){return $e.lW.from(en(t),"base64").toString(e)},on.toBase64=en,on.fromBase64=rn,on.toBuffer=nn,window.Buffer=$e.lW}}]);
@@ -0,0 +1,22 @@
1
+ /*!
2
+ * The buffer module from node.js, for the browser.
3
+ *
4
+ * @author Feross Aboukhadijeh <https://feross.org>
5
+ * @license MIT
6
+ */
7
+
8
+ /*! Bundled license information:
9
+
10
+ ieee754/index.js:
11
+ (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
12
+
13
+ buffer/index.js:
14
+ (*!
15
+ * The buffer module from node.js, for the browser.
16
+ *
17
+ * @author Feross Aboukhadijeh <https://feross.org>
18
+ * @license MIT
19
+ *)
20
+ */
21
+
22
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */