cool-common-utils 1.0.10 → 1.0.11

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 (35) hide show
  1. package/dist/aes.js +1 -1
  2. package/dist/aes.mjs +1 -1
  3. package/dist/amap-utils.js +1 -1
  4. package/dist/amap-utils.mjs +1 -1
  5. package/dist/commons/{vendor-crypto-js-AYnBdXB5.js → vendor-crypto-js-CHx7Nkas.js} +3 -3
  6. package/dist/commons/{vendor-crypto-js-Dhi5niDn.js → vendor-crypto-js-ggwe14WE.js} +3 -3
  7. package/dist/commons/vendor-other-DLjaiDjw.js +1 -0
  8. package/dist/commons/vendor-other-DcMV6-Tw.js +1 -0
  9. package/dist/commons/{vendor-qs-L1Bpz2hz.js → vendor-qs-CKHH0rfG.js} +1 -1
  10. package/dist/commons/{vendor-qs-B9_OEdmf.js → vendor-qs-rzo3AKLH.js} +1 -1
  11. package/dist/commons/{vendor-socket.io-client-OWv_jVwG.js → vendor-socket.io-client-DcCjVzSH.js} +1 -1
  12. package/dist/commons/{vendor-socket.io-client-DfIeTHYA.js → vendor-socket.io-client-qKh85rxA.js} +1 -1
  13. package/dist/commons/{vendor-sweetalert-4FJTrmvX.js → vendor-sweetalert-BDpBaJHE.js} +1 -1
  14. package/dist/commons/{vendor-sweetalert-KX8J3Sv0.js → vendor-sweetalert-C5QMYO6D.js} +1 -1
  15. package/dist/custom-crypto.js +1 -0
  16. package/dist/custom-crypto.mjs +1 -0
  17. package/dist/index.d.ts +9 -9
  18. package/dist/index.js +1 -1
  19. package/dist/index.mjs +1 -1
  20. package/dist/message.js +1 -1
  21. package/dist/message.mjs +1 -1
  22. package/dist/request.js +1 -1
  23. package/dist/request.mjs +1 -1
  24. package/dist/socket-io.js +1 -1
  25. package/dist/socket-io.mjs +1 -1
  26. package/dist/utils/requests/custom-crypto.d.ts +27 -0
  27. package/dist/utils/requests/request.d.ts +9 -0
  28. package/dist/utils/utils.d.ts +9 -0
  29. package/dist/utils.js +1 -1
  30. package/dist/utils.mjs +1 -1
  31. package/dist/websocket.js +1 -1
  32. package/dist/websocket.mjs +1 -1
  33. package/package.json +2 -1
  34. package/dist/commons/vendor-other-Cd2MOa_2.js +0 -1
  35. package/dist/commons/vendor-other-odeBaM7w.js +0 -1
@@ -0,0 +1 @@
1
+ import{c as t,g as e,r,a as n}from"./vendor-crypto-js-ggwe14WE.js";var o=function(){return o=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},o.apply(this,arguments)};function i(t,e,r,n){return new(r||(r=Promise))(function(o,i){function s(t){try{u(n.next(t))}catch(t){i(t)}}function a(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){t.done?o(t.value):function(t){return t instanceof r?t:new r(function(e){e(t)})}(t.value).then(s,a)}u((n=n.apply(t,e||[])).next())})}function s(t,e){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}function a(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s}function c(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var h,p,f,l,y,d={exports:{}},g=d.exports;function m(){return h||(h=1,t=d,function(){var e;function r(t,e,r){null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function n(){return new r(null)}var o="undefined"!=typeof navigator;o&&"Microsoft Internet Explorer"==navigator.appName?(r.prototype.am=function(t,e,r,n,o,i){for(var s=32767&e,a=e>>15;--i>=0;){var u=32767&this[t],c=this[t++]>>15,h=a*u+c*s;o=((u=s*u+((32767&h)<<15)+r[n]+(1073741823&o))>>>30)+(h>>>15)+a*c+(o>>>30),r[n++]=1073741823&u}return o},e=30):o&&"Netscape"!=navigator.appName?(r.prototype.am=function(t,e,r,n,o,i){for(;--i>=0;){var s=e*this[t++]+r[n]+o;o=Math.floor(s/67108864),r[n++]=67108863&s}return o},e=26):(r.prototype.am=function(t,e,r,n,o,i){for(var s=16383&e,a=e>>14;--i>=0;){var u=16383&this[t],c=this[t++]>>14,h=a*u+c*s;o=((u=s*u+((16383&h)<<14)+r[n]+o)>>28)+(h>>14)+a*c,r[n++]=268435455&u}return o},e=28),r.prototype.DB=e,r.prototype.DM=(1<<e)-1,r.prototype.DV=1<<e,r.prototype.FV=Math.pow(2,52),r.prototype.F1=52-e,r.prototype.F2=2*e-52;var i,s,a=new Array;for(i="0".charCodeAt(0),s=0;s<=9;++s)a[i++]=s;for(i="a".charCodeAt(0),s=10;s<36;++s)a[i++]=s;for(i="A".charCodeAt(0),s=10;s<36;++s)a[i++]=s;function u(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function c(t,e){var r=a[t.charCodeAt(e)];return null==r?-1:r}function h(t){var e=n();return e.fromInt(t),e}function p(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function f(t){this.m=t}function l(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function y(t,e){return t&e}function d(t,e){return t|e}function g(t,e){return t^e}function m(t,e){return t&~e}function b(t){if(0==t)return-1;var e=0;return 65535&t||(t>>=16,e+=16),255&t||(t>>=8,e+=8),15&t||(t>>=4,e+=4),3&t||(t>>=2,e+=2),1&t||++e,e}function v(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function w(){}function S(t){return t}function E(t){this.r2=n(),this.q3=n(),r.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}f.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},f.prototype.revert=function(t){return t},f.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},f.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},f.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},l.prototype.convert=function(t){var e=n();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(r.ZERO)>0&&this.m.subTo(e,e),e},l.prototype.revert=function(t){var e=n();return t.copyTo(e),this.reduce(e),e},l.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t[e],n=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},l.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},l.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},r.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},r.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},r.prototype.fromString=function(t,e){var n;if(16==e)n=4;else if(8==e)n=3;else if(256==e)n=8;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)return void this.fromRadix(t,e);n=2}this.t=0,this.s=0;for(var o=t.length,i=!1,s=0;--o>=0;){var a=8==n?255&t[o]:c(t,o);a<0?"-"==t.charAt(o)&&(i=!0):(i=!1,0==s?this[this.t++]=a:s+n>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,(s+=n)>=this.DB&&(s-=this.DB))}8==n&&128&t[0]&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),i&&r.ZERO.subTo(this,this)},r.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},r.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},r.prototype.drShiftTo=function(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s},r.prototype.lShiftTo=function(t,e){var r,n=t%this.DB,o=this.DB-n,i=(1<<o)-1,s=Math.floor(t/this.DB),a=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)e[r+s+1]=this[r]>>o|a,a=(this[r]&i)<<n;for(r=s-1;r>=0;--r)e[r]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},r.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,o=this.DB-n,i=(1<<n)-1;e[0]=this[r]>>n;for(var s=r+1;s<this.t;++s)e[s-r-1]|=(this[s]&i)<<o,e[s-r]=this[s]>>n;n>0&&(e[this.t-r-1]|=(this.s&i)<<o),e.t=this.t-r,e.clamp()}},r.prototype.subTo=function(t,e){for(var r=0,n=0,o=Math.min(t.t,this.t);r<o;)n+=this[r]-t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n-=t[r],e[r++]=n&this.DM,n>>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()},r.prototype.multiplyTo=function(t,e){var n=this.abs(),o=t.abs(),i=n.t;for(e.t=i+o.t;--i>=0;)e[i]=0;for(i=0;i<o.t;++i)e[i+n.t]=n.am(0,o[i],e,i,0,n.t);e.s=0,e.clamp(),this.s!=t.s&&r.ZERO.subTo(e,e)},r.prototype.squareTo=function(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var n=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,n,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},r.prototype.divRemTo=function(t,e,o){var i=t.abs();if(!(i.t<=0)){var s=this.abs();if(s.t<i.t)return null!=e&&e.fromInt(0),void(null!=o&&this.copyTo(o));null==o&&(o=n());var a=n(),u=this.s,c=t.s,h=this.DB-p(i[i.t-1]);h>0?(i.lShiftTo(h,a),s.lShiftTo(h,o)):(i.copyTo(a),s.copyTo(o));var f=a.t,l=a[f-1];if(0!=l){var y=l*(1<<this.F1)+(f>1?a[f-2]>>this.F2:0),d=this.FV/y,g=(1<<this.F1)/y,m=1<<this.F2,b=o.t,v=b-f,w=null==e?n():e;for(a.dlShiftTo(v,w),o.compareTo(w)>=0&&(o[o.t++]=1,o.subTo(w,o)),r.ONE.dlShiftTo(f,w),w.subTo(a,a);a.t<f;)a[a.t++]=0;for(;--v>=0;){var S=o[--b]==l?this.DM:Math.floor(o[b]*d+(o[b-1]+m)*g);if((o[b]+=a.am(0,S,o,v,0,f))<S)for(a.dlShiftTo(v,w),o.subTo(w,o);o[b]<--S;)o.subTo(w,o)}null!=e&&(o.drShiftTo(f,e),u!=c&&r.ZERO.subTo(e,e)),o.t=f,o.clamp(),h>0&&o.rShiftTo(h,o),u<0&&r.ZERO.subTo(o,o)}}},r.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(!(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},r.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},r.prototype.exp=function(t,e){if(t>4294967295||t<1)return r.ONE;var o=n(),i=n(),s=e.convert(this),a=p(t)-1;for(s.copyTo(o);--a>=0;)if(e.sqrTo(o,i),(t&1<<a)>0)e.mulTo(i,s,o);else{var u=o;o=i,i=u}return e.revert(o)},r.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<<e)-1,o=!1,i="",s=this.t,a=this.DB-s*this.DB%e;if(s-- >0)for(a<this.DB&&(r=this[s]>>a)>0&&(o=!0,i=u(r));s>=0;)a<e?(r=(this[s]&(1<<a)-1)<<e-a,r|=this[--s]>>(a+=this.DB-e)):(r=this[s]>>(a-=e)&n,a<=0&&(a+=this.DB,--s)),r>0&&(o=!0),o&&(i+=u(r));return o?i:"0"},r.prototype.negate=function(){var t=n();return r.ZERO.subTo(this,t),t},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function(t){var e=n();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(r.ZERO)>0&&t.subTo(e,e),e},r.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new f(e):new l(e),this.exp(t,r)},r.ZERO=h(0),r.ONE=h(1),w.prototype.convert=S,w.prototype.revert=S,w.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},w.prototype.sqrTo=function(t,e){t.squareTo(e)},E.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=n();return t.copyTo(e),this.reduce(e),e},E.prototype.revert=function(t){return t},E.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},E.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},E.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var T,A,x,B=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],F=(1<<26)/B[B.length-1];function _(){var t;t=(new Date).getTime(),A[x++]^=255&t,A[x++]^=t>>8&255,A[x++]^=t>>16&255,A[x++]^=t>>24&255,x>=q&&(x-=q)}if(r.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},r.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),o=h(r),i=n(),s=n(),a="";for(this.divRemTo(o,i,s);i.signum()>0;)a=(r+s.intValue()).toString(t).substr(1)+a,i.divRemTo(o,i,s);return s.intValue().toString(t)+a},r.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var n=this.chunkSize(e),o=Math.pow(e,n),i=!1,s=0,a=0,u=0;u<t.length;++u){var h=c(t,u);h<0?"-"==t.charAt(u)&&0==this.signum()&&(i=!0):(a=e*a+h,++s>=n&&(this.dMultiply(o),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),i&&r.ZERO.subTo(this,this)},r.prototype.fromNumber=function(t,e,n){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(r.ONE.shiftLeft(t-1),d,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(r.ONE.shiftLeft(t-1),this);else{var o=new Array,i=7&t;o.length=1+(t>>3),e.nextBytes(o),i>0?o[0]&=(1<<i)-1:o[0]=0,this.fromString(o,256)}},r.prototype.bitwiseTo=function(t,e,r){var n,o,i=Math.min(t.t,this.t);for(n=0;n<i;++n)r[n]=e(this[n],t[n]);if(t.t<this.t){for(o=t.s&this.DM,n=i;n<this.t;++n)r[n]=e(this[n],o);r.t=this.t}else{for(o=this.s&this.DM,n=i;n<t.t;++n)r[n]=e(o,t[n]);r.t=t.t}r.s=e(this.s,t.s),r.clamp()},r.prototype.changeBit=function(t,e){var n=r.ONE.shiftLeft(t);return this.bitwiseTo(n,e,n),n},r.prototype.addTo=function(t,e){for(var r=0,n=0,o=Math.min(t.t,this.t);r<o;)n+=this[r]+t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n+=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n+=t[r],e[r++]=n&this.DM,n>>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()},r.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},r.prototype.multiplyLowerTo=function(t,e,r){var n,o=Math.min(this.t+t.t,e);for(r.s=0,r.t=o;o>0;)r[--o]=0;for(n=r.t-this.t;o<n;++o)r[o+this.t]=this.am(0,t[o],r,o,0,this.t);for(n=Math.min(t.t,e);o<n;++o)this.am(0,t[o],r,o,0,e-o);r.clamp()},r.prototype.multiplyUpperTo=function(t,e,r){--e;var n=r.t=this.t+t.t-e;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(e-this.t,0);n<t.t;++n)r[this.t+n-e]=this.am(e-n,t[n],r,0,0,this.t+n-e);r.clamp(),r.drShiftTo(1,r)},r.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this[n])%t;return r},r.prototype.millerRabin=function(t){var e=this.subtract(r.ONE),o=e.getLowestSetBit();if(o<=0)return!1;var i=e.shiftRight(o);(t=t+1>>1)>B.length&&(t=B.length);for(var s=n(),a=0;a<t;++a){s.fromInt(B[Math.floor(Math.random()*B.length)]);var u=s.modPow(i,this);if(0!=u.compareTo(r.ONE)&&0!=u.compareTo(e)){for(var c=1;c++<o&&0!=u.compareTo(e);)if(0==(u=u.modPowInt(2,this)).compareTo(r.ONE))return!1;if(0!=u.compareTo(e))return!1}}return!0},r.prototype.clone=function(){var t=n();return this.copyTo(t),t},r.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},r.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},r.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},r.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},r.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,n=this.DB-t*this.DB%8,o=0;if(t-- >0)for(n<this.DB&&(r=this[t]>>n)!=(this.s&this.DM)>>n&&(e[o++]=r|this.s<<this.DB-n);t>=0;)n<8?(r=(this[t]&(1<<n)-1)<<8-n,r|=this[--t]>>(n+=this.DB-8)):(r=this[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),128&r&&(r|=-256),0==o&&(128&this.s)!=(128&r)&&++o,(o>0||r!=this.s)&&(e[o++]=r);return e},r.prototype.equals=function(t){return 0==this.compareTo(t)},r.prototype.min=function(t){return this.compareTo(t)<0?this:t},r.prototype.max=function(t){return this.compareTo(t)>0?this:t},r.prototype.and=function(t){var e=n();return this.bitwiseTo(t,y,e),e},r.prototype.or=function(t){var e=n();return this.bitwiseTo(t,d,e),e},r.prototype.xor=function(t){var e=n();return this.bitwiseTo(t,g,e),e},r.prototype.andNot=function(t){var e=n();return this.bitwiseTo(t,m,e),e},r.prototype.not=function(){for(var t=n(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},r.prototype.shiftLeft=function(t){var e=n();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},r.prototype.shiftRight=function(t){var e=n();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},r.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+b(this[t]);return this.s<0?this.t*this.DB:-1},r.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=v(this[r]^e);return t},r.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:!!(this[e]&1<<t%this.DB)},r.prototype.setBit=function(t){return this.changeBit(t,d)},r.prototype.clearBit=function(t){return this.changeBit(t,m)},r.prototype.flipBit=function(t){return this.changeBit(t,g)},r.prototype.add=function(t){var e=n();return this.addTo(t,e),e},r.prototype.subtract=function(t){var e=n();return this.subTo(t,e),e},r.prototype.multiply=function(t){var e=n();return this.multiplyTo(t,e),e},r.prototype.divide=function(t){var e=n();return this.divRemTo(t,e,null),e},r.prototype.remainder=function(t){var e=n();return this.divRemTo(t,null,e),e},r.prototype.divideAndRemainder=function(t){var e=n(),r=n();return this.divRemTo(t,e,r),new Array(e,r)},r.prototype.modPow=function(t,e){var r,o,i=t.bitLength(),s=h(1);if(i<=0)return s;r=i<18?1:i<48?3:i<144?4:i<768?5:6,o=i<8?new f(e):e.isEven()?new E(e):new l(e);var a=new Array,u=3,c=r-1,y=(1<<r)-1;if(a[1]=o.convert(this),r>1){var d=n();for(o.sqrTo(a[1],d);u<=y;)a[u]=n(),o.mulTo(d,a[u-2],a[u]),u+=2}var g,m,b=t.t-1,v=!0,w=n();for(i=p(t[b])-1;b>=0;){for(i>=c?g=t[b]>>i-c&y:(g=(t[b]&(1<<i+1)-1)<<c-i,b>0&&(g|=t[b-1]>>this.DB+i-c)),u=r;!(1&g);)g>>=1,--u;if((i-=u)<0&&(i+=this.DB,--b),v)a[g].copyTo(s),v=!1;else{for(;u>1;)o.sqrTo(s,w),o.sqrTo(w,s),u-=2;u>0?o.sqrTo(s,w):(m=s,s=w,w=m),o.mulTo(w,a[g],s)}for(;b>=0&&!(t[b]&1<<i);)o.sqrTo(s,w),m=s,s=w,w=m,--i<0&&(i=this.DB-1,--b)}return o.revert(s)},r.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return r.ZERO;for(var n=t.clone(),o=this.clone(),i=h(1),s=h(0),a=h(0),u=h(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),e?(i.isEven()&&s.isEven()||(i.addTo(this,i),s.subTo(t,s)),i.rShiftTo(1,i)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;o.isEven();)o.rShiftTo(1,o),e?(a.isEven()&&u.isEven()||(a.addTo(this,a),u.subTo(t,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);n.compareTo(o)>=0?(n.subTo(o,n),e&&i.subTo(a,i),s.subTo(u,s)):(o.subTo(n,o),e&&a.subTo(i,a),u.subTo(s,u))}return 0!=o.compareTo(r.ONE)?r.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},r.prototype.pow=function(t){return this.exp(t,new w)},r.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var o=e.getLowestSetBit(),i=r.getLowestSetBit();if(i<0)return e;for(o<i&&(i=o),i>0&&(e.rShiftTo(i,e),r.rShiftTo(i,r));e.signum()>0;)(o=e.getLowestSetBit())>0&&e.rShiftTo(o,e),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return i>0&&r.lShiftTo(i,r),r},r.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=B[B.length-1]){for(e=0;e<B.length;++e)if(r[0]==B[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<B.length;){for(var n=B[e],o=e+1;o<B.length&&n<F;)n*=B[o++];for(n=r.modInt(n);e<o;)if(n%B[e++]==0)return!1}return r.millerRabin(t)},r.prototype.square=function(){var t=n();return this.squareTo(t),t},r.prototype.Barrett=E,null==A){var R;if(A=new Array,x=0,"undefined"!=typeof window&&window.crypto)if(window.crypto.getRandomValues){var O=new Uint8Array(32);for(window.crypto.getRandomValues(O),R=0;R<32;++R)A[x++]=O[R]}else if("Netscape"==navigator.appName&&navigator.appVersion<"5"){var P=window.crypto.random(32);for(R=0;R<P.length;++R)A[x++]=255&P.charCodeAt(R)}for(;x<q;)R=Math.floor(65536*Math.random()),A[x++]=R>>>8,A[x++]=255&R;x=0,_()}function I(){if(null==T){for(_(),(T=new D).init(A),x=0;x<A.length;++x)A[x]=0;x=0}return T.next()}function k(){}function D(){this.i=0,this.j=0,this.S=new Array}k.prototype.nextBytes=function(t){var e;for(e=0;e<t.length;++e)t[e]=I()},D.prototype.init=function(t){var e,r,n;for(e=0;e<256;++e)this.S[e]=e;for(r=0,e=0;e<256;++e)r=r+this.S[e]+t[e%t.length]&255,n=this.S[e],this.S[e]=this.S[r],this.S[r]=n;this.i=0,this.j=0},D.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]};var q=256;t.exports={default:r,BigInteger:r,SecureRandom:k}}.call(g)),d.exports;var t}function b(){if(f)return p;f=1;const{BigInteger:t}=m();class e{constructor(){this.tlv=null,this.t="00",this.l="00",this.v=""}getEncodedHex(){return this.tlv||(this.v=this.getValue(),this.l=this.getLength(),this.tlv=this.t+this.l+this.v),this.tlv}getLength(){const t=this.v.length/2;let e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;return(128+e.length/2).toString(16)+e}getValue(){return""}}class r extends e{constructor(e){super(),this.t="02",e&&(this.v=function(e){let r=e.toString(16);if("-"!==r[0])r.length%2==1?r="0"+r:r.match(/^[0-7]/)||(r="00"+r);else{r=r.substr(1);let n=r.length;n%2==1?n+=1:r.match(/^[0-7]/)||(n+=2);let o="";for(let t=0;t<n;t++)o+="f";o=new t(o,16),r=o.xor(e).add(t.ONE),r=r.toString(16).replace(/^-/,"")}return r}(e))}getValue(){return this.v}}class n extends e{constructor(t){super(),this.t="30",this.asn1Array=t}getValue(){return this.v=this.asn1Array.map(t=>t.getEncodedHex()).join(""),this.v}}function o(t,e){if(e+2>t.length)throw new Error("invalid DER: length field truncated");const r=parseInt(t.substring(e,e+2),16);if(r<128)return{len:r,lenOfL:1};const n=127&r;if(0===n)throw new Error("invalid DER: indefinite length not allowed");if(n>4)throw new Error("invalid DER: length too large");if(e+2+2*n>t.length)throw new Error("invalid DER: length field truncated");const o=t.substring(e+2,e+2+2*n),i=parseInt(o,16);if(i<128)throw new Error("invalid DER: length not minimally encoded (should use short form)");if("00"===o.substring(0,2))throw new Error("invalid DER: length has leading zero byte");return{len:i,lenOfL:1+n}}function i(t,e){if(e+2>t.length)throw new Error("invalid DER: tag field truncated");const r=t.substring(e,e+2),{len:n,lenOfL:i}=o(t,e+2),s=e+2+2*i,a=s+2*n;if(a>t.length)throw new Error("invalid DER: value truncated");return{tag:r,valueHex:t.substring(s,a),nextStart:a}}function s(t){if(0===t.length)throw new Error("invalid DER: INTEGER is empty");const e=parseInt(t.substring(0,2),16);if(128&e)throw new Error("invalid DER: INTEGER is negative");if(0===e){if(2===t.length)return;if(!(128&parseInt(t.substring(2,4),16)))throw new Error("invalid DER: INTEGER has non-minimal leading zero")}}return p={encodeDer(t,e){const o=new r(t),i=new r(e);return new n([o,i]).getEncodedHex()},decodeDer(e){if("string"!=typeof e||e.length%2!=0)throw new Error("invalid DER: input must be a hex string of even length");if("30"!==e.substring(0,2))throw new Error("invalid DER: expected SEQUENCE (0x30)");const r=o(e,2),n=2+2*r.lenOfL;if(n+2*r.len!==e.length)throw new Error("invalid DER: SEQUENCE length does not match input length");const a=i(e,n);if("02"!==a.tag)throw new Error("invalid DER: expected INTEGER (0x02) for R");s(a.valueHex);const u=i(e,a.nextStart);if("02"!==u.tag)throw new Error("invalid DER: expected INTEGER (0x02) for S");if(s(u.valueHex),u.nextStart!==e.length)throw new Error("invalid DER: trailing bytes inside SEQUENCE");return{r:new t(a.valueHex,16),s:new t(u.valueHex,16)}}}}var v,w,S,E,T,A,x,B,F,_,R,O,P,I={exports:{}};function k(){return v||(v=1,function(e){let r,n,o;class i{constructor(){this.i=0,this.j=0,this.S=[]}init(t){let e,r,n;for(e=0;e<256;++e)this.S[e]=e;for(r=0,e=0;e<256;++e)r=r+this.S[e]+t[e%t.length]&255,n=this.S[e],this.S[e]=this.S[r],this.S[r]=n;this.i=0,this.j=0}next(){this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255;const t=this.S[this.i];return this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]}}function s(){var t;t=(new Date).getTime(),n[o++]^=255&t,n[o++]^=t>>8&255,n[o++]^=t>>16&255,n[o++]^=t>>24&255,o>=256&&(o-=256)}if(null==n){let r;n=[],o=0;const i=new Uint8Array(32);if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues)for(window.crypto.getRandomValues(i),r=0;r<32;++r)n[o++]=i[r];else{const s="function"==typeof t?t.bind(e):null,a=s?s("crypto"):null;if(a)a.getRandomValues(i);else{if(!globalThis.crypto)throw new Error("当前环境不支持 crypto.getRandomValues!");globalThis.crypto.getRandomValues(i)}for(r=0;r<32;++r)n[o++]=i[r]}o=0,s()}function a(){if(null==r){for(s(),r=new i,r.init(n),o=0;o<n.length;++o)n[o]=0;o=0}return r.next()}e.exports={SecureRandom:class{nextBytes(t){for(let e=0;e<t.length;++e)t[e]=a()}}}}(I)),I.exports}function D(){if(S)return w;S=1;const{BigInteger:t}=m(),{ECCurveFp:e}=function(){if(y)return l;y=1;const{BigInteger:t}=m(),e=new t("2"),r=new t("3");class n{constructor(t,e){this.x=e,this.q=t}equals(t){return t===this||this.q.equals(t.q)&&this.x.equals(t.x)}toBigInteger(){return this.x}negate(){return new n(this.q,this.x.negate().mod(this.q))}add(t){return new n(this.q,this.x.add(t.toBigInteger()).mod(this.q))}subtract(t){return new n(this.q,this.x.subtract(t.toBigInteger()).mod(this.q))}multiply(t){return new n(this.q,this.x.multiply(t.toBigInteger()).mod(this.q))}divide(t){return new n(this.q,this.x.multiply(t.toBigInteger().modInverse(this.q)).mod(this.q))}square(){return new n(this.q,this.x.square().mod(this.q))}}class o{constructor(e,r,n,o){this.curve=e,this.x=r,this.y=n,this.z=null==o?t.ONE:o,this.zinv=null}getX(){return null===this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))}getY(){return null===this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))}equals(e){return e===this||(this.isInfinity()?e.isInfinity():e.isInfinity()?this.isInfinity():!!e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(t.ZERO)&&e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(t.ZERO))}isInfinity(){return null===this.x&&null===this.y||this.z.equals(t.ZERO)&&!this.y.toBigInteger().equals(t.ZERO)}negate(){return new o(this.curve,this.x,this.y.negate(),this.z)}add(e){if(this.isInfinity())return e;if(e.isInfinity())return this;const r=this.x.toBigInteger(),n=this.y.toBigInteger(),i=this.z,s=e.x.toBigInteger(),a=e.y.toBigInteger(),u=e.z,c=this.curve.q,h=r.multiply(u).mod(c),p=s.multiply(i).mod(c),f=h.subtract(p),l=n.multiply(u).mod(c),y=a.multiply(i).mod(c),d=l.subtract(y);if(t.ZERO.equals(f))return t.ZERO.equals(d)?this.twice():this.curve.infinity;const g=h.add(p),m=i.multiply(u).mod(c),b=f.square().mod(c),v=f.multiply(b).mod(c),w=m.multiply(d.square()).subtract(g.multiply(b)).mod(c),S=f.multiply(w).mod(c),E=d.multiply(b.multiply(h).subtract(w)).subtract(l.multiply(v)).mod(c),T=v.multiply(m).mod(c);return new o(this.curve,this.curve.fromBigInteger(S),this.curve.fromBigInteger(E),T)}twice(){if(this.isInfinity())return this;if(!this.y.toBigInteger().signum())return this.curve.infinity;const t=this.x.toBigInteger(),e=this.y.toBigInteger(),n=this.z,i=this.curve.q,s=this.curve.a.toBigInteger(),a=t.square().multiply(r).add(s.multiply(n.square())).mod(i),u=e.shiftLeft(1).multiply(n).mod(i),c=e.square().mod(i),h=c.multiply(t).multiply(n).mod(i),p=u.square().mod(i),f=a.square().subtract(h.shiftLeft(3)).mod(i),l=u.multiply(f).mod(i),y=a.multiply(h.shiftLeft(2).subtract(f)).subtract(p.shiftLeft(1).multiply(c)).mod(i),d=u.multiply(p).mod(i);return new o(this.curve,this.curve.fromBigInteger(l),this.curve.fromBigInteger(y),d)}multiply(t){if(this.isInfinity())return this;if(!t.signum())return this.curve.infinity;const e=t.multiply(r),n=this.negate();let o=this;for(let r=e.bitLength()-2;r>0;r--){o=o.twice();const i=e.testBit(r);i!==t.testBit(r)&&(o=o.add(i?this:n))}return o}}return l={ECPointFp:o,ECCurveFp:class{constructor(t,e,r){this.q=t,this.a=this.fromBigInteger(e),this.b=this.fromBigInteger(r),this.infinity=new o(this,null,null)}equals(t){return t===this||this.q.equals(t.q)&&this.a.equals(t.a)&&this.b.equals(t.b)}fromBigInteger(t){return new n(this.q,t)}decodePointHex(r){if("string"!=typeof r||r.length<2||r.length%2!=0)return null;switch(parseInt(r.substr(0,2),16)){case 0:return 2!==r.length?null:this.infinity;case 2:case 3:if(66!==r.length)return null;const n=this.fromBigInteger(new t(r.substr(2),16));let i=this.fromBigInteger(n.multiply(n.square()).add(n.multiply(this.a)).add(this.b).toBigInteger().modPow(this.q.divide(new t("4")).add(t.ONE),this.q));return i.toBigInteger().mod(e).equals(new t(r.substr(0,2),16).subtract(e))||(i=i.negate()),new o(this,n,i);case 4:case 6:case 7:if(130!==r.length)return null;const s=(r.length-2)/2,a=r.substr(2,s),u=r.substr(s+2,s);return new o(this,this.fromBigInteger(new t(a,16)),this.fromBigInteger(new t(u,16)));default:return null}}}}}(),{SecureRandom:r}=k(),n=new r,{curve:o,G:i,n:s}=a();function a(){const r=new t("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF",16),n=new t("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC",16),o=new t("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93",16),i=new e(r,n,o),s=i.decodePointHex("0432C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0");return{curve:i,G:s,n:new t("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123",16)}}function u(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t}function c(t){if("string"!=typeof t||!t)return!1;let e;try{e=o.decodePointHex(t)}catch(t){return!1}if(!e||e.isInfinity())return!1;const r=e.getX();return e.getY().square().equals(r.multiply(r.square()).add(r.multiply(o.a)).add(o.b))}return w={getGlobalCurve:function(){return o},generateEcparam:a,generateKeyPairHex:function(e,r,o){const a=(e?new t(e,r,o):new t(s.bitLength(),n)).mod(s.subtract(t.ONE)).add(t.ONE),c=u(a.toString(16),64),h=i.multiply(a);return{privateKey:c,publicKey:"04"+u(h.getX().toBigInteger().toString(16),64)+u(h.getY().toBigInteger().toString(16),64)}},compressPublicKeyHex:function(e){if(130!==e.length)throw new Error("Invalid public key to compress");const r=(e.length-2)/2,n=e.substr(2,r);let o="03";return new t(e.substr(r+2,r),16).mod(new t("2")).equals(t.ZERO)&&(o="02"),o+n},utf8ToHex:function(t){const e=(t=unescape(encodeURIComponent(t))).length,r=[];for(let n=0;n<e;n++)r[n>>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;const n=[];for(let t=0;t<e;t++){const e=r[t>>>2]>>>24-t%4*8&255;n.push((e>>>4).toString(16)),n.push((15&e).toString(16))}return n.join("")},leftPad:u,arrayToHex:function(t){const e=[];for(let r=0;r<t.length;r++){const n=255&t[r];e.push((n>>>4).toString(16)),e.push((15&n).toString(16))}return e.join("")},arrayToUtf8:function(t){const e=[];let r=0;for(let n=0;n<2*t.length;n+=2)e[n>>>3]|=parseInt(t[r],10)<<24-n%8*4,r++;try{const r=[];for(let n=0;n<t.length;n++){const t=e[n>>>2]>>>24-n%4*8&255;r.push(String.fromCharCode(t))}return decodeURIComponent(escape(r.join("")))}catch(t){throw new Error("Malformed UTF-8 data")}},hexToArray:function(t){const e=[];let r=t.length;r%2!=0&&(t=u(t,r+1)),r=t.length;for(let n=0;n<r;n+=2)e.push(parseInt(t.substr(n,2),16));return e},verifyPublicKey:c,comparePublicKeyHex:function(t,e){if(!c(t)||!c(e))return!1;const r=o.decodePointHex(t),n=o.decodePointHex(e);return r.equals(n)}}}function q(){if(T)return E;T=1;const t=new Uint32Array(68),e=new Uint32Array(64);function r(t,e){const r=31&e;return t<<r|t>>>32-r}function n(t,e){const r=[];for(let n=t.length-1;n>=0;n--)r[n]=255&(t[n]^e[n]);return r}function o(t){return t^r(t,9)^r(t,17)}function i(t){return t^r(t,15)^r(t,23)}function s(n){let s=8*n.length,a=s%512;a=a>=448?512-a%448-1:448-a-1;const u=new Array((a-7)/8),c=new Array(8);for(let t=0,e=u.length;t<e;t++)u[t]=0;for(let t=0,e=c.length;t<e;t++)c[t]=0;s=s.toString(2);for(let t=7;t>=0;t--)if(s.length>8){const e=s.length-8;c[t]=parseInt(s.substr(e),2),s=s.substr(0,e)}else s.length>0&&(c[t]=parseInt(s,2),s="");const h=new Uint8Array([...n,128,...u,...c]),p=new DataView(h.buffer,0),f=h.length/64,l=new Uint32Array([1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214]);for(let n=0;n<f;n++){t.fill(0),e.fill(0);const s=16*n;for(let e=0;e<16;e++)t[e]=p.getUint32(4*(s+e),!1);for(let e=16;e<68;e++)t[e]=i(t[e-16]^t[e-9]^r(t[e-3],15))^r(t[e-13],7)^t[e-6];for(let r=0;r<64;r++)e[r]=t[r]^t[r+4];const a=2043430169,u=2055708042;let c,h,f,y,d,g=l[0],m=l[1],b=l[2],v=l[3],w=l[4],S=l[5],E=l[6],T=l[7];for(let n=0;n<64;n++)d=n>=0&&n<=15?a:u,c=r(r(g,12)+w+r(d,n),7),h=c^r(g,12),f=(n>=0&&n<=15?g^m^b:g&m|g&b|m&b)+v+h+e[n],y=(n>=0&&n<=15?w^S^E:w&S|~w&E)+T+c+t[n],v=b,b=r(m,9),m=g,g=f,T=E,E=r(S,19),S=w,w=o(y);l[0]^=g,l[1]^=m,l[2]^=b,l[3]^=v,l[4]^=w,l[5]^=S,l[6]^=E,l[7]^=T}const y=[];for(let t=0,e=l.length;t<e;t++){const e=l[t];y.push((4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e)}return y}const a=new Uint8Array(64),u=new Uint8Array(64);for(let t=0;t<64;t++)a[t]=54,u[t]=92;return E={sm3:s,hmac:function(t,e){for(e.length>64&&(e=s(e));e.length<64;)e.push(0);const r=n(e,a),o=n(e,u),i=s([...r,...t]);return s([...o,...i])}}}function j(){if(x)return A;x=1;const{BigInteger:t}=m(),{encodeDer:e,decodeDer:r}=b(),n=D(),o=q().sm3,{G:i,curve:s,n:a}=n.generateEcparam();function u(t,e,r="1234567812345678"){r=n.utf8ToHex(r);const s=n.leftPad(i.curve.a.toBigInteger().toRadix(16),64),a=n.leftPad(i.curve.b.toBigInteger().toRadix(16),64),u=n.leftPad(i.getX().toBigInteger().toRadix(16),64),c=n.leftPad(i.getY().toBigInteger().toRadix(16),64);let h,p;if(128===e.length)h=e.substr(0,64),p=e.substr(64,64);else{const t=i.curve.decodePointHex(e);h=n.leftPad(t.getX().toBigInteger().toRadix(16),64),p=n.leftPad(t.getY().toBigInteger().toRadix(16),64)}const f=n.hexToArray(r+s+a+u+c+h+p),l=4*r.length;f.unshift(255&l),f.unshift(l>>8&255);const y=o(f);return n.arrayToHex(o(y.concat(n.hexToArray(t))))}function c(e){const r=i.multiply(new t(e,16));return"04"+n.leftPad(r.getX().toBigInteger().toString(16),64)+n.leftPad(r.getY().toBigInteger().toString(16),64)}function h(){const e=n.generateKeyPairHex(),r=s.decodePointHex(e.publicKey);return e.k=new t(e.privateKey,16),e.x1=r.getX().toBigInteger(),e}return A={generateKeyPairHex:n.generateKeyPairHex,compressPublicKeyHex:n.compressPublicKeyHex,comparePublicKeyHex:n.comparePublicKeyHex,doEncrypt:function(e,r,i=1){if(!n.verifyPublicKey(r))throw new Error("Invalid public key");e="string"==typeof e?n.hexToArray(n.utf8ToHex(e)):Array.prototype.slice.call(e),r=n.getGlobalCurve().decodePointHex(r);const s=n.generateKeyPairHex(),a=new t(s.privateKey,16);let u=s.publicKey;u.length>128&&(u=u.substr(u.length-128));const c=r.multiply(a),h=n.hexToArray(n.leftPad(c.getX().toBigInteger().toRadix(16),64)),p=n.hexToArray(n.leftPad(c.getY().toBigInteger().toRadix(16),64)),f=n.arrayToHex(o([].concat(h,e,p)));let l=1,y=0,d=[];const g=[].concat(h,p),m=()=>{d=o([...g,l>>24&255,l>>16&255,l>>8&255,255&l]),l++,y=0};m();for(let t=0,r=e.length;t<r;t++)y===d.length&&m(),e[t]^=255&d[y++];const b=n.arrayToHex(e);return 0===i?u+b+f:u+f+b},doDecrypt:function(e,r,i=1,{output:s="string"}={}){r=new t(r,16);let a=e.substr(128,64),u=e.substr(192);0===i&&(a=e.substr(e.length-64),u=e.substr(128,e.length-128-64));const c=n.hexToArray(u),h=n.getGlobalCurve().decodePointHex("04"+e.substr(0,128));if(!h||!n.verifyPublicKey("04"+e.substr(0,128)))return"array"===s?[]:"";const p=h.multiply(r),f=n.hexToArray(n.leftPad(p.getX().toBigInteger().toRadix(16),64)),l=n.hexToArray(n.leftPad(p.getY().toBigInteger().toRadix(16),64));let y=1,d=0,g=[];const m=[].concat(f,l),b=()=>{g=o([...m,y>>24&255,y>>16&255,y>>8&255,255&y]),y++,d=0};b();for(let t=0,e=c.length;t<e;t++)d===g.length&&b(),c[t]^=255&g[d++];return n.arrayToHex(o([].concat(f,c,l)))===a.toLowerCase()?"array"===s?c:n.arrayToUtf8(c):"array"===s?[]:""},doSignature:function(r,o,{pointPool:i,der:s,hash:p=!0,publicKey:f,userId:l}={}){let y="string"==typeof r?n.utf8ToHex(r):n.arrayToHex(Array.prototype.slice.call(r));p&&(y=u(y,f=f||c(o),l));const d=new t(o,16),g=new t(y,16);let m=null,b=null,v=null;do{do{let t;t=i&&i.length?i.pop():h(),m=t.k,b=g.add(t.x1).mod(a)}while(b.equals(t.ZERO)||b.add(m).equals(a));v=d.add(t.ONE).modInverse(a).multiply(m.subtract(b.multiply(d))).mod(a)}while(v.equals(t.ZERO));return s?e(b,v):n.leftPad(b.toString(16),64)+n.leftPad(v.toString(16),64)},doVerifySignature:function(e,o,c,{der:h,hash:p=!0,userId:f}={}){if(!n.verifyPublicKey(c))return!1;let l,y,d="string"==typeof e?n.utf8ToHex(e):n.arrayToHex(Array.prototype.slice.call(e));if(p&&(d=u(d,c,f)),h)try{const t=r(o);l=t.r,y=t.s}catch(t){return!1}else l=new t(o.substring(0,64),16),y=new t(o.substring(64),16);const g=a.subtract(t.ONE);if(l.compareTo(t.ONE)<0||l.compareTo(g)>0)return!1;if(y.compareTo(t.ONE)<0||y.compareTo(g)>0)return!1;const m=s.decodePointHex(c);if(!m)return!1;const b=new t(d,16),v=l.add(y).mod(a);if(v.equals(t.ZERO))return!1;const w=i.multiply(y).add(m.multiply(v)),S=b.add(w.getX().toBigInteger()).mod(a);return l.equals(S)},getPublicKeyFromPrivateKey:c,getPoint:h,verifyPublicKey:n.verifyPublicKey}}function C(){if(F)return B;F=1;const{sm3:t,hmac:e}=q();function r(t){return t.map(t=>1===(t=t.toString(16)).length?"0"+t:t).join("")}function n(t){const e=[];let r=t.length;var n,o;r%2!=0&&(o=r+1,t=(n=t).length>=o?n:new Array(o-n.length+1).join("0")+n),r=t.length;for(let n=0;n<r;n+=2)e.push(parseInt(t.substr(n,2),16));return e}return B=function(o,i){if(o="string"==typeof o?function(t){const e=[];for(let r=0,n=t.length;r<n;r++){const n=t.codePointAt(r);if(n<=127)e.push(n);else if(n<=2047)e.push(192|n>>>6),e.push(128|63&n);else if(n<=55295||n>=57344&&n<=65535)e.push(224|n>>>12),e.push(128|n>>>6&63),e.push(128|63&n);else{if(!(n>=65536&&n<=1114111))throw e.push(n),new Error("input is not supported");r++,e.push(240|n>>>18&28),e.push(128|n>>>12&63),e.push(128|n>>>6&63),e.push(128|63&n)}}return e}(o):Array.prototype.slice.call(o),i){if("hmac"!==(i.mode||"hmac"))throw new Error("invalid mode");let t=i.key;if(!t)throw new Error("invalid key");return t="string"==typeof t?n(t):Array.prototype.slice.call(t),r(e(o,t))}return r(t(o))}}function N(){if(R)return _;R=1;const t=16,e=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],r=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function n(t){const e=[];for(let r=0,n=t.length;r<n;r+=2)e.push(parseInt(t.substr(r,2),16));return e}function o(t,e){const r=31&e;return t<<r|t>>>32-r}function i(t){return(255&e[t>>>24&255])<<24|(255&e[t>>>16&255])<<16|(255&e[t>>>8&255])<<8|255&e[255&t]}function s(t){return t^o(t,2)^o(t,10)^o(t,18)^o(t,24)}function a(t){return t^o(t,13)^o(t,23)}function u(t,e,r){const n=new Array(4),o=new Array(4);for(let e=0;e<4;e++)o[0]=255&t[4*e],o[1]=255&t[4*e+1],o[2]=255&t[4*e+2],o[3]=255&t[4*e+3],n[e]=o[0]<<24|o[1]<<16|o[2]<<8|o[3];for(let t,e=0;e<32;e+=4)t=n[1]^n[2]^n[3]^r[e+0],n[0]^=s(i(t)),t=n[2]^n[3]^n[0]^r[e+1],n[1]^=s(i(t)),t=n[3]^n[0]^n[1]^r[e+2],n[2]^=s(i(t)),t=n[0]^n[1]^n[2]^r[e+3],n[3]^=s(i(t));for(let t=0;t<16;t+=4)e[t]=n[3-t/4]>>>24&255,e[t+1]=n[3-t/4]>>>16&255,e[t+2]=n[3-t/4]>>>8&255,e[t+3]=255&n[3-t/4]}function c(e,o,s,{padding:c="pkcs#7",mode:h,iv:p=[],output:f="string"}={}){if("cbc"===h&&("string"==typeof p&&(p=n(p)),16!==p.length))throw new Error("iv is invalid");if("string"==typeof o&&(o=n(o)),16!==o.length)throw new Error("key is invalid");if(e="string"==typeof e?0!==s?function(t){const e=[];for(let r=0,n=t.length;r<n;r++){const n=t.codePointAt(r);if(n<=127)e.push(n);else if(n<=2047)e.push(192|n>>>6),e.push(128|63&n);else if(n<=55295||n>=57344&&n<=65535)e.push(224|n>>>12),e.push(128|n>>>6&63),e.push(128|63&n);else{if(!(n>=65536&&n<=1114111))throw e.push(n),new Error("input is not supported");r++,e.push(240|n>>>18&28),e.push(128|n>>>12&63),e.push(128|n>>>6&63),e.push(128|63&n)}}return e}(e):n(e):[...e],("pkcs#5"===c||"pkcs#7"===c)&&0!==s){const r=t-e.length%t;for(let t=0;t<r;t++)e.push(r)}const l=new Array(32);!function(t,e,n){const o=new Array(4),s=new Array(4);for(let e=0;e<4;e++)s[0]=255&t[0+4*e],s[1]=255&t[1+4*e],s[2]=255&t[2+4*e],s[3]=255&t[3+4*e],o[e]=s[0]<<24|s[1]<<16|s[2]<<8|s[3];o[0]^=2746333894,o[1]^=1453994832,o[2]^=1736282519,o[3]^=2993693404;for(let t,n=0;n<32;n+=4)t=o[1]^o[2]^o[3]^r[n+0],e[n+0]=o[0]^=a(i(t)),t=o[2]^o[3]^o[0]^r[n+1],e[n+1]=o[1]^=a(i(t)),t=o[3]^o[0]^o[1]^r[n+2],e[n+2]=o[2]^=a(i(t)),t=o[0]^o[1]^o[2]^r[n+3],e[n+3]=o[3]^=a(i(t));if(0===n)for(let t,r=0;r<16;r++)t=e[r],e[r]=e[31-r],e[31-r]=t}(o,l,s);const y=[];let d=p,g=e.length,m=0;for(;g>=t;){const r=e.slice(m,m+16),n=new Array(16);if("cbc"===h)for(let e=0;e<t;e++)0!==s&&(r[e]^=d[e]);u(r,n,l);for(let e=0;e<t;e++)"cbc"===h&&0===s&&(n[e]^=d[e]),y[m+e]=n[e];"cbc"===h&&(d=0!==s?n:r),g-=t,m+=t}if(("pkcs#5"===c||"pkcs#7"===c)&&0===s){const t=y.length,e=y[t-1];for(let r=1;r<=e;r++)if(y[t-r]!==e)throw new Error("padding is invalid");y.splice(t-e,e)}return"array"!==f?0!==s?y.map(t=>1===(t=t.toString(16)).length?"0"+t:t).join(""):function(t){const e=[];for(let r=0,n=t.length;r<n;r++)t[r]>=240&&t[r]<=247?(e.push(String.fromCodePoint(((7&t[r])<<18)+((63&t[r+1])<<12)+((63&t[r+2])<<6)+(63&t[r+3]))),r+=3):t[r]>=224&&t[r]<=239?(e.push(String.fromCodePoint(((15&t[r])<<12)+((63&t[r+1])<<6)+(63&t[r+2]))),r+=2):t[r]>=192&&t[r]<=223?(e.push(String.fromCodePoint(((31&t[r])<<6)+(63&t[r+1]))),r++):e.push(String.fromCodePoint(t[r]));return e.join("")}(y):y}return _={encrypt:(t,e,r)=>c(t,e,1,r),decrypt:(t,e,r)=>c(t,e,0,r)}}var M,U,L,V,H,W,K,z,G,$,Y,Z,X,J,Q,tt,et,rt,nt,ot,it,st,at,ut,ct,ht,pt,ft,lt,yt,dt,gt,mt,bt,vt,wt,St,Et,Tt,At,xt,Bt,Ft,_t,Rt,Ot,Pt,It,kt,Dt,qt,jt,Ct,Nt,Mt,Ut,Lt,Vt,Ht,Wt,Kt,zt,Gt,$t,Yt,Zt,Xt,Jt,Qt,te,ee,re,ne,oe,ie,se,ae,ue,ce,he,pe=e(P?O:(P=1,O={sm2:j(),sm3:C(),sm4:N()}));function fe(){return U?M:(U=1,M=TypeError)}function le(){if(V)return L;V=1;var t="function"==typeof Map&&Map.prototype,e=Object.getOwnPropertyDescriptor&&t?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=t&&e&&"function"==typeof e.get?e.get:null,i=t&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,a=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=s&&a&&"function"==typeof a.get?a.get:null,c=s&&Set.prototype.forEach,h="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,f="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,l=Boolean.prototype.valueOf,y=Object.prototype.toString,d=Function.prototype.toString,g=String.prototype.match,m=String.prototype.slice,b=String.prototype.replace,v=String.prototype.toUpperCase,w=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,T=Array.prototype.join,A=Array.prototype.slice,x=Math.floor,B="function"==typeof BigInt?BigInt.prototype.valueOf:null,F=Object.getOwnPropertySymbols,_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,R="function"==typeof Symbol&&"object"==typeof Symbol.iterator,O="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===R||"symbol")?Symbol.toStringTag:null,P=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function k(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-x(-t):x(t);if(n!==t){var o=String(n),i=m.call(e,o.length+1);return b.call(o,r,"$&_")+"."+b.call(b.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return b.call(e,r,"$&_")}var D=r,q=D.custom,j=z(q)?q:null,C={__proto__:null,double:'"',single:"'"},N={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function M(t,e,r){var n=r.quoteStyle||e,o=C[n];return o+t+o}function U(t){return b.call(String(t),/"/g,"&quot;")}function H(t){return!O||!("object"==typeof t&&(O in t||void 0!==t[O]))}function W(t){return"[object Array]"===Y(t)&&H(t)}function K(t){return"[object RegExp]"===Y(t)&&H(t)}function z(t){if(R)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!_)return!1;try{return _.call(t),!0}catch(t){}return!1}L=function t(e,r,s,a){var y=r||{};if($(y,"quoteStyle")&&!$(C,y.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if($(y,"maxStringLength")&&("number"==typeof y.maxStringLength?y.maxStringLength<0&&y.maxStringLength!==1/0:null!==y.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var v=!$(y,"customInspect")||y.customInspect;if("boolean"!=typeof v&&"symbol"!==v)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if($(y,"indent")&&null!==y.indent&&"\t"!==y.indent&&!(parseInt(y.indent,10)===y.indent&&y.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if($(y,"numericSeparator")&&"boolean"!=typeof y.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var S=y.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return X(e,y);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var x=String(e);return S?k(e,x):x}if("bigint"==typeof e){var F=String(e)+"n";return S?k(e,F):F}var q=void 0===y.depth?5:y.depth;if(void 0===s&&(s=0),s>=q&&q>0&&"object"==typeof e)return W(e)?"[Array]":"[Object]";var N=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=T.call(Array(t.indent+1)," ")}return{base:r,prev:T.call(Array(e+1),r)}}(y,s);if(void 0===a)a=[];else if(Z(a,e)>=0)return"[Circular]";function L(e,r,n){if(r&&(a=A.call(a)).push(r),n){var o={depth:y.depth};return $(y,"quoteStyle")&&(o.quoteStyle=y.quoteStyle),t(e,o,s+1,a)}return t(e,y,s+1,a)}if("function"==typeof e&&!K(e)){var V=function(t){if(t.name)return t.name;var e=g.call(d.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(e),G=nt(e,L);return"[Function"+(V?": "+V:" (anonymous)")+"]"+(G.length>0?" { "+T.call(G,", ")+" }":"")}if(z(e)){var J=R?b.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):_.call(e);return"object"!=typeof e||R?J:Q(J)}if(function(t){if(!t||"object"!=typeof t)return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(e)){for(var ot="<"+w.call(String(e.nodeName)),it=e.attributes||[],st=0;st<it.length;st++)ot+=" "+it[st].name+"="+M(U(it[st].value),"double",y);return ot+=">",e.childNodes&&e.childNodes.length&&(ot+="..."),ot+="</"+w.call(String(e.nodeName))+">"}if(W(e)){if(0===e.length)return"[]";var at=nt(e,L);return N&&!function(t){for(var e=0;e<t.length;e++)if(Z(t[e],"\n")>=0)return!1;return!0}(at)?"["+rt(at,N)+"]":"[ "+T.call(at,", ")+" ]"}if(function(t){return"[object Error]"===Y(t)&&H(t)}(e)){var ut=nt(e,L);return"cause"in Error.prototype||!("cause"in e)||P.call(e,"cause")?0===ut.length?"["+String(e)+"]":"{ ["+String(e)+"] "+T.call(ut,", ")+" }":"{ ["+String(e)+"] "+T.call(E.call("[cause]: "+L(e.cause),ut),", ")+" }"}if("object"==typeof e&&v){if(j&&"function"==typeof e[j]&&D)return D(e,{depth:q-s});if("symbol"!==v&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!o||!t||"object"!=typeof t)return!1;try{o.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var ct=[];return i&&i.call(e,function(t,r){ct.push(L(r,e,!0)+" => "+L(t,e))}),et("Map",o.call(e),ct,N)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{o.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var ht=[];return c&&c.call(e,function(t){ht.push(L(t,e))}),et("Set",u.call(e),ht,N)}if(function(t){if(!h||!t||"object"!=typeof t)return!1;try{h.call(t,h);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return tt("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{h.call(t,h)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return tt("WeakSet");if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{return f.call(t),!0}catch(t){}return!1}(e))return tt("WeakRef");if(function(t){return"[object Number]"===Y(t)&&H(t)}(e))return Q(L(Number(e)));if(function(t){if(!t||"object"!=typeof t||!B)return!1;try{return B.call(t),!0}catch(t){}return!1}(e))return Q(L(B.call(e)));if(function(t){return"[object Boolean]"===Y(t)&&H(t)}(e))return Q(l.call(e));if(function(t){return"[object String]"===Y(t)&&H(t)}(e))return Q(L(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&e===globalThis||void 0!==n&&e===n)return"{ [object globalThis] }";if(!function(t){return"[object Date]"===Y(t)&&H(t)}(e)&&!K(e)){var pt=nt(e,L),ft=I?I(e)===Object.prototype:e instanceof Object||e.constructor===Object,lt=e instanceof Object?"":"null prototype",yt=!ft&&O&&Object(e)===e&&O in e?m.call(Y(e),8,-1):lt?"Object":"",dt=(ft||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(yt||lt?"["+T.call(E.call([],yt||[],lt||[]),": ")+"] ":"");return 0===pt.length?dt+"{}":N?dt+"{"+rt(pt,N)+"}":dt+"{ "+T.call(pt,", ")+" }"}return String(e)};var G=Object.prototype.hasOwnProperty||function(t){return t in this};function $(t,e){return G.call(t,e)}function Y(t){return y.call(t)}function Z(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function X(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return X(m.call(t,0,e.maxStringLength),e)+n}var o=N[e.quoteStyle||"single"];return o.lastIndex=0,M(b.call(b.call(t,o,"\\$1"),/[\x00-\x1f]/g,J),"single",e)}function J(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+v.call(e.toString(16))}function Q(t){return"Object("+t+")"}function tt(t){return t+" { ? }"}function et(t,e,r,n){return t+" ("+e+") {"+(n?rt(r,n):T.call(r,", "))+"}"}function rt(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+T.call(t,","+r)+"\n"+e.prev}function nt(t,e){var r=W(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=$(t,o)?e(t[o],t):""}var i,s="function"==typeof F?F(t):[];if(R){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var u in t)$(t,u)&&(r&&String(Number(u))===u&&u<t.length||R&&i["$"+u]instanceof Symbol||(S.call(/[^\w$]/,u)?n.push(e(u,t)+": "+e(t[u],t)):n.push(u+": "+e(t[u],t))));if("function"==typeof F)for(var c=0;c<s.length;c++)P.call(t,s[c])&&n.push("["+e(s[c])+"]: "+e(t[s[c]],t));return n}return L}function ye(){if(W)return H;W=1;var t=le(),e=fe(),r=function(t,e,r){for(var n,o=t;null!=(n=o.next);o=n)if(n.key===e)return o.next=n.next,r||(n.next=t.next,t.next=n),n};return H=function(){var n,o={assert:function(r){if(!o.has(r))throw new e("Side channel does not contain "+t(r))},delete:function(t){var e=function(t,e){if(t)return r(t,e,!0)}(n,t);return e&&n&&!n.next&&(n=void 0),!!e},get:function(t){return function(t,e){if(t){var n=r(t,e);return n&&n.value}}(n,t)},has:function(t){return function(t,e){return!!t&&!!r(t,e)}(n,t)},set:function(t,e){n||(n={next:void 0}),function(t,e,n){var o=r(t,e);o?o.value=n:t.next={key:e,next:t.next,value:n}}(n,t,e)}};return o},H}function de(){return z?K:(z=1,K=Object)}function ge(){return $?G:($=1,G=Error)}function me(){return Z?Y:(Z=1,Y=EvalError)}function be(){return J?X:(J=1,X=RangeError)}function ve(){return tt?Q:(tt=1,Q=ReferenceError)}function we(){return rt?et:(rt=1,et=SyntaxError)}function Se(){return ot?nt:(ot=1,nt=URIError)}function Ee(){return st?it:(st=1,it=Math.abs)}function Te(){return ut?at:(ut=1,at=Math.floor)}function Ae(){return ht?ct:(ht=1,ct=Math.max)}function xe(){return ft?pt:(ft=1,pt=Math.min)}function Be(){return yt?lt:(yt=1,lt=Math.pow)}function Fe(){return gt?dt:(gt=1,dt=Math.round)}function _e(){return bt?mt:(bt=1,mt=Number.isNaN||function(t){return t!=t})}function Re(){if(wt)return vt;wt=1;var t=_e();return vt=function(e){return t(e)||0===e?e:e<0?-1:1}}function Oe(){return Et?St:(Et=1,St=Object.getOwnPropertyDescriptor)}function Pe(){if(At)return Tt;At=1;var t=Oe();if(t)try{t([],"length")}catch(e){t=null}return Tt=t}function Ie(){if(Bt)return xt;Bt=1;var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}return xt=t}function ke(){if(Ot)return Rt;Ot=1;var t="undefined"!=typeof Symbol&&Symbol,e=_t?Ft:(_t=1,Ft=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0});return Rt=function(){return"function"==typeof t&&("function"==typeof Symbol&&("symbol"==typeof t("foo")&&("symbol"==typeof Symbol("bar")&&e())))}}function De(){return It?Pt:(It=1,Pt="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function qe(){return Dt?kt:(Dt=1,kt=de().getPrototypeOf||null)}function je(){if(jt)return qt;jt=1;var t=Object.prototype.toString,e=Math.max,r=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var o=0;o<e.length;o+=1)r[o+t.length]=e[o];return r};return qt=function(n){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,s=function(t,e){for(var r=[],n=e,o=0;n<t.length;n+=1,o+=1)r[o]=t[n];return r}(arguments,1),a=e(0,o.length-s.length),u=[],c=0;c<a;c++)u[c]="$"+c;if(i=Function("binder","return function ("+function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r}(u,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var t=o.apply(this,r(s,arguments));return Object(t)===t?t:this}return o.apply(n,r(s,arguments))}),o.prototype){var h=function(){};h.prototype=o.prototype,i.prototype=new h,h.prototype=null}return i},qt}function Ce(){if(Nt)return Ct;Nt=1;var t=je();return Ct=Function.prototype.bind||t}function Ne(){return Ut?Mt:(Ut=1,Mt=Function.prototype.call)}function Me(){return Vt?Lt:(Vt=1,Lt=Function.prototype.apply)}function Ue(){if(zt)return Kt;zt=1;var t=Ce(),e=Me(),r=Ne(),n=Wt?Ht:(Wt=1,Ht="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return Kt=n||t.call(r,e)}function Le(){if($t)return Gt;$t=1;var t=Ce(),e=fe(),r=Ne(),n=Ue();return Gt=function(o){if(o.length<1||"function"!=typeof o[0])throw new e("a function is required");return n(t,r,o)}}function Ve(){if(Zt)return Yt;Zt=1;var t,e=Le(),r=Pe();try{t=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var n=!!t&&r&&r(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return Yt=n&&"function"==typeof n.get?e([n.get]):"function"==typeof i&&function(t){return i(null==t?t:o(t))},Yt}function He(){if(Jt)return Xt;Jt=1;var t=De(),e=qe(),r=Ve();return Xt=t?function(e){return t(e)}:e?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return e(t)}:r?function(t){return r(t)}:null}function We(){if(te)return Qt;te=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=Ce();return Qt=r.call(t,e)}function Ke(){if(re)return ee;var t;re=1;var e=de(),r=ge(),n=me(),o=be(),i=ve(),s=we(),a=fe(),u=Se(),c=Ee(),h=Te(),p=Ae(),f=xe(),l=Be(),y=Fe(),d=Re(),g=Function,m=function(t){try{return g('"use strict"; return ('+t+").constructor;")()}catch(t){}},b=Pe(),v=Ie(),w=function(){throw new a},S=b?function(){try{return w}catch(t){try{return b(arguments,"callee").get}catch(t){return w}}}():w,E=ke()(),T=He(),A=qe(),x=De(),B=Me(),F=Ne(),_={},R="undefined"!=typeof Uint8Array&&T?T(Uint8Array):t,O={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?t:ArrayBuffer,"%ArrayIteratorPrototype%":E&&T?T([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":_,"%AsyncGenerator%":_,"%AsyncGeneratorFunction%":_,"%AsyncIteratorPrototype%":_,"%Atomics%":"undefined"==typeof Atomics?t:Atomics,"%BigInt%":"undefined"==typeof BigInt?t:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?t:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":"undefined"==typeof Float16Array?t:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?t:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?t:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?t:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":_,"%Int8Array%":"undefined"==typeof Int8Array?t:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?t:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&T?T(T([][Symbol.iterator]())):t,"%JSON%":"object"==typeof JSON?JSON:t,"%Map%":"undefined"==typeof Map?t:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&E&&T?T((new Map)[Symbol.iterator]()):t,"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?t:Promise,"%Proxy%":"undefined"==typeof Proxy?t:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":"undefined"==typeof Reflect?t:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?t:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&E&&T?T((new Set)[Symbol.iterator]()):t,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&T?T(""[Symbol.iterator]()):t,"%Symbol%":E?Symbol:t,"%SyntaxError%":s,"%ThrowTypeError%":S,"%TypedArray%":R,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?t:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?t:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?t:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?t:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?t:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?t:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?t:WeakSet,"%Function.prototype.call%":F,"%Function.prototype.apply%":B,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":A,"%Math.abs%":c,"%Math.floor%":h,"%Math.max%":p,"%Math.min%":f,"%Math.pow%":l,"%Math.round%":y,"%Math.sign%":d,"%Reflect.getPrototypeOf%":x};if(T)try{null.error}catch(t){var P=T(T(t));O["%Error.prototype%"]=P}var I=function t(e){var r;if("%AsyncFunction%"===e)r=m("async function () {}");else if("%GeneratorFunction%"===e)r=m("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=m("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&T&&(r=T(o.prototype))}return O[e]=r,r},k={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},D=Ce(),q=We(),j=D.call(F,Array.prototype.concat),C=D.call(B,Array.prototype.splice),N=D.call(F,String.prototype.replace),M=D.call(F,String.prototype.slice),U=D.call(F,RegExp.prototype.exec),L=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,V=/\\(\\)?/g,H=function(t,e){var r,n=t;if(q(k,n)&&(n="%"+(r=k[n])[0]+"%"),q(O,n)){var o=O[n];if(o===_&&(o=I(n)),void 0===o&&!e)throw new a("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new s("intrinsic "+t+" does not exist!")};return ee=function(t,e){if("string"!=typeof t||0===t.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===U(/^%?[^%]*%?$/,t))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=M(t,0,1),r=M(t,-1);if("%"===e&&"%"!==r)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new s("invalid intrinsic syntax, expected opening `%`");var n=[];return N(t,L,function(t,e,r,o){n[n.length]=r?N(o,V,"$1"):e||t}),n}(t),n=r.length>0?r[0]:"",o=H("%"+n+"%",e),i=o.name,u=o.value,c=!1,h=o.alias;h&&(n=h[0],C(r,j([0,1],h)));for(var p=1,f=!0;p<r.length;p+=1){var l=r[p],y=M(l,0,1),d=M(l,-1);if(('"'===y||"'"===y||"`"===y||'"'===d||"'"===d||"`"===d)&&y!==d)throw new s("property names with quotes must have matching quotes");if("constructor"!==l&&f||(c=!0),q(O,i="%"+(n+="."+l)+"%"))u=O[i];else if(null!=u){if(!(l in u)){if(!e)throw new a("base intrinsic for "+t+" exists, but the property is not available.");return}if(b&&p+1>=r.length){var g=b(u,l);u=(f=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:u[l]}else f=q(u,l),u=u[l];f&&!c&&(O[i]=u)}}return u},ee}function ze(){if(oe)return ne;oe=1;var t=Ke(),e=Le(),r=e([t("%String.prototype.indexOf%")]);return ne=function(n,o){var i=t(n,!!o);return"function"==typeof i&&r(n,".prototype.")>-1?e([i]):i}}function Ge(){if(se)return ie;se=1;var t=Ke(),e=ze(),r=le(),n=fe(),o=t("%Map%",!0),i=e("Map.prototype.get",!0),s=e("Map.prototype.set",!0),a=e("Map.prototype.has",!0),u=e("Map.prototype.delete",!0),c=e("Map.prototype.size",!0);return ie=!!o&&function(){var t,e={assert:function(t){if(!e.has(t))throw new n("Side channel does not contain "+r(t))},delete:function(e){if(t){var r=u(t,e);return 0===c(t)&&(t=void 0),r}return!1},get:function(e){if(t)return i(t,e)},has:function(e){return!!t&&a(t,e)},set:function(e,r){t||(t=new o),s(t,e,r)}};return e},ie}function $e(){if(he)return ce;he=1;var t=fe(),e=le(),r=ye(),n=Ge(),o=function(){if(ue)return ae;ue=1;var t=Ke(),e=ze(),r=le(),n=Ge(),o=fe(),i=t("%WeakMap%",!0),s=e("WeakMap.prototype.get",!0),a=e("WeakMap.prototype.set",!0),u=e("WeakMap.prototype.has",!0),c=e("WeakMap.prototype.delete",!0);return ae=i?function(){var t,e,h={assert:function(t){if(!h.has(t))throw new o("Side channel does not contain "+r(t))},delete:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(t)return c(t,r)}else if(n&&e)return e.delete(r);return!1},get:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&t?s(t,r):e&&e.get(r)},has:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&t?u(t,r):!!e&&e.has(r)},set:function(r,o){i&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new i),a(t,r,o)):n&&(e||(e=n()),e.set(r,o))}};return h}:n,ae}(),i=o||n||r;return ce=function(){var r,n={assert:function(r){if(!n.has(r))throw new t("Side channel does not contain "+e(r))},delete:function(t){return!!r&&r.delete(t)},get:function(t){return r&&r.get(t)},has:function(t){return!!r&&r.has(t)},set:function(t,e){r||(r=i()),r.set(t,e)}};return n},ce}const Ye=Object.create(null);Ye.open="0",Ye.close="1",Ye.ping="2",Ye.pong="3",Ye.message="4",Ye.upgrade="5",Ye.noop="6";const Ze=Object.create(null);Object.keys(Ye).forEach(t=>{Ze[Ye[t]]=t});const Xe={type:"error",data:"parser error"},Je="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),Qe="function"==typeof ArrayBuffer,tr=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,er=({type:t,data:e},r,n)=>Je&&e instanceof Blob?r?n(e):rr(e,n):Qe&&(e instanceof ArrayBuffer||tr(e))?r?n(e):rr(new Blob([e]),n):n(Ye[t]+(e||"")),rr=(t,e)=>{const r=new FileReader;return r.onload=function(){const t=r.result.split(",")[1];e("b"+(t||""))},r.readAsDataURL(t)};function nr(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let or;const ir="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sr="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)sr[ir.charCodeAt(t)]=t;const ar="function"==typeof ArrayBuffer,ur=(t,e)=>{if("string"!=typeof t)return{type:"message",data:hr(t,e)};const r=t.charAt(0);if("b"===r)return{type:"message",data:cr(t.substring(1),e)};return Ze[r]?t.length>1?{type:Ze[r],data:t.substring(1)}:{type:Ze[r]}:Xe},cr=(t,e)=>{if(ar){const r=(t=>{let e,r,n,o,i,s=.75*t.length,a=t.length,u=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);const c=new ArrayBuffer(s),h=new Uint8Array(c);for(e=0;e<a;e+=4)r=sr[t.charCodeAt(e)],n=sr[t.charCodeAt(e+1)],o=sr[t.charCodeAt(e+2)],i=sr[t.charCodeAt(e+3)],h[u++]=r<<2|n>>4,h[u++]=(15&n)<<4|o>>2,h[u++]=(3&o)<<6|63&i;return c})(t);return hr(r,e)}return{base64:!0,data:t}},hr=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,pr=String.fromCharCode(30);function fr(){return new TransformStream({transform(t,e){!function(t,e){Je&&t.data instanceof Blob?t.data.arrayBuffer().then(nr).then(e):Qe&&(t.data instanceof ArrayBuffer||tr(t.data))?e(nr(t.data)):er(t,!1,t=>{or||(or=new TextEncoder),e(or.encode(t))})}(t,r=>{const n=r.length;let o;if(n<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,n);else if(n<65536){o=new Uint8Array(3);const t=new DataView(o.buffer);t.setUint8(0,126),t.setUint16(1,n)}else{o=new Uint8Array(9);const t=new DataView(o.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(n))}t.data&&"string"!=typeof t.data&&(o[0]|=128),e.enqueue(o),e.enqueue(r)})}})}let lr;function yr(t){return t.reduce((t,e)=>t+e.length,0)}function dr(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let o=0;o<e;o++)r[o]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}var gr,mr={};var br=function(){if(gr)return mr;function t(e){if(e)return function(e){for(var r in t.prototype)e[r]=t.prototype[r];return e}(e)}return gr=1,mr.Emitter=t,t.prototype.on=t.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},t.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<n.length;o++)if((r=n[o])===e||r.fn===e){n.splice(o,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},t.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){n=0;for(var o=(r=r.slice(0)).length;n<o;++n)r[n].apply(this,e)}return this},t.prototype.emitReserved=t.prototype.emit,t.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},t.prototype.hasListeners=function(t){return!!this.listeners(t).length},mr}();const vr="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),wr="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function Sr(t,...e){return e.reduce((e,r)=>(t.hasOwnProperty(r)&&(e[r]=t[r]),e),{})}const Er=wr.setTimeout,Tr=wr.clearTimeout;function Ar(t,e){e.useNativeTimers?(t.setTimeoutFn=Er.bind(wr),t.clearTimeoutFn=Tr.bind(wr)):(t.setTimeoutFn=wr.setTimeout.bind(wr),t.clearTimeoutFn=wr.clearTimeout.bind(wr))}function xr(t){return"string"==typeof t?function(t){let e=0,r=0;for(let n=0,o=t.length;n<o;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}(t):Math.ceil(1.33*(t.byteLength||t.size))}function Br(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class Fr extends Error{constructor(t,e,r){super(t),this.description=e,this.context=r,this.type="TransportError"}}class _r extends br.Emitter{constructor(t){super(),this.writable=!1,Ar(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,e,r){return super.emitReserved("error",new Fr(t,e,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=ur(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){const e=function(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}(t);return e.length?"?"+e:""}}class Rr extends _r{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let t=0;this._polling&&(t++,this.once("pollComplete",function(){--t||e()})),this.writable||(t++,this.once("drain",function(){--t||e()}))}else e()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){((t,e)=>{const r=t.split(pr),n=[];for(let t=0;t<r.length;t++){const o=ur(r[t],e);if(n.push(o),"error"===o.type)break}return n})(t,this.socket.binaryType).forEach(t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,((t,e)=>{const r=t.length,n=new Array(r);let o=0;t.forEach((t,i)=>{er(t,!1,t=>{n[i]=t,++o===r&&e(n.join(pr))})})})(t,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=Br()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}}let Or=!1;try{Or="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}const Pr=Or;function Ir(){}class kr extends Rr{constructor(t){if(super(t),"undefined"!=typeof location){const e="https:"===location.protocol;let r=location.port;r||(r=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,e){const r=this.request({method:"POST",data:t});r.on("success",e),r.on("error",(t,e)=>{this.onError("xhr post error",t,e)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t,e)=>{this.onError("xhr poll error",t,e)}),this.pollXhr=t}}class Dr extends br.Emitter{constructor(t,e,r){super(),this.createRequest=t,Ar(this,r),this._opts=r,this._method=r.method||"GET",this._uri=e,this._data=void 0!==r.data?r.data:null,this._create()}_create(){var t;const e=Sr(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(e);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let t in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(t)&&r.setRequestHeader(t,this._opts.extraHeaders[t])}}catch(t){}if("POST"===this._method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{r.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this._opts.cookieJar)||void 0===t||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var t;3===r.readyState&&(null===(t=this._opts.cookieJar)||void 0===t||t.parseCookies(r.getResponseHeader("set-cookie"))),4===r.readyState&&(200===r.status||1223===r.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof r.status?r.status:0)},0))},r.send(this._data)}catch(t){return void this.setTimeoutFn(()=>{this._onError(t)},0)}"undefined"!=typeof document&&(this._index=Dr.requestsCount++,Dr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=Ir,t)try{this._xhr.abort()}catch(t){}"undefined"!=typeof document&&delete Dr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(Dr.requestsCount=0,Dr.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",qr);else if("function"==typeof addEventListener){addEventListener("onpagehide"in wr?"pagehide":"unload",qr,!1)}function qr(){for(let t in Dr.requests)Dr.requests.hasOwnProperty(t)&&Dr.requests[t].abort()}const jr=function(){const t=Cr({xdomain:!1});return t&&null!==t.responseType}();function Cr(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||Pr))return new XMLHttpRequest}catch(t){}if(!e)try{return new(wr[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}const Nr="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class Mr extends _r{get name(){return"websocket"}doOpen(){const t=this.uri(),e=this.opts.protocols,r=Nr?{}:Sr(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,e,r)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const r=t[e],n=e===t.length-1;er(r,this.supportsBinary,t=>{try{this.doWrite(r,t)}catch(t){}n&&vr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=Br()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}}const Ur=wr.WebSocket||wr.MozWebSocket;const Lr={websocket:class extends Mr{createSocket(t,e,r){return Nr?new Ur(t,e,r):e?new Ur(t,e):new Ur(t)}doWrite(t,e){this.ws.send(e)}},webtransport:class extends _r{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const e=function(t,e){lr||(lr=new TextDecoder);const r=[];let n=0,o=-1,i=!1;return new TransformStream({transform(s,a){for(r.push(s);;){if(0===n){if(yr(r)<1)break;const t=dr(r,1);i=!(128&~t[0]),o=127&t[0],n=o<126?3:126===o?1:2}else if(1===n){if(yr(r)<2)break;const t=dr(r,2);o=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),n=3}else if(2===n){if(yr(r)<8)break;const t=dr(r,8),e=new DataView(t.buffer,t.byteOffset,t.length),i=e.getUint32(0);if(i>Math.pow(2,21)-1){a.enqueue(Xe);break}o=i*Math.pow(2,32)+e.getUint32(4),n=3}else{if(yr(r)<o)break;const t=dr(r,o);a.enqueue(ur(i?t:lr.decode(t),e)),n=0}if(0===o||o>t){a.enqueue(Xe);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(e).getReader(),n=fr();n.readable.pipeTo(t.writable),this._writer=n.writable.getWriter();const o=()=>{r.read().then(({done:t,value:e})=>{t||(this.onPacket(e),o())}).catch(t=>{})};o();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const r=t[e],n=e===t.length-1;this._writer.write(r).then(()=>{n&&vr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;null===(t=this._transport)||void 0===t||t.close()}},polling:class extends kr{constructor(t){super(t);const e=t&&t.forceBase64;this.supportsBinary=jr&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Dr(Cr,this.uri(),t)}}},Vr=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Hr=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Wr(t){if(t.length>8e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");-1!=r&&-1!=n&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let o=Vr.exec(t||""),i={},s=14;for(;s--;)i[Hr[s]]=o[s]||"";return-1!=r&&-1!=n&&(i.source=e,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=function(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");"/"!=e.slice(0,1)&&0!==e.length||n.splice(0,1);"/"==e.slice(-1)&&n.splice(n.length-1,1);return n}(0,i.path),i.queryKey=function(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,e,n){e&&(r[e]=n)}),r}(0,i.query),i}const Kr="function"==typeof addEventListener&&"function"==typeof removeEventListener,zr=[];Kr&&addEventListener("offline",()=>{zr.forEach(t=>t())},!1);class Gr extends br.Emitter{constructor(t,e){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&"object"==typeof t&&(e=t,t=null),t){const r=Wr(t);e.hostname=r.host,e.secure="https"===r.protocol||"wss"===r.protocol,e.port=r.port,r.query&&(e.query=r.query)}else e.host&&(e.hostname=Wr(e.host).host);Ar(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},e.transports.forEach(t=>{const e=t.prototype.name;this.transports.push(e),this._transportsByName[e]=t}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},r=t.split("&");for(let t=0,n=r.length;t<n;t++){let n=r[t].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}(this.opts.query)),Kr&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},zr.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);const r=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);const t=this.opts.rememberUpgrade&&Gr.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const e=this.createTransport(t);e.open(),this.setTransport(e)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",Gr.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const e=new Error("server error");e.code=t.data,this._onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){const r=this.writeBuffer[e].data;if(r&&(t+=xr(r)),e>0&&t>this._maxPayload)return this.writeBuffer.slice(0,e);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,vr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,e,r){return this._sendPacket("message",t,e,r),this}send(t,e,r){return this._sendPacket("message",t,e,r),this}_sendPacket(t,e,r,n){if("function"==typeof e&&(n=e,e=void 0),"function"==typeof r&&(n=r,r=null),"closing"===this.readyState||"closed"===this.readyState)return;(r=r||{}).compress=!1!==r.compress;const o={type:t,data:e,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},r=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Gr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Kr&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const t=zr.indexOf(this._offlineEventListener);-1!==t&&zr.splice(t,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this._prevBufferLen=0}}}Gr.protocol=4;class $r extends Gr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let e=this.createTransport(t),r=!1;Gr.priorWebsocketSuccess=!1;const n=()=>{r||(e.send([{type:"ping",data:"probe"}]),e.once("packet",t=>{if(!r)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;Gr.priorWebsocketSuccess="websocket"===e.name,this.transport.pause(()=>{r||"closed"!==this.readyState&&(c(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const t=new Error("probe error");t.transport=e.name,this.emitReserved("upgradeError",t)}}))};function o(){r||(r=!0,c(),e.close(),e=null)}const i=t=>{const r=new Error("probe error: "+t);r.transport=e.name,o(),this.emitReserved("upgradeError",r)};function s(){i("transport closed")}function a(){i("socket closed")}function u(t){e&&t.name!==e.name&&o()}const c=()=>{e.removeListener("open",n),e.removeListener("error",i),e.removeListener("close",s),this.off("close",a),this.off("upgrading",u)};e.once("open",n),e.once("error",i),e.once("close",s),this.once("close",a),this.once("upgrading",u),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn(()=>{r||e.open()},200):e.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const e=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&e.push(t[r]);return e}}class Yr extends $r{constructor(t,e={}){const r="object"==typeof t?t:e;(!r.transports||r.transports&&"string"==typeof r.transports[0])&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(t=>Lr[t]).filter(t=>!!t)),super(t,r)}}const Zr="function"==typeof ArrayBuffer,Xr=Object.prototype.toString,Jr="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Xr.call(Blob),Qr="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===Xr.call(File);function tn(t){return Zr&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||Jr&&t instanceof Blob||Qr&&t instanceof File}function en(t,e){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let e=0,r=t.length;e<r;e++)if(en(t[e]))return!0;return!1}if(tn(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return en(t.toJSON(),!0);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&en(t[e]))return!0;return!1}function rn(t){const e=[],r=t.data,n=t;return n.data=nn(r,e),n.attachments=e.length,{packet:n,buffers:e}}function nn(t,e){if(!t)return t;if(tn(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=nn(t[n],e);return r}if("object"==typeof t&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=nn(t[n],e));return r}return t}function on(t,e){return t.data=sn(t.data,e),delete t.attachments,t}function sn(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=sn(t[r],e);else if("object"==typeof t)for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=sn(t[r],e));return t}const an=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var un;!function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"}(un||(un={}));class cn extends br.Emitter{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},"function"==typeof t?{reviver:t}:t)}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const r=e.type===un.BINARY_EVENT;r||e.type===un.BINARY_ACK?(e.type=r?un.EVENT:un.ACK,this.reconstructor=new hn(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!tn(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const r={type:Number(t.charAt(0))};if(void 0===un[r.type])throw new Error("unknown packet type "+r.type);if(r.type===un.BINARY_EVENT||r.type===un.BINARY_ACK){const n=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const o=t.substring(n,e);if(o!=Number(o)||"-"!==t.charAt(e))throw new Error("Illegal attachments");const i=Number(o);if(!pn(i)||i<0)throw new Error("Illegal attachments");if(i>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=i}if("/"===t.charAt(e+1)){const n=e+1;for(;++e;){if(","===t.charAt(e))break;if(e===t.length)break}r.nsp=t.substring(n,e)}else r.nsp="/";const n=t.charAt(e+1);if(""!==n&&Number(n)==n){const n=e+1;for(;++e;){const r=t.charAt(e);if(null==r||Number(r)!=r){--e;break}if(e===t.length)break}r.id=Number(t.substring(n,e+1))}if(t.charAt(++e)){const n=this.tryParse(t.substr(e));if(!cn.isPayloadValid(r.type,n))throw new Error("invalid payload");r.data=n}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case un.CONNECT:return fn(e);case un.DISCONNECT:return void 0===e;case un.CONNECT_ERROR:return"string"==typeof e||fn(e);case un.EVENT:case un.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===an.indexOf(e[0]));case un.ACK:case un.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class hn{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=on(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const pn=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};function fn(t){return"[object Object]"===Object.prototype.toString.call(t)}var ln=Object.freeze({__proto__:null,Decoder:cn,Encoder:class{constructor(t){this.replacer=t}encode(t){return t.type!==un.EVENT&&t.type!==un.ACK||!en(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===un.EVENT?un.BINARY_EVENT:un.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==un.BINARY_EVENT&&t.type!==un.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=rn(t),r=this.encodeAsString(e.packet),n=e.buffers;return n.unshift(r),n}},get PacketType(){return un}});export{un as P,Yr as S,i as _,ln as a,o as b,br as c,s as d,a as e,u as f,c as g,Ar as i,vr as n,Wr as p,$e as r,pe as s};
@@ -0,0 +1 @@
1
+ "use strict";var t=require("./vendor-crypto-js-CHx7Nkas.js");exports.__assign=function(){return exports.__assign=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},exports.__assign.apply(this,arguments)},"function"==typeof SuppressedError&&SuppressedError;var e,r,n,o,i,s={exports:{}},a=s.exports;function u(){return e||(e=1,t=s,function(){var e;function r(t,e,r){null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}function n(){return new r(null)}var o="undefined"!=typeof navigator;o&&"Microsoft Internet Explorer"==navigator.appName?(r.prototype.am=function(t,e,r,n,o,i){for(var s=32767&e,a=e>>15;--i>=0;){var u=32767&this[t],c=this[t++]>>15,h=a*u+c*s;o=((u=s*u+((32767&h)<<15)+r[n]+(1073741823&o))>>>30)+(h>>>15)+a*c+(o>>>30),r[n++]=1073741823&u}return o},e=30):o&&"Netscape"!=navigator.appName?(r.prototype.am=function(t,e,r,n,o,i){for(;--i>=0;){var s=e*this[t++]+r[n]+o;o=Math.floor(s/67108864),r[n++]=67108863&s}return o},e=26):(r.prototype.am=function(t,e,r,n,o,i){for(var s=16383&e,a=e>>14;--i>=0;){var u=16383&this[t],c=this[t++]>>14,h=a*u+c*s;o=((u=s*u+((16383&h)<<14)+r[n]+o)>>28)+(h>>14)+a*c,r[n++]=268435455&u}return o},e=28),r.prototype.DB=e,r.prototype.DM=(1<<e)-1,r.prototype.DV=1<<e,r.prototype.FV=Math.pow(2,52),r.prototype.F1=52-e,r.prototype.F2=2*e-52;var i,s,a=new Array;for(i="0".charCodeAt(0),s=0;s<=9;++s)a[i++]=s;for(i="a".charCodeAt(0),s=10;s<36;++s)a[i++]=s;for(i="A".charCodeAt(0),s=10;s<36;++s)a[i++]=s;function u(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function c(t,e){var r=a[t.charCodeAt(e)];return null==r?-1:r}function h(t){var e=n();return e.fromInt(t),e}function p(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function f(t){this.m=t}function l(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function y(t,e){return t&e}function d(t,e){return t|e}function g(t,e){return t^e}function m(t,e){return t&~e}function b(t){if(0==t)return-1;var e=0;return 65535&t||(t>>=16,e+=16),255&t||(t>>=8,e+=8),15&t||(t>>=4,e+=4),3&t||(t>>=2,e+=2),1&t||++e,e}function v(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function w(){}function T(t){return t}function S(t){this.r2=n(),this.q3=n(),r.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}f.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},f.prototype.revert=function(t){return t},f.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},f.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},f.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},l.prototype.convert=function(t){var e=n();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(r.ZERO)>0&&this.m.subTo(e,e),e},l.prototype.revert=function(t){var e=n();return t.copyTo(e),this.reduce(e),e},l.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t[e],n=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},l.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},l.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},r.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},r.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},r.prototype.fromString=function(t,e){var n;if(16==e)n=4;else if(8==e)n=3;else if(256==e)n=8;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)return void this.fromRadix(t,e);n=2}this.t=0,this.s=0;for(var o=t.length,i=!1,s=0;--o>=0;){var a=8==n?255&t[o]:c(t,o);a<0?"-"==t.charAt(o)&&(i=!0):(i=!1,0==s?this[this.t++]=a:s+n>this.DB?(this[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this[this.t++]=a>>this.DB-s):this[this.t-1]|=a<<s,(s+=n)>=this.DB&&(s-=this.DB))}8==n&&128&t[0]&&(this.s=-1,s>0&&(this[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),i&&r.ZERO.subTo(this,this)},r.prototype.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},r.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},r.prototype.drShiftTo=function(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s},r.prototype.lShiftTo=function(t,e){var r,n=t%this.DB,o=this.DB-n,i=(1<<o)-1,s=Math.floor(t/this.DB),a=this.s<<n&this.DM;for(r=this.t-1;r>=0;--r)e[r+s+1]=this[r]>>o|a,a=(this[r]&i)<<n;for(r=s-1;r>=0;--r)e[r]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},r.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var n=t%this.DB,o=this.DB-n,i=(1<<n)-1;e[0]=this[r]>>n;for(var s=r+1;s<this.t;++s)e[s-r-1]|=(this[s]&i)<<o,e[s-r]=this[s]>>n;n>0&&(e[this.t-r-1]|=(this.s&i)<<o),e.t=this.t-r,e.clamp()}},r.prototype.subTo=function(t,e){for(var r=0,n=0,o=Math.min(t.t,this.t);r<o;)n+=this[r]-t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n-=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n-=t[r],e[r++]=n&this.DM,n>>=this.DB;n-=t.s}e.s=n<0?-1:0,n<-1?e[r++]=this.DV+n:n>0&&(e[r++]=n),e.t=r,e.clamp()},r.prototype.multiplyTo=function(t,e){var n=this.abs(),o=t.abs(),i=n.t;for(e.t=i+o.t;--i>=0;)e[i]=0;for(i=0;i<o.t;++i)e[i+n.t]=n.am(0,o[i],e,i,0,n.t);e.s=0,e.clamp(),this.s!=t.s&&r.ZERO.subTo(e,e)},r.prototype.squareTo=function(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var n=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,n,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},r.prototype.divRemTo=function(t,e,o){var i=t.abs();if(!(i.t<=0)){var s=this.abs();if(s.t<i.t)return null!=e&&e.fromInt(0),void(null!=o&&this.copyTo(o));null==o&&(o=n());var a=n(),u=this.s,c=t.s,h=this.DB-p(i[i.t-1]);h>0?(i.lShiftTo(h,a),s.lShiftTo(h,o)):(i.copyTo(a),s.copyTo(o));var f=a.t,l=a[f-1];if(0!=l){var y=l*(1<<this.F1)+(f>1?a[f-2]>>this.F2:0),d=this.FV/y,g=(1<<this.F1)/y,m=1<<this.F2,b=o.t,v=b-f,w=null==e?n():e;for(a.dlShiftTo(v,w),o.compareTo(w)>=0&&(o[o.t++]=1,o.subTo(w,o)),r.ONE.dlShiftTo(f,w),w.subTo(a,a);a.t<f;)a[a.t++]=0;for(;--v>=0;){var T=o[--b]==l?this.DM:Math.floor(o[b]*d+(o[b-1]+m)*g);if((o[b]+=a.am(0,T,o,v,0,f))<T)for(a.dlShiftTo(v,w),o.subTo(w,o);o[b]<--T;)o.subTo(w,o)}null!=e&&(o.drShiftTo(f,e),u!=c&&r.ZERO.subTo(e,e)),o.t=f,o.clamp(),h>0&&o.rShiftTo(h,o),u<0&&r.ZERO.subTo(o,o)}}},r.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(!(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},r.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},r.prototype.exp=function(t,e){if(t>4294967295||t<1)return r.ONE;var o=n(),i=n(),s=e.convert(this),a=p(t)-1;for(s.copyTo(o);--a>=0;)if(e.sqrTo(o,i),(t&1<<a)>0)e.mulTo(i,s,o);else{var u=o;o=i,i=u}return e.revert(o)},r.prototype.toString=function(t){if(this.s<0)return"-"+this.negate().toString(t);var e;if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return this.toRadix(t);e=2}var r,n=(1<<e)-1,o=!1,i="",s=this.t,a=this.DB-s*this.DB%e;if(s-- >0)for(a<this.DB&&(r=this[s]>>a)>0&&(o=!0,i=u(r));s>=0;)a<e?(r=(this[s]&(1<<a)-1)<<e-a,r|=this[--s]>>(a+=this.DB-e)):(r=this[s]>>(a-=e)&n,a<=0&&(a+=this.DB,--s)),r>0&&(o=!0),o&&(i+=u(r));return o?i:"0"},r.prototype.negate=function(){var t=n();return r.ZERO.subTo(this,t),t},r.prototype.abs=function(){return this.s<0?this.negate():this},r.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},r.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+p(this[this.t-1]^this.s&this.DM)},r.prototype.mod=function(t){var e=n();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(r.ZERO)>0&&t.subTo(e,e),e},r.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new f(e):new l(e),this.exp(t,r)},r.ZERO=h(0),r.ONE=h(1),w.prototype.convert=T,w.prototype.revert=T,w.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},w.prototype.sqrTo=function(t,e){t.squareTo(e)},S.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=n();return t.copyTo(e),this.reduce(e),e},S.prototype.revert=function(t){return t},S.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},S.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},S.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var E,A,x,F=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],B=(1<<26)/F[F.length-1];function _(){var t;t=(new Date).getTime(),A[x++]^=255&t,A[x++]^=t>>8&255,A[x++]^=t>>16&255,A[x++]^=t>>24&255,x>=q&&(x-=q)}if(r.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},r.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),o=h(r),i=n(),s=n(),a="";for(this.divRemTo(o,i,s);i.signum()>0;)a=(r+s.intValue()).toString(t).substr(1)+a,i.divRemTo(o,i,s);return s.intValue().toString(t)+a},r.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var n=this.chunkSize(e),o=Math.pow(e,n),i=!1,s=0,a=0,u=0;u<t.length;++u){var h=c(t,u);h<0?"-"==t.charAt(u)&&0==this.signum()&&(i=!0):(a=e*a+h,++s>=n&&(this.dMultiply(o),this.dAddOffset(a,0),s=0,a=0))}s>0&&(this.dMultiply(Math.pow(e,s)),this.dAddOffset(a,0)),i&&r.ZERO.subTo(this,this)},r.prototype.fromNumber=function(t,e,n){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(r.ONE.shiftLeft(t-1),d,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(r.ONE.shiftLeft(t-1),this);else{var o=new Array,i=7&t;o.length=1+(t>>3),e.nextBytes(o),i>0?o[0]&=(1<<i)-1:o[0]=0,this.fromString(o,256)}},r.prototype.bitwiseTo=function(t,e,r){var n,o,i=Math.min(t.t,this.t);for(n=0;n<i;++n)r[n]=e(this[n],t[n]);if(t.t<this.t){for(o=t.s&this.DM,n=i;n<this.t;++n)r[n]=e(this[n],o);r.t=this.t}else{for(o=this.s&this.DM,n=i;n<t.t;++n)r[n]=e(o,t[n]);r.t=t.t}r.s=e(this.s,t.s),r.clamp()},r.prototype.changeBit=function(t,e){var n=r.ONE.shiftLeft(t);return this.bitwiseTo(n,e,n),n},r.prototype.addTo=function(t,e){for(var r=0,n=0,o=Math.min(t.t,this.t);r<o;)n+=this[r]+t[r],e[r++]=n&this.DM,n>>=this.DB;if(t.t<this.t){for(n+=t.s;r<this.t;)n+=this[r],e[r++]=n&this.DM,n>>=this.DB;n+=this.s}else{for(n+=this.s;r<t.t;)n+=t[r],e[r++]=n&this.DM,n>>=this.DB;n+=t.s}e.s=n<0?-1:0,n>0?e[r++]=n:n<-1&&(e[r++]=this.DV+n),e.t=r,e.clamp()},r.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},r.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},r.prototype.multiplyLowerTo=function(t,e,r){var n,o=Math.min(this.t+t.t,e);for(r.s=0,r.t=o;o>0;)r[--o]=0;for(n=r.t-this.t;o<n;++o)r[o+this.t]=this.am(0,t[o],r,o,0,this.t);for(n=Math.min(t.t,e);o<n;++o)this.am(0,t[o],r,o,0,e-o);r.clamp()},r.prototype.multiplyUpperTo=function(t,e,r){--e;var n=r.t=this.t+t.t-e;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(e-this.t,0);n<t.t;++n)r[this.t+n-e]=this.am(e-n,t[n],r,0,0,this.t+n-e);r.clamp(),r.drShiftTo(1,r)},r.prototype.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this[n])%t;return r},r.prototype.millerRabin=function(t){var e=this.subtract(r.ONE),o=e.getLowestSetBit();if(o<=0)return!1;var i=e.shiftRight(o);(t=t+1>>1)>F.length&&(t=F.length);for(var s=n(),a=0;a<t;++a){s.fromInt(F[Math.floor(Math.random()*F.length)]);var u=s.modPow(i,this);if(0!=u.compareTo(r.ONE)&&0!=u.compareTo(e)){for(var c=1;c++<o&&0!=u.compareTo(e);)if(0==(u=u.modPowInt(2,this)).compareTo(r.ONE))return!1;if(0!=u.compareTo(e))return!1}}return!0},r.prototype.clone=function(){var t=n();return this.copyTo(t),t},r.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},r.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},r.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},r.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},r.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,n=this.DB-t*this.DB%8,o=0;if(t-- >0)for(n<this.DB&&(r=this[t]>>n)!=(this.s&this.DM)>>n&&(e[o++]=r|this.s<<this.DB-n);t>=0;)n<8?(r=(this[t]&(1<<n)-1)<<8-n,r|=this[--t]>>(n+=this.DB-8)):(r=this[t]>>(n-=8)&255,n<=0&&(n+=this.DB,--t)),128&r&&(r|=-256),0==o&&(128&this.s)!=(128&r)&&++o,(o>0||r!=this.s)&&(e[o++]=r);return e},r.prototype.equals=function(t){return 0==this.compareTo(t)},r.prototype.min=function(t){return this.compareTo(t)<0?this:t},r.prototype.max=function(t){return this.compareTo(t)>0?this:t},r.prototype.and=function(t){var e=n();return this.bitwiseTo(t,y,e),e},r.prototype.or=function(t){var e=n();return this.bitwiseTo(t,d,e),e},r.prototype.xor=function(t){var e=n();return this.bitwiseTo(t,g,e),e},r.prototype.andNot=function(t){var e=n();return this.bitwiseTo(t,m,e),e},r.prototype.not=function(){for(var t=n(),e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},r.prototype.shiftLeft=function(t){var e=n();return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},r.prototype.shiftRight=function(t){var e=n();return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},r.prototype.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+b(this[t]);return this.s<0?this.t*this.DB:-1},r.prototype.bitCount=function(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=v(this[r]^e);return t},r.prototype.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:!!(this[e]&1<<t%this.DB)},r.prototype.setBit=function(t){return this.changeBit(t,d)},r.prototype.clearBit=function(t){return this.changeBit(t,m)},r.prototype.flipBit=function(t){return this.changeBit(t,g)},r.prototype.add=function(t){var e=n();return this.addTo(t,e),e},r.prototype.subtract=function(t){var e=n();return this.subTo(t,e),e},r.prototype.multiply=function(t){var e=n();return this.multiplyTo(t,e),e},r.prototype.divide=function(t){var e=n();return this.divRemTo(t,e,null),e},r.prototype.remainder=function(t){var e=n();return this.divRemTo(t,null,e),e},r.prototype.divideAndRemainder=function(t){var e=n(),r=n();return this.divRemTo(t,e,r),new Array(e,r)},r.prototype.modPow=function(t,e){var r,o,i=t.bitLength(),s=h(1);if(i<=0)return s;r=i<18?1:i<48?3:i<144?4:i<768?5:6,o=i<8?new f(e):e.isEven()?new S(e):new l(e);var a=new Array,u=3,c=r-1,y=(1<<r)-1;if(a[1]=o.convert(this),r>1){var d=n();for(o.sqrTo(a[1],d);u<=y;)a[u]=n(),o.mulTo(d,a[u-2],a[u]),u+=2}var g,m,b=t.t-1,v=!0,w=n();for(i=p(t[b])-1;b>=0;){for(i>=c?g=t[b]>>i-c&y:(g=(t[b]&(1<<i+1)-1)<<c-i,b>0&&(g|=t[b-1]>>this.DB+i-c)),u=r;!(1&g);)g>>=1,--u;if((i-=u)<0&&(i+=this.DB,--b),v)a[g].copyTo(s),v=!1;else{for(;u>1;)o.sqrTo(s,w),o.sqrTo(w,s),u-=2;u>0?o.sqrTo(s,w):(m=s,s=w,w=m),o.mulTo(w,a[g],s)}for(;b>=0&&!(t[b]&1<<i);)o.sqrTo(s,w),m=s,s=w,w=m,--i<0&&(i=this.DB-1,--b)}return o.revert(s)},r.prototype.modInverse=function(t){var e=t.isEven();if(this.isEven()&&e||0==t.signum())return r.ZERO;for(var n=t.clone(),o=this.clone(),i=h(1),s=h(0),a=h(0),u=h(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),e?(i.isEven()&&s.isEven()||(i.addTo(this,i),s.subTo(t,s)),i.rShiftTo(1,i)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;o.isEven();)o.rShiftTo(1,o),e?(a.isEven()&&u.isEven()||(a.addTo(this,a),u.subTo(t,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);n.compareTo(o)>=0?(n.subTo(o,n),e&&i.subTo(a,i),s.subTo(u,s)):(o.subTo(n,o),e&&a.subTo(i,a),u.subTo(s,u))}return 0!=o.compareTo(r.ONE)?r.ZERO:u.compareTo(t)>=0?u.subtract(t):u.signum()<0?(u.addTo(t,u),u.signum()<0?u.add(t):u):u},r.prototype.pow=function(t){return this.exp(t,new w)},r.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var o=e.getLowestSetBit(),i=r.getLowestSetBit();if(i<0)return e;for(o<i&&(i=o),i>0&&(e.rShiftTo(i,e),r.rShiftTo(i,r));e.signum()>0;)(o=e.getLowestSetBit())>0&&e.rShiftTo(o,e),(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return i>0&&r.lShiftTo(i,r),r},r.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=F[F.length-1]){for(e=0;e<F.length;++e)if(r[0]==F[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<F.length;){for(var n=F[e],o=e+1;o<F.length&&n<B;)n*=F[o++];for(n=r.modInt(n);e<o;)if(n%F[e++]==0)return!1}return r.millerRabin(t)},r.prototype.square=function(){var t=n();return this.squareTo(t),t},r.prototype.Barrett=S,null==A){var P;if(A=new Array,x=0,"undefined"!=typeof window&&window.crypto)if(window.crypto.getRandomValues){var R=new Uint8Array(32);for(window.crypto.getRandomValues(R),P=0;P<32;++P)A[x++]=R[P]}else if("Netscape"==navigator.appName&&navigator.appVersion<"5"){var O=window.crypto.random(32);for(P=0;P<O.length;++P)A[x++]=255&O.charCodeAt(P)}for(;x<q;)P=Math.floor(65536*Math.random()),A[x++]=P>>>8,A[x++]=255&P;x=0,_()}function k(){if(null==E){for(_(),(E=new D).init(A),x=0;x<A.length;++x)A[x]=0;x=0}return E.next()}function I(){}function D(){this.i=0,this.j=0,this.S=new Array}I.prototype.nextBytes=function(t){var e;for(e=0;e<t.length;++e)t[e]=k()},D.prototype.init=function(t){var e,r,n;for(e=0;e<256;++e)this.S[e]=e;for(r=0,e=0;e<256;++e)r=r+this.S[e]+t[e%t.length]&255,n=this.S[e],this.S[e]=this.S[r],this.S[r]=n;this.i=0,this.j=0},D.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]};var q=256;t.exports={default:r,BigInteger:r,SecureRandom:I}}.call(a)),s.exports;var t}function c(){if(n)return r;n=1;const{BigInteger:t}=u();class e{constructor(){this.tlv=null,this.t="00",this.l="00",this.v=""}getEncodedHex(){return this.tlv||(this.v=this.getValue(),this.l=this.getLength(),this.tlv=this.t+this.l+this.v),this.tlv}getLength(){const t=this.v.length/2;let e=t.toString(16);if(e.length%2==1&&(e="0"+e),t<128)return e;return(128+e.length/2).toString(16)+e}getValue(){return""}}class o extends e{constructor(e){super(),this.t="02",e&&(this.v=function(e){let r=e.toString(16);if("-"!==r[0])r.length%2==1?r="0"+r:r.match(/^[0-7]/)||(r="00"+r);else{r=r.substr(1);let n=r.length;n%2==1?n+=1:r.match(/^[0-7]/)||(n+=2);let o="";for(let t=0;t<n;t++)o+="f";o=new t(o,16),r=o.xor(e).add(t.ONE),r=r.toString(16).replace(/^-/,"")}return r}(e))}getValue(){return this.v}}class i extends e{constructor(t){super(),this.t="30",this.asn1Array=t}getValue(){return this.v=this.asn1Array.map(t=>t.getEncodedHex()).join(""),this.v}}function s(t,e){if(e+2>t.length)throw new Error("invalid DER: length field truncated");const r=parseInt(t.substring(e,e+2),16);if(r<128)return{len:r,lenOfL:1};const n=127&r;if(0===n)throw new Error("invalid DER: indefinite length not allowed");if(n>4)throw new Error("invalid DER: length too large");if(e+2+2*n>t.length)throw new Error("invalid DER: length field truncated");const o=t.substring(e+2,e+2+2*n),i=parseInt(o,16);if(i<128)throw new Error("invalid DER: length not minimally encoded (should use short form)");if("00"===o.substring(0,2))throw new Error("invalid DER: length has leading zero byte");return{len:i,lenOfL:1+n}}function a(t,e){if(e+2>t.length)throw new Error("invalid DER: tag field truncated");const r=t.substring(e,e+2),{len:n,lenOfL:o}=s(t,e+2),i=e+2+2*o,a=i+2*n;if(a>t.length)throw new Error("invalid DER: value truncated");return{tag:r,valueHex:t.substring(i,a),nextStart:a}}function c(t){if(0===t.length)throw new Error("invalid DER: INTEGER is empty");const e=parseInt(t.substring(0,2),16);if(128&e)throw new Error("invalid DER: INTEGER is negative");if(0===e){if(2===t.length)return;if(!(128&parseInt(t.substring(2,4),16)))throw new Error("invalid DER: INTEGER has non-minimal leading zero")}}return r={encodeDer(t,e){const r=new o(t),n=new o(e);return new i([r,n]).getEncodedHex()},decodeDer(e){if("string"!=typeof e||e.length%2!=0)throw new Error("invalid DER: input must be a hex string of even length");if("30"!==e.substring(0,2))throw new Error("invalid DER: expected SEQUENCE (0x30)");const r=s(e,2),n=2+2*r.lenOfL;if(n+2*r.len!==e.length)throw new Error("invalid DER: SEQUENCE length does not match input length");const o=a(e,n);if("02"!==o.tag)throw new Error("invalid DER: expected INTEGER (0x02) for R");c(o.valueHex);const i=a(e,o.nextStart);if("02"!==i.tag)throw new Error("invalid DER: expected INTEGER (0x02) for S");if(c(i.valueHex),i.nextStart!==e.length)throw new Error("invalid DER: trailing bytes inside SEQUENCE");return{r:new t(o.valueHex,16),s:new t(i.valueHex,16)}}}}var h,p,f,l,y,d,g,m,b,v,w,T,S,E={exports:{}};function A(){return h||(h=1,function(e){let r,n,o;class i{constructor(){this.i=0,this.j=0,this.S=[]}init(t){let e,r,n;for(e=0;e<256;++e)this.S[e]=e;for(r=0,e=0;e<256;++e)r=r+this.S[e]+t[e%t.length]&255,n=this.S[e],this.S[e]=this.S[r],this.S[r]=n;this.i=0,this.j=0}next(){this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255;const t=this.S[this.i];return this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]}}function s(){var t;t=(new Date).getTime(),n[o++]^=255&t,n[o++]^=t>>8&255,n[o++]^=t>>16&255,n[o++]^=t>>24&255,o>=256&&(o-=256)}if(null==n){let r;n=[],o=0;const i=new Uint8Array(32);if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues)for(window.crypto.getRandomValues(i),r=0;r<32;++r)n[o++]=i[r];else{const s="function"==typeof t.commonjsRequire?t.commonjsRequire.bind(e):null,a=s?s("crypto"):null;if(a)a.getRandomValues(i);else{if(!globalThis.crypto)throw new Error("当前环境不支持 crypto.getRandomValues!");globalThis.crypto.getRandomValues(i)}for(r=0;r<32;++r)n[o++]=i[r]}o=0,s()}function a(){if(null==r){for(s(),r=new i,r.init(n),o=0;o<n.length;++o)n[o]=0;o=0}return r.next()}e.exports={SecureRandom:class{nextBytes(t){for(let e=0;e<t.length;++e)t[e]=a()}}}}(E)),E.exports}function x(){if(f)return p;f=1;const{BigInteger:t}=u(),{ECCurveFp:e}=function(){if(i)return o;i=1;const{BigInteger:t}=u(),e=new t("2"),r=new t("3");class n{constructor(t,e){this.x=e,this.q=t}equals(t){return t===this||this.q.equals(t.q)&&this.x.equals(t.x)}toBigInteger(){return this.x}negate(){return new n(this.q,this.x.negate().mod(this.q))}add(t){return new n(this.q,this.x.add(t.toBigInteger()).mod(this.q))}subtract(t){return new n(this.q,this.x.subtract(t.toBigInteger()).mod(this.q))}multiply(t){return new n(this.q,this.x.multiply(t.toBigInteger()).mod(this.q))}divide(t){return new n(this.q,this.x.multiply(t.toBigInteger().modInverse(this.q)).mod(this.q))}square(){return new n(this.q,this.x.square().mod(this.q))}}class s{constructor(e,r,n,o){this.curve=e,this.x=r,this.y=n,this.z=null==o?t.ONE:o,this.zinv=null}getX(){return null===this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))}getY(){return null===this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))}equals(e){return e===this||(this.isInfinity()?e.isInfinity():e.isInfinity()?this.isInfinity():!!e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(t.ZERO)&&e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(t.ZERO))}isInfinity(){return null===this.x&&null===this.y||this.z.equals(t.ZERO)&&!this.y.toBigInteger().equals(t.ZERO)}negate(){return new s(this.curve,this.x,this.y.negate(),this.z)}add(e){if(this.isInfinity())return e;if(e.isInfinity())return this;const r=this.x.toBigInteger(),n=this.y.toBigInteger(),o=this.z,i=e.x.toBigInteger(),a=e.y.toBigInteger(),u=e.z,c=this.curve.q,h=r.multiply(u).mod(c),p=i.multiply(o).mod(c),f=h.subtract(p),l=n.multiply(u).mod(c),y=a.multiply(o).mod(c),d=l.subtract(y);if(t.ZERO.equals(f))return t.ZERO.equals(d)?this.twice():this.curve.infinity;const g=h.add(p),m=o.multiply(u).mod(c),b=f.square().mod(c),v=f.multiply(b).mod(c),w=m.multiply(d.square()).subtract(g.multiply(b)).mod(c),T=f.multiply(w).mod(c),S=d.multiply(b.multiply(h).subtract(w)).subtract(l.multiply(v)).mod(c),E=v.multiply(m).mod(c);return new s(this.curve,this.curve.fromBigInteger(T),this.curve.fromBigInteger(S),E)}twice(){if(this.isInfinity())return this;if(!this.y.toBigInteger().signum())return this.curve.infinity;const t=this.x.toBigInteger(),e=this.y.toBigInteger(),n=this.z,o=this.curve.q,i=this.curve.a.toBigInteger(),a=t.square().multiply(r).add(i.multiply(n.square())).mod(o),u=e.shiftLeft(1).multiply(n).mod(o),c=e.square().mod(o),h=c.multiply(t).multiply(n).mod(o),p=u.square().mod(o),f=a.square().subtract(h.shiftLeft(3)).mod(o),l=u.multiply(f).mod(o),y=a.multiply(h.shiftLeft(2).subtract(f)).subtract(p.shiftLeft(1).multiply(c)).mod(o),d=u.multiply(p).mod(o);return new s(this.curve,this.curve.fromBigInteger(l),this.curve.fromBigInteger(y),d)}multiply(t){if(this.isInfinity())return this;if(!t.signum())return this.curve.infinity;const e=t.multiply(r),n=this.negate();let o=this;for(let r=e.bitLength()-2;r>0;r--){o=o.twice();const i=e.testBit(r);i!==t.testBit(r)&&(o=o.add(i?this:n))}return o}}return o={ECPointFp:s,ECCurveFp:class{constructor(t,e,r){this.q=t,this.a=this.fromBigInteger(e),this.b=this.fromBigInteger(r),this.infinity=new s(this,null,null)}equals(t){return t===this||this.q.equals(t.q)&&this.a.equals(t.a)&&this.b.equals(t.b)}fromBigInteger(t){return new n(this.q,t)}decodePointHex(r){if("string"!=typeof r||r.length<2||r.length%2!=0)return null;switch(parseInt(r.substr(0,2),16)){case 0:return 2!==r.length?null:this.infinity;case 2:case 3:if(66!==r.length)return null;const n=this.fromBigInteger(new t(r.substr(2),16));let o=this.fromBigInteger(n.multiply(n.square()).add(n.multiply(this.a)).add(this.b).toBigInteger().modPow(this.q.divide(new t("4")).add(t.ONE),this.q));return o.toBigInteger().mod(e).equals(new t(r.substr(0,2),16).subtract(e))||(o=o.negate()),new s(this,n,o);case 4:case 6:case 7:if(130!==r.length)return null;const i=(r.length-2)/2,a=r.substr(2,i),u=r.substr(i+2,i);return new s(this,this.fromBigInteger(new t(a,16)),this.fromBigInteger(new t(u,16)));default:return null}}}}}(),{SecureRandom:r}=A(),n=new r,{curve:s,G:a,n:c}=h();function h(){const r=new t("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF",16),n=new t("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC",16),o=new t("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93",16),i=new e(r,n,o),s=i.decodePointHex("0432C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0");return{curve:i,G:s,n:new t("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123",16)}}function l(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t}function y(t){if("string"!=typeof t||!t)return!1;let e;try{e=s.decodePointHex(t)}catch(t){return!1}if(!e||e.isInfinity())return!1;const r=e.getX();return e.getY().square().equals(r.multiply(r.square()).add(r.multiply(s.a)).add(s.b))}return p={getGlobalCurve:function(){return s},generateEcparam:h,generateKeyPairHex:function(e,r,o){const i=(e?new t(e,r,o):new t(c.bitLength(),n)).mod(c.subtract(t.ONE)).add(t.ONE),s=l(i.toString(16),64),u=a.multiply(i);return{privateKey:s,publicKey:"04"+l(u.getX().toBigInteger().toString(16),64)+l(u.getY().toBigInteger().toString(16),64)}},compressPublicKeyHex:function(e){if(130!==e.length)throw new Error("Invalid public key to compress");const r=(e.length-2)/2,n=e.substr(2,r);let o="03";return new t(e.substr(r+2,r),16).mod(new t("2")).equals(t.ZERO)&&(o="02"),o+n},utf8ToHex:function(t){const e=(t=unescape(encodeURIComponent(t))).length,r=[];for(let n=0;n<e;n++)r[n>>>2]|=(255&t.charCodeAt(n))<<24-n%4*8;const n=[];for(let t=0;t<e;t++){const e=r[t>>>2]>>>24-t%4*8&255;n.push((e>>>4).toString(16)),n.push((15&e).toString(16))}return n.join("")},leftPad:l,arrayToHex:function(t){const e=[];for(let r=0;r<t.length;r++){const n=255&t[r];e.push((n>>>4).toString(16)),e.push((15&n).toString(16))}return e.join("")},arrayToUtf8:function(t){const e=[];let r=0;for(let n=0;n<2*t.length;n+=2)e[n>>>3]|=parseInt(t[r],10)<<24-n%8*4,r++;try{const r=[];for(let n=0;n<t.length;n++){const t=e[n>>>2]>>>24-n%4*8&255;r.push(String.fromCharCode(t))}return decodeURIComponent(escape(r.join("")))}catch(t){throw new Error("Malformed UTF-8 data")}},hexToArray:function(t){const e=[];let r=t.length;r%2!=0&&(t=l(t,r+1)),r=t.length;for(let n=0;n<r;n+=2)e.push(parseInt(t.substr(n,2),16));return e},verifyPublicKey:y,comparePublicKeyHex:function(t,e){if(!y(t)||!y(e))return!1;const r=s.decodePointHex(t),n=s.decodePointHex(e);return r.equals(n)}}}function F(){if(y)return l;y=1;const t=new Uint32Array(68),e=new Uint32Array(64);function r(t,e){const r=31&e;return t<<r|t>>>32-r}function n(t,e){const r=[];for(let n=t.length-1;n>=0;n--)r[n]=255&(t[n]^e[n]);return r}function o(t){return t^r(t,9)^r(t,17)}function i(t){return t^r(t,15)^r(t,23)}function s(n){let s=8*n.length,a=s%512;a=a>=448?512-a%448-1:448-a-1;const u=new Array((a-7)/8),c=new Array(8);for(let t=0,e=u.length;t<e;t++)u[t]=0;for(let t=0,e=c.length;t<e;t++)c[t]=0;s=s.toString(2);for(let t=7;t>=0;t--)if(s.length>8){const e=s.length-8;c[t]=parseInt(s.substr(e),2),s=s.substr(0,e)}else s.length>0&&(c[t]=parseInt(s,2),s="");const h=new Uint8Array([...n,128,...u,...c]),p=new DataView(h.buffer,0),f=h.length/64,l=new Uint32Array([1937774191,1226093241,388252375,3666478592,2842636476,372324522,3817729613,2969243214]);for(let n=0;n<f;n++){t.fill(0),e.fill(0);const s=16*n;for(let e=0;e<16;e++)t[e]=p.getUint32(4*(s+e),!1);for(let e=16;e<68;e++)t[e]=i(t[e-16]^t[e-9]^r(t[e-3],15))^r(t[e-13],7)^t[e-6];for(let r=0;r<64;r++)e[r]=t[r]^t[r+4];const a=2043430169,u=2055708042;let c,h,f,y,d,g=l[0],m=l[1],b=l[2],v=l[3],w=l[4],T=l[5],S=l[6],E=l[7];for(let n=0;n<64;n++)d=n>=0&&n<=15?a:u,c=r(r(g,12)+w+r(d,n),7),h=c^r(g,12),f=(n>=0&&n<=15?g^m^b:g&m|g&b|m&b)+v+h+e[n],y=(n>=0&&n<=15?w^T^S:w&T|~w&S)+E+c+t[n],v=b,b=r(m,9),m=g,g=f,E=S,S=r(T,19),T=w,w=o(y);l[0]^=g,l[1]^=m,l[2]^=b,l[3]^=v,l[4]^=w,l[5]^=T,l[6]^=S,l[7]^=E}const y=[];for(let t=0,e=l.length;t<e;t++){const e=l[t];y.push((4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e)}return y}const a=new Uint8Array(64),u=new Uint8Array(64);for(let t=0;t<64;t++)a[t]=54,u[t]=92;return l={sm3:s,hmac:function(t,e){for(e.length>64&&(e=s(e));e.length<64;)e.push(0);const r=n(e,a),o=n(e,u),i=s([...r,...t]);return s([...o,...i])}}}function B(){if(g)return d;g=1;const{BigInteger:t}=u(),{encodeDer:e,decodeDer:r}=c(),n=x(),o=F().sm3,{G:i,curve:s,n:a}=n.generateEcparam();function h(t,e,r="1234567812345678"){r=n.utf8ToHex(r);const s=n.leftPad(i.curve.a.toBigInteger().toRadix(16),64),a=n.leftPad(i.curve.b.toBigInteger().toRadix(16),64),u=n.leftPad(i.getX().toBigInteger().toRadix(16),64),c=n.leftPad(i.getY().toBigInteger().toRadix(16),64);let h,p;if(128===e.length)h=e.substr(0,64),p=e.substr(64,64);else{const t=i.curve.decodePointHex(e);h=n.leftPad(t.getX().toBigInteger().toRadix(16),64),p=n.leftPad(t.getY().toBigInteger().toRadix(16),64)}const f=n.hexToArray(r+s+a+u+c+h+p),l=4*r.length;f.unshift(255&l),f.unshift(l>>8&255);const y=o(f);return n.arrayToHex(o(y.concat(n.hexToArray(t))))}function p(e){const r=i.multiply(new t(e,16));return"04"+n.leftPad(r.getX().toBigInteger().toString(16),64)+n.leftPad(r.getY().toBigInteger().toString(16),64)}function f(){const e=n.generateKeyPairHex(),r=s.decodePointHex(e.publicKey);return e.k=new t(e.privateKey,16),e.x1=r.getX().toBigInteger(),e}return d={generateKeyPairHex:n.generateKeyPairHex,compressPublicKeyHex:n.compressPublicKeyHex,comparePublicKeyHex:n.comparePublicKeyHex,doEncrypt:function(e,r,i=1){if(!n.verifyPublicKey(r))throw new Error("Invalid public key");e="string"==typeof e?n.hexToArray(n.utf8ToHex(e)):Array.prototype.slice.call(e),r=n.getGlobalCurve().decodePointHex(r);const s=n.generateKeyPairHex(),a=new t(s.privateKey,16);let u=s.publicKey;u.length>128&&(u=u.substr(u.length-128));const c=r.multiply(a),h=n.hexToArray(n.leftPad(c.getX().toBigInteger().toRadix(16),64)),p=n.hexToArray(n.leftPad(c.getY().toBigInteger().toRadix(16),64)),f=n.arrayToHex(o([].concat(h,e,p)));let l=1,y=0,d=[];const g=[].concat(h,p),m=()=>{d=o([...g,l>>24&255,l>>16&255,l>>8&255,255&l]),l++,y=0};m();for(let t=0,r=e.length;t<r;t++)y===d.length&&m(),e[t]^=255&d[y++];const b=n.arrayToHex(e);return 0===i?u+b+f:u+f+b},doDecrypt:function(e,r,i=1,{output:s="string"}={}){r=new t(r,16);let a=e.substr(128,64),u=e.substr(192);0===i&&(a=e.substr(e.length-64),u=e.substr(128,e.length-128-64));const c=n.hexToArray(u),h=n.getGlobalCurve().decodePointHex("04"+e.substr(0,128));if(!h||!n.verifyPublicKey("04"+e.substr(0,128)))return"array"===s?[]:"";const p=h.multiply(r),f=n.hexToArray(n.leftPad(p.getX().toBigInteger().toRadix(16),64)),l=n.hexToArray(n.leftPad(p.getY().toBigInteger().toRadix(16),64));let y=1,d=0,g=[];const m=[].concat(f,l),b=()=>{g=o([...m,y>>24&255,y>>16&255,y>>8&255,255&y]),y++,d=0};b();for(let t=0,e=c.length;t<e;t++)d===g.length&&b(),c[t]^=255&g[d++];return n.arrayToHex(o([].concat(f,c,l)))===a.toLowerCase()?"array"===s?c:n.arrayToUtf8(c):"array"===s?[]:""},doSignature:function(r,o,{pointPool:i,der:s,hash:u=!0,publicKey:c,userId:l}={}){let y="string"==typeof r?n.utf8ToHex(r):n.arrayToHex(Array.prototype.slice.call(r));u&&(y=h(y,c=c||p(o),l));const d=new t(o,16),g=new t(y,16);let m=null,b=null,v=null;do{do{let t;t=i&&i.length?i.pop():f(),m=t.k,b=g.add(t.x1).mod(a)}while(b.equals(t.ZERO)||b.add(m).equals(a));v=d.add(t.ONE).modInverse(a).multiply(m.subtract(b.multiply(d))).mod(a)}while(v.equals(t.ZERO));return s?e(b,v):n.leftPad(b.toString(16),64)+n.leftPad(v.toString(16),64)},doVerifySignature:function(e,o,u,{der:c,hash:p=!0,userId:f}={}){if(!n.verifyPublicKey(u))return!1;let l,y,d="string"==typeof e?n.utf8ToHex(e):n.arrayToHex(Array.prototype.slice.call(e));if(p&&(d=h(d,u,f)),c)try{const t=r(o);l=t.r,y=t.s}catch(t){return!1}else l=new t(o.substring(0,64),16),y=new t(o.substring(64),16);const g=a.subtract(t.ONE);if(l.compareTo(t.ONE)<0||l.compareTo(g)>0)return!1;if(y.compareTo(t.ONE)<0||y.compareTo(g)>0)return!1;const m=s.decodePointHex(u);if(!m)return!1;const b=new t(d,16),v=l.add(y).mod(a);if(v.equals(t.ZERO))return!1;const w=i.multiply(y).add(m.multiply(v)),T=b.add(w.getX().toBigInteger()).mod(a);return l.equals(T)},getPublicKeyFromPrivateKey:p,getPoint:f,verifyPublicKey:n.verifyPublicKey}}function _(){if(b)return m;b=1;const{sm3:t,hmac:e}=F();function r(t){return t.map(t=>1===(t=t.toString(16)).length?"0"+t:t).join("")}function n(t){const e=[];let r=t.length;var n,o;r%2!=0&&(o=r+1,t=(n=t).length>=o?n:new Array(o-n.length+1).join("0")+n),r=t.length;for(let n=0;n<r;n+=2)e.push(parseInt(t.substr(n,2),16));return e}return m=function(o,i){if(o="string"==typeof o?function(t){const e=[];for(let r=0,n=t.length;r<n;r++){const n=t.codePointAt(r);if(n<=127)e.push(n);else if(n<=2047)e.push(192|n>>>6),e.push(128|63&n);else if(n<=55295||n>=57344&&n<=65535)e.push(224|n>>>12),e.push(128|n>>>6&63),e.push(128|63&n);else{if(!(n>=65536&&n<=1114111))throw e.push(n),new Error("input is not supported");r++,e.push(240|n>>>18&28),e.push(128|n>>>12&63),e.push(128|n>>>6&63),e.push(128|63&n)}}return e}(o):Array.prototype.slice.call(o),i){if("hmac"!==(i.mode||"hmac"))throw new Error("invalid mode");let t=i.key;if(!t)throw new Error("invalid key");return t="string"==typeof t?n(t):Array.prototype.slice.call(t),r(e(o,t))}return r(t(o))}}function P(){if(w)return v;w=1;const t=16,e=[214,144,233,254,204,225,61,183,22,182,20,194,40,251,44,5,43,103,154,118,42,190,4,195,170,68,19,38,73,134,6,153,156,66,80,244,145,239,152,122,51,84,11,67,237,207,172,98,228,179,28,169,201,8,232,149,128,223,148,250,117,143,63,166,71,7,167,252,243,115,23,186,131,89,60,25,230,133,79,168,104,107,129,178,113,100,218,139,248,235,15,75,112,86,157,53,30,36,14,94,99,88,209,162,37,34,124,59,1,33,120,135,212,0,70,87,159,211,39,82,76,54,2,231,160,196,200,158,234,191,138,210,64,199,56,181,163,247,242,206,249,97,21,161,224,174,93,164,155,52,26,85,173,147,50,48,245,140,177,227,29,246,226,46,130,102,202,96,192,41,35,171,13,83,78,111,213,219,55,69,222,253,142,47,3,255,106,114,109,108,91,81,141,27,175,146,187,221,188,127,17,217,92,65,31,16,90,216,10,193,49,136,165,205,123,189,45,116,208,18,184,229,180,176,137,105,151,74,12,150,119,126,101,185,241,9,197,110,198,132,24,240,125,236,58,220,77,32,121,238,95,62,215,203,57,72],r=[462357,472066609,943670861,1415275113,1886879365,2358483617,2830087869,3301692121,3773296373,4228057617,404694573,876298825,1347903077,1819507329,2291111581,2762715833,3234320085,3705924337,4177462797,337322537,808926789,1280531041,1752135293,2223739545,2695343797,3166948049,3638552301,4110090761,269950501,741554753,1213159005,1684763257];function n(t){const e=[];for(let r=0,n=t.length;r<n;r+=2)e.push(parseInt(t.substr(r,2),16));return e}function o(t,e){const r=31&e;return t<<r|t>>>32-r}function i(t){return(255&e[t>>>24&255])<<24|(255&e[t>>>16&255])<<16|(255&e[t>>>8&255])<<8|255&e[255&t]}function s(t){return t^o(t,2)^o(t,10)^o(t,18)^o(t,24)}function a(t){return t^o(t,13)^o(t,23)}function u(t,e,r){const n=new Array(4),o=new Array(4);for(let e=0;e<4;e++)o[0]=255&t[4*e],o[1]=255&t[4*e+1],o[2]=255&t[4*e+2],o[3]=255&t[4*e+3],n[e]=o[0]<<24|o[1]<<16|o[2]<<8|o[3];for(let t,e=0;e<32;e+=4)t=n[1]^n[2]^n[3]^r[e+0],n[0]^=s(i(t)),t=n[2]^n[3]^n[0]^r[e+1],n[1]^=s(i(t)),t=n[3]^n[0]^n[1]^r[e+2],n[2]^=s(i(t)),t=n[0]^n[1]^n[2]^r[e+3],n[3]^=s(i(t));for(let t=0;t<16;t+=4)e[t]=n[3-t/4]>>>24&255,e[t+1]=n[3-t/4]>>>16&255,e[t+2]=n[3-t/4]>>>8&255,e[t+3]=255&n[3-t/4]}function c(e,o,s,{padding:c="pkcs#7",mode:h,iv:p=[],output:f="string"}={}){if("cbc"===h&&("string"==typeof p&&(p=n(p)),16!==p.length))throw new Error("iv is invalid");if("string"==typeof o&&(o=n(o)),16!==o.length)throw new Error("key is invalid");if(e="string"==typeof e?0!==s?function(t){const e=[];for(let r=0,n=t.length;r<n;r++){const n=t.codePointAt(r);if(n<=127)e.push(n);else if(n<=2047)e.push(192|n>>>6),e.push(128|63&n);else if(n<=55295||n>=57344&&n<=65535)e.push(224|n>>>12),e.push(128|n>>>6&63),e.push(128|63&n);else{if(!(n>=65536&&n<=1114111))throw e.push(n),new Error("input is not supported");r++,e.push(240|n>>>18&28),e.push(128|n>>>12&63),e.push(128|n>>>6&63),e.push(128|63&n)}}return e}(e):n(e):[...e],("pkcs#5"===c||"pkcs#7"===c)&&0!==s){const r=t-e.length%t;for(let t=0;t<r;t++)e.push(r)}const l=new Array(32);!function(t,e,n){const o=new Array(4),s=new Array(4);for(let e=0;e<4;e++)s[0]=255&t[0+4*e],s[1]=255&t[1+4*e],s[2]=255&t[2+4*e],s[3]=255&t[3+4*e],o[e]=s[0]<<24|s[1]<<16|s[2]<<8|s[3];o[0]^=2746333894,o[1]^=1453994832,o[2]^=1736282519,o[3]^=2993693404;for(let t,n=0;n<32;n+=4)t=o[1]^o[2]^o[3]^r[n+0],e[n+0]=o[0]^=a(i(t)),t=o[2]^o[3]^o[0]^r[n+1],e[n+1]=o[1]^=a(i(t)),t=o[3]^o[0]^o[1]^r[n+2],e[n+2]=o[2]^=a(i(t)),t=o[0]^o[1]^o[2]^r[n+3],e[n+3]=o[3]^=a(i(t));if(0===n)for(let t,r=0;r<16;r++)t=e[r],e[r]=e[31-r],e[31-r]=t}(o,l,s);const y=[];let d=p,g=e.length,m=0;for(;g>=t;){const r=e.slice(m,m+16),n=new Array(16);if("cbc"===h)for(let e=0;e<t;e++)0!==s&&(r[e]^=d[e]);u(r,n,l);for(let e=0;e<t;e++)"cbc"===h&&0===s&&(n[e]^=d[e]),y[m+e]=n[e];"cbc"===h&&(d=0!==s?n:r),g-=t,m+=t}if(("pkcs#5"===c||"pkcs#7"===c)&&0===s){const t=y.length,e=y[t-1];for(let r=1;r<=e;r++)if(y[t-r]!==e)throw new Error("padding is invalid");y.splice(t-e,e)}return"array"!==f?0!==s?y.map(t=>1===(t=t.toString(16)).length?"0"+t:t).join(""):function(t){const e=[];for(let r=0,n=t.length;r<n;r++)t[r]>=240&&t[r]<=247?(e.push(String.fromCodePoint(((7&t[r])<<18)+((63&t[r+1])<<12)+((63&t[r+2])<<6)+(63&t[r+3]))),r+=3):t[r]>=224&&t[r]<=239?(e.push(String.fromCodePoint(((15&t[r])<<12)+((63&t[r+1])<<6)+(63&t[r+2]))),r+=2):t[r]>=192&&t[r]<=223?(e.push(String.fromCodePoint(((31&t[r])<<6)+(63&t[r+1]))),r++):e.push(String.fromCodePoint(t[r]));return e.join("")}(y):y}return v={encrypt:(t,e,r)=>c(t,e,1,r),decrypt:(t,e,r)=>c(t,e,0,r)}}var R,O,k,I,D,q,j,C,N,M,U,L,V,H,W,K,z,G,$,Y,Z,X,J,Q,tt,et,rt,nt,ot,it,st,at,ut,ct,ht,pt,ft,lt,yt,dt,gt,mt,bt,vt,wt,Tt,St,Et,At,xt,Ft,Bt,_t,Pt,Rt,Ot,kt,It,Dt,qt,jt,Ct,Nt,Mt,Ut,Lt,Vt,Ht,Wt,Kt,zt,Gt,$t,Yt,Zt,Xt,Jt,Qt,te,ee,re=S?T:(S=1,T={sm2:B(),sm3:_(),sm4:P()}),ne=t.getDefaultExportFromCjs(re);function oe(){return O?R:(O=1,R=TypeError)}function ie(){if(I)return k;I=1;var e="function"==typeof Map&&Map.prototype,r=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&r&&"function"==typeof r.get?r.get:null,o=e&&Map.prototype.forEach,i="function"==typeof Set&&Set.prototype,s=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=i&&s&&"function"==typeof s.get?s.get:null,u=i&&Set.prototype.forEach,c="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,h="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,l=Object.prototype.toString,y=Function.prototype.toString,d=String.prototype.match,g=String.prototype.slice,m=String.prototype.replace,b=String.prototype.toUpperCase,v=String.prototype.toLowerCase,w=RegExp.prototype.test,T=Array.prototype.concat,S=Array.prototype.join,E=Array.prototype.slice,A=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,F=Object.getOwnPropertySymbols,B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,_="function"==typeof Symbol&&"object"==typeof Symbol.iterator,P="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===_||"symbol")?Symbol.toStringTag:null,R=Object.prototype.propertyIsEnumerable,O=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function D(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||w.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-A(-t):A(t);if(n!==t){var o=String(n),i=g.call(e,o.length+1);return m.call(o,r,"$&_")+"."+m.call(m.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return m.call(e,r,"$&_")}var q=t.require$$0,j=q.custom,C=K(j)?j:null,N={__proto__:null,double:'"',single:"'"},M={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};function U(t,e,r){var n=r.quoteStyle||e,o=N[n];return o+t+o}function L(t){return m.call(String(t),/"/g,"&quot;")}function V(t){return!P||!("object"==typeof t&&(P in t||void 0!==t[P]))}function H(t){return"[object Array]"===$(t)&&V(t)}function W(t){return"[object RegExp]"===$(t)&&V(t)}function K(t){if(_)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!B)return!1;try{return B.call(t),!0}catch(t){}return!1}k=function e(r,i,s,l){var b=i||{};if(G(b,"quoteStyle")&&!G(N,b.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(b,"maxStringLength")&&("number"==typeof b.maxStringLength?b.maxStringLength<0&&b.maxStringLength!==1/0:null!==b.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var w=!G(b,"customInspect")||b.customInspect;if("boolean"!=typeof w&&"symbol"!==w)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(b,"indent")&&null!==b.indent&&"\t"!==b.indent&&!(parseInt(b.indent,10)===b.indent&&b.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(b,"numericSeparator")&&"boolean"!=typeof b.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var A=b.numericSeparator;if(void 0===r)return"undefined";if(null===r)return"null";if("boolean"==typeof r)return r?"true":"false";if("string"==typeof r)return Z(r,b);if("number"==typeof r){if(0===r)return 1/0/r>0?"0":"-0";var F=String(r);return A?D(r,F):F}if("bigint"==typeof r){var k=String(r)+"n";return A?D(r,k):k}var I=void 0===b.depth?5:b.depth;if(void 0===s&&(s=0),s>=I&&I>0&&"object"==typeof r)return H(r)?"[Array]":"[Object]";var j=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=S.call(Array(t.indent+1)," ")}return{base:r,prev:S.call(Array(e+1),r)}}(b,s);if(void 0===l)l=[];else if(Y(l,r)>=0)return"[Circular]";function M(t,r,n){if(r&&(l=E.call(l)).push(r),n){var o={depth:b.depth};return G(b,"quoteStyle")&&(o.quoteStyle=b.quoteStyle),e(t,o,s+1,l)}return e(t,b,s+1,l)}if("function"==typeof r&&!W(r)){var z=function(t){if(t.name)return t.name;var e=d.call(y.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(r),X=rt(r,M);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(X.length>0?" { "+S.call(X,", ")+" }":"")}if(K(r)){var nt=_?m.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):B.call(r);return"object"!=typeof r||_?nt:J(nt)}if(function(t){if(!t||"object"!=typeof t)return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(r)){for(var ot="<"+v.call(String(r.nodeName)),it=r.attributes||[],st=0;st<it.length;st++)ot+=" "+it[st].name+"="+U(L(it[st].value),"double",b);return ot+=">",r.childNodes&&r.childNodes.length&&(ot+="..."),ot+="</"+v.call(String(r.nodeName))+">"}if(H(r)){if(0===r.length)return"[]";var at=rt(r,M);return j&&!function(t){for(var e=0;e<t.length;e++)if(Y(t[e],"\n")>=0)return!1;return!0}(at)?"["+et(at,j)+"]":"[ "+S.call(at,", ")+" ]"}if(function(t){return"[object Error]"===$(t)&&V(t)}(r)){var ut=rt(r,M);return"cause"in Error.prototype||!("cause"in r)||R.call(r,"cause")?0===ut.length?"["+String(r)+"]":"{ ["+String(r)+"] "+S.call(ut,", ")+" }":"{ ["+String(r)+"] "+S.call(T.call("[cause]: "+M(r.cause),ut),", ")+" }"}if("object"==typeof r&&w){if(C&&"function"==typeof r[C]&&q)return q(r,{depth:I-s});if("symbol"!==w&&"function"==typeof r.inspect)return r.inspect()}if(function(t){if(!n||!t||"object"!=typeof t)return!1;try{n.call(t);try{a.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(r)){var ct=[];return o&&o.call(r,function(t,e){ct.push(M(e,r,!0)+" => "+M(t,r))}),tt("Map",n.call(r),ct,j)}if(function(t){if(!a||!t||"object"!=typeof t)return!1;try{a.call(t);try{n.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(r)){var ht=[];return u&&u.call(r,function(t){ht.push(M(t,r))}),tt("Set",a.call(r),ht,j)}if(function(t){if(!c||!t||"object"!=typeof t)return!1;try{c.call(t,c);try{h.call(t,h)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(r))return Q("WeakMap");if(function(t){if(!h||!t||"object"!=typeof t)return!1;try{h.call(t,h);try{c.call(t,c)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(r))return Q("WeakSet");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{return p.call(t),!0}catch(t){}return!1}(r))return Q("WeakRef");if(function(t){return"[object Number]"===$(t)&&V(t)}(r))return J(M(Number(r)));if(function(t){if(!t||"object"!=typeof t||!x)return!1;try{return x.call(t),!0}catch(t){}return!1}(r))return J(M(x.call(r)));if(function(t){return"[object Boolean]"===$(t)&&V(t)}(r))return J(f.call(r));if(function(t){return"[object String]"===$(t)&&V(t)}(r))return J(M(String(r)));if("undefined"!=typeof window&&r===window)return"{ [object Window] }";if("undefined"!=typeof globalThis&&r===globalThis||void 0!==t.commonjsGlobal&&r===t.commonjsGlobal)return"{ [object globalThis] }";if(!function(t){return"[object Date]"===$(t)&&V(t)}(r)&&!W(r)){var pt=rt(r,M),ft=O?O(r)===Object.prototype:r instanceof Object||r.constructor===Object,lt=r instanceof Object?"":"null prototype",yt=!ft&&P&&Object(r)===r&&P in r?g.call($(r),8,-1):lt?"Object":"",dt=(ft||"function"!=typeof r.constructor?"":r.constructor.name?r.constructor.name+" ":"")+(yt||lt?"["+S.call(T.call([],yt||[],lt||[]),": ")+"] ":"");return 0===pt.length?dt+"{}":j?dt+"{"+et(pt,j)+"}":dt+"{ "+S.call(pt,", ")+" }"}return String(r)};var z=Object.prototype.hasOwnProperty||function(t){return t in this};function G(t,e){return z.call(t,e)}function $(t){return l.call(t)}function Y(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function Z(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Z(g.call(t,0,e.maxStringLength),e)+n}var o=M[e.quoteStyle||"single"];return o.lastIndex=0,U(m.call(m.call(t,o,"\\$1"),/[\x00-\x1f]/g,X),"single",e)}function X(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+b.call(e.toString(16))}function J(t){return"Object("+t+")"}function Q(t){return t+" { ? }"}function tt(t,e,r,n){return t+" ("+e+") {"+(n?et(r,n):S.call(r,", "))+"}"}function et(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+S.call(t,","+r)+"\n"+e.prev}function rt(t,e){var r=H(t),n=[];if(r){n.length=t.length;for(var o=0;o<t.length;o++)n[o]=G(t,o)?e(t[o],t):""}var i,s="function"==typeof F?F(t):[];if(_){i={};for(var a=0;a<s.length;a++)i["$"+s[a]]=s[a]}for(var u in t)G(t,u)&&(r&&String(Number(u))===u&&u<t.length||_&&i["$"+u]instanceof Symbol||(w.call(/[^\w$]/,u)?n.push(e(u,t)+": "+e(t[u],t)):n.push(u+": "+e(t[u],t))));if("function"==typeof F)for(var c=0;c<s.length;c++)R.call(t,s[c])&&n.push("["+e(s[c])+"]: "+e(t[s[c]],t));return n}return k}function se(){if(q)return D;q=1;var t=ie(),e=oe(),r=function(t,e,r){for(var n,o=t;null!=(n=o.next);o=n)if(n.key===e)return o.next=n.next,r||(n.next=t.next,t.next=n),n};return D=function(){var n,o={assert:function(r){if(!o.has(r))throw new e("Side channel does not contain "+t(r))},delete:function(t){var e=function(t,e){if(t)return r(t,e,!0)}(n,t);return e&&n&&!n.next&&(n=void 0),!!e},get:function(t){return function(t,e){if(t){var n=r(t,e);return n&&n.value}}(n,t)},has:function(t){return function(t,e){return!!t&&!!r(t,e)}(n,t)},set:function(t,e){n||(n={next:void 0}),function(t,e,n){var o=r(t,e);o?o.value=n:t.next={key:e,next:t.next,value:n}}(n,t,e)}};return o},D}function ae(){return C?j:(C=1,j=Object)}function ue(){return M?N:(M=1,N=Error)}function ce(){return L?U:(L=1,U=EvalError)}function he(){return H?V:(H=1,V=RangeError)}function pe(){return K?W:(K=1,W=ReferenceError)}function fe(){return G?z:(G=1,z=SyntaxError)}function le(){return Y?$:(Y=1,$=URIError)}function ye(){return X?Z:(X=1,Z=Math.abs)}function de(){return Q?J:(Q=1,J=Math.floor)}function ge(){return et?tt:(et=1,tt=Math.max)}function me(){return nt?rt:(nt=1,rt=Math.min)}function be(){return it?ot:(it=1,ot=Math.pow)}function ve(){return at?st:(at=1,st=Math.round)}function we(){return ct?ut:(ct=1,ut=Number.isNaN||function(t){return t!=t})}function Te(){if(pt)return ht;pt=1;var t=we();return ht=function(e){return t(e)||0===e?e:e<0?-1:1}}function Se(){return lt?ft:(lt=1,ft=Object.getOwnPropertyDescriptor)}function Ee(){if(dt)return yt;dt=1;var t=Se();if(t)try{t([],"length")}catch(e){t=null}return yt=t}function Ae(){if(mt)return gt;mt=1;var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}return gt=t}function xe(){if(Tt)return wt;Tt=1;var t="undefined"!=typeof Symbol&&Symbol,e=vt?bt:(vt=1,bt=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var o=Object.getOwnPropertySymbols(t);if(1!==o.length||o[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0});return wt=function(){return"function"==typeof t&&("function"==typeof Symbol&&("symbol"==typeof t("foo")&&("symbol"==typeof Symbol("bar")&&e())))}}function Fe(){return Et?St:(Et=1,St="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function Be(){return xt?At:(xt=1,At=ae().getPrototypeOf||null)}function _e(){if(Bt)return Ft;Bt=1;var t=Object.prototype.toString,e=Math.max,r=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var o=0;o<e.length;o+=1)r[o+t.length]=e[o];return r};return Ft=function(n){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,s=function(t,e){for(var r=[],n=e,o=0;n<t.length;n+=1,o+=1)r[o]=t[n];return r}(arguments,1),a=e(0,o.length-s.length),u=[],c=0;c<a;c++)u[c]="$"+c;if(i=Function("binder","return function ("+function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r}(u,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof i){var t=o.apply(this,r(s,arguments));return Object(t)===t?t:this}return o.apply(n,r(s,arguments))}),o.prototype){var h=function(){};h.prototype=o.prototype,i.prototype=new h,h.prototype=null}return i},Ft}function Pe(){if(Pt)return _t;Pt=1;var t=_e();return _t=Function.prototype.bind||t}function Re(){return Ot?Rt:(Ot=1,Rt=Function.prototype.call)}function Oe(){return It?kt:(It=1,kt=Function.prototype.apply)}function ke(){if(Ct)return jt;Ct=1;var t=Pe(),e=Oe(),r=Re(),n=qt?Dt:(qt=1,Dt="undefined"!=typeof Reflect&&Reflect&&Reflect.apply);return jt=n||t.call(r,e)}function Ie(){if(Mt)return Nt;Mt=1;var t=Pe(),e=oe(),r=Re(),n=ke();return Nt=function(o){if(o.length<1||"function"!=typeof o[0])throw new e("a function is required");return n(t,r,o)}}function De(){if(Lt)return Ut;Lt=1;var t,e=Ie(),r=Ee();try{t=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var n=!!t&&r&&r(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return Ut=n&&"function"==typeof n.get?e([n.get]):"function"==typeof i&&function(t){return i(null==t?t:o(t))},Ut}function qe(){if(Ht)return Vt;Ht=1;var t=Fe(),e=Be(),r=De();return Vt=t?function(e){return t(e)}:e?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return e(t)}:r?function(t){return r(t)}:null}function je(){if(Kt)return Wt;Kt=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=Pe();return Wt=r.call(t,e)}function Ce(){if(Gt)return zt;var t;Gt=1;var e=ae(),r=ue(),n=ce(),o=he(),i=pe(),s=fe(),a=oe(),u=le(),c=ye(),h=de(),p=ge(),f=me(),l=be(),y=ve(),d=Te(),g=Function,m=function(t){try{return g('"use strict"; return ('+t+").constructor;")()}catch(t){}},b=Ee(),v=Ae(),w=function(){throw new a},T=b?function(){try{return w}catch(t){try{return b(arguments,"callee").get}catch(t){return w}}}():w,S=xe()(),E=qe(),A=Be(),x=Fe(),F=Oe(),B=Re(),_={},P="undefined"!=typeof Uint8Array&&E?E(Uint8Array):t,R={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?t:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?t:ArrayBuffer,"%ArrayIteratorPrototype%":S&&E?E([][Symbol.iterator]()):t,"%AsyncFromSyncIteratorPrototype%":t,"%AsyncFunction%":_,"%AsyncGenerator%":_,"%AsyncGeneratorFunction%":_,"%AsyncIteratorPrototype%":_,"%Atomics%":"undefined"==typeof Atomics?t:Atomics,"%BigInt%":"undefined"==typeof BigInt?t:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?t:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?t:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?t:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":r,"%eval%":eval,"%EvalError%":n,"%Float16Array%":"undefined"==typeof Float16Array?t:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?t:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?t:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?t:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":_,"%Int8Array%":"undefined"==typeof Int8Array?t:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?t:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?t:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":S&&E?E(E([][Symbol.iterator]())):t,"%JSON%":"object"==typeof JSON?JSON:t,"%Map%":"undefined"==typeof Map?t:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&S&&E?E((new Map)[Symbol.iterator]()):t,"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?t:Promise,"%Proxy%":"undefined"==typeof Proxy?t:Proxy,"%RangeError%":o,"%ReferenceError%":i,"%Reflect%":"undefined"==typeof Reflect?t:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?t:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&S&&E?E((new Set)[Symbol.iterator]()):t,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?t:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":S&&E?E(""[Symbol.iterator]()):t,"%Symbol%":S?Symbol:t,"%SyntaxError%":s,"%ThrowTypeError%":T,"%TypedArray%":P,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?t:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?t:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?t:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?t:Uint32Array,"%URIError%":u,"%WeakMap%":"undefined"==typeof WeakMap?t:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?t:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?t:WeakSet,"%Function.prototype.call%":B,"%Function.prototype.apply%":F,"%Object.defineProperty%":v,"%Object.getPrototypeOf%":A,"%Math.abs%":c,"%Math.floor%":h,"%Math.max%":p,"%Math.min%":f,"%Math.pow%":l,"%Math.round%":y,"%Math.sign%":d,"%Reflect.getPrototypeOf%":x};if(E)try{null.error}catch(t){var O=E(E(t));R["%Error.prototype%"]=O}var k=function t(e){var r;if("%AsyncFunction%"===e)r=m("async function () {}");else if("%GeneratorFunction%"===e)r=m("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=m("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&E&&(r=E(o.prototype))}return R[e]=r,r},I={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},D=Pe(),q=je(),j=D.call(B,Array.prototype.concat),C=D.call(F,Array.prototype.splice),N=D.call(B,String.prototype.replace),M=D.call(B,String.prototype.slice),U=D.call(B,RegExp.prototype.exec),L=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,V=/\\(\\)?/g,H=function(t,e){var r,n=t;if(q(I,n)&&(n="%"+(r=I[n])[0]+"%"),q(R,n)){var o=R[n];if(o===_&&(o=k(n)),void 0===o&&!e)throw new a("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new s("intrinsic "+t+" does not exist!")};return zt=function(t,e){if("string"!=typeof t||0===t.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new a('"allowMissing" argument must be a boolean');if(null===U(/^%?[^%]*%?$/,t))throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=M(t,0,1),r=M(t,-1);if("%"===e&&"%"!==r)throw new s("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new s("invalid intrinsic syntax, expected opening `%`");var n=[];return N(t,L,function(t,e,r,o){n[n.length]=r?N(o,V,"$1"):e||t}),n}(t),n=r.length>0?r[0]:"",o=H("%"+n+"%",e),i=o.name,u=o.value,c=!1,h=o.alias;h&&(n=h[0],C(r,j([0,1],h)));for(var p=1,f=!0;p<r.length;p+=1){var l=r[p],y=M(l,0,1),d=M(l,-1);if(('"'===y||"'"===y||"`"===y||'"'===d||"'"===d||"`"===d)&&y!==d)throw new s("property names with quotes must have matching quotes");if("constructor"!==l&&f||(c=!0),q(R,i="%"+(n+="."+l)+"%"))u=R[i];else if(null!=u){if(!(l in u)){if(!e)throw new a("base intrinsic for "+t+" exists, but the property is not available.");return}if(b&&p+1>=r.length){var g=b(u,l);u=(f=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:u[l]}else f=q(u,l),u=u[l];f&&!c&&(R[i]=u)}}return u},zt}function Ne(){if(Yt)return $t;Yt=1;var t=Ce(),e=Ie(),r=e([t("%String.prototype.indexOf%")]);return $t=function(n,o){var i=t(n,!!o);return"function"==typeof i&&r(n,".prototype.")>-1?e([i]):i}}function Me(){if(Xt)return Zt;Xt=1;var t=Ce(),e=Ne(),r=ie(),n=oe(),o=t("%Map%",!0),i=e("Map.prototype.get",!0),s=e("Map.prototype.set",!0),a=e("Map.prototype.has",!0),u=e("Map.prototype.delete",!0),c=e("Map.prototype.size",!0);return Zt=!!o&&function(){var t,e={assert:function(t){if(!e.has(t))throw new n("Side channel does not contain "+r(t))},delete:function(e){if(t){var r=u(t,e);return 0===c(t)&&(t=void 0),r}return!1},get:function(e){if(t)return i(t,e)},has:function(e){return!!t&&a(t,e)},set:function(e,r){t||(t=new o),s(t,e,r)}};return e},Zt}const Ue=Object.create(null);Ue.open="0",Ue.close="1",Ue.ping="2",Ue.pong="3",Ue.message="4",Ue.upgrade="5",Ue.noop="6";const Le=Object.create(null);Object.keys(Ue).forEach(t=>{Le[Ue[t]]=t});const Ve={type:"error",data:"parser error"},He="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),We="function"==typeof ArrayBuffer,Ke=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,ze=({type:t,data:e},r,n)=>He&&e instanceof Blob?r?n(e):Ge(e,n):We&&(e instanceof ArrayBuffer||Ke(e))?r?n(e):Ge(new Blob([e]),n):n(Ue[t]+(e||"")),Ge=(t,e)=>{const r=new FileReader;return r.onload=function(){const t=r.result.split(",")[1];e("b"+(t||""))},r.readAsDataURL(t)};function $e(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let Ye;const Ze="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xe="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)Xe[Ze.charCodeAt(t)]=t;const Je="function"==typeof ArrayBuffer,Qe=(t,e)=>{if("string"!=typeof t)return{type:"message",data:er(t,e)};const r=t.charAt(0);if("b"===r)return{type:"message",data:tr(t.substring(1),e)};return Le[r]?t.length>1?{type:Le[r],data:t.substring(1)}:{type:Le[r]}:Ve},tr=(t,e)=>{if(Je){const r=(t=>{let e,r,n,o,i,s=.75*t.length,a=t.length,u=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);const c=new ArrayBuffer(s),h=new Uint8Array(c);for(e=0;e<a;e+=4)r=Xe[t.charCodeAt(e)],n=Xe[t.charCodeAt(e+1)],o=Xe[t.charCodeAt(e+2)],i=Xe[t.charCodeAt(e+3)],h[u++]=r<<2|n>>4,h[u++]=(15&n)<<4|o>>2,h[u++]=(3&o)<<6|63&i;return c})(t);return er(r,e)}return{base64:!0,data:t}},er=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,rr=String.fromCharCode(30);function nr(){return new TransformStream({transform(t,e){!function(t,e){He&&t.data instanceof Blob?t.data.arrayBuffer().then($e).then(e):We&&(t.data instanceof ArrayBuffer||Ke(t.data))?e($e(t.data)):ze(t,!1,t=>{Ye||(Ye=new TextEncoder),e(Ye.encode(t))})}(t,r=>{const n=r.length;let o;if(n<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,n);else if(n<65536){o=new Uint8Array(3);const t=new DataView(o.buffer);t.setUint8(0,126),t.setUint16(1,n)}else{o=new Uint8Array(9);const t=new DataView(o.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(n))}t.data&&"string"!=typeof t.data&&(o[0]|=128),e.enqueue(o),e.enqueue(r)})}})}let or;function ir(t){return t.reduce((t,e)=>t+e.length,0)}function sr(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let o=0;o<e;o++)r[o]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}var ar,ur={};var cr=function(){if(ar)return ur;function t(e){if(e)return function(e){for(var r in t.prototype)e[r]=t.prototype[r];return e}(e)}return ar=1,ur.Emitter=t,t.prototype.on=t.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},t.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var o=0;o<n.length;o++)if((r=n[o])===e||r.fn===e){n.splice(o,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},t.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){n=0;for(var o=(r=r.slice(0)).length;n<o;++n)r[n].apply(this,e)}return this},t.prototype.emitReserved=t.prototype.emit,t.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},t.prototype.hasListeners=function(t){return!!this.listeners(t).length},ur}();const hr="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),pr="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function fr(t,...e){return e.reduce((e,r)=>(t.hasOwnProperty(r)&&(e[r]=t[r]),e),{})}const lr=pr.setTimeout,yr=pr.clearTimeout;function dr(t,e){e.useNativeTimers?(t.setTimeoutFn=lr.bind(pr),t.clearTimeoutFn=yr.bind(pr)):(t.setTimeoutFn=pr.setTimeout.bind(pr),t.clearTimeoutFn=pr.clearTimeout.bind(pr))}function gr(t){return"string"==typeof t?function(t){let e=0,r=0;for(let n=0,o=t.length;n<o;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}(t):Math.ceil(1.33*(t.byteLength||t.size))}function mr(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class br extends Error{constructor(t,e,r){super(t),this.description=e,this.context=r,this.type="TransportError"}}class vr extends cr.Emitter{constructor(t){super(),this.writable=!1,dr(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,e,r){return super.emitReserved("error",new br(t,e,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=Qe(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){const e=function(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}(t);return e.length?"?"+e:""}}class wr extends vr{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let t=0;this._polling&&(t++,this.once("pollComplete",function(){--t||e()})),this.writable||(t++,this.once("drain",function(){--t||e()}))}else e()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){((t,e)=>{const r=t.split(rr),n=[];for(let t=0;t<r.length;t++){const o=Qe(r[t],e);if(n.push(o),"error"===o.type)break}return n})(t,this.socket.binaryType).forEach(t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,((t,e)=>{const r=t.length,n=new Array(r);let o=0;t.forEach((t,i)=>{ze(t,!1,t=>{n[i]=t,++o===r&&e(n.join(rr))})})})(t,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=mr()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}}let Tr=!1;try{Tr="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}const Sr=Tr;function Er(){}class Ar extends wr{constructor(t){if(super(t),"undefined"!=typeof location){const e="https:"===location.protocol;let r=location.port;r||(r=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,e){const r=this.request({method:"POST",data:t});r.on("success",e),r.on("error",(t,e)=>{this.onError("xhr post error",t,e)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t,e)=>{this.onError("xhr poll error",t,e)}),this.pollXhr=t}}class xr extends cr.Emitter{constructor(t,e,r){super(),this.createRequest=t,dr(this,r),this._opts=r,this._method=r.method||"GET",this._uri=e,this._data=void 0!==r.data?r.data:null,this._create()}_create(){var t;const e=fr(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(e);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let t in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(t)&&r.setRequestHeader(t,this._opts.extraHeaders[t])}}catch(t){}if("POST"===this._method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{r.setRequestHeader("Accept","*/*")}catch(t){}null===(t=this._opts.cookieJar)||void 0===t||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var t;3===r.readyState&&(null===(t=this._opts.cookieJar)||void 0===t||t.parseCookies(r.getResponseHeader("set-cookie"))),4===r.readyState&&(200===r.status||1223===r.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof r.status?r.status:0)},0))},r.send(this._data)}catch(t){return void this.setTimeoutFn(()=>{this._onError(t)},0)}"undefined"!=typeof document&&(this._index=xr.requestsCount++,xr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=Er,t)try{this._xhr.abort()}catch(t){}"undefined"!=typeof document&&delete xr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(xr.requestsCount=0,xr.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",Fr);else if("function"==typeof addEventListener){addEventListener("onpagehide"in pr?"pagehide":"unload",Fr,!1)}function Fr(){for(let t in xr.requests)xr.requests.hasOwnProperty(t)&&xr.requests[t].abort()}const Br=function(){const t=_r({xdomain:!1});return t&&null!==t.responseType}();function _r(t){const e=t.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!e||Sr))return new XMLHttpRequest}catch(t){}if(!e)try{return new(pr[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(t){}}const Pr="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class Rr extends vr{get name(){return"websocket"}doOpen(){const t=this.uri(),e=this.opts.protocols,r=Pr?{}:fr(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,e,r)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const r=t[e],n=e===t.length-1;ze(r,this.supportsBinary,t=>{try{this.doWrite(r,t)}catch(t){}n&&hr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=mr()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}}const Or=pr.WebSocket||pr.MozWebSocket;const kr={websocket:class extends Rr{createSocket(t,e,r){return Pr?new Or(t,e,r):e?new Or(t,e):new Or(t)}doWrite(t,e){this.ws.send(e)}},webtransport:class extends vr{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const e=function(t,e){or||(or=new TextDecoder);const r=[];let n=0,o=-1,i=!1;return new TransformStream({transform(s,a){for(r.push(s);;){if(0===n){if(ir(r)<1)break;const t=sr(r,1);i=!(128&~t[0]),o=127&t[0],n=o<126?3:126===o?1:2}else if(1===n){if(ir(r)<2)break;const t=sr(r,2);o=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),n=3}else if(2===n){if(ir(r)<8)break;const t=sr(r,8),e=new DataView(t.buffer,t.byteOffset,t.length),i=e.getUint32(0);if(i>Math.pow(2,21)-1){a.enqueue(Ve);break}o=i*Math.pow(2,32)+e.getUint32(4),n=3}else{if(ir(r)<o)break;const t=sr(r,o);a.enqueue(Qe(i?t:or.decode(t),e)),n=0}if(0===o||o>t){a.enqueue(Ve);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(e).getReader(),n=nr();n.readable.pipeTo(t.writable),this._writer=n.writable.getWriter();const o=()=>{r.read().then(({done:t,value:e})=>{t||(this.onPacket(e),o())}).catch(t=>{})};o();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let e=0;e<t.length;e++){const r=t[e],n=e===t.length-1;this._writer.write(r).then(()=>{n&&hr(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;null===(t=this._transport)||void 0===t||t.close()}},polling:class extends Ar{constructor(t){super(t);const e=t&&t.forceBase64;this.supportsBinary=Br&&!e}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new xr(_r,this.uri(),t)}}},Ir=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Dr=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function qr(t){if(t.length>8e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");-1!=r&&-1!=n&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let o=Ir.exec(t||""),i={},s=14;for(;s--;)i[Dr[s]]=o[s]||"";return-1!=r&&-1!=n&&(i.source=e,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=function(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");"/"!=e.slice(0,1)&&0!==e.length||n.splice(0,1);"/"==e.slice(-1)&&n.splice(n.length-1,1);return n}(0,i.path),i.queryKey=function(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,e,n){e&&(r[e]=n)}),r}(0,i.query),i}const jr="function"==typeof addEventListener&&"function"==typeof removeEventListener,Cr=[];jr&&addEventListener("offline",()=>{Cr.forEach(t=>t())},!1);class Nr extends cr.Emitter{constructor(t,e){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&"object"==typeof t&&(e=t,t=null),t){const r=qr(t);e.hostname=r.host,e.secure="https"===r.protocol||"wss"===r.protocol,e.port=r.port,r.query&&(e.query=r.query)}else e.host&&(e.hostname=qr(e.host).host);dr(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},e.transports.forEach(t=>{const e=t.prototype.name;this.transports.push(e),this._transportsByName[e]=t}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},r=t.split("&");for(let t=0,n=r.length;t<n;t++){let n=r[t].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}(this.opts.query)),jr&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Cr.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);const r=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);const t=this.opts.rememberUpgrade&&Nr.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const e=this.createTransport(t);e.open(),this.setTransport(e)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",Nr.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const e=new Error("server error");e.code=t.data,this._onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){const r=this.writeBuffer[e].data;if(r&&(t+=gr(r)),e>0&&t>this._maxPayload)return this.writeBuffer.slice(0,e);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,hr(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,e,r){return this._sendPacket("message",t,e,r),this}send(t,e,r){return this._sendPacket("message",t,e,r),this}_sendPacket(t,e,r,n){if("function"==typeof e&&(n=e,e=void 0),"function"==typeof r&&(n=r,r=null),"closing"===this.readyState||"closed"===this.readyState)return;(r=r||{}).compress=!1!==r.compress;const o={type:t,data:e,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},r=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Nr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),jr&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const t=Cr.indexOf(this._offlineEventListener);-1!==t&&Cr.splice(t,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this._prevBufferLen=0}}}Nr.protocol=4;class Mr extends Nr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let e=this.createTransport(t),r=!1;Nr.priorWebsocketSuccess=!1;const n=()=>{r||(e.send([{type:"ping",data:"probe"}]),e.once("packet",t=>{if(!r)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;Nr.priorWebsocketSuccess="websocket"===e.name,this.transport.pause(()=>{r||"closed"!==this.readyState&&(c(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{const t=new Error("probe error");t.transport=e.name,this.emitReserved("upgradeError",t)}}))};function o(){r||(r=!0,c(),e.close(),e=null)}const i=t=>{const r=new Error("probe error: "+t);r.transport=e.name,o(),this.emitReserved("upgradeError",r)};function s(){i("transport closed")}function a(){i("socket closed")}function u(t){e&&t.name!==e.name&&o()}const c=()=>{e.removeListener("open",n),e.removeListener("error",i),e.removeListener("close",s),this.off("close",a),this.off("upgrading",u)};e.once("open",n),e.once("error",i),e.once("close",s),this.once("close",a),this.once("upgrading",u),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn(()=>{r||e.open()},200):e.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const e=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&e.push(t[r]);return e}}class Ur extends Mr{constructor(t,e={}){const r="object"==typeof t?t:e;(!r.transports||r.transports&&"string"==typeof r.transports[0])&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(t=>kr[t]).filter(t=>!!t)),super(t,r)}}const Lr="function"==typeof ArrayBuffer,Vr=Object.prototype.toString,Hr="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Vr.call(Blob),Wr="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===Vr.call(File);function Kr(t){return Lr&&(t instanceof ArrayBuffer||(t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(t))||Hr&&t instanceof Blob||Wr&&t instanceof File}function zr(t,e){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let e=0,r=t.length;e<r;e++)if(zr(t[e]))return!0;return!1}if(Kr(t))return!0;if(t.toJSON&&"function"==typeof t.toJSON&&1===arguments.length)return zr(t.toJSON(),!0);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)&&zr(t[e]))return!0;return!1}function Gr(t){const e=[],r=t.data,n=t;return n.data=$r(r,e),n.attachments=e.length,{packet:n,buffers:e}}function $r(t,e){if(!t)return t;if(Kr(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=$r(t[n],e);return r}if("object"==typeof t&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=$r(t[n],e));return r}return t}function Yr(t,e){return t.data=Zr(t.data,e),delete t.attachments,t}function Zr(t,e){if(!t)return t;if(t&&!0===t._placeholder){if("number"==typeof t.num&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=Zr(t[r],e);else if("object"==typeof t)for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=Zr(t[r],e));return t}const Xr=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Jr;exports.PacketType=void 0,(Jr=exports.PacketType||(exports.PacketType={}))[Jr.CONNECT=0]="CONNECT",Jr[Jr.DISCONNECT=1]="DISCONNECT",Jr[Jr.EVENT=2]="EVENT",Jr[Jr.ACK=3]="ACK",Jr[Jr.CONNECT_ERROR=4]="CONNECT_ERROR",Jr[Jr.BINARY_EVENT=5]="BINARY_EVENT",Jr[Jr.BINARY_ACK=6]="BINARY_ACK";class Qr extends cr.Emitter{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},"function"==typeof t?{reviver:t}:t)}add(t){let e;if("string"==typeof t){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");e=this.decodeString(t);const r=e.type===exports.PacketType.BINARY_EVENT;r||e.type===exports.PacketType.BINARY_ACK?(e.type=r?exports.PacketType.EVENT:exports.PacketType.ACK,this.reconstructor=new tn(e),0===e.attachments&&super.emitReserved("decoded",e)):super.emitReserved("decoded",e)}else{if(!Kr(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");e=this.reconstructor.takeBinaryData(t),e&&(this.reconstructor=null,super.emitReserved("decoded",e))}}decodeString(t){let e=0;const r={type:Number(t.charAt(0))};if(void 0===exports.PacketType[r.type])throw new Error("unknown packet type "+r.type);if(r.type===exports.PacketType.BINARY_EVENT||r.type===exports.PacketType.BINARY_ACK){const n=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);const o=t.substring(n,e);if(o!=Number(o)||"-"!==t.charAt(e))throw new Error("Illegal attachments");const i=Number(o);if(!en(i)||i<0)throw new Error("Illegal attachments");if(i>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=i}if("/"===t.charAt(e+1)){const n=e+1;for(;++e;){if(","===t.charAt(e))break;if(e===t.length)break}r.nsp=t.substring(n,e)}else r.nsp="/";const n=t.charAt(e+1);if(""!==n&&Number(n)==n){const n=e+1;for(;++e;){const r=t.charAt(e);if(null==r||Number(r)!=r){--e;break}if(e===t.length)break}r.id=Number(t.substring(n,e+1))}if(t.charAt(++e)){const n=this.tryParse(t.substr(e));if(!Qr.isPayloadValid(r.type,n))throw new Error("invalid payload");r.data=n}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case exports.PacketType.CONNECT:return rn(e);case exports.PacketType.DISCONNECT:return void 0===e;case exports.PacketType.CONNECT_ERROR:return"string"==typeof e||rn(e);case exports.PacketType.EVENT:case exports.PacketType.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===Xr.indexOf(e[0]));case exports.PacketType.ACK:case exports.PacketType.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class tn{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const t=Yr(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const en=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};function rn(t){return"[object Object]"===Object.prototype.toString.call(t)}var nn=Object.freeze({__proto__:null,Decoder:Qr,Encoder:class{constructor(t){this.replacer=t}encode(t){return t.type!==exports.PacketType.EVENT&&t.type!==exports.PacketType.ACK||!zr(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===exports.PacketType.EVENT?exports.PacketType.BINARY_EVENT:exports.PacketType.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let e=""+t.type;return t.type!==exports.PacketType.BINARY_EVENT&&t.type!==exports.PacketType.BINARY_ACK||(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){const e=Gr(t),r=this.encodeAsString(e.packet),n=e.buffers;return n.unshift(r),n}},get PacketType(){return exports.PacketType}});exports.Socket=Ur,exports.__awaiter=function(t,e,r,n){return new(r||(r=Promise))(function(o,i){function s(t){try{u(n.next(t))}catch(t){i(t)}}function a(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){t.done?o(t.value):function(t){return t instanceof r?t:new r(function(e){e(t)})}(t.value).then(s,a)}u((n=n.apply(t,e||[])).next())})},exports.__generator=function(t,e){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&a[0]?n.return:a[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,a[1])).done)return o;switch(n=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,n=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t],n=0}finally{r=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}},exports.__read=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,o,i=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s},exports.__spreadArray=function(t,e,r){if(r||2===arguments.length)for(var n,o=0,i=e.length;o<i;o++)!n&&o in e||(n||(n=Array.prototype.slice.call(e,0,o)),n[o]=e[o]);return t.concat(n||Array.prototype.slice.call(e))},exports.__values=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},exports.cjsExports=cr,exports.installTimerFunctions=dr,exports.nextTick=hr,exports.parse=qr,exports.parser=nn,exports.requireSideChannel=function(){if(ee)return te;ee=1;var t=oe(),e=ie(),r=se(),n=Me(),o=function(){if(Qt)return Jt;Qt=1;var t=Ce(),e=Ne(),r=ie(),n=Me(),o=oe(),i=t("%WeakMap%",!0),s=e("WeakMap.prototype.get",!0),a=e("WeakMap.prototype.set",!0),u=e("WeakMap.prototype.has",!0),c=e("WeakMap.prototype.delete",!0);return Jt=i?function(){var t,e,h={assert:function(t){if(!h.has(t))throw new o("Side channel does not contain "+r(t))},delete:function(r){if(i&&r&&("object"==typeof r||"function"==typeof r)){if(t)return c(t,r)}else if(n&&e)return e.delete(r);return!1},get:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&t?s(t,r):e&&e.get(r)},has:function(r){return i&&r&&("object"==typeof r||"function"==typeof r)&&t?u(t,r):!!e&&e.has(r)},set:function(r,o){i&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new i),a(t,r,o)):n&&(e||(e=n()),e.set(r,o))}};return h}:n,Jt}(),i=o||n||r;return te=function(){var r,n={assert:function(r){if(!n.has(r))throw new t("Side channel does not contain "+e(r))},delete:function(t){return!!r&&r.delete(t)},get:function(t){return r&&r.get(t)},has:function(t){return!!r&&r.has(t)},set:function(t,e){r||(r=i()),r.set(t,e)}};return n},te},exports.smCrypto=ne;