@qriton/gateway 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @qriton/gateway might be problematic. Click here for more details.
- package/LICENSE +66 -0
- package/README.md +142 -0
- package/bin/run.js +36 -0
- package/dist/bundle.js +265 -0
- package/package.json +54 -0
package/dist/bundle.js
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var R5=Object.create;var Lh=Object.defineProperty;var O5=Object.getOwnPropertyDescriptor;var L5=Object.getOwnPropertyNames;var D5=Object.getPrototypeOf,q5=Object.prototype.hasOwnProperty;var SE=(e,t)=>()=>(e&&(t=e(e=0)),t);var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),wE=(e,t)=>{for(var r in t)Lh(e,r,{get:t[r],enumerable:!0})},CE=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of L5(t))!q5.call(e,n)&&n!==r&&Lh(e,n,{get:()=>t[n],enumerable:!(i=O5(t,n))||i.enumerable});return e};var Xv=(e,t,r)=>(r=e!=null?R5(D5(e)):{},CE(t||!e||!e.__esModule?Lh(r,"default",{value:e,enumerable:!0}):r,e)),D=e=>CE(Lh({},"__esModule",{value:!0}),e);var us=b(_c=>{"use strict";var s6="[object ArrayBuffer]",cs=class e{static isArrayBuffer(t){return Object.prototype.toString.call(t)===s6}static toArrayBuffer(t){return this.isArrayBuffer(t)?t:t.byteLength===t.buffer.byteLength||t.byteOffset===0&&t.byteLength===t.buffer.byteLength?t.buffer:this.toUint8Array(t.buffer).slice(t.byteOffset,t.byteOffset+t.byteLength).buffer}static toUint8Array(t){return this.toView(t,Uint8Array)}static toView(t,r){if(t.constructor===r)return t;if(this.isArrayBuffer(t))return new r(t);if(this.isArrayBufferView(t))return new r(t.buffer,t.byteOffset,t.byteLength);throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'")}static isBufferSource(t){return this.isArrayBufferView(t)||this.isArrayBuffer(t)}static isArrayBufferView(t){return ArrayBuffer.isView(t)||t&&this.isArrayBuffer(t.buffer)}static isEqual(t,r){let i=e.toUint8Array(t),n=e.toUint8Array(r);if(i.length!==n.byteLength)return!1;for(let s=0;s<i.length;s++)if(i[s]!==n[s])return!1;return!0}static concat(...t){let r;Array.isArray(t[0])&&!(t[1]instanceof Function)||Array.isArray(t[0])&&t[1]instanceof Function?r=t[0]:t[t.length-1]instanceof Function?r=t.slice(0,t.length-1):r=t;let i=0;for(let a of r)i+=a.byteLength;let n=new Uint8Array(i),s=0;for(let a of r){let o=this.toUint8Array(a);n.set(o,s),s+=o.length}return t[t.length-1]instanceof Function?this.toView(n,t[t.length-1]):n.buffer}},dx="string",a6=/^[0-9a-f\s]+$/i,o6=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,c6=/^[a-zA-Z0-9-_]+$/,Kh=class{static fromString(t){let r=unescape(encodeURIComponent(t)),i=new Uint8Array(r.length);for(let n=0;n<r.length;n++)i[n]=r.charCodeAt(n);return i.buffer}static toString(t){let r=cs.toUint8Array(t),i="";for(let s=0;s<r.length;s++)i+=String.fromCharCode(r[s]);return decodeURIComponent(escape(i))}},Ni=class{static toString(t,r=!1){let i=cs.toArrayBuffer(t),n=new DataView(i),s="";for(let a=0;a<i.byteLength;a+=2){let o=n.getUint16(a,r);s+=String.fromCharCode(o)}return s}static fromString(t,r=!1){let i=new ArrayBuffer(t.length*2),n=new DataView(i);for(let s=0;s<t.length;s++)n.setUint16(s*2,t.charCodeAt(s),r);return i}},Hh=class e{static isHex(t){return typeof t===dx&&a6.test(t)}static isBase64(t){return typeof t===dx&&o6.test(t)}static isBase64Url(t){return typeof t===dx&&c6.test(t)}static ToString(t,r="utf8"){let i=cs.toUint8Array(t);switch(r.toLowerCase()){case"utf8":return this.ToUtf8String(i);case"binary":return this.ToBinary(i);case"hex":return this.ToHex(i);case"base64":return this.ToBase64(i);case"base64url":return this.ToBase64Url(i);case"utf16le":return Ni.toString(i,!0);case"utf16":case"utf16be":return Ni.toString(i);default:throw new Error(`Unknown type of encoding '${r}'`)}}static FromString(t,r="utf8"){if(!t)return new ArrayBuffer(0);switch(r.toLowerCase()){case"utf8":return this.FromUtf8String(t);case"binary":return this.FromBinary(t);case"hex":return this.FromHex(t);case"base64":return this.FromBase64(t);case"base64url":return this.FromBase64Url(t);case"utf16le":return Ni.fromString(t,!0);case"utf16":case"utf16be":return Ni.fromString(t);default:throw new Error(`Unknown type of encoding '${r}'`)}}static ToBase64(t){let r=cs.toUint8Array(t);if(typeof btoa<"u"){let i=this.ToString(r,"binary");return btoa(i)}else return Buffer.from(r).toString("base64")}static FromBase64(t){let r=this.formatString(t);if(!r)return new ArrayBuffer(0);if(!e.isBase64(r))throw new TypeError("Argument 'base64Text' is not Base64 encoded");return typeof atob<"u"?this.FromBinary(atob(r)):new Uint8Array(Buffer.from(r,"base64")).buffer}static FromBase64Url(t){let r=this.formatString(t);if(!r)return new ArrayBuffer(0);if(!e.isBase64Url(r))throw new TypeError("Argument 'base64url' is not Base64Url encoded");return this.FromBase64(this.Base64Padding(r.replace(/\-/g,"+").replace(/\_/g,"/")))}static ToBase64Url(t){return this.ToBase64(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}static FromUtf8String(t,r=e.DEFAULT_UTF8_ENCODING){switch(r){case"ascii":return this.FromBinary(t);case"utf8":return Kh.fromString(t);case"utf16":case"utf16be":return Ni.fromString(t);case"utf16le":case"usc2":return Ni.fromString(t,!0);default:throw new Error(`Unknown type of encoding '${r}'`)}}static ToUtf8String(t,r=e.DEFAULT_UTF8_ENCODING){switch(r){case"ascii":return this.ToBinary(t);case"utf8":return Kh.toString(t);case"utf16":case"utf16be":return Ni.toString(t);case"utf16le":case"usc2":return Ni.toString(t,!0);default:throw new Error(`Unknown type of encoding '${r}'`)}}static FromBinary(t){let r=t.length,i=new Uint8Array(r);for(let n=0;n<r;n++)i[n]=t.charCodeAt(n);return i.buffer}static ToBinary(t){let r=cs.toUint8Array(t),i="";for(let n=0;n<r.length;n++)i+=String.fromCharCode(r[n]);return i}static ToHex(t){let r=cs.toUint8Array(t),i="",n=r.length;for(let s=0;s<n;s++){let a=r[s];a<16&&(i+="0"),i+=a.toString(16)}return i}static FromHex(t){let r=this.formatString(t);if(!r)return new ArrayBuffer(0);if(!e.isHex(r))throw new TypeError("Argument 'hexString' is not HEX encoded");r.length%2&&(r=`0${r}`);let i=new Uint8Array(r.length/2);for(let n=0;n<r.length;n=n+2){let s=r.slice(n,n+2);i[n/2]=parseInt(s,16)}return i.buffer}static ToUtf16String(t,r=!1){return Ni.toString(t,r)}static FromUtf16String(t,r=!1){return Ni.fromString(t,r)}static Base64Padding(t){let r=4-t.length%4;if(r<4)for(let i=0;i<r;i++)t+="=";return t}static formatString(t){return t?.replace(/[\n\r\t ]/g,"")||""}};Hh.DEFAULT_UTF8_ENCODING="utf8";function u6(e,...t){let r=arguments[0];for(let i=1;i<arguments.length;i++){let n=arguments[i];for(let s in n)r[s]=n[s]}return r}function l6(...e){let t=e.map(n=>n.byteLength).reduce((n,s)=>n+s),r=new Uint8Array(t),i=0;return e.map(n=>new Uint8Array(n)).forEach(n=>{for(let s of n)r[i++]=s}),r.buffer}function p6(e,t){if(!(e&&t)||e.byteLength!==t.byteLength)return!1;let r=new Uint8Array(e),i=new Uint8Array(t);for(let n=0;n<e.byteLength;n++)if(r[n]!==i[n])return!1;return!0}_c.BufferSourceConverter=cs;_c.Convert=Hh;_c.assign=u6;_c.combine=l6;_c.isEqual=p6});var RT=b(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});function f6(e){return new Date(e.getTime()+e.getTimezoneOffset()*6e4)}function d6(e,t,r){var i;return e instanceof Object&&(i=e[t])!==null&&i!==void 0?i:r}function h6(e,t=0,r=e.byteLength-t,i=!1){let n="";for(let s of new Uint8Array(e,t,r)){let a=s.toString(16).toUpperCase();a.length===1&&(n+="0"),n+=a,i&&(n+=" ")}return n.trim()}function m6(e,t,r,i){return t instanceof ArrayBuffer?t.byteLength?r<0?(e.error="Wrong parameter: inputOffset less than zero",!1):i<0?(e.error="Wrong parameter: inputLength less than zero",!1):t.byteLength-r-i<0?(e.error="End of input reached before message was fully decoded (inconsistent offset and length values)",!1):!0:(e.error="Wrong parameter: inputBuffer has zero length",!1):(e.error='Wrong parameter: inputBuffer must be "ArrayBuffer"',!1)}function hx(e,t){let r=0;if(e.length===1)return e[0];for(let i=e.length-1;i>=0;i--)r+=e[e.length-1-i]*Math.pow(2,t*i);return r}function mx(e,t,r=-1){let i=r,n=e,s=0,a=Math.pow(2,t);for(let o=1;o<8;o++){if(e<a){let c;if(i<0)c=new ArrayBuffer(o),s=o;else{if(i<o)return new ArrayBuffer(0);c=new ArrayBuffer(i),s=i}let u=new Uint8Array(c);for(let l=o-1;l>=0;l--){let p=Math.pow(2,l*t);u[s-l-1]=Math.floor(n/p),n-=u[s-l-1]*p}return c}a*=Math.pow(2,t)}return new ArrayBuffer(0)}function y6(...e){let t=0,r=0;for(let s of e)t+=s.byteLength;let i=new ArrayBuffer(t),n=new Uint8Array(i);for(let s of e)n.set(new Uint8Array(s),r),r+=s.byteLength;return i}function g6(...e){let t=0,r=0;for(let s of e)t+=s.length;let i=new ArrayBuffer(t),n=new Uint8Array(i);for(let s of e)n.set(s,r),r+=s.length;return n}function v6(){let e=new Uint8Array(this.valueHex);if(this.valueHex.byteLength>=2){let o=e[0]===255&&e[1]&128,c=e[0]===0&&(e[1]&128)===0;(o||c)&&this.warnings.push("Needlessly long format")}let t=new ArrayBuffer(this.valueHex.byteLength),r=new Uint8Array(t);for(let o=0;o<this.valueHex.byteLength;o++)r[o]=0;r[0]=e[0]&128;let i=hx(r,8),n=new ArrayBuffer(this.valueHex.byteLength),s=new Uint8Array(n);for(let o=0;o<this.valueHex.byteLength;o++)s[o]=e[o];return s[0]&=127,hx(s,8)-i}function x6(e){let t=e<0?e*-1:e,r=128;for(let i=1;i<8;i++){if(t<=r){if(e<0){let a=r-t,o=mx(a,8,i),c=new Uint8Array(o);return c[0]|=128,o}let n=mx(t,8,i),s=new Uint8Array(n);if(s[0]&128){let a=n.slice(0),o=new Uint8Array(a);n=new ArrayBuffer(n.byteLength+1),s=new Uint8Array(n);for(let c=0;c<a.byteLength;c++)s[c+1]=o[c];s[0]=0}return n}r*=Math.pow(2,8)}return new ArrayBuffer(0)}function b6(e,t){if(e.byteLength!==t.byteLength)return!1;let r=new Uint8Array(e),i=new Uint8Array(t);for(let n=0;n<r.length;n++)if(r[n]!==i[n])return!1;return!0}function _6(e,t){let r=e.toString(10);if(t<r.length)return"";let i=t-r.length,n=new Array(i);for(let a=0;a<i;a++)n[a]="0";return n.join("").concat(r)}var PT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",NT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=";function A6(e,t=!1,r=!1,i=!1){let n=0,s=0,a=0,o="",c=t?NT:PT;if(i){let u=0;for(let l=0;l<e.length;l++)if(e.charCodeAt(l)!==0){u=l;break}e=e.slice(u)}for(;n<e.length;){let u=e.charCodeAt(n++);n>=e.length&&(s=1);let l=e.charCodeAt(n++);n>=e.length&&(a=1);let p=e.charCodeAt(n++),d=u>>2,h=(u&3)<<4|l>>4,f=(l&15)<<2|p>>6,m=p&63;s===1?f=m=64:a===1&&(m=64),r?f===64?o+=`${c.charAt(d)}${c.charAt(h)}`:m===64?o+=`${c.charAt(d)}${c.charAt(h)}${c.charAt(f)}`:o+=`${c.charAt(d)}${c.charAt(h)}${c.charAt(f)}${c.charAt(m)}`:o+=`${c.charAt(d)}${c.charAt(h)}${c.charAt(f)}${c.charAt(m)}`}return o}function S6(e,t=!1,r=!1){let i=t?NT:PT;function n(c){for(let u=0;u<64;u++)if(i.charAt(u)===c)return u;return 64}function s(c){return c===64?0:c}let a=0,o="";for(;a<e.length;){let c=n(e.charAt(a++)),u=a>=e.length?0:n(e.charAt(a++)),l=a>=e.length?0:n(e.charAt(a++)),p=a>=e.length?0:n(e.charAt(a++)),d=s(c)<<2|s(u)>>4,h=(s(u)&15)<<4|s(l)>>2,f=(s(l)&3)<<6|s(p);o+=String.fromCharCode(d),l!==64&&(o+=String.fromCharCode(h)),p!==64&&(o+=String.fromCharCode(f))}if(r){let c=o.length,u=-1;for(let l=c-1;l>=0;l--)if(o.charCodeAt(l)!==0){u=l;break}u!==-1?o=o.slice(0,u+1):o=""}return o}function w6(e){let t="",r=new Uint8Array(e);for(let i of r)t+=String.fromCharCode(i);return t}function C6(e){let t=e.length,r=new ArrayBuffer(t),i=new Uint8Array(r);for(let n=0;n<t;n++)i[n]=e.charCodeAt(n);return r}var E6=Math.log(2);function T6(e){let t=Math.log(e)/E6,r=Math.floor(t),i=Math.round(t);return r===i?r:i}function I6(e,t){for(let r of t)delete e[r]}rr.arrayBufferToString=w6;rr.bufferToHexCodes=h6;rr.checkBufferParams=m6;rr.clearProps=I6;rr.fromBase64=S6;rr.getParametersValue=d6;rr.getUTCDate=f6;rr.isEqualBuffer=b6;rr.nearestPowerOf2=T6;rr.padNumber=_6;rr.stringToArrayBuffer=C6;rr.toBase64=A6;rr.utilConcatBuf=y6;rr.utilConcatView=g6;rr.utilDecodeTC=v6;rr.utilEncodeTC=x6;rr.utilFromBase=hx;rr.utilToBase=mx});var ds=b(Ne=>{"use strict";var B6=us(),k6=RT();function qT(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if(r!=="default"){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var Ke=qT(B6),lt=qT(k6);function $h(){if(typeof BigInt>"u")throw new Error("BigInt is not defined. Your environment doesn't implement BigInt.")}function vx(e){let t=0,r=0;for(let n=0;n<e.length;n++){let s=e[n];t+=s.byteLength}let i=new Uint8Array(t);for(let n=0;n<e.length;n++){let s=e[n];i.set(new Uint8Array(s),r),r+=s.byteLength}return i.buffer}function fs(e,t,r,i){return t instanceof Uint8Array?t.byteLength?r<0?(e.error="Wrong parameter: inputOffset less than zero",!1):i<0?(e.error="Wrong parameter: inputLength less than zero",!1):t.byteLength-r-i<0?(e.error="End of input reached before message was fully decoded (inconsistent offset and length values)",!1):!0:(e.error="Wrong parameter: inputBuffer has zero length",!1):(e.error="Wrong parameter: inputBuffer must be 'Uint8Array'",!1)}var Sc=class{constructor(){this.items=[]}write(t){this.items.push(t)}final(){return vx(this.items)}},Yl=[new Uint8Array([1])],OT="0123456789",yx="name",LT="valueHexView",P6="isHexOnly",N6="idBlock",R6="tagClass",O6="tagNumber",L6="isConstructed",D6="fromBER",q6="toBER",j6="local",ei="",En=new ArrayBuffer(0),om=new Uint8Array(0),Jl="EndOfContent",jT="OCTET STRING",UT="BIT STRING";function Tn(e){var t;return t=class extends e{get valueHex(){return this.valueHexView.slice().buffer}set valueHex(i){this.valueHexView=new Uint8Array(i)}constructor(...i){var n;super(...i);let s=i[0]||{};this.isHexOnly=(n=s.isHexOnly)!==null&&n!==void 0?n:!1,this.valueHexView=s.valueHex?Ke.BufferSourceConverter.toUint8Array(s.valueHex):om}fromBER(i,n,s){let a=i instanceof ArrayBuffer?new Uint8Array(i):i;if(!fs(this,a,n,s))return-1;let o=n+s;return this.valueHexView=a.subarray(n,o),this.valueHexView.length?(this.blockLength=s,o):(this.warnings.push("Zero buffer length"),n)}toBER(i=!1){return this.isHexOnly?i?new ArrayBuffer(this.valueHexView.byteLength):this.valueHexView.byteLength===this.valueHexView.buffer.byteLength?this.valueHexView.buffer:this.valueHexView.slice().buffer:(this.error="Flag 'isHexOnly' is not set, abort",En)}toJSON(){return{...super.toJSON(),isHexOnly:this.isHexOnly,valueHex:Ke.Convert.ToHex(this.valueHexView)}}},t.NAME="hexBlock",t}var ls=class{static blockName(){return this.NAME}get valueBeforeDecode(){return this.valueBeforeDecodeView.slice().buffer}set valueBeforeDecode(t){this.valueBeforeDecodeView=new Uint8Array(t)}constructor({blockLength:t=0,error:r=ei,warnings:i=[],valueBeforeDecode:n=om}={}){this.blockLength=t,this.error=r,this.warnings=i,this.valueBeforeDecodeView=Ke.BufferSourceConverter.toUint8Array(n)}toJSON(){return{blockName:this.constructor.NAME,blockLength:this.blockLength,error:this.error,warnings:this.warnings,valueBeforeDecode:Ke.Convert.ToHex(this.valueBeforeDecodeView)}}};ls.NAME="baseBlock";var Br=class extends ls{fromBER(t,r,i){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")}toBER(t,r){throw TypeError("User need to make a specific function in a class which extends 'ValueBlock'")}};Br.NAME="valueBlock";var zh=class extends Tn(ls){constructor({idBlock:t={}}={}){var r,i,n,s;super(),t?(this.isHexOnly=(r=t.isHexOnly)!==null&&r!==void 0?r:!1,this.valueHexView=t.valueHex?Ke.BufferSourceConverter.toUint8Array(t.valueHex):om,this.tagClass=(i=t.tagClass)!==null&&i!==void 0?i:-1,this.tagNumber=(n=t.tagNumber)!==null&&n!==void 0?n:-1,this.isConstructed=(s=t.isConstructed)!==null&&s!==void 0?s:!1):(this.tagClass=-1,this.tagNumber=-1,this.isConstructed=!1)}toBER(t=!1){let r=0;switch(this.tagClass){case 1:r|=0;break;case 2:r|=64;break;case 3:r|=128;break;case 4:r|=192;break;default:return this.error="Unknown tag class",En}if(this.isConstructed&&(r|=32),this.tagNumber<31&&!this.isHexOnly){let n=new Uint8Array(1);if(!t){let s=this.tagNumber;s&=31,r|=s,n[0]=r}return n.buffer}if(!this.isHexOnly){let n=lt.utilToBase(this.tagNumber,7),s=new Uint8Array(n),a=n.byteLength,o=new Uint8Array(a+1);if(o[0]=r|31,!t){for(let c=0;c<a-1;c++)o[c+1]=s[c]|128;o[a]=s[a-1]}return o.buffer}let i=new Uint8Array(this.valueHexView.byteLength+1);if(i[0]=r|31,!t){let n=this.valueHexView;for(let s=0;s<n.length-1;s++)i[s+1]=n[s]|128;i[this.valueHexView.byteLength]=n[n.length-1]}return i.buffer}fromBER(t,r,i){let n=Ke.BufferSourceConverter.toUint8Array(t);if(!fs(this,n,r,i))return-1;let s=n.subarray(r,r+i);if(s.length===0)return this.error="Zero buffer length",-1;switch(s[0]&192){case 0:this.tagClass=1;break;case 64:this.tagClass=2;break;case 128:this.tagClass=3;break;case 192:this.tagClass=4;break;default:return this.error="Unknown tag class",-1}this.isConstructed=(s[0]&32)===32,this.isHexOnly=!1;let o=s[0]&31;if(o!==31)this.tagNumber=o,this.blockLength=1;else{let c=1,u=this.valueHexView=new Uint8Array(255),l=255;for(;s[c]&128;){if(u[c-1]=s[c]&127,c++,c>=s.length)return this.error="End of input reached before message was fully decoded",-1;if(c===l){l+=255;let d=new Uint8Array(l);for(let h=0;h<u.length;h++)d[h]=u[h];u=this.valueHexView=new Uint8Array(l)}}this.blockLength=c+1,u[c-1]=s[c]&127;let p=new Uint8Array(c);for(let d=0;d<c;d++)p[d]=u[d];u=this.valueHexView=new Uint8Array(c),u.set(p),this.blockLength<=9?this.tagNumber=lt.utilFromBase(u,7):(this.isHexOnly=!0,this.warnings.push("Tag too long, represented as hex-coded"))}if(this.tagClass===1&&this.isConstructed)switch(this.tagNumber){case 1:case 2:case 5:case 6:case 9:case 13:case 14:case 23:case 24:case 31:case 32:case 33:case 34:return this.error="Constructed encoding used for primitive type",-1}return r+this.blockLength}toJSON(){return{...super.toJSON(),tagClass:this.tagClass,tagNumber:this.tagNumber,isConstructed:this.isConstructed}}};zh.NAME="identificationBlock";var Gh=class extends ls{constructor({lenBlock:t={}}={}){var r,i,n;super(),this.isIndefiniteForm=(r=t.isIndefiniteForm)!==null&&r!==void 0?r:!1,this.longFormUsed=(i=t.longFormUsed)!==null&&i!==void 0?i:!1,this.length=(n=t.length)!==null&&n!==void 0?n:0}fromBER(t,r,i){let n=Ke.BufferSourceConverter.toUint8Array(t);if(!fs(this,n,r,i))return-1;let s=n.subarray(r,r+i);if(s.length===0)return this.error="Zero buffer length",-1;if(s[0]===255)return this.error="Length block 0xFF is reserved by standard",-1;if(this.isIndefiniteForm=s[0]===128,this.isIndefiniteForm)return this.blockLength=1,r+this.blockLength;if(this.longFormUsed=!!(s[0]&128),this.longFormUsed===!1)return this.length=s[0],this.blockLength=1,r+this.blockLength;let a=s[0]&127;if(a>8)return this.error="Too big integer",-1;if(a+1>s.length)return this.error="End of input reached before message was fully decoded",-1;let o=r+1,c=n.subarray(o,o+a);return c[a-1]===0&&this.warnings.push("Needlessly long encoded length"),this.length=lt.utilFromBase(c,8),this.longFormUsed&&this.length<=127&&this.warnings.push("Unnecessary usage of long length form"),this.blockLength=a+1,r+this.blockLength}toBER(t=!1){let r,i;if(this.length>127&&(this.longFormUsed=!0),this.isIndefiniteForm)return r=new ArrayBuffer(1),t===!1&&(i=new Uint8Array(r),i[0]=128),r;if(this.longFormUsed){let n=lt.utilToBase(this.length,8);if(n.byteLength>127)return this.error="Too big length",En;if(r=new ArrayBuffer(n.byteLength+1),t)return r;let s=new Uint8Array(n);i=new Uint8Array(r),i[0]=n.byteLength|128;for(let a=0;a<n.byteLength;a++)i[a+1]=s[a];return r}return r=new ArrayBuffer(1),t===!1&&(i=new Uint8Array(r),i[0]=this.length),r}toJSON(){return{...super.toJSON(),isIndefiniteForm:this.isIndefiniteForm,longFormUsed:this.longFormUsed,length:this.length}}};Gh.NAME="lengthBlock";var de={},gr=class extends ls{constructor({name:t=ei,optional:r=!1,primitiveSchema:i,...n}={},s){super(n),this.name=t,this.optional=r,i&&(this.primitiveSchema=i),this.idBlock=new zh(n),this.lenBlock=new Gh(n),this.valueBlock=s?new s(n):new Br(n)}fromBER(t,r,i){let n=this.valueBlock.fromBER(t,r,this.lenBlock.isIndefiniteForm?i:this.lenBlock.length);return n===-1?(this.error=this.valueBlock.error,n):(this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength),n)}toBER(t,r){let i=r||new Sc;r||FT(this);let n=this.idBlock.toBER(t);if(i.write(n),this.lenBlock.isIndefiniteForm)i.write(new Uint8Array([128]).buffer),this.valueBlock.toBER(t,i),i.write(new ArrayBuffer(2));else{let s=this.valueBlock.toBER(t);this.lenBlock.length=s.byteLength;let a=this.lenBlock.toBER(t);i.write(a),i.write(s)}return r?En:i.final()}toJSON(){let t={...super.toJSON(),idBlock:this.idBlock.toJSON(),lenBlock:this.lenBlock.toJSON(),valueBlock:this.valueBlock.toJSON(),name:this.name,optional:this.optional};return this.primitiveSchema&&(t.primitiveSchema=this.primitiveSchema.toJSON()),t}toString(t="ascii"){return t==="ascii"?this.onAsciiEncoding():Ke.Convert.ToHex(this.toBER())}onAsciiEncoding(){let t=this.constructor.NAME,r=Ke.Convert.ToHex(this.valueBlock.valueBeforeDecodeView);return`${t} : ${r}`}isEqual(t){if(this===t)return!0;if(!(t instanceof this.constructor))return!1;let r=this.toBER(),i=t.toBER();return lt.isEqualBuffer(r,i)}};gr.NAME="BaseBlock";function FT(e){var t;if(e instanceof de.Constructed)for(let r of e.valueBlock.value)FT(r)&&(e.lenBlock.isIndefiniteForm=!0);return!!(!((t=e.lenBlock)===null||t===void 0)&&t.isIndefiniteForm)}var Xl=class extends gr{getValue(){return this.valueBlock.value}setValue(t){this.valueBlock.value=t}constructor({value:t=ei,...r}={},i){super(r,i),t&&this.fromString(t)}fromBER(t,r,i){let n=this.valueBlock.fromBER(t,r,this.lenBlock.isIndefiniteForm?i:this.lenBlock.length);return n===-1?(this.error=this.valueBlock.error,n):(this.fromBuffer(this.valueBlock.valueHexView),this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength),n)}onAsciiEncoding(){return`${this.constructor.NAME} : '${this.valueBlock.value}'`}};Xl.NAME="BaseStringBlock";var Wh=class extends Tn(Br){constructor({isHexOnly:t=!0,...r}={}){super(r),this.isHexOnly=t}};Wh.NAME="PrimitiveValueBlock";var MT,Zl=class extends gr{constructor(t={}){super(t,Wh),this.idBlock.isConstructed=!1}};MT=Zl;de.Primitive=MT;Zl.NAME="PRIMITIVE";function U6(e,t){if(e instanceof t)return e;let r=new t;return r.idBlock=e.idBlock,r.lenBlock=e.lenBlock,r.warnings=e.warnings,r.valueBeforeDecodeView=e.valueBeforeDecodeView,r}function Tc(e,t=0,r=e.length){let i=t,n=new gr({},Br),s=new ls;if(!fs(s,e,t,r))return n.error=s.error,{offset:-1,result:n};if(!e.subarray(t,t+r).length)return n.error="Zero buffer length",{offset:-1,result:n};let o=n.idBlock.fromBER(e,t,r);if(n.idBlock.warnings.length&&n.warnings.concat(n.idBlock.warnings),o===-1)return n.error=n.idBlock.error,{offset:-1,result:n};if(t=o,r-=n.idBlock.blockLength,o=n.lenBlock.fromBER(e,t,r),n.lenBlock.warnings.length&&n.warnings.concat(n.lenBlock.warnings),o===-1)return n.error=n.lenBlock.error,{offset:-1,result:n};if(t=o,r-=n.lenBlock.blockLength,!n.idBlock.isConstructed&&n.lenBlock.isIndefiniteForm)return n.error="Indefinite length form used for primitive encoding form",{offset:-1,result:n};let c=gr;switch(n.idBlock.tagClass){case 1:if(n.idBlock.tagNumber>=37&&n.idBlock.isHexOnly===!1)return n.error="UNIVERSAL 37 and upper tags are reserved by ASN.1 standard",{offset:-1,result:n};switch(n.idBlock.tagNumber){case 0:if(n.idBlock.isConstructed&&n.lenBlock.length>0)return n.error="Type [UNIVERSAL 0] is reserved",{offset:-1,result:n};c=de.EndOfContent;break;case 1:c=de.Boolean;break;case 2:c=de.Integer;break;case 3:c=de.BitString;break;case 4:c=de.OctetString;break;case 5:c=de.Null;break;case 6:c=de.ObjectIdentifier;break;case 10:c=de.Enumerated;break;case 12:c=de.Utf8String;break;case 13:c=de.RelativeObjectIdentifier;break;case 14:c=de.TIME;break;case 15:return n.error="[UNIVERSAL 15] is reserved by ASN.1 standard",{offset:-1,result:n};case 16:c=de.Sequence;break;case 17:c=de.Set;break;case 18:c=de.NumericString;break;case 19:c=de.PrintableString;break;case 20:c=de.TeletexString;break;case 21:c=de.VideotexString;break;case 22:c=de.IA5String;break;case 23:c=de.UTCTime;break;case 24:c=de.GeneralizedTime;break;case 25:c=de.GraphicString;break;case 26:c=de.VisibleString;break;case 27:c=de.GeneralString;break;case 28:c=de.UniversalString;break;case 29:c=de.CharacterString;break;case 30:c=de.BmpString;break;case 31:c=de.DATE;break;case 32:c=de.TimeOfDay;break;case 33:c=de.DateTime;break;case 34:c=de.Duration;break;default:{let u=n.idBlock.isConstructed?new de.Constructed:new de.Primitive;u.idBlock=n.idBlock,u.lenBlock=n.lenBlock,u.warnings=n.warnings,n=u}}break;default:c=n.idBlock.isConstructed?de.Constructed:de.Primitive}return n=U6(n,c),o=n.fromBER(e,t,n.lenBlock.isIndefiniteForm?r:n.lenBlock.length),n.valueBeforeDecodeView=e.subarray(i,i+n.blockLength),{offset:o,result:n}}function F6(e){if(!e.byteLength){let t=new gr({},Br);return t.error="Input buffer has zero length",{offset:-1,result:t}}return Tc(Ke.BufferSourceConverter.toUint8Array(e).slice(),0,e.byteLength)}function M6(e,t){return e?1:t}var wn=class extends Br{constructor({value:t=[],isIndefiniteForm:r=!1,...i}={}){super(i),this.value=t,this.isIndefiniteForm=r}fromBER(t,r,i){let n=Ke.BufferSourceConverter.toUint8Array(t);if(!fs(this,n,r,i))return-1;if(this.valueBeforeDecodeView=n.subarray(r,r+i),this.valueBeforeDecodeView.length===0)return this.warnings.push("Zero buffer length"),r;let s=r;for(;M6(this.isIndefiniteForm,i)>0;){let a=Tc(n,s,i);if(a.offset===-1)return this.error=a.result.error,this.warnings.concat(a.result.warnings),-1;if(s=a.offset,this.blockLength+=a.result.blockLength,i-=a.result.blockLength,this.value.push(a.result),this.isIndefiniteForm&&a.result.constructor.NAME===Jl)break}return this.isIndefiniteForm&&(this.value[this.value.length-1].constructor.NAME===Jl?this.value.pop():this.warnings.push("No EndOfContent block encoded")),s}toBER(t,r){let i=r||new Sc;for(let n=0;n<this.value.length;n++)this.value[n].toBER(t,i);return r?En:i.final()}toJSON(){let t={...super.toJSON(),isIndefiniteForm:this.isIndefiniteForm,value:[]};for(let r of this.value)t.value.push(r.toJSON());return t}};wn.NAME="ConstructedValueBlock";var VT,ps=class extends gr{constructor(t={}){super(t,wn),this.idBlock.isConstructed=!0}fromBER(t,r,i){this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm;let n=this.valueBlock.fromBER(t,r,this.lenBlock.isIndefiniteForm?i:this.lenBlock.length);return n===-1?(this.error=this.valueBlock.error,n):(this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.valueBlock.error.length||(this.blockLength+=this.valueBlock.blockLength),n)}onAsciiEncoding(){let t=[];for(let i of this.valueBlock.value)t.push(i.toString("ascii").split(`
|
|
3
|
+
`).map(n=>` ${n}`).join(`
|
|
4
|
+
`));let r=this.idBlock.tagClass===3?`[${this.idBlock.tagNumber}]`:this.constructor.NAME;return t.length?`${r} :
|
|
5
|
+
${t.join(`
|
|
6
|
+
`)}`:`${r} :`}};VT=ps;de.Constructed=VT;ps.NAME="CONSTRUCTED";var Yh=class extends Br{fromBER(t,r,i){return r}toBER(t){return En}};Yh.override="EndOfContentValueBlock";var KT,ep=class extends gr{constructor(t={}){super(t,Yh),this.idBlock.tagClass=1,this.idBlock.tagNumber=0}};KT=ep;de.EndOfContent=KT;ep.NAME=Jl;var HT,tp=class extends gr{constructor(t={}){super(t,Br),this.idBlock.tagClass=1,this.idBlock.tagNumber=5}fromBER(t,r,i){return this.lenBlock.length>0&&this.warnings.push("Non-zero length of value block for Null type"),this.idBlock.error.length||(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length||(this.blockLength+=this.lenBlock.blockLength),this.blockLength+=i,r+i>t.byteLength?(this.error="End of input reached before message was fully decoded (inconsistent offset and length values)",-1):r+i}toBER(t,r){let i=new ArrayBuffer(2);if(!t){let n=new Uint8Array(i);n[0]=5,n[1]=0}return r&&r.write(i),i}onAsciiEncoding(){return`${this.constructor.NAME}`}};HT=tp;de.Null=HT;tp.NAME="NULL";var Qh=class extends Tn(Br){get value(){for(let t of this.valueHexView)if(t>0)return!0;return!1}set value(t){this.valueHexView[0]=t?255:0}constructor({value:t,...r}={}){super(r),r.valueHex?this.valueHexView=Ke.BufferSourceConverter.toUint8Array(r.valueHex):this.valueHexView=new Uint8Array(1),t&&(this.value=t)}fromBER(t,r,i){let n=Ke.BufferSourceConverter.toUint8Array(t);return fs(this,n,r,i)?(this.valueHexView=n.subarray(r,r+i),i>1&&this.warnings.push("Boolean value encoded in more then 1 octet"),this.isHexOnly=!0,lt.utilDecodeTC.call(this),this.blockLength=i,r+i):-1}toBER(){return this.valueHexView.slice()}toJSON(){return{...super.toJSON(),value:this.value}}};Qh.NAME="BooleanValueBlock";var $T,rp=class extends gr{getValue(){return this.valueBlock.value}setValue(t){this.valueBlock.value=t}constructor(t={}){super(t,Qh),this.idBlock.tagClass=1,this.idBlock.tagNumber=1}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.getValue}`}};$T=rp;de.Boolean=$T;rp.NAME="BOOLEAN";var Jh=class extends Tn(wn){constructor({isConstructed:t=!1,...r}={}){super(r),this.isConstructed=t}fromBER(t,r,i){let n=0;if(this.isConstructed){if(this.isHexOnly=!1,n=wn.prototype.fromBER.call(this,t,r,i),n===-1)return n;for(let s=0;s<this.value.length;s++){let a=this.value[s].constructor.NAME;if(a===Jl){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, OCTET STRING may consists of OCTET STRINGs only",-1}if(a!==jT)return this.error="OCTET STRING may consists of OCTET STRINGs only",-1}}else this.isHexOnly=!0,n=super.fromBER(t,r,i),this.blockLength=i;return n}toBER(t,r){return this.isConstructed?wn.prototype.toBER.call(this,t,r):t?new ArrayBuffer(this.valueHexView.byteLength):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),isConstructed:this.isConstructed}}};Jh.NAME="OctetStringValueBlock";var xx,ip=class extends gr{constructor({idBlock:t={},lenBlock:r={},...i}={}){var n,s;(n=i.isConstructed)!==null&&n!==void 0||(i.isConstructed=!!(!((s=i.value)===null||s===void 0)&&s.length)),super({idBlock:{isConstructed:i.isConstructed,...t},lenBlock:{...r,isIndefiniteForm:!!i.isIndefiniteForm},...i},Jh),this.idBlock.tagClass=1,this.idBlock.tagNumber=4}fromBER(t,r,i){if(this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,i===0)return this.idBlock.error.length===0&&(this.blockLength+=this.idBlock.blockLength),this.lenBlock.error.length===0&&(this.blockLength+=this.lenBlock.blockLength),r;if(!this.valueBlock.isConstructed){let s=(t instanceof ArrayBuffer?new Uint8Array(t):t).subarray(r,r+i);try{if(s.byteLength){let a=Tc(s,0,s.byteLength);a.offset!==-1&&a.offset===i&&(this.valueBlock.value=[a.result])}}catch{}}return super.fromBER(t,r,i)}onAsciiEncoding(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length)return ps.prototype.onAsciiEncoding.call(this);let t=this.constructor.NAME,r=Ke.Convert.ToHex(this.valueBlock.valueHexView);return`${t} : ${r}`}getValue(){if(!this.idBlock.isConstructed)return this.valueBlock.valueHexView.slice().buffer;let t=[];for(let r of this.valueBlock.value)r instanceof xx&&t.push(r.valueBlock.valueHexView);return Ke.BufferSourceConverter.concat(t)}};xx=ip;de.OctetString=xx;ip.NAME=jT;var Xh=class extends Tn(wn){constructor({unusedBits:t=0,isConstructed:r=!1,...i}={}){super(i),this.unusedBits=t,this.isConstructed=r,this.blockLength=this.valueHexView.byteLength}fromBER(t,r,i){if(!i)return r;let n=-1;if(this.isConstructed){if(n=wn.prototype.fromBER.call(this,t,r,i),n===-1)return n;for(let o of this.value){let c=o.constructor.NAME;if(c===Jl){if(this.isIndefiniteForm)break;return this.error="EndOfContent is unexpected, BIT STRING may consists of BIT STRINGs only",-1}if(c!==UT)return this.error="BIT STRING may consists of BIT STRINGs only",-1;let u=o.valueBlock;if(this.unusedBits>0&&u.unusedBits>0)return this.error='Using of "unused bits" inside constructive BIT STRING allowed for least one only',-1;this.unusedBits=u.unusedBits}return n}let s=Ke.BufferSourceConverter.toUint8Array(t);if(!fs(this,s,r,i))return-1;let a=s.subarray(r,r+i);if(this.unusedBits=a[0],this.unusedBits>7)return this.error="Unused bits for BitString must be in range 0-7",-1;if(!this.unusedBits){let o=a.subarray(1);try{if(o.byteLength){let c=Tc(o,0,o.byteLength);c.offset!==-1&&c.offset===i-1&&(this.value=[c.result])}}catch{}}return this.valueHexView=a.subarray(1),this.blockLength=a.length,r+i}toBER(t,r){if(this.isConstructed)return wn.prototype.toBER.call(this,t,r);if(t)return new ArrayBuffer(this.valueHexView.byteLength+1);if(!this.valueHexView.byteLength){let n=new Uint8Array(1);return n[0]=0,n.buffer}let i=new Uint8Array(this.valueHexView.length+1);return i[0]=this.unusedBits,i.set(this.valueHexView,1),i.buffer}toJSON(){return{...super.toJSON(),unusedBits:this.unusedBits,isConstructed:this.isConstructed}}};Xh.NAME="BitStringValueBlock";var zT,np=class extends gr{constructor({idBlock:t={},lenBlock:r={},...i}={}){var n,s;(n=i.isConstructed)!==null&&n!==void 0||(i.isConstructed=!!(!((s=i.value)===null||s===void 0)&&s.length)),super({idBlock:{isConstructed:i.isConstructed,...t},lenBlock:{...r,isIndefiniteForm:!!i.isIndefiniteForm},...i},Xh),this.idBlock.tagClass=1,this.idBlock.tagNumber=3}fromBER(t,r,i){return this.valueBlock.isConstructed=this.idBlock.isConstructed,this.valueBlock.isIndefiniteForm=this.lenBlock.isIndefiniteForm,super.fromBER(t,r,i)}onAsciiEncoding(){if(this.valueBlock.isConstructed||this.valueBlock.value&&this.valueBlock.value.length)return ps.prototype.onAsciiEncoding.call(this);{let t=[],r=this.valueBlock.valueHexView;for(let a of r)t.push(a.toString(2).padStart(8,"0"));let i=t.join(""),n=this.constructor.NAME,s=i.substring(0,i.length-this.valueBlock.unusedBits);return`${n} : ${s}`}}};zT=np;de.BitString=zT;np.NAME=UT;var GT;function V6(e,t){let r=new Uint8Array([0]),i=new Uint8Array(e),n=new Uint8Array(t),s=i.slice(0),a=s.length-1,o=n.slice(0),c=o.length-1,u=0,l=c<a?a:c,p=0;for(let d=l;d>=0;d--,p++)!0===p<o.length?u=s[a-p]+o[c-p]+r[0]:u=s[a-p]+r[0],r[0]=u/10,!0===p>=s.length?s=lt.utilConcatView(new Uint8Array([u%10]),s):s[a-p]=u%10;return r[0]>0&&(s=lt.utilConcatView(r,s)),s}function DT(e){if(e>=Yl.length)for(let t=Yl.length;t<=e;t++){let r=new Uint8Array([0]),i=Yl[t-1].slice(0);for(let n=i.length-1;n>=0;n--){let s=new Uint8Array([(i[n]<<1)+r[0]]);r[0]=s[0]/10,i[n]=s[0]%10}r[0]>0&&(i=lt.utilConcatView(r,i)),Yl.push(i)}return Yl[e]}function K6(e,t){let r=0,i=new Uint8Array(e),n=new Uint8Array(t),s=i.slice(0),a=s.length-1,o=n.slice(0),c=o.length-1,u,l=0;for(let p=c;p>=0;p--,l++)u=s[a-l]-o[c-l]-r,!0===u<0?(r=1,s[a-l]=u+10):(r=0,s[a-l]=u);if(r>0)for(let p=a-c+1;p>=0;p--,l++)if(u=s[a-l]-r,u<0)r=1,s[a-l]=u+10;else{r=0,s[a-l]=u;break}return s.slice()}var sp=class extends Tn(Br){setValueHex(){this.valueHexView.length>=4?(this.warnings.push("Too big Integer for decoding, hex only"),this.isHexOnly=!0,this._valueDec=0):(this.isHexOnly=!1,this.valueHexView.length>0&&(this._valueDec=lt.utilDecodeTC.call(this)))}constructor({value:t,...r}={}){super(r),this._valueDec=0,r.valueHex&&this.setValueHex(),t!==void 0&&(this.valueDec=t)}set valueDec(t){this._valueDec=t,this.isHexOnly=!1,this.valueHexView=new Uint8Array(lt.utilEncodeTC(t))}get valueDec(){return this._valueDec}fromDER(t,r,i,n=0){let s=this.fromBER(t,r,i);if(s===-1)return s;let a=this.valueHexView;return a[0]===0&&(a[1]&128)!==0?this.valueHexView=a.subarray(1):n!==0&&a.length<n&&(n-a.length>1&&(n=a.length+1),this.valueHexView=a.subarray(n-a.length)),s}toDER(t=!1){let r=this.valueHexView;switch(!0){case(r[0]&128)!==0:{let i=new Uint8Array(this.valueHexView.length+1);i[0]=0,i.set(r,1),this.valueHexView=i}break;case(r[0]===0&&(r[1]&128)===0):this.valueHexView=this.valueHexView.subarray(1);break}return this.toBER(t)}fromBER(t,r,i){let n=super.fromBER(t,r,i);return n===-1||this.setValueHex(),n}toBER(t){return t?new ArrayBuffer(this.valueHexView.length):this.valueHexView.slice().buffer}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}toString(){let t=this.valueHexView.length*8-1,r=new Uint8Array(this.valueHexView.length*8/3),i=0,n,s=this.valueHexView,a="",o=!1;for(let c=s.byteLength-1;c>=0;c--){n=s[c];for(let u=0;u<8;u++)(n&1)===1&&(i===t?(r=K6(DT(i),r),a="-"):r=V6(r,DT(i))),i++,n>>=1}for(let c=0;c<r.length;c++)r[c]&&(o=!0),o&&(a+=OT.charAt(r[c]));return o===!1&&(a+=OT.charAt(0)),a}};GT=sp;sp.NAME="IntegerValueBlock";Object.defineProperty(GT.prototype,"valueHex",{set:function(e){this.valueHexView=new Uint8Array(e),this.setValueHex()},get:function(){return this.valueHexView.slice().buffer}});var Ql,wc=class extends gr{constructor(t={}){super(t,sp),this.idBlock.tagClass=1,this.idBlock.tagNumber=2}toBigInt(){return $h(),BigInt(this.valueBlock.toString())}static fromBigInt(t){$h();let r=BigInt(t),i=new Sc,n=r.toString(16).replace(/^-/,""),s=new Uint8Array(Ke.Convert.FromHex(n));if(r<0){let o=new Uint8Array(s.length+(s[0]&128?1:0));o[0]|=128;let u=BigInt(`0x${Ke.Convert.ToHex(o)}`)+r,l=Ke.BufferSourceConverter.toUint8Array(Ke.Convert.FromHex(u.toString(16)));l[0]|=128,i.write(l)}else s[0]&128&&i.write(new Uint8Array([0])),i.write(s);return new Ql({valueHex:i.final()})}convertToDER(){let t=new Ql({valueHex:this.valueBlock.valueHexView});return t.valueBlock.toDER(),t}convertFromDER(){return new Ql({valueHex:this.valueBlock.valueHexView[0]===0?this.valueBlock.valueHexView.subarray(1):this.valueBlock.valueHexView})}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()}`}};Ql=wc;de.Integer=Ql;wc.NAME="INTEGER";var WT,ap=class extends wc{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=10}};WT=ap;de.Enumerated=WT;ap.NAME="ENUMERATED";var op=class extends Tn(Br){constructor({valueDec:t=-1,isFirstSid:r=!1,...i}={}){super(i),this.valueDec=t,this.isFirstSid=r}fromBER(t,r,i){if(!i)return r;let n=Ke.BufferSourceConverter.toUint8Array(t);if(!fs(this,n,r,i))return-1;let s=n.subarray(r,r+i);this.valueHexView=new Uint8Array(i);for(let o=0;o<i&&(this.valueHexView[o]=s[o]&127,this.blockLength++,(s[o]&128)!==0);o++);let a=new Uint8Array(this.blockLength);for(let o=0;o<this.blockLength;o++)a[o]=this.valueHexView[o];return this.valueHexView=a,(s[this.blockLength-1]&128)!==0?(this.error="End of input reached before message was fully decoded",-1):(this.valueHexView[0]===0&&this.warnings.push("Needlessly long format of SID encoding"),this.blockLength<=8?this.valueDec=lt.utilFromBase(this.valueHexView,7):(this.isHexOnly=!0,this.warnings.push("Too big SID for decoding, hex only")),r+this.blockLength)}set valueBigInt(t){$h();let r=BigInt(t).toString(2);for(;r.length%7;)r="0"+r;let i=new Uint8Array(r.length/7);for(let n=0;n<i.length;n++)i[n]=parseInt(r.slice(n*7,n*7+7),2)+(n+1<i.length?128:0);this.fromBER(i.buffer,0,i.length)}toBER(t){if(this.isHexOnly){if(t)return new ArrayBuffer(this.valueHexView.byteLength);let n=this.valueHexView,s=new Uint8Array(this.blockLength);for(let a=0;a<this.blockLength-1;a++)s[a]=n[a]|128;return s[this.blockLength-1]=n[this.blockLength-1],s.buffer}let r=lt.utilToBase(this.valueDec,7);if(r.byteLength===0)return this.error="Error during encoding SID value",En;let i=new Uint8Array(r.byteLength);if(!t){let n=new Uint8Array(r),s=r.byteLength-1;for(let a=0;a<s;a++)i[a]=n[a]|128;i[s]=n[s]}return i}toString(){let t="";if(this.isHexOnly)t=Ke.Convert.ToHex(this.valueHexView);else if(this.isFirstSid){let r=this.valueDec;this.valueDec<=39?t="0.":this.valueDec<=79?(t="1.",r-=40):(t="2.",r-=80),t+=r.toString()}else t=this.valueDec.toString();return t}toJSON(){return{...super.toJSON(),valueDec:this.valueDec,isFirstSid:this.isFirstSid}}};op.NAME="sidBlock";var Zh=class extends Br{constructor({value:t=ei,...r}={}){super(r),this.value=[],t&&this.fromString(t)}fromBER(t,r,i){let n=r;for(;i>0;){let s=new op;if(n=s.fromBER(t,n,i),n===-1)return this.blockLength=0,this.error=s.error,n;this.value.length===0&&(s.isFirstSid=!0),this.blockLength+=s.blockLength,i-=s.blockLength,this.value.push(s)}return n}toBER(t){let r=[];for(let i=0;i<this.value.length;i++){let n=this.value[i].toBER(t);if(n.byteLength===0)return this.error=this.value[i].error,En;r.push(n)}return vx(r)}fromString(t){this.value=[];let r=0,i=0,n="",s=!1;do if(i=t.indexOf(".",r),i===-1?n=t.substring(r):n=t.substring(r,i),r=i+1,s){let a=this.value[0],o=0;switch(a.valueDec){case 0:break;case 1:o=40;break;case 2:o=80;break;default:this.value=[];return}let c=parseInt(n,10);if(isNaN(c))return;a.valueDec=c+o,s=!1}else{let a=new op;if(n>Number.MAX_SAFE_INTEGER){$h();let o=BigInt(n);a.valueBigInt=o}else if(a.valueDec=parseInt(n,10),isNaN(a.valueDec))return;this.value.length||(a.isFirstSid=!0,s=!0),this.value.push(a)}while(i!==-1)}toString(){let t="",r=!1;for(let i=0;i<this.value.length;i++){r=this.value[i].isHexOnly;let n=this.value[i].toString();i!==0&&(t=`${t}.`),r?(n=`{${n}}`,this.value[i].isFirstSid?t=`2.{${n} - 80}`:t+=n):t+=n}return t}toJSON(){let t={...super.toJSON(),value:this.toString(),sidArray:[]};for(let r=0;r<this.value.length;r++)t.sidArray.push(this.value[r].toJSON());return t}};Zh.NAME="ObjectIdentifierValueBlock";var YT,cp=class extends gr{getValue(){return this.valueBlock.toString()}setValue(t){this.valueBlock.fromString(t)}constructor(t={}){super(t,Zh),this.idBlock.tagClass=1,this.idBlock.tagNumber=6}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}};YT=cp;de.ObjectIdentifier=YT;cp.NAME="OBJECT IDENTIFIER";var up=class extends Tn(ls){constructor({valueDec:t=0,...r}={}){super(r),this.valueDec=t}fromBER(t,r,i){if(i===0)return r;let n=Ke.BufferSourceConverter.toUint8Array(t);if(!fs(this,n,r,i))return-1;let s=n.subarray(r,r+i);this.valueHexView=new Uint8Array(i);for(let o=0;o<i&&(this.valueHexView[o]=s[o]&127,this.blockLength++,(s[o]&128)!==0);o++);let a=new Uint8Array(this.blockLength);for(let o=0;o<this.blockLength;o++)a[o]=this.valueHexView[o];return this.valueHexView=a,(s[this.blockLength-1]&128)!==0?(this.error="End of input reached before message was fully decoded",-1):(this.valueHexView[0]===0&&this.warnings.push("Needlessly long format of SID encoding"),this.blockLength<=8?this.valueDec=lt.utilFromBase(this.valueHexView,7):(this.isHexOnly=!0,this.warnings.push("Too big SID for decoding, hex only")),r+this.blockLength)}toBER(t){if(this.isHexOnly){if(t)return new ArrayBuffer(this.valueHexView.byteLength);let n=this.valueHexView,s=new Uint8Array(this.blockLength);for(let a=0;a<this.blockLength-1;a++)s[a]=n[a]|128;return s[this.blockLength-1]=n[this.blockLength-1],s.buffer}let r=lt.utilToBase(this.valueDec,7);if(r.byteLength===0)return this.error="Error during encoding SID value",En;let i=new Uint8Array(r.byteLength);if(!t){let n=new Uint8Array(r),s=r.byteLength-1;for(let a=0;a<s;a++)i[a]=n[a]|128;i[s]=n[s]}return i.buffer}toString(){let t="";return this.isHexOnly?t=Ke.Convert.ToHex(this.valueHexView):t=this.valueDec.toString(),t}toJSON(){return{...super.toJSON(),valueDec:this.valueDec}}};up.NAME="relativeSidBlock";var em=class extends Br{constructor({value:t=ei,...r}={}){super(r),this.value=[],t&&this.fromString(t)}fromBER(t,r,i){let n=r;for(;i>0;){let s=new up;if(n=s.fromBER(t,n,i),n===-1)return this.blockLength=0,this.error=s.error,n;this.blockLength+=s.blockLength,i-=s.blockLength,this.value.push(s)}return n}toBER(t,r){let i=[];for(let n=0;n<this.value.length;n++){let s=this.value[n].toBER(t);if(s.byteLength===0)return this.error=this.value[n].error,En;i.push(s)}return vx(i)}fromString(t){this.value=[];let r=0,i=0,n="";do{i=t.indexOf(".",r),i===-1?n=t.substring(r):n=t.substring(r,i),r=i+1;let s=new up;if(s.valueDec=parseInt(n,10),isNaN(s.valueDec))return!0;this.value.push(s)}while(i!==-1);return!0}toString(){let t="",r=!1;for(let i=0;i<this.value.length;i++){r=this.value[i].isHexOnly;let n=this.value[i].toString();i!==0&&(t=`${t}.`),r&&(n=`{${n}}`),t+=n}return t}toJSON(){let t={...super.toJSON(),value:this.toString(),sidArray:[]};for(let r=0;r<this.value.length;r++)t.sidArray.push(this.value[r].toJSON());return t}};em.NAME="RelativeObjectIdentifierValueBlock";var QT,lp=class extends gr{getValue(){return this.valueBlock.toString()}setValue(t){this.valueBlock.fromString(t)}constructor(t={}){super(t,em),this.idBlock.tagClass=1,this.idBlock.tagNumber=13}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.valueBlock.toString()||"empty"}`}toJSON(){return{...super.toJSON(),value:this.getValue()}}};QT=lp;de.RelativeObjectIdentifier=QT;lp.NAME="RelativeObjectIdentifier";var JT,pp=class extends ps{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=16}};JT=pp;de.Sequence=JT;pp.NAME="SEQUENCE";var XT,fp=class extends ps{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=17}};XT=fp;de.Set=XT;fp.NAME="SET";var tm=class extends Tn(Br){constructor({...t}={}){super(t),this.isHexOnly=!0,this.value=ei}toJSON(){return{...super.toJSON(),value:this.value}}};tm.NAME="StringValueBlock";var rm=class extends tm{};rm.NAME="SimpleStringValueBlock";var Hr=class extends Xl{constructor({...t}={}){super(t,rm)}fromBuffer(t){this.valueBlock.value=String.fromCharCode.apply(null,Ke.BufferSourceConverter.toUint8Array(t))}fromString(t){let r=t.length,i=this.valueBlock.valueHexView=new Uint8Array(r);for(let n=0;n<r;n++)i[n]=t.charCodeAt(n);this.valueBlock.value=t}};Hr.NAME="SIMPLE STRING";var im=class extends Hr{fromBuffer(t){this.valueBlock.valueHexView=Ke.BufferSourceConverter.toUint8Array(t);try{this.valueBlock.value=Ke.Convert.ToUtf8String(t)}catch(r){this.warnings.push(`Error during "decodeURIComponent": ${r}, using raw string`),this.valueBlock.value=Ke.Convert.ToBinary(t)}}fromString(t){this.valueBlock.valueHexView=new Uint8Array(Ke.Convert.FromUtf8String(t)),this.valueBlock.value=t}};im.NAME="Utf8StringValueBlock";var ZT,Cn=class extends im{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=12}};ZT=Cn;de.Utf8String=ZT;Cn.NAME="UTF8String";var nm=class extends Hr{fromBuffer(t){this.valueBlock.value=Ke.Convert.ToUtf16String(t),this.valueBlock.valueHexView=Ke.BufferSourceConverter.toUint8Array(t)}fromString(t){this.valueBlock.value=t,this.valueBlock.valueHexView=new Uint8Array(Ke.Convert.FromUtf16String(t))}};nm.NAME="BmpStringValueBlock";var e2,dp=class extends nm{constructor({...t}={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=30}};e2=dp;de.BmpString=e2;dp.NAME="BMPString";var sm=class extends Hr{fromBuffer(t){let r=ArrayBuffer.isView(t)?t.slice().buffer:t.slice(0),i=new Uint8Array(r);for(let n=0;n<i.length;n+=4)i[n]=i[n+3],i[n+1]=i[n+2],i[n+2]=0,i[n+3]=0;this.valueBlock.value=String.fromCharCode.apply(null,new Uint32Array(r))}fromString(t){let r=t.length,i=this.valueBlock.valueHexView=new Uint8Array(r*4);for(let n=0;n<r;n++){let s=lt.utilToBase(t.charCodeAt(n),8),a=new Uint8Array(s);if(a.length>4)continue;let o=4-a.length;for(let c=a.length-1;c>=0;c--)i[n*4+c+o]=a[c]}this.valueBlock.value=t}};sm.NAME="UniversalStringValueBlock";var t2,hp=class extends sm{constructor({...t}={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=28}};t2=hp;de.UniversalString=t2;hp.NAME="UniversalString";var r2,mp=class extends Hr{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=18}};r2=mp;de.NumericString=r2;mp.NAME="NumericString";var i2,yp=class extends Hr{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=19}};i2=yp;de.PrintableString=i2;yp.NAME="PrintableString";var n2,gp=class extends Hr{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=20}};n2=gp;de.TeletexString=n2;gp.NAME="TeletexString";var s2,vp=class extends Hr{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=21}};s2=vp;de.VideotexString=s2;vp.NAME="VideotexString";var a2,xp=class extends Hr{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=22}};a2=xp;de.IA5String=a2;xp.NAME="IA5String";var o2,bp=class extends Hr{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=25}};o2=bp;de.GraphicString=o2;bp.NAME="GraphicString";var c2,Cc=class extends Hr{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=26}};c2=Cc;de.VisibleString=c2;Cc.NAME="VisibleString";var u2,_p=class extends Hr{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=27}};u2=_p;de.GeneralString=u2;_p.NAME="GeneralString";var l2,Ap=class extends Hr{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=29}};l2=Ap;de.CharacterString=l2;Ap.NAME="CharacterString";var p2,Ec=class extends Cc{constructor({value:t,valueDate:r,...i}={}){if(super(i),this.year=0,this.month=0,this.day=0,this.hour=0,this.minute=0,this.second=0,t){this.fromString(t),this.valueBlock.valueHexView=new Uint8Array(t.length);for(let n=0;n<t.length;n++)this.valueBlock.valueHexView[n]=t.charCodeAt(n)}r&&(this.fromDate(r),this.valueBlock.valueHexView=new Uint8Array(this.toBuffer())),this.idBlock.tagClass=1,this.idBlock.tagNumber=23}fromBuffer(t){this.fromString(String.fromCharCode.apply(null,Ke.BufferSourceConverter.toUint8Array(t)))}toBuffer(){let t=this.toString(),r=new ArrayBuffer(t.length),i=new Uint8Array(r);for(let n=0;n<t.length;n++)i[n]=t.charCodeAt(n);return r}fromDate(t){this.year=t.getUTCFullYear(),this.month=t.getUTCMonth()+1,this.day=t.getUTCDate(),this.hour=t.getUTCHours(),this.minute=t.getUTCMinutes(),this.second=t.getUTCSeconds()}toDate(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second))}fromString(t){let i=/(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})Z/ig.exec(t);if(i===null){this.error="Wrong input string for conversion";return}let n=parseInt(i[1],10);n>=50?this.year=1900+n:this.year=2e3+n,this.month=parseInt(i[2],10),this.day=parseInt(i[3],10),this.hour=parseInt(i[4],10),this.minute=parseInt(i[5],10),this.second=parseInt(i[6],10)}toString(t="iso"){if(t==="iso"){let r=new Array(7);return r[0]=lt.padNumber(this.year<2e3?this.year-1900:this.year-2e3,2),r[1]=lt.padNumber(this.month,2),r[2]=lt.padNumber(this.day,2),r[3]=lt.padNumber(this.hour,2),r[4]=lt.padNumber(this.minute,2),r[5]=lt.padNumber(this.second,2),r[6]="Z",r.join("")}return super.toString(t)}onAsciiEncoding(){return`${this.constructor.NAME} : ${this.toDate().toISOString()}`}toJSON(){return{...super.toJSON(),year:this.year,month:this.month,day:this.day,hour:this.hour,minute:this.minute,second:this.second}}};p2=Ec;de.UTCTime=p2;Ec.NAME="UTCTime";var f2,Sp=class extends Ec{constructor(t={}){var r;super(t),(r=this.millisecond)!==null&&r!==void 0||(this.millisecond=0),this.idBlock.tagClass=1,this.idBlock.tagNumber=24}fromDate(t){super.fromDate(t),this.millisecond=t.getUTCMilliseconds()}toDate(){let t=Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond);return new Date(t)}fromString(t){let r=!1,i="",n="",s=0,a,o=0,c=0;if(t[t.length-1]==="Z")i=t.substring(0,t.length-1),r=!0;else{let p=new Number(t[t.length-1]);if(isNaN(p.valueOf()))throw new Error("Wrong input string for conversion");i=t}if(r){if(i.indexOf("+")!==-1)throw new Error("Wrong input string for conversion");if(i.indexOf("-")!==-1)throw new Error("Wrong input string for conversion")}else{let p=1,d=i.indexOf("+"),h="";if(d===-1&&(d=i.indexOf("-"),p=-1),d!==-1){if(h=i.substring(d+1),i=i.substring(0,d),h.length!==2&&h.length!==4)throw new Error("Wrong input string for conversion");let f=parseInt(h.substring(0,2),10);if(isNaN(f.valueOf()))throw new Error("Wrong input string for conversion");if(o=p*f,h.length===4){if(f=parseInt(h.substring(2,4),10),isNaN(f.valueOf()))throw new Error("Wrong input string for conversion");c=p*f}}}let u=i.indexOf(".");if(u===-1&&(u=i.indexOf(",")),u!==-1){let p=new Number(`0${i.substring(u)}`);if(isNaN(p.valueOf()))throw new Error("Wrong input string for conversion");s=p.valueOf(),n=i.substring(0,u)}else n=i;switch(!0){case n.length===8:if(a=/(\d{4})(\d{2})(\d{2})/ig,u!==-1)throw new Error("Wrong input string for conversion");break;case n.length===10:if(a=/(\d{4})(\d{2})(\d{2})(\d{2})/ig,u!==-1){let p=60*s;this.minute=Math.floor(p),p=60*(p-this.minute),this.second=Math.floor(p),p=1e3*(p-this.second),this.millisecond=Math.floor(p)}break;case n.length===12:if(a=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})/ig,u!==-1){let p=60*s;this.second=Math.floor(p),p=1e3*(p-this.second),this.millisecond=Math.floor(p)}break;case n.length===14:if(a=/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/ig,u!==-1){let p=1e3*s;this.millisecond=Math.floor(p)}break;default:throw new Error("Wrong input string for conversion")}let l=a.exec(n);if(l===null)throw new Error("Wrong input string for conversion");for(let p=1;p<l.length;p++)switch(p){case 1:this.year=parseInt(l[p],10);break;case 2:this.month=parseInt(l[p],10);break;case 3:this.day=parseInt(l[p],10);break;case 4:this.hour=parseInt(l[p],10)+o;break;case 5:this.minute=parseInt(l[p],10)+c;break;case 6:this.second=parseInt(l[p],10);break;default:throw new Error("Wrong input string for conversion")}if(r===!1){let p=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond);this.year=p.getUTCFullYear(),this.month=p.getUTCMonth(),this.day=p.getUTCDay(),this.hour=p.getUTCHours(),this.minute=p.getUTCMinutes(),this.second=p.getUTCSeconds(),this.millisecond=p.getUTCMilliseconds()}}toString(t="iso"){if(t==="iso"){let r=[];return r.push(lt.padNumber(this.year,4)),r.push(lt.padNumber(this.month,2)),r.push(lt.padNumber(this.day,2)),r.push(lt.padNumber(this.hour,2)),r.push(lt.padNumber(this.minute,2)),r.push(lt.padNumber(this.second,2)),this.millisecond!==0&&(r.push("."),r.push(lt.padNumber(this.millisecond,3))),r.push("Z"),r.join("")}return super.toString(t)}toJSON(){return{...super.toJSON(),millisecond:this.millisecond}}};f2=Sp;de.GeneralizedTime=f2;Sp.NAME="GeneralizedTime";var d2,wp=class extends Cn{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=31}};d2=wp;de.DATE=d2;wp.NAME="DATE";var h2,Cp=class extends Cn{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=32}};h2=Cp;de.TimeOfDay=h2;Cp.NAME="TimeOfDay";var m2,Ep=class extends Cn{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=33}};m2=Ep;de.DateTime=m2;Ep.NAME="DateTime";var y2,Tp=class extends Cn{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=34}};y2=Tp;de.Duration=y2;Tp.NAME="Duration";var g2,Ip=class extends Cn{constructor(t={}){super(t),this.idBlock.tagClass=1,this.idBlock.tagNumber=14}};g2=Ip;de.TIME=g2;Ip.NAME="TIME";var Ba=class{constructor({name:t=ei,optional:r=!1}={}){this.name=t,this.optional=r}},am=class extends Ba{constructor({value:t=[],...r}={}){super(r),this.value=t}},Bp=class extends Ba{constructor({value:t=new Ba,local:r=!1,...i}={}){super(i),this.value=t,this.local=r}},gx=class{get data(){return this.dataView.slice().buffer}set data(t){this.dataView=Ke.BufferSourceConverter.toUint8Array(t)}constructor({data:t=om}={}){this.dataView=Ke.BufferSourceConverter.toUint8Array(t)}fromBER(t,r,i){let n=r+i;return this.dataView=Ke.BufferSourceConverter.toUint8Array(t).subarray(r,n),n}toBER(t){return this.dataView.slice().buffer}};function Ac(e,t,r){if(r instanceof am){for(let s of r.value)if(Ac(e,t,s).verified)return{verified:!0,result:e};{let s={verified:!1,result:{error:"Wrong values for Choice type"}};return r.hasOwnProperty(yx)&&(s.name=r.name),s}}if(r instanceof Ba)return r.hasOwnProperty(yx)&&(e[r.name]=t),{verified:!0,result:e};if(!(e instanceof Object))return{verified:!1,result:{error:"Wrong root object"}};if(!(t instanceof Object))return{verified:!1,result:{error:"Wrong ASN.1 data"}};if(!(r instanceof Object))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(N6 in r))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(D6 in r.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(!(q6 in r.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};let i=r.idBlock.toBER(!1);if(i.byteLength===0)return{verified:!1,result:{error:"Error encoding idBlock for ASN.1 schema"}};if(r.idBlock.fromBER(i,0,i.byteLength)===-1)return{verified:!1,result:{error:"Error decoding idBlock for ASN.1 schema"}};if(r.idBlock.hasOwnProperty(R6)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(r.idBlock.tagClass!==t.idBlock.tagClass)return{verified:!1,result:e};if(r.idBlock.hasOwnProperty(O6)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(r.idBlock.tagNumber!==t.idBlock.tagNumber)return{verified:!1,result:e};if(r.idBlock.hasOwnProperty(L6)===!1)return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(r.idBlock.isConstructed!==t.idBlock.isConstructed)return{verified:!1,result:e};if(!(P6 in r.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};if(r.idBlock.isHexOnly!==t.idBlock.isHexOnly)return{verified:!1,result:e};if(r.idBlock.isHexOnly){if(!(LT in r.idBlock))return{verified:!1,result:{error:"Wrong ASN.1 schema"}};let s=r.idBlock.valueHexView,a=t.idBlock.valueHexView;if(s.length!==a.length)return{verified:!1,result:e};for(let o=0;o<s.length;o++)if(s[o]!==a[1])return{verified:!1,result:e}}if(r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,ei),r.name&&(e[r.name]=t)),r instanceof de.Constructed){let s=0,a={verified:!1,result:{error:"Unknown error"}},o=r.valueBlock.value.length;if(o>0&&r.valueBlock.value[0]instanceof Bp&&(o=t.valueBlock.value.length),o===0)return{verified:!0,result:e};if(t.valueBlock.value.length===0&&r.valueBlock.value.length!==0){let c=!0;for(let u=0;u<r.valueBlock.value.length;u++)c=c&&(r.valueBlock.value[u].optional||!1);return c?{verified:!0,result:e}:(r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,ei),r.name&&delete e[r.name]),e.error="Inconsistent object length",{verified:!1,result:e})}for(let c=0;c<o;c++)if(c-s>=t.valueBlock.value.length){if(r.valueBlock.value[c].optional===!1){let u={verified:!1,result:e};return e.error="Inconsistent length between ASN.1 data and schema",r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,ei),r.name&&(delete e[r.name],u.name=r.name)),u}}else if(r.valueBlock.value[0]instanceof Bp){if(a=Ac(e,t.valueBlock.value[c],r.valueBlock.value[0].value),a.verified===!1)if(r.valueBlock.value[0].optional)s++;else return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,ei),r.name&&delete e[r.name]),a;if(yx in r.valueBlock.value[0]&&r.valueBlock.value[0].name.length>0){let u={};j6 in r.valueBlock.value[0]&&r.valueBlock.value[0].local?u=t:u=e,typeof u[r.valueBlock.value[0].name]>"u"&&(u[r.valueBlock.value[0].name]=[]),u[r.valueBlock.value[0].name].push(t.valueBlock.value[c])}}else if(a=Ac(e,t.valueBlock.value[c-s],r.valueBlock.value[c]),a.verified===!1)if(r.valueBlock.value[c].optional)s++;else return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,ei),r.name&&delete e[r.name]),a;if(a.verified===!1){let c={verified:!1,result:e};return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,ei),r.name&&(delete e[r.name],c.name=r.name)),c}return{verified:!0,result:e}}if(r.primitiveSchema&< in t.valueBlock){let s=Tc(t.valueBlock.valueHexView);if(s.offset===-1){let a={verified:!1,result:s.result};return r.name&&(r.name=r.name.replace(/^\s+|\s+$/g,ei),r.name&&(delete e[r.name],a.name=r.name)),a}return Ac(e,s.result,r.primitiveSchema)}return{verified:!0,result:e}}function H6(e,t){if(!(t instanceof Object))return{verified:!1,result:{error:"Wrong ASN.1 schema type"}};let r=Tc(Ke.BufferSourceConverter.toUint8Array(e));return r.offset===-1?{verified:!1,result:r.result}:Ac(r.result,r.result,t)}Ne.Any=Ba;Ne.BaseBlock=gr;Ne.BaseStringBlock=Xl;Ne.BitString=np;Ne.BmpString=dp;Ne.Boolean=rp;Ne.CharacterString=Ap;Ne.Choice=am;Ne.Constructed=ps;Ne.DATE=wp;Ne.DateTime=Ep;Ne.Duration=Tp;Ne.EndOfContent=ep;Ne.Enumerated=ap;Ne.GeneralString=_p;Ne.GeneralizedTime=Sp;Ne.GraphicString=bp;Ne.HexBlock=Tn;Ne.IA5String=xp;Ne.Integer=wc;Ne.Null=tp;Ne.NumericString=mp;Ne.ObjectIdentifier=cp;Ne.OctetString=ip;Ne.Primitive=Zl;Ne.PrintableString=yp;Ne.RawData=gx;Ne.RelativeObjectIdentifier=lp;Ne.Repeated=Bp;Ne.Sequence=pp;Ne.Set=fp;Ne.TIME=Ip;Ne.TeletexString=gp;Ne.TimeOfDay=Cp;Ne.UTCTime=Ec;Ne.UniversalString=hp;Ne.Utf8String=Cn;Ne.ValueBlock=Br;Ne.VideotexString=vp;Ne.ViewWriter=Sc;Ne.VisibleString=Cc;Ne.compareSchema=Ac;Ne.fromBER=F6;Ne.verifySchema=H6});var x2=b(()=>{var v2;(function(e){(function(t){var r=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:o(),i=n(e);typeof r.Reflect<"u"&&(i=n(r.Reflect,i)),t(i,r),typeof r.Reflect>"u"&&(r.Reflect=e);function n(c,u){return function(l,p){Object.defineProperty(c,l,{configurable:!0,writable:!0,value:p}),u&&u(l,p)}}function s(){try{return Function("return this;")()}catch{}}function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}function o(){return s()||a()}})(function(t,r){var i=Object.prototype.hasOwnProperty,n=typeof Symbol=="function",s=n&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=n&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",o=typeof Object.create=="function",c={__proto__:[]}instanceof Array,u=!o&&!c,l={create:o?function(){return Jv(Object.create(null))}:c?function(){return Jv({__proto__:null})}:function(){return Jv({})},has:u?function(k,R){return i.call(k,R)}:function(k,R){return R in k},get:u?function(k,R){return i.call(k,R)?k[R]:void 0}:function(k,R){return k[R]}},p=Object.getPrototypeOf(Function),d=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:I5(),h=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:B5(),f=typeof WeakMap=="function"?WeakMap:k5(),m=n?Symbol.for("@reflect-metadata:registry"):void 0,y=C5(),_=E5(y);function A(k,R,F,te){if(J(F)){if(!cr(k))throw new TypeError;if(!ur(R))throw new TypeError;return be(k,R)}else{if(!cr(k))throw new TypeError;if(!Te(R))throw new TypeError;if(!Te(te)&&!J(te)&&!Me(te))throw new TypeError;return Me(te)&&(te=void 0),F=Oe(F),Be(k,R,F,te)}}t("decorate",A);function S(k,R){function F(te,Se){if(!Te(te))throw new TypeError;if(!J(Se)&&!yr(Se))throw new TypeError;dt(k,R,te,Se)}return F}t("metadata",S);function B(k,R,F,te){if(!Te(F))throw new TypeError;return J(te)||(te=Oe(te)),dt(k,R,F,te)}t("defineMetadata",B);function O(k,R,F){if(!Te(R))throw new TypeError;return J(F)||(F=Oe(F)),De(k,R,F)}t("hasMetadata",O);function N(k,R,F){if(!Te(R))throw new TypeError;return J(F)||(F=Oe(F)),Ee(k,R,F)}t("hasOwnMetadata",N);function Y(k,R,F){if(!Te(R))throw new TypeError;return J(F)||(F=Oe(F)),Pe(k,R,F)}t("getMetadata",Y);function q(k,R,F){if(!Te(R))throw new TypeError;return J(F)||(F=Oe(F)),re(k,R,F)}t("getOwnMetadata",q);function z(k,R){if(!Te(k))throw new TypeError;return J(R)||(R=Oe(R)),or(k,R)}t("getMetadataKeys",z);function oe(k,R){if(!Te(k))throw new TypeError;return J(R)||(R=Oe(R)),fe(k,R)}t("getOwnMetadataKeys",oe);function _e(k,R,F){if(!Te(R))throw new TypeError;if(J(F)||(F=Oe(F)),!Te(R))throw new TypeError;J(F)||(F=Oe(F));var te=Kl(R,F,!1);return J(te)?!1:te.OrdinaryDeleteMetadata(k,R,F)}t("deleteMetadata",_e);function be(k,R){for(var F=k.length-1;F>=0;--F){var te=k[F],Se=te(R);if(!J(Se)&&!Me(Se)){if(!ur(Se))throw new TypeError;R=Se}}return R}function Be(k,R,F,te){for(var Se=k.length-1;Se>=0;--Se){var Wt=k[Se],lr=Wt(R,F,te);if(!J(lr)&&!Me(lr)){if(!Te(lr))throw new TypeError;te=lr}}return te}function De(k,R,F){var te=Ee(k,R,F);if(te)return!0;var Se=Qv(R);return Me(Se)?!1:De(k,Se,F)}function Ee(k,R,F){var te=Kl(R,F,!1);return J(te)?!1:Rt(te.OrdinaryHasOwnMetadata(k,R,F))}function Pe(k,R,F){var te=Ee(k,R,F);if(te)return re(k,R,F);var Se=Qv(R);if(!Me(Se))return Pe(k,Se,F)}function re(k,R,F){var te=Kl(R,F,!1);if(!J(te))return te.OrdinaryGetOwnMetadata(k,R,F)}function dt(k,R,F,te){var Se=Kl(F,te,!0);Se.OrdinaryDefineOwnMetadata(k,R,F,te)}function or(k,R){var F=fe(k,R),te=Qv(k);if(te===null)return F;var Se=or(te,R);if(Se.length<=0)return F;if(F.length<=0)return Se;for(var Wt=new h,lr=[],Ve=0,ue=F;Ve<ue.length;Ve++){var ye=ue[Ve],ve=Wt.has(ye);ve||(Wt.add(ye),lr.push(ye))}for(var xe=0,We=Se;xe<We.length;xe++){var ye=We[xe],ve=Wt.has(ye);ve||(Wt.add(ye),lr.push(ye))}return lr}function fe(k,R){var F=Kl(k,R,!1);return F?F.OrdinaryOwnMetadataKeys(k,R):[]}function ie(k){if(k===null)return 1;switch(typeof k){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return k===null?1:6;default:return 6}}function J(k){return k===void 0}function Me(k){return k===null}function je(k){return typeof k=="symbol"}function Te(k){return typeof k=="object"?k!==null:typeof k=="function"}function ht(k,R){switch(ie(k)){case 0:return k;case 1:return k;case 2:return k;case 3:return k;case 4:return k;case 5:return k}var F=R===3?"string":R===5?"number":"default",te=gE(k,s);if(te!==void 0){var Se=te.call(k,F);if(Te(Se))throw new TypeError;return Se}return it(k,F==="default"?"number":F)}function it(k,R){if(R==="string"){var F=k.toString;if(Dt(F)){var te=F.call(k);if(!Te(te))return te}var Se=k.valueOf;if(Dt(Se)){var te=Se.call(k);if(!Te(te))return te}}else{var Se=k.valueOf;if(Dt(Se)){var te=Se.call(k);if(!Te(te))return te}var Wt=k.toString;if(Dt(Wt)){var te=Wt.call(k);if(!Te(te))return te}}throw new TypeError}function Rt(k){return!!k}function Ft(k){return""+k}function Oe(k){var R=ht(k,3);return je(R)?R:Ft(R)}function cr(k){return Array.isArray?Array.isArray(k):k instanceof Object?k instanceof Array:Object.prototype.toString.call(k)==="[object Array]"}function Dt(k){return typeof k=="function"}function ur(k){return typeof k=="function"}function yr(k){switch(ie(k)){case 3:return!0;case 4:return!0;default:return!1}}function er(k,R){return k===R||k!==k&&R!==R}function gE(k,R){var F=k[R];if(F!=null){if(!Dt(F))throw new TypeError;return F}}function vE(k){var R=gE(k,a);if(!Dt(R))throw new TypeError;var F=R.call(k);if(!Te(F))throw new TypeError;return F}function xE(k){return k.value}function bE(k){var R=k.next();return R.done?!1:R}function _E(k){var R=k.return;R&&R.call(k)}function Qv(k){var R=Object.getPrototypeOf(k);if(typeof k!="function"||k===p||R!==p)return R;var F=k.prototype,te=F&&Object.getPrototypeOf(F);if(te==null||te===Object.prototype)return R;var Se=te.constructor;return typeof Se!="function"||Se===k?R:Se}function w5(){var k;!J(m)&&typeof r.Reflect<"u"&&!(m in r.Reflect)&&typeof r.Reflect.defineMetadata=="function"&&(k=T5(r.Reflect));var R,F,te,Se=new f,Wt={registerProvider:lr,getProvider:ue,setProvider:ve};return Wt;function lr(xe){if(!Object.isExtensible(Wt))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case k===xe:break;case J(R):R=xe;break;case R===xe:break;case J(F):F=xe;break;case F===xe:break;default:te===void 0&&(te=new h),te.add(xe);break}}function Ve(xe,We){if(!J(R)){if(R.isProviderFor(xe,We))return R;if(!J(F)){if(F.isProviderFor(xe,We))return R;if(!J(te))for(var Ct=vE(te);;){var Yt=bE(Ct);if(!Yt)return;var Qi=xE(Yt);if(Qi.isProviderFor(xe,We))return _E(Ct),Qi}}}if(!J(k)&&k.isProviderFor(xe,We))return k}function ue(xe,We){var Ct=Se.get(xe),Yt;return J(Ct)||(Yt=Ct.get(We)),J(Yt)&&(Yt=Ve(xe,We),J(Yt)||(J(Ct)&&(Ct=new d,Se.set(xe,Ct)),Ct.set(We,Yt))),Yt}function ye(xe){if(J(xe))throw new TypeError;return R===xe||F===xe||!J(te)&&te.has(xe)}function ve(xe,We,Ct){if(!ye(Ct))throw new Error("Metadata provider not registered.");var Yt=ue(xe,We);if(Yt!==Ct){if(!J(Yt))return!1;var Qi=Se.get(xe);J(Qi)&&(Qi=new d,Se.set(xe,Qi)),Qi.set(We,Ct)}return!0}}function C5(){var k;return!J(m)&&Te(r.Reflect)&&Object.isExtensible(r.Reflect)&&(k=r.Reflect[m]),J(k)&&(k=w5()),!J(m)&&Te(r.Reflect)&&Object.isExtensible(r.Reflect)&&Object.defineProperty(r.Reflect,m,{enumerable:!1,configurable:!1,writable:!1,value:k}),k}function E5(k){var R=new f,F={isProviderFor:function(ye,ve){var xe=R.get(ye);return J(xe)?!1:xe.has(ve)},OrdinaryDefineOwnMetadata:lr,OrdinaryHasOwnMetadata:Se,OrdinaryGetOwnMetadata:Wt,OrdinaryOwnMetadataKeys:Ve,OrdinaryDeleteMetadata:ue};return y.registerProvider(F),F;function te(ye,ve,xe){var We=R.get(ye),Ct=!1;if(J(We)){if(!xe)return;We=new d,R.set(ye,We),Ct=!0}var Yt=We.get(ve);if(J(Yt)){if(!xe)return;if(Yt=new d,We.set(ve,Yt),!k.setProvider(ye,ve,F))throw We.delete(ve),Ct&&R.delete(ye),new Error("Wrong provider for target.")}return Yt}function Se(ye,ve,xe){var We=te(ve,xe,!1);return J(We)?!1:Rt(We.has(ye))}function Wt(ye,ve,xe){var We=te(ve,xe,!1);if(!J(We))return We.get(ye)}function lr(ye,ve,xe,We){var Ct=te(xe,We,!0);Ct.set(ye,ve)}function Ve(ye,ve){var xe=[],We=te(ye,ve,!1);if(J(We))return xe;for(var Ct=We.keys(),Yt=vE(Ct),Qi=0;;){var AE=bE(Yt);if(!AE)return xe.length=Qi,xe;var P5=xE(AE);try{xe[Qi]=P5}catch(N5){try{_E(Yt)}finally{throw N5}}Qi++}}function ue(ye,ve,xe){var We=te(ve,xe,!1);if(J(We)||!We.delete(ye))return!1;if(We.size===0){var Ct=R.get(ve);J(Ct)||(Ct.delete(xe),Ct.size===0&&R.delete(Ct))}return!0}}function T5(k){var R=k.defineMetadata,F=k.hasOwnMetadata,te=k.getOwnMetadata,Se=k.getOwnMetadataKeys,Wt=k.deleteMetadata,lr=new f,Ve={isProviderFor:function(ue,ye){var ve=lr.get(ue);return!J(ve)&&ve.has(ye)?!0:Se(ue,ye).length?(J(ve)&&(ve=new h,lr.set(ue,ve)),ve.add(ye),!0):!1},OrdinaryDefineOwnMetadata:R,OrdinaryHasOwnMetadata:F,OrdinaryGetOwnMetadata:te,OrdinaryOwnMetadataKeys:Se,OrdinaryDeleteMetadata:Wt};return Ve}function Kl(k,R,F){var te=y.getProvider(k,R);if(!J(te))return te;if(F){if(y.setProvider(k,R,_))return _;throw new Error("Illegal state.")}}function I5(){var k={},R=[],F=(function(){function Ve(ue,ye,ve){this._index=0,this._keys=ue,this._values=ye,this._selector=ve}return Ve.prototype["@@iterator"]=function(){return this},Ve.prototype[a]=function(){return this},Ve.prototype.next=function(){var ue=this._index;if(ue>=0&&ue<this._keys.length){var ye=this._selector(this._keys[ue],this._values[ue]);return ue+1>=this._keys.length?(this._index=-1,this._keys=R,this._values=R):this._index++,{value:ye,done:!1}}return{value:void 0,done:!0}},Ve.prototype.throw=function(ue){throw this._index>=0&&(this._index=-1,this._keys=R,this._values=R),ue},Ve.prototype.return=function(ue){return this._index>=0&&(this._index=-1,this._keys=R,this._values=R),{value:ue,done:!0}},Ve})(),te=(function(){function Ve(){this._keys=[],this._values=[],this._cacheKey=k,this._cacheIndex=-2}return Object.defineProperty(Ve.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),Ve.prototype.has=function(ue){return this._find(ue,!1)>=0},Ve.prototype.get=function(ue){var ye=this._find(ue,!1);return ye>=0?this._values[ye]:void 0},Ve.prototype.set=function(ue,ye){var ve=this._find(ue,!0);return this._values[ve]=ye,this},Ve.prototype.delete=function(ue){var ye=this._find(ue,!1);if(ye>=0){for(var ve=this._keys.length,xe=ye+1;xe<ve;xe++)this._keys[xe-1]=this._keys[xe],this._values[xe-1]=this._values[xe];return this._keys.length--,this._values.length--,er(ue,this._cacheKey)&&(this._cacheKey=k,this._cacheIndex=-2),!0}return!1},Ve.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=k,this._cacheIndex=-2},Ve.prototype.keys=function(){return new F(this._keys,this._values,Se)},Ve.prototype.values=function(){return new F(this._keys,this._values,Wt)},Ve.prototype.entries=function(){return new F(this._keys,this._values,lr)},Ve.prototype["@@iterator"]=function(){return this.entries()},Ve.prototype[a]=function(){return this.entries()},Ve.prototype._find=function(ue,ye){if(!er(this._cacheKey,ue)){this._cacheIndex=-1;for(var ve=0;ve<this._keys.length;ve++)if(er(this._keys[ve],ue)){this._cacheIndex=ve;break}}return this._cacheIndex<0&&ye&&(this._cacheIndex=this._keys.length,this._keys.push(ue),this._values.push(void 0)),this._cacheIndex},Ve})();return te;function Se(Ve,ue){return Ve}function Wt(Ve,ue){return ue}function lr(Ve,ue){return[Ve,ue]}}function B5(){var k=(function(){function R(){this._map=new d}return Object.defineProperty(R.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),R.prototype.has=function(F){return this._map.has(F)},R.prototype.add=function(F){return this._map.set(F,F),this},R.prototype.delete=function(F){return this._map.delete(F)},R.prototype.clear=function(){this._map.clear()},R.prototype.keys=function(){return this._map.keys()},R.prototype.values=function(){return this._map.keys()},R.prototype.entries=function(){return this._map.entries()},R.prototype["@@iterator"]=function(){return this.keys()},R.prototype[a]=function(){return this.keys()},R})();return k}function k5(){var k=16,R=l.create(),F=te();return(function(){function ue(){this._key=te()}return ue.prototype.has=function(ye){var ve=Se(ye,!1);return ve!==void 0?l.has(ve,this._key):!1},ue.prototype.get=function(ye){var ve=Se(ye,!1);return ve!==void 0?l.get(ve,this._key):void 0},ue.prototype.set=function(ye,ve){var xe=Se(ye,!0);return xe[this._key]=ve,this},ue.prototype.delete=function(ye){var ve=Se(ye,!1);return ve!==void 0?delete ve[this._key]:!1},ue.prototype.clear=function(){this._key=te()},ue})();function te(){var ue;do ue="@@WeakMap@@"+Ve();while(l.has(R,ue));return R[ue]=!0,ue}function Se(ue,ye){if(!i.call(ue,F)){if(!ye)return;Object.defineProperty(ue,F,{value:l.create()})}return ue[F]}function Wt(ue,ye){for(var ve=0;ve<ye;++ve)ue[ve]=Math.random()*255|0;return ue}function lr(ue){if(typeof Uint8Array=="function"){var ye=new Uint8Array(ue);return typeof crypto<"u"?crypto.getRandomValues(ye):typeof msCrypto<"u"?msCrypto.getRandomValues(ye):Wt(ye,ue),ye}return Wt(new Array(ue),ue)}function Ve(){var ue=lr(k);ue[6]=ue[6]&79|64,ue[8]=ue[8]&191|128;for(var ye="",ve=0;ve<k;++ve){var xe=ue[ve];(ve===4||ve===6||ve===8)&&(ye+="-"),xe<16&&(ye+="0"),ye+=xe.toString(16).toLowerCase()}return ye}}function Jv(k){return k.__=void 0,delete k.__,k}})})(v2||(v2={}))});var j={};wE(j,{__addDisposableResource:()=>H2,__assign:()=>cm,__asyncDelegator:()=>D2,__asyncGenerator:()=>L2,__asyncValues:()=>q2,__await:()=>Ic,__awaiter:()=>B2,__classPrivateFieldGet:()=>M2,__classPrivateFieldIn:()=>K2,__classPrivateFieldSet:()=>V2,__createBinding:()=>lm,__decorate:()=>A2,__disposeResources:()=>$2,__esDecorate:()=>w2,__exportStar:()=>P2,__extends:()=>b2,__generator:()=>k2,__importDefault:()=>F2,__importStar:()=>U2,__makeTemplateObject:()=>j2,__metadata:()=>I2,__param:()=>S2,__propKey:()=>E2,__read:()=>Ax,__rest:()=>_2,__rewriteRelativeImportExtension:()=>z2,__runInitializers:()=>C2,__setFunctionName:()=>T2,__spread:()=>N2,__spreadArray:()=>O2,__spreadArrays:()=>R2,__values:()=>um,default:()=>G6});function b2(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");bx(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function _2(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]]);return r}function A2(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,i);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(n<3?a(s):n>3?a(t,r,s):a(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s}function S2(e,t){return function(r,i){t(r,i,e)}}function w2(e,t,r,i,n,s){function a(_){if(_!==void 0&&typeof _!="function")throw new TypeError("Function expected");return _}for(var o=i.kind,c=o==="getter"?"get":o==="setter"?"set":"value",u=!t&&e?i.static?e:e.prototype:null,l=t||(u?Object.getOwnPropertyDescriptor(u,i.name):{}),p,d=!1,h=r.length-1;h>=0;h--){var f={};for(var m in i)f[m]=m==="access"?{}:i[m];for(var m in i.access)f.access[m]=i.access[m];f.addInitializer=function(_){if(d)throw new TypeError("Cannot add initializers after decoration has completed");s.push(a(_||null))};var y=(0,r[h])(o==="accessor"?{get:l.get,set:l.set}:l[c],f);if(o==="accessor"){if(y===void 0)continue;if(y===null||typeof y!="object")throw new TypeError("Object expected");(p=a(y.get))&&(l.get=p),(p=a(y.set))&&(l.set=p),(p=a(y.init))&&n.unshift(p)}else(p=a(y))&&(o==="field"?n.unshift(p):l[c]=p)}u&&Object.defineProperty(u,i.name,l),d=!0}function C2(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0}function E2(e){return typeof e=="symbol"?e:"".concat(e)}function T2(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function I2(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function B2(e,t,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{u(i.next(l))}catch(p){a(p)}}function c(l){try{u(i.throw(l))}catch(p){a(p)}}function u(l){l.done?s(l.value):n(l.value).then(o,c)}u((i=i.apply(e,t||[])).next())})}function k2(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=o(0),a.throw=o(1),a.return=o(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(u){return function(l){return c([u,l])}}function c(u){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(r=0)),r;)try{if(i=1,n&&(s=u[0]&2?n.return:u[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,u[1])).done)return s;switch(n=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,n=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){r.label=u[1];break}if(u[0]===6&&r.label<s[1]){r.label=s[1],s=u;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(u);break}s[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],n=0}finally{i=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function P2(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&lm(t,e,r)}function um(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ax(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i=r.call(e),n,s=[],a;try{for(;(t===void 0||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(o){a={error:o}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return s}function N2(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ax(arguments[t]));return e}function R2(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var i=Array(e),n=0,t=0;t<r;t++)for(var s=arguments[t],a=0,o=s.length;a<o;a++,n++)i[n]=s[a];return i}function O2(e,t,r){if(r||arguments.length===2)for(var i=0,n=t.length,s;i<n;i++)(s||!(i in t))&&(s||(s=Array.prototype.slice.call(t,0,i)),s[i]=t[i]);return e.concat(s||Array.prototype.slice.call(t))}function Ic(e){return this instanceof Ic?(this.v=e,this):new Ic(e)}function L2(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=r.apply(e,t||[]),n,s=[];return n=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",a),n[Symbol.asyncIterator]=function(){return this},n;function a(h){return function(f){return Promise.resolve(f).then(h,p)}}function o(h,f){i[h]&&(n[h]=function(m){return new Promise(function(y,_){s.push([h,m,y,_])>1||c(h,m)})},f&&(n[h]=f(n[h])))}function c(h,f){try{u(i[h](f))}catch(m){d(s[0][3],m)}}function u(h){h.value instanceof Ic?Promise.resolve(h.value.v).then(l,p):d(s[0][2],h)}function l(h){c("next",h)}function p(h){c("throw",h)}function d(h,f){h(f),s.shift(),s.length&&c(s[0][0],s[0][1])}}function D2(e){var t,r;return t={},i("next"),i("throw",function(n){throw n}),i("return"),t[Symbol.iterator]=function(){return this},t;function i(n,s){t[n]=e[n]?function(a){return(r=!r)?{value:Ic(e[n](a)),done:!1}:s?s(a):a}:s}}function q2(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof um=="function"?um(e):e[Symbol.iterator](),r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r);function i(s){r[s]=e[s]&&function(a){return new Promise(function(o,c){a=e[s](a),n(o,c,a.done,a.value)})}}function n(s,a,o,c){Promise.resolve(c).then(function(u){s({value:u,done:o})},a)}}function j2(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function U2(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=_x(e),i=0;i<r.length;i++)r[i]!=="default"&&lm(t,e,r[i]);return $6(t,e),t}function F2(e){return e&&e.__esModule?e:{default:e}}function M2(e,t,r,i){if(r==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?i:r==="a"?i.call(e):i?i.value:t.get(e)}function V2(e,t,r,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(e,r):n?n.value=r:t.set(e,r),r}function K2(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function H2(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var i,n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(i===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose],r&&(n=i)}if(typeof i!="function")throw new TypeError("Object not disposable.");n&&(i=function(){try{n.call(this)}catch(s){return Promise.reject(s)}}),e.stack.push({value:t,dispose:i,async:r})}else r&&e.stack.push({async:!0});return t}function $2(e){function t(s){e.error=e.hasError?new z6(s,e.error,"An error was suppressed during disposal."):s,e.hasError=!0}var r,i=0;function n(){for(;r=e.stack.pop();)try{if(!r.async&&i===1)return i=0,e.stack.push(r),Promise.resolve().then(n);if(r.dispose){var s=r.dispose.call(r.value);if(r.async)return i|=2,Promise.resolve(s).then(n,function(a){return t(a),n()})}else i|=1}catch(a){t(a)}if(i===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return n()}function z2(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,i,n,s,a){return i?t?".jsx":".js":n&&(!s||!a)?r:n+s+"."+a.toLowerCase()+"js"}):e}var bx,cm,lm,$6,_x,z6,G6,U=SE(()=>{bx=function(e,t){return bx=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r[n]=i[n])},bx(e,t)};cm=function(){return cm=Object.assign||function(t){for(var r,i=1,n=arguments.length;i<n;i++){r=arguments[i];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},cm.apply(this,arguments)};lm=Object.create?(function(e,t,r,i){i===void 0&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);(!n||("get"in n?!t.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}):(function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]});$6=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t},_x=function(e){return _x=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},_x(e)};z6=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var i=new Error(r);return i.name="SuppressedError",i.error=e,i.suppressed=t,i};G6={__extends:b2,__assign:cm,__rest:_2,__decorate:A2,__param:S2,__esDecorate:w2,__runInitializers:C2,__propKey:E2,__setFunctionName:T2,__metadata:I2,__awaiter:B2,__generator:k2,__createBinding:lm,__exportStar:P2,__values:um,__read:Ax,__spread:N2,__spreadArrays:R2,__spreadArray:O2,__await:Ic,__asyncGenerator:L2,__asyncDelegator:D2,__asyncValues:q2,__makeTemplateObject:j2,__importStar:U2,__importDefault:F2,__classPrivateFieldGet:M2,__classPrivateFieldSet:V2,__classPrivateFieldIn:K2,__addDisposableResource:H2,__disposeResources:$2,__rewriteRelativeImportExtension:z2}});var ka=b(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});Bc.AsnPropTypes=Bc.AsnTypeTypes=void 0;var G2;(function(e){e[e.Sequence=0]="Sequence",e[e.Set=1]="Set",e[e.Choice=2]="Choice"})(G2||(Bc.AsnTypeTypes=G2={}));var W2;(function(e){e[e.Any=1]="Any",e[e.Boolean=2]="Boolean",e[e.OctetString=3]="OctetString",e[e.BitString=4]="BitString",e[e.Integer=5]="Integer",e[e.Enumerated=6]="Enumerated",e[e.ObjectIdentifier=7]="ObjectIdentifier",e[e.Utf8String=8]="Utf8String",e[e.BmpString=9]="BmpString",e[e.UniversalString=10]="UniversalString",e[e.NumericString=11]="NumericString",e[e.PrintableString=12]="PrintableString",e[e.TeletexString=13]="TeletexString",e[e.VideotexString=14]="VideotexString",e[e.IA5String=15]="IA5String",e[e.GraphicString=16]="GraphicString",e[e.VisibleString=17]="VisibleString",e[e.GeneralString=18]="GeneralString",e[e.CharacterString=19]="CharacterString",e[e.UTCTime=20]="UTCTime",e[e.GeneralizedTime=21]="GeneralizedTime",e[e.DATE=22]="DATE",e[e.TimeOfDay=23]="TimeOfDay",e[e.DateTime=24]="DateTime",e[e.Duration=25]="Duration",e[e.TIME=26]="TIME",e[e.Null=27]="Null"})(W2||(Bc.AsnPropTypes=W2={}))});var Q2=b(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});pm.BitString=void 0;var Sx=ds(),Y2=us(),wx=class{constructor(t,r=0){if(this.unusedBits=0,this.value=new ArrayBuffer(0),t)if(typeof t=="number")this.fromNumber(t);else if(Y2.BufferSourceConverter.isBufferSource(t))this.unusedBits=r,this.value=Y2.BufferSourceConverter.toArrayBuffer(t);else throw TypeError("Unsupported type of 'params' argument for BitString")}fromASN(t){if(!(t instanceof Sx.BitString))throw new TypeError("Argument 'asn' is not instance of ASN.1 BitString");return this.unusedBits=t.valueBlock.unusedBits,this.value=t.valueBlock.valueHex,this}toASN(){return new Sx.BitString({unusedBits:this.unusedBits,valueHex:this.value})}toSchema(t){return new Sx.BitString({name:t})}toNumber(){let t="",r=new Uint8Array(this.value);for(let i of r)t+=i.toString(2).padStart(8,"0");return t=t.split("").reverse().join(""),this.unusedBits&&(t=t.slice(this.unusedBits).padStart(this.unusedBits,"0")),parseInt(t,2)}fromNumber(t){let r=t.toString(2),i=r.length+7>>3;this.unusedBits=(i<<3)-r.length;let n=new Uint8Array(i);r=r.padStart(i<<3,"0").split("").reverse().join("");let s=0;for(;s<i;)n[s]=parseInt(r.slice(s<<3,(s<<3)+8),2),s++;this.value=n.buffer}};pm.BitString=wx});var X2=b(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});fm.OctetString=void 0;var Cx=ds(),J2=us(),Ex=class{get byteLength(){return this.buffer.byteLength}get byteOffset(){return 0}constructor(t){typeof t=="number"?this.buffer=new ArrayBuffer(t):J2.BufferSourceConverter.isBufferSource(t)?this.buffer=J2.BufferSourceConverter.toArrayBuffer(t):Array.isArray(t)?this.buffer=new Uint8Array(t):this.buffer=new ArrayBuffer(0)}fromASN(t){if(!(t instanceof Cx.OctetString))throw new TypeError("Argument 'asn' is not instance of ASN.1 OctetString");return this.buffer=t.valueBlock.valueHex,this}toASN(){return new Cx.OctetString({valueHex:this.buffer})}toSchema(t){return new Cx.OctetString({name:t})}};fm.OctetString=Ex});var Tx=b(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});var Z2=(U(),D(j));Z2.__exportStar(Q2(),dm);Z2.__exportStar(X2(),dm)});var kp=b(ae=>{"use strict";Object.defineProperty(ae,"__esModule",{value:!0});ae.AsnNullConverter=ae.AsnGeneralizedTimeConverter=ae.AsnUTCTimeConverter=ae.AsnCharacterStringConverter=ae.AsnGeneralStringConverter=ae.AsnVisibleStringConverter=ae.AsnGraphicStringConverter=ae.AsnIA5StringConverter=ae.AsnVideotexStringConverter=ae.AsnTeletexStringConverter=ae.AsnPrintableStringConverter=ae.AsnNumericStringConverter=ae.AsnUniversalStringConverter=ae.AsnBmpStringConverter=ae.AsnUtf8StringConverter=ae.AsnConstructedOctetStringConverter=ae.AsnOctetStringConverter=ae.AsnBooleanConverter=ae.AsnObjectIdentifierConverter=ae.AsnBitStringConverter=ae.AsnIntegerBigIntConverter=ae.AsnIntegerArrayBufferConverter=ae.AsnEnumeratedConverter=ae.AsnIntegerConverter=ae.AsnAnyConverter=void 0;ae.defaultConverter=Y6;var bt=ds(),Mt=ka(),W6=Tx();ae.AsnAnyConverter={fromASN:e=>e instanceof bt.Null?null:e.valueBeforeDecodeView,toASN:e=>{if(e===null)return new bt.Null;let t=bt.fromBER(e);if(t.result.error)throw new Error(t.result.error);return t.result}};ae.AsnIntegerConverter={fromASN:e=>e.valueBlock.valueHexView.byteLength>=4?e.valueBlock.toString():e.valueBlock.valueDec,toASN:e=>new bt.Integer({value:+e})};ae.AsnEnumeratedConverter={fromASN:e=>e.valueBlock.valueDec,toASN:e=>new bt.Enumerated({value:e})};ae.AsnIntegerArrayBufferConverter={fromASN:e=>e.valueBlock.valueHexView,toASN:e=>new bt.Integer({valueHex:e})};ae.AsnIntegerBigIntConverter={fromASN:e=>e.toBigInt(),toASN:e=>bt.Integer.fromBigInt(e)};ae.AsnBitStringConverter={fromASN:e=>e.valueBlock.valueHexView,toASN:e=>new bt.BitString({valueHex:e})};ae.AsnObjectIdentifierConverter={fromASN:e=>e.valueBlock.toString(),toASN:e=>new bt.ObjectIdentifier({value:e})};ae.AsnBooleanConverter={fromASN:e=>e.valueBlock.value,toASN:e=>new bt.Boolean({value:e})};ae.AsnOctetStringConverter={fromASN:e=>e.valueBlock.valueHexView,toASN:e=>new bt.OctetString({valueHex:e})};ae.AsnConstructedOctetStringConverter={fromASN:e=>new W6.OctetString(e.getValue()),toASN:e=>e.toASN()};function Ri(e){return{fromASN:t=>t.valueBlock.value,toASN:t=>new e({value:t})}}ae.AsnUtf8StringConverter=Ri(bt.Utf8String);ae.AsnBmpStringConverter=Ri(bt.BmpString);ae.AsnUniversalStringConverter=Ri(bt.UniversalString);ae.AsnNumericStringConverter=Ri(bt.NumericString);ae.AsnPrintableStringConverter=Ri(bt.PrintableString);ae.AsnTeletexStringConverter=Ri(bt.TeletexString);ae.AsnVideotexStringConverter=Ri(bt.VideotexString);ae.AsnIA5StringConverter=Ri(bt.IA5String);ae.AsnGraphicStringConverter=Ri(bt.GraphicString);ae.AsnVisibleStringConverter=Ri(bt.VisibleString);ae.AsnGeneralStringConverter=Ri(bt.GeneralString);ae.AsnCharacterStringConverter=Ri(bt.CharacterString);ae.AsnUTCTimeConverter={fromASN:e=>e.toDate(),toASN:e=>new bt.UTCTime({valueDate:e})};ae.AsnGeneralizedTimeConverter={fromASN:e=>e.toDate(),toASN:e=>new bt.GeneralizedTime({valueDate:e})};ae.AsnNullConverter={fromASN:()=>null,toASN:()=>new bt.Null};function Y6(e){switch(e){case Mt.AsnPropTypes.Any:return ae.AsnAnyConverter;case Mt.AsnPropTypes.BitString:return ae.AsnBitStringConverter;case Mt.AsnPropTypes.BmpString:return ae.AsnBmpStringConverter;case Mt.AsnPropTypes.Boolean:return ae.AsnBooleanConverter;case Mt.AsnPropTypes.CharacterString:return ae.AsnCharacterStringConverter;case Mt.AsnPropTypes.Enumerated:return ae.AsnEnumeratedConverter;case Mt.AsnPropTypes.GeneralString:return ae.AsnGeneralStringConverter;case Mt.AsnPropTypes.GeneralizedTime:return ae.AsnGeneralizedTimeConverter;case Mt.AsnPropTypes.GraphicString:return ae.AsnGraphicStringConverter;case Mt.AsnPropTypes.IA5String:return ae.AsnIA5StringConverter;case Mt.AsnPropTypes.Integer:return ae.AsnIntegerConverter;case Mt.AsnPropTypes.Null:return ae.AsnNullConverter;case Mt.AsnPropTypes.NumericString:return ae.AsnNumericStringConverter;case Mt.AsnPropTypes.ObjectIdentifier:return ae.AsnObjectIdentifierConverter;case Mt.AsnPropTypes.OctetString:return ae.AsnOctetStringConverter;case Mt.AsnPropTypes.PrintableString:return ae.AsnPrintableStringConverter;case Mt.AsnPropTypes.TeletexString:return ae.AsnTeletexStringConverter;case Mt.AsnPropTypes.UTCTime:return ae.AsnUTCTimeConverter;case Mt.AsnPropTypes.UniversalString:return ae.AsnUniversalStringConverter;case Mt.AsnPropTypes.Utf8String:return ae.AsnUtf8StringConverter;case Mt.AsnPropTypes.VideotexString:return ae.AsnVideotexStringConverter;case Mt.AsnPropTypes.VisibleString:return ae.AsnVisibleStringConverter;default:return null}}});var hm=b(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});Pp.isConvertible=eI;Pp.isTypeOfArray=tI;Pp.isArrayEqual=Q6;function eI(e){return typeof e=="function"&&e.prototype?e.prototype.toASN&&e.prototype.fromASN?!0:eI(e.prototype):!!(e&&typeof e=="object"&&"toASN"in e&&"fromASN"in e)}function tI(e){var t;if(e){let r=Object.getPrototypeOf(e);return((t=r?.prototype)===null||t===void 0?void 0:t.constructor)===Array?!0:tI(r)}return!1}function Q6(e,t){if(!(e&&t)||e.byteLength!==t.byteLength)return!1;let r=new Uint8Array(e),i=new Uint8Array(t);for(let n=0;n<e.byteLength;n++)if(r[n]!==i[n])return!1;return!0}});var iI=b(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});mm.AsnSchemaStorage=void 0;var _i=ds(),kc=ka(),rI=hm(),Ix=class{constructor(){this.items=new WeakMap}has(t){return this.items.has(t)}get(t,r=!1){let i=this.items.get(t);if(!i)throw new Error(`Cannot get schema for '${t.prototype.constructor.name}' target`);if(r&&!i.schema)throw new Error(`Schema '${t.prototype.constructor.name}' doesn't contain ASN.1 schema. Call 'AsnSchemaStorage.cache'.`);return i}cache(t){let r=this.get(t);r.schema||(r.schema=this.create(t,!0))}createDefault(t){let r={type:kc.AsnTypeTypes.Sequence,items:{}},i=this.findParentSchema(t);return i&&(Object.assign(r,i),r.items=Object.assign({},r.items,i.items)),r}create(t,r){let i=this.items.get(t)||this.createDefault(t),n=[];for(let s in i.items){let a=i.items[s],o=r?s:"",c;if(typeof a.type=="number"){let l=kc.AsnPropTypes[a.type],p=_i[l];if(!p)throw new Error(`Cannot get ASN1 class by name '${l}'`);c=new p({name:o})}else(0,rI.isConvertible)(a.type)?c=new a.type().toSchema(o):a.optional?this.get(a.type).type===kc.AsnTypeTypes.Choice?c=new _i.Any({name:o}):(c=this.create(a.type,!1),c.name=o):c=new _i.Any({name:o});let u=!!a.optional||a.defaultValue!==void 0;if(a.repeated){c.name="";let l=a.repeated==="set"?_i.Set:_i.Sequence;c=new l({name:"",value:[new _i.Repeated({name:o,value:c})]})}if(a.context!==null&&a.context!==void 0)if(a.implicit)if(typeof a.type=="number"||(0,rI.isConvertible)(a.type)){let l=a.repeated?_i.Constructed:_i.Primitive;n.push(new l({name:o,optional:u,idBlock:{tagClass:3,tagNumber:a.context}}))}else{this.cache(a.type);let l=!!a.repeated,p=l?c:this.get(a.type,!0).schema;p="valueBlock"in p?p.valueBlock.value:p.value,n.push(new _i.Constructed({name:l?"":o,optional:u,idBlock:{tagClass:3,tagNumber:a.context},value:p}))}else n.push(new _i.Constructed({optional:u,idBlock:{tagClass:3,tagNumber:a.context},value:[c]}));else c.optional=u,n.push(c)}switch(i.type){case kc.AsnTypeTypes.Sequence:return new _i.Sequence({value:n,name:""});case kc.AsnTypeTypes.Set:return new _i.Set({value:n,name:""});case kc.AsnTypeTypes.Choice:return new _i.Choice({value:n,name:""});default:throw new Error("Unsupported ASN1 type in use")}}set(t,r){return this.items.set(t,r),this}findParentSchema(t){let r=Object.getPrototypeOf(t);return r?this.items.get(r)||this.findParentSchema(r):null}};mm.AsnSchemaStorage=Ix});var gm=b(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});ym.schemaStorage=void 0;var J6=iI();ym.schemaStorage=new J6.AsnSchemaStorage});var nI=b($r=>{"use strict";Object.defineProperty($r,"__esModule",{value:!0});$r.AsnProp=$r.AsnSequenceType=$r.AsnSetType=$r.AsnChoiceType=$r.AsnType=void 0;var X6=kp(),Bx=ka(),Fs=gm(),Z6=e=>t=>{let r;Fs.schemaStorage.has(t)?r=Fs.schemaStorage.get(t):(r=Fs.schemaStorage.createDefault(t),Fs.schemaStorage.set(t,r)),Object.assign(r,e)};$r.AsnType=Z6;var eF=()=>(0,$r.AsnType)({type:Bx.AsnTypeTypes.Choice});$r.AsnChoiceType=eF;var tF=e=>(0,$r.AsnType)({type:Bx.AsnTypeTypes.Set,...e});$r.AsnSetType=tF;var rF=e=>(0,$r.AsnType)({type:Bx.AsnTypeTypes.Sequence,...e});$r.AsnSequenceType=rF;var iF=e=>(t,r)=>{let i;Fs.schemaStorage.has(t.constructor)?i=Fs.schemaStorage.get(t.constructor):(i=Fs.schemaStorage.createDefault(t.constructor),Fs.schemaStorage.set(t.constructor,i));let n=Object.assign({},e);if(typeof n.type=="number"&&!n.converter){let s=X6.defaultConverter(e.type);if(!s)throw new Error(`Cannot get default converter for property '${r}' of ${t.constructor.name}`);n.converter=s}n.raw=e.raw,i.items[r]=n};$r.AsnProp=iF});var sI=b(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});vm.AsnSchemaValidationError=void 0;var kx=class extends Error{constructor(){super(...arguments),this.schemas=[]}};vm.AsnSchemaValidationError=kx});var Nx=b(Px=>{"use strict";Object.defineProperty(Px,"__esModule",{value:!0});var nF=(U(),D(j));nF.__exportStar(sI(),Px)});var Lx=b(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});xm.AsnParser=void 0;var ti=ds(),Ms=ka(),Rx=kp(),Np=Nx(),Rp=hm(),Pa=gm(),Ox=class{static parse(t,r){let i=ti.fromBER(t);if(i.result.error)throw new Error(i.result.error);return this.fromASN(i.result,r)}static fromASN(t,r){try{if((0,Rp.isConvertible)(r))return new r().fromASN(t);let i=Pa.schemaStorage.get(r);Pa.schemaStorage.cache(r);let n=i.schema,s=this.handleChoiceTypes(t,i,r,n);if(s?.result)return s.result;s?.targetSchema&&(n=s.targetSchema);let a=this.handleSequenceTypes(t,i,r,n),o=new r;return(0,Rp.isTypeOfArray)(r)?this.handleArrayTypes(t,i,r):(this.processSchemaItems(i,a,o),o)}catch(i){throw i instanceof Np.AsnSchemaValidationError&&i.schemas.push(r.name),i}}static handleChoiceTypes(t,r,i,n){if(t.constructor===ti.Constructed&&r.type===Ms.AsnTypeTypes.Choice&&t.idBlock.tagClass===3)for(let s in r.items){let a=r.items[s];if(a.context===t.idBlock.tagNumber&&a.implicit&&typeof a.type=="function"&&Pa.schemaStorage.has(a.type)){let o=Pa.schemaStorage.get(a.type);if(o&&o.type===Ms.AsnTypeTypes.Sequence){let c=new ti.Sequence;if("value"in t.valueBlock&&Array.isArray(t.valueBlock.value)&&"value"in c.valueBlock){c.valueBlock.value=t.valueBlock.value;let u=this.fromASN(c,a.type),l=new i;return l[s]=u,{result:l}}}}}else if(t.constructor===ti.Constructed&&r.type!==Ms.AsnTypeTypes.Choice){let s=new ti.Constructed({idBlock:{tagClass:3,tagNumber:t.idBlock.tagNumber},value:r.schema.valueBlock.value});for(let a in r.items)delete t[a];return{targetSchema:s}}return null}static handleSequenceTypes(t,r,i,n){if(r.type===Ms.AsnTypeTypes.Sequence){let s=ti.compareSchema({},t,n);if(!s.verified)throw new Np.AsnSchemaValidationError(`Data does not match to ${i.name} ASN1 schema.${s.result.error?` ${s.result.error}`:""}`);return s}else{let s=ti.compareSchema({},t,n);if(!s.verified)throw new Np.AsnSchemaValidationError(`Data does not match to ${i.name} ASN1 schema.${s.result.error?` ${s.result.error}`:""}`);return s}}static processRepeatedField(t,r,i){let n=t.slice(r);if(n.length===1&&n[0].constructor.name==="Sequence"){let s=n[0];s.valueBlock&&s.valueBlock.value&&Array.isArray(s.valueBlock.value)&&(n=s.valueBlock.value)}if(typeof i.type=="number"){let s=Rx.defaultConverter(i.type);if(!s)throw new Error(`No converter for ASN.1 type ${i.type}`);return n.filter(a=>a&&a.valueBlock).map(a=>{try{return s.fromASN(a)}catch{return}}).filter(a=>a!==void 0)}else return n.filter(s=>s&&s.valueBlock).map(s=>{try{return this.fromASN(s,i.type)}catch{return}}).filter(s=>s!==void 0)}static processPrimitiveField(t,r){let i=Rx.defaultConverter(r.type);if(!i)throw new Error(`No converter for ASN.1 type ${r.type}`);return i.fromASN(t)}static isOptionalChoiceField(t){return t.optional&&typeof t.type=="function"&&Pa.schemaStorage.has(t.type)&&Pa.schemaStorage.get(t.type).type===Ms.AsnTypeTypes.Choice}static processOptionalChoiceField(t,r){try{return{processed:!0,value:this.fromASN(t,r.type)}}catch(i){if(i instanceof Np.AsnSchemaValidationError&&/Wrong values for Choice type/.test(i.message))return{processed:!1};throw i}}static handleArrayTypes(t,r,i){if(!("value"in t.valueBlock&&Array.isArray(t.valueBlock.value)))throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");let n=r.itemType;if(typeof n=="number"){let s=Rx.defaultConverter(n);if(!s)throw new Error(`Cannot get default converter for array item of ${i.name} ASN1 schema`);return i.from(t.valueBlock.value,a=>s.fromASN(a))}else return i.from(t.valueBlock.value,s=>this.fromASN(s,n))}static processSchemaItems(t,r,i){for(let n in t.items){let s=r.result[n];if(!s)continue;let a=t.items[n],o=a.type,c;typeof o=="number"||(0,Rp.isConvertible)(o)?c=this.processPrimitiveSchemaItem(s,a,o):c=this.processComplexSchemaItem(s,a,o),c&&typeof c=="object"&&"value"in c&&"raw"in c?(i[n]=c.value,i[`${n}Raw`]=c.raw):i[n]=c}}static processPrimitiveSchemaItem(t,r,i){var n;let s=(n=r.converter)!==null&&n!==void 0?n:(0,Rp.isConvertible)(i)?new i:null;if(!s)throw new Error("Converter is empty");return r.repeated?this.processRepeatedPrimitiveItem(t,r,s):this.processSinglePrimitiveItem(t,r,i,s)}static processRepeatedPrimitiveItem(t,r,i){if(r.implicit){let n=r.repeated==="sequence"?ti.Sequence:ti.Set,s=new n;s.valueBlock=t.valueBlock;let a=ti.fromBER(s.toBER(!1));if(a.offset===-1)throw new Error(`Cannot parse the child item. ${a.result.error}`);if(!("value"in a.result.valueBlock&&Array.isArray(a.result.valueBlock.value)))throw new Error("Cannot get items from the ASN.1 parsed value. ASN.1 object is not constructed.");let o=a.result.valueBlock.value;return Array.from(o,c=>i.fromASN(c))}else return Array.from(t,n=>i.fromASN(n))}static processSinglePrimitiveItem(t,r,i,n){let s=t;if(r.implicit){let a;if((0,Rp.isConvertible)(i))a=new i().toSchema("");else{let o=Ms.AsnPropTypes[i],c=ti[o];if(!c)throw new Error(`Cannot get '${o}' class from asn1js module`);a=new c}a.valueBlock=s.valueBlock,s=ti.fromBER(a.toBER(!1)).result}return n.fromASN(s)}static processComplexSchemaItem(t,r,i){if(r.repeated){if(!Array.isArray(t))throw new Error("Cannot get list of items from the ASN.1 parsed value. ASN.1 value should be iterable.");return Array.from(t,n=>this.fromASN(n,i))}else{let n=this.handleImplicitTagging(t,r,i);if(this.isOptionalChoiceField(r))try{return this.fromASN(n,i)}catch(s){if(s instanceof Np.AsnSchemaValidationError&&/Wrong values for Choice type/.test(s.message))return;throw s}else{let s=this.fromASN(n,i);return r.raw?{value:s,raw:t.valueBeforeDecodeView}:s}}}static handleImplicitTagging(t,r,i){if(r.implicit&&typeof r.context=="number"){let n=Pa.schemaStorage.get(i);if(n.type===Ms.AsnTypeTypes.Sequence){let s=new ti.Sequence;if("value"in t.valueBlock&&Array.isArray(t.valueBlock.value)&&"value"in s.valueBlock)return s.valueBlock.value=t.valueBlock.value,s}else if(n.type===Ms.AsnTypeTypes.Set){let s=new ti.Set;if("value"in t.valueBlock&&Array.isArray(t.valueBlock.value)&&"value"in s.valueBlock)return s.valueBlock.value=t.valueBlock.value,s}}return t}};xm.AsnParser=Ox});var jx=b(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});_m.AsnSerializer=void 0;var Ji=ds(),sF=kp(),bm=ka(),Dx=hm(),aI=gm(),qx=class e{static serialize(t){return t instanceof Ji.BaseBlock?t.toBER(!1):this.toASN(t).toBER(!1)}static toASN(t){if(t&&typeof t=="object"&&(0,Dx.isConvertible)(t))return t.toASN();if(!(t&&typeof t=="object"))throw new TypeError("Parameter 1 should be type of Object.");let r=t.constructor,i=aI.schemaStorage.get(r);aI.schemaStorage.cache(r);let n=[];if(i.itemType){if(!Array.isArray(t))throw new TypeError("Parameter 1 should be type of Array.");if(typeof i.itemType=="number"){let a=sF.defaultConverter(i.itemType);if(!a)throw new Error(`Cannot get default converter for array item of ${r.name} ASN1 schema`);n=t.map(o=>a.toASN(o))}else n=t.map(a=>this.toAsnItem({type:i.itemType},"[]",r,a))}else for(let a in i.items){let o=i.items[a],c=t[a];if(c===void 0||o.defaultValue===c||typeof o.defaultValue=="object"&&typeof c=="object"&&(0,Dx.isArrayEqual)(this.serialize(o.defaultValue),this.serialize(c)))continue;let u=e.toAsnItem(o,a,r,c);if(typeof o.context=="number")if(o.implicit)if(!o.repeated&&(typeof o.type=="number"||(0,Dx.isConvertible)(o.type))){let l={};l.valueHex=u instanceof Ji.Null?u.valueBeforeDecodeView:u.valueBlock.toBER(),n.push(new Ji.Primitive({optional:o.optional,idBlock:{tagClass:3,tagNumber:o.context},...l}))}else n.push(new Ji.Constructed({optional:o.optional,idBlock:{tagClass:3,tagNumber:o.context},value:u.valueBlock.value}));else n.push(new Ji.Constructed({optional:o.optional,idBlock:{tagClass:3,tagNumber:o.context},value:[u]}));else o.repeated?n=n.concat(u):n.push(u)}let s;switch(i.type){case bm.AsnTypeTypes.Sequence:s=new Ji.Sequence({value:n});break;case bm.AsnTypeTypes.Set:s=new Ji.Set({value:n});break;case bm.AsnTypeTypes.Choice:if(!n[0])throw new Error(`Schema '${r.name}' has wrong data. Choice cannot be empty.`);s=n[0];break}return s}static toAsnItem(t,r,i,n){let s;if(typeof t.type=="number"){let a=t.converter;if(!a)throw new Error(`Property '${r}' doesn't have converter for type ${bm.AsnPropTypes[t.type]} in schema '${i.name}'`);if(t.repeated){if(!Array.isArray(n))throw new TypeError("Parameter 'objProp' should be type of Array.");let o=Array.from(n,u=>a.toASN(u)),c=t.repeated==="sequence"?Ji.Sequence:Ji.Set;s=new c({value:o})}else s=a.toASN(n)}else if(t.repeated){if(!Array.isArray(n))throw new TypeError("Parameter 'objProp' should be type of Array.");let a=Array.from(n,c=>this.toASN(c)),o=t.repeated==="sequence"?Ji.Sequence:Ji.Set;s=new o({value:a})}else s=this.toASN(n);return s}};_m.AsnSerializer=qx});var oI=b(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});Am.AsnArray=void 0;var Ux=class extends Array{constructor(t=[]){if(typeof t=="number")super(t);else{super();for(let r of t)this.push(r)}}};Am.AsnArray=Ux});var uI=b(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});Sm.AsnConvert=void 0;var aF=ds(),cI=us(),oF=Lx(),cF=jx(),Fx=class e{static serialize(t){return cF.AsnSerializer.serialize(t)}static parse(t,r){return oF.AsnParser.parse(t,r)}static toString(t){let r=cI.BufferSourceConverter.isBufferSource(t)?cI.BufferSourceConverter.toArrayBuffer(t):e.serialize(t),i=aF.fromBER(r);if(i.offset===-1)throw new Error(`Cannot decode ASN.1 data. ${i.result.error}`);return i.result.toString()}};Sm.AsnConvert=Fx});var H=b(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.AsnSerializer=Et.AsnParser=Et.AsnPropTypes=Et.AsnTypeTypes=Et.AsnSetType=Et.AsnSequenceType=Et.AsnChoiceType=Et.AsnType=Et.AsnProp=void 0;var Op=(U(),D(j));Op.__exportStar(kp(),Et);Op.__exportStar(Tx(),Et);var Lp=nI();Object.defineProperty(Et,"AsnProp",{enumerable:!0,get:function(){return Lp.AsnProp}});Object.defineProperty(Et,"AsnType",{enumerable:!0,get:function(){return Lp.AsnType}});Object.defineProperty(Et,"AsnChoiceType",{enumerable:!0,get:function(){return Lp.AsnChoiceType}});Object.defineProperty(Et,"AsnSequenceType",{enumerable:!0,get:function(){return Lp.AsnSequenceType}});Object.defineProperty(Et,"AsnSetType",{enumerable:!0,get:function(){return Lp.AsnSetType}});var lI=ka();Object.defineProperty(Et,"AsnTypeTypes",{enumerable:!0,get:function(){return lI.AsnTypeTypes}});Object.defineProperty(Et,"AsnPropTypes",{enumerable:!0,get:function(){return lI.AsnPropTypes}});var uF=Lx();Object.defineProperty(Et,"AsnParser",{enumerable:!0,get:function(){return uF.AsnParser}});var lF=jx();Object.defineProperty(Et,"AsnSerializer",{enumerable:!0,get:function(){return lF.AsnSerializer}});Op.__exportStar(Nx(),Et);Op.__exportStar(oI(),Et);Op.__exportStar(uI(),Et)});var pI=b(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});wm.IpConverter=void 0;var pF=us(),Mx=class{static isIPv4(t){return/^(\d{1,3}\.){3}\d{1,3}$/.test(t)}static parseIPv4(t){let r=t.split(".");if(r.length!==4)throw new Error("Invalid IPv4 address");return r.map(i=>{let n=parseInt(i,10);if(isNaN(n)||n<0||n>255)throw new Error("Invalid IPv4 address part");return n})}static parseIPv6(t){let i=this.expandIPv6(t).split(":");if(i.length!==8)throw new Error("Invalid IPv6 address");return i.reduce((n,s)=>{let a=parseInt(s,16);if(isNaN(a)||a<0||a>65535)throw new Error("Invalid IPv6 address part");return n.push(a>>8&255),n.push(a&255),n},[])}static expandIPv6(t){if(!t.includes("::"))return t;let r=t.split("::");if(r.length>2)throw new Error("Invalid IPv6 address");let i=r[0]?r[0].split(":"):[],n=r[1]?r[1].split(":"):[],s=8-(i.length+n.length);if(s<0)throw new Error("Invalid IPv6 address");return[...i,...Array(s).fill("0"),...n].join(":")}static formatIPv6(t){let r=[];for(let i=0;i<16;i+=2)r.push((t[i]<<8|t[i+1]).toString(16));return this.compressIPv6(r.join(":"))}static compressIPv6(t){let r=t.split(":"),i=-1,n=0,s=-1,a=0;for(let o=0;o<r.length;o++)r[o]==="0"?(s===-1&&(s=o),a++):(a>n&&(i=s,n=a),s=-1,a=0);if(a>n&&(i=s,n=a),n>1){let o=r.slice(0,i).join(":"),c=r.slice(i+n).join(":");return`${o}::${c}`}return t}static parseCIDR(t){let[r,i]=t.split("/"),n=parseInt(i,10);if(this.isIPv4(r)){if(n<0||n>32)throw new Error("Invalid IPv4 prefix length");return[this.parseIPv4(r),n]}else{if(n<0||n>128)throw new Error("Invalid IPv6 prefix length");return[this.parseIPv6(r),n]}}static decodeIP(t){if(t.length===64&&parseInt(t,16)===0)return"::/0";if(t.length!==16)return t;let r=parseInt(t.slice(8),16).toString(2).split("").reduce((n,s)=>n+ +s,0),i=t.slice(0,8).replace(/(.{2})/g,n=>`${parseInt(n,16)}.`);return i=i.slice(0,-1),`${i}/${r}`}static toString(t){let r=new Uint8Array(t);if(r.length===4)return Array.from(r).join(".");if(r.length===16)return this.formatIPv6(r);if(r.length===8||r.length===32){let i=r.length/2,n=r.slice(0,i),s=r.slice(i);if(r.every(c=>c===0))return r.length===8?"0.0.0.0/0":"::/0";let o=s.reduce((c,u)=>c+(u.toString(2).match(/1/g)||[]).length,0);return r.length===8?`${Array.from(n).join(".")}/${o}`:`${this.formatIPv6(n)}/${o}`}return this.decodeIP(pF.Convert.ToHex(t))}static fromString(t){if(t.includes("/")){let[i,n]=this.parseCIDR(t),s=new Uint8Array(i.length),a=n;for(let c=0;c<s.length;c++)a>=8?(s[c]=255,a-=8):a>0&&(s[c]=255<<8-a,a=0);let o=new Uint8Array(i.length*2);return o.set(i,0),o.set(s,i.length),o.buffer}let r=this.isIPv4(t)?this.parseIPv4(t):this.parseIPv6(t);return new Uint8Array(r).buffer}};wm.IpConverter=Mx});var Nc=b(fr=>{"use strict";var Vx,Kx,Hx;Object.defineProperty(fr,"__esModule",{value:!0});fr.Name=fr.RDNSequence=fr.RelativeDistinguishedName=fr.AttributeTypeAndValue=fr.AttributeValue=fr.DirectoryString=void 0;var ri=(U(),D(j)),pt=H(),fF=us(),hs=class{constructor(t={}){Object.assign(this,t)}toString(){return this.bmpString||this.printableString||this.teletexString||this.universalString||this.utf8String||""}};fr.DirectoryString=hs;ri.__decorate([(0,pt.AsnProp)({type:pt.AsnPropTypes.TeletexString})],hs.prototype,"teletexString",void 0);ri.__decorate([(0,pt.AsnProp)({type:pt.AsnPropTypes.PrintableString})],hs.prototype,"printableString",void 0);ri.__decorate([(0,pt.AsnProp)({type:pt.AsnPropTypes.UniversalString})],hs.prototype,"universalString",void 0);ri.__decorate([(0,pt.AsnProp)({type:pt.AsnPropTypes.Utf8String})],hs.prototype,"utf8String",void 0);ri.__decorate([(0,pt.AsnProp)({type:pt.AsnPropTypes.BmpString})],hs.prototype,"bmpString",void 0);fr.DirectoryString=hs=ri.__decorate([(0,pt.AsnType)({type:pt.AsnTypeTypes.Choice})],hs);var Na=class extends hs{constructor(t={}){super(t),Object.assign(this,t)}toString(){return this.ia5String||(this.anyValue?fF.Convert.ToHex(this.anyValue):super.toString())}};fr.AttributeValue=Na;ri.__decorate([(0,pt.AsnProp)({type:pt.AsnPropTypes.IA5String})],Na.prototype,"ia5String",void 0);ri.__decorate([(0,pt.AsnProp)({type:pt.AsnPropTypes.Any})],Na.prototype,"anyValue",void 0);fr.AttributeValue=Na=ri.__decorate([(0,pt.AsnType)({type:pt.AsnTypeTypes.Choice})],Na);var Pc=class{constructor(t={}){this.type="",this.value=new Na,Object.assign(this,t)}};fr.AttributeTypeAndValue=Pc;ri.__decorate([(0,pt.AsnProp)({type:pt.AsnPropTypes.ObjectIdentifier})],Pc.prototype,"type",void 0);ri.__decorate([(0,pt.AsnProp)({type:Na})],Pc.prototype,"value",void 0);var Cm=Vx=class extends pt.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,Vx.prototype)}};fr.RelativeDistinguishedName=Cm;fr.RelativeDistinguishedName=Cm=Vx=ri.__decorate([(0,pt.AsnType)({type:pt.AsnTypeTypes.Set,itemType:Pc})],Cm);var Em=Kx=class extends pt.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,Kx.prototype)}};fr.RDNSequence=Em;fr.RDNSequence=Em=Kx=ri.__decorate([(0,pt.AsnType)({type:pt.AsnTypeTypes.Sequence,itemType:Cm})],Em);var $x=Hx=class extends Em{constructor(t){super(t),Object.setPrototypeOf(this,Hx.prototype)}};fr.Name=$x;fr.Name=$x=Hx=ri.__decorate([(0,pt.AsnType)({type:pt.AsnTypeTypes.Sequence})],$x)});var Ra=b(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.GeneralName=Oi.EDIPartyName=Oi.OtherName=Oi.AsnIpConverter=void 0;var ii=(U(),D(j)),Tt=H(),fI=pI(),Tm=Nc();Oi.AsnIpConverter={fromASN:e=>fI.IpConverter.toString(Tt.AsnOctetStringConverter.fromASN(e)),toASN:e=>Tt.AsnOctetStringConverter.toASN(fI.IpConverter.fromString(e))};var Rc=class{constructor(t={}){this.typeId="",this.value=new ArrayBuffer(0),Object.assign(this,t)}};Oi.OtherName=Rc;ii.__decorate([(0,Tt.AsnProp)({type:Tt.AsnPropTypes.ObjectIdentifier})],Rc.prototype,"typeId",void 0);ii.__decorate([(0,Tt.AsnProp)({type:Tt.AsnPropTypes.Any,context:0})],Rc.prototype,"value",void 0);var Oc=class{constructor(t={}){this.partyName=new Tm.DirectoryString,Object.assign(this,t)}};Oi.EDIPartyName=Oc;ii.__decorate([(0,Tt.AsnProp)({type:Tm.DirectoryString,optional:!0,context:0,implicit:!0})],Oc.prototype,"nameAssigner",void 0);ii.__decorate([(0,Tt.AsnProp)({type:Tm.DirectoryString,context:1,implicit:!0})],Oc.prototype,"partyName",void 0);var Li=class{constructor(t={}){Object.assign(this,t)}};Oi.GeneralName=Li;ii.__decorate([(0,Tt.AsnProp)({type:Rc,context:0,implicit:!0})],Li.prototype,"otherName",void 0);ii.__decorate([(0,Tt.AsnProp)({type:Tt.AsnPropTypes.IA5String,context:1,implicit:!0})],Li.prototype,"rfc822Name",void 0);ii.__decorate([(0,Tt.AsnProp)({type:Tt.AsnPropTypes.IA5String,context:2,implicit:!0})],Li.prototype,"dNSName",void 0);ii.__decorate([(0,Tt.AsnProp)({type:Tt.AsnPropTypes.Any,context:3,implicit:!0})],Li.prototype,"x400Address",void 0);ii.__decorate([(0,Tt.AsnProp)({type:Tm.Name,context:4,implicit:!1})],Li.prototype,"directoryName",void 0);ii.__decorate([(0,Tt.AsnProp)({type:Oc,context:5})],Li.prototype,"ediPartyName",void 0);ii.__decorate([(0,Tt.AsnProp)({type:Tt.AsnPropTypes.IA5String,context:6,implicit:!0})],Li.prototype,"uniformResourceIdentifier",void 0);ii.__decorate([(0,Tt.AsnProp)({type:Tt.AsnPropTypes.OctetString,context:7,implicit:!0,converter:Oi.AsnIpConverter})],Li.prototype,"iPAddress",void 0);ii.__decorate([(0,Tt.AsnProp)({type:Tt.AsnPropTypes.ObjectIdentifier,context:8,implicit:!0})],Li.prototype,"registeredID",void 0);Oi.GeneralName=Li=ii.__decorate([(0,Tt.AsnType)({type:Tt.AsnTypeTypes.Choice})],Li)});var _t=b(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.id_ce=Ye.id_ad_caRepository=Ye.id_ad_timeStamping=Ye.id_ad_caIssuers=Ye.id_ad_ocsp=Ye.id_qt_unotice=Ye.id_qt_csp=Ye.id_ad=Ye.id_kp=Ye.id_qt=Ye.id_pe=Ye.id_pkix=void 0;Ye.id_pkix="1.3.6.1.5.5.7";Ye.id_pe=`${Ye.id_pkix}.1`;Ye.id_qt=`${Ye.id_pkix}.2`;Ye.id_kp=`${Ye.id_pkix}.3`;Ye.id_ad=`${Ye.id_pkix}.48`;Ye.id_qt_csp=`${Ye.id_qt}.1`;Ye.id_qt_unotice=`${Ye.id_qt}.2`;Ye.id_ad_ocsp=`${Ye.id_ad}.1`;Ye.id_ad_caIssuers=`${Ye.id_ad}.2`;Ye.id_ad_timeStamping=`${Ye.id_ad}.3`;Ye.id_ad_caRepository=`${Ye.id_ad}.5`;Ye.id_ce="2.5.29"});var Yx=b(ms=>{"use strict";var zx;Object.defineProperty(ms,"__esModule",{value:!0});ms.AuthorityInfoAccessSyntax=ms.AccessDescription=ms.id_pe_authorityInfoAccess=void 0;var Wx=(U(),D(j)),Lc=H(),dI=Ra(),dF=_t();ms.id_pe_authorityInfoAccess=`${dF.id_pe}.1`;var Dc=class{constructor(t={}){this.accessMethod="",this.accessLocation=new dI.GeneralName,Object.assign(this,t)}};ms.AccessDescription=Dc;Wx.__decorate([(0,Lc.AsnProp)({type:Lc.AsnPropTypes.ObjectIdentifier})],Dc.prototype,"accessMethod",void 0);Wx.__decorate([(0,Lc.AsnProp)({type:dI.GeneralName})],Dc.prototype,"accessLocation",void 0);var Gx=zx=class extends Lc.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,zx.prototype)}};ms.AuthorityInfoAccessSyntax=Gx;ms.AuthorityInfoAccessSyntax=Gx=zx=Wx.__decorate([(0,Lc.AsnType)({type:Lc.AsnTypeTypes.Sequence,itemType:Dc})],Gx)});var Jx=b(Vs=>{"use strict";Object.defineProperty(Vs,"__esModule",{value:!0});Vs.AuthorityKeyIdentifier=Vs.KeyIdentifier=Vs.id_ce_authorityKeyIdentifier=void 0;var Qx=(U(),D(j)),qc=H(),hF=Ra(),mF=_t();Vs.id_ce_authorityKeyIdentifier=`${mF.id_ce}.35`;var Im=class extends qc.OctetString{};Vs.KeyIdentifier=Im;var jc=class{constructor(t={}){t&&Object.assign(this,t)}};Vs.AuthorityKeyIdentifier=jc;Qx.__decorate([(0,qc.AsnProp)({type:Im,context:0,optional:!0,implicit:!0})],jc.prototype,"keyIdentifier",void 0);Qx.__decorate([(0,qc.AsnProp)({type:hF.GeneralName,context:1,optional:!0,implicit:!0,repeated:"sequence"})],jc.prototype,"authorityCertIssuer",void 0);Qx.__decorate([(0,qc.AsnProp)({type:qc.AsnPropTypes.Integer,context:2,optional:!0,implicit:!0,converter:qc.AsnIntegerArrayBufferConverter})],jc.prototype,"authorityCertSerialNumber",void 0)});var mI=b(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.BasicConstraints=Uc.id_ce_basicConstraints=void 0;var hI=(U(),D(j)),Bm=H(),yF=_t();Uc.id_ce_basicConstraints=`${yF.id_ce}.19`;var Dp=class{constructor(t={}){this.cA=!1,Object.assign(this,t)}};Uc.BasicConstraints=Dp;hI.__decorate([(0,Bm.AsnProp)({type:Bm.AsnPropTypes.Boolean,defaultValue:!1})],Dp.prototype,"cA",void 0);hI.__decorate([(0,Bm.AsnProp)({type:Bm.AsnPropTypes.Integer,optional:!0})],Dp.prototype,"pathLenConstraint",void 0)});var jp=b(qp=>{"use strict";var Xx;Object.defineProperty(qp,"__esModule",{value:!0});qp.GeneralNames=void 0;var gF=(U(),D(j)),yI=H(),vF=Ra(),xF=H(),Zx=Xx=class extends xF.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,Xx.prototype)}};qp.GeneralNames=Zx;qp.GeneralNames=Zx=Xx=gF.__decorate([(0,yI.AsnType)({type:yI.AsnTypeTypes.Sequence,itemType:vF.GeneralName})],Zx)});var vI=b(Oa=>{"use strict";var eb;Object.defineProperty(Oa,"__esModule",{value:!0});Oa.CertificateIssuer=Oa.id_ce_certificateIssuer=void 0;var bF=(U(),D(j)),gI=H(),_F=jp(),AF=_t();Oa.id_ce_certificateIssuer=`${AF.id_ce}.29`;var tb=eb=class extends _F.GeneralNames{constructor(t){super(t),Object.setPrototypeOf(this,eb.prototype)}};Oa.CertificateIssuer=tb;Oa.CertificateIssuer=tb=eb=bF.__decorate([(0,gI.AsnType)({type:gI.AsnTypeTypes.Sequence})],tb)});var xI=b(Ot=>{"use strict";var rb;Object.defineProperty(Ot,"__esModule",{value:!0});Ot.CertificatePolicies=Ot.PolicyInformation=Ot.PolicyQualifierInfo=Ot.Qualifier=Ot.UserNotice=Ot.NoticeReference=Ot.DisplayText=Ot.id_ce_certificatePolicies_anyPolicy=Ot.id_ce_certificatePolicies=void 0;var kr=(U(),D(j)),ot=H(),SF=_t();Ot.id_ce_certificatePolicies=`${SF.id_ce}.32`;Ot.id_ce_certificatePolicies_anyPolicy=`${Ot.id_ce_certificatePolicies}.0`;var In=class{constructor(t={}){Object.assign(this,t)}toString(){return this.ia5String||this.visibleString||this.bmpString||this.utf8String||""}};Ot.DisplayText=In;kr.__decorate([(0,ot.AsnProp)({type:ot.AsnPropTypes.IA5String})],In.prototype,"ia5String",void 0);kr.__decorate([(0,ot.AsnProp)({type:ot.AsnPropTypes.VisibleString})],In.prototype,"visibleString",void 0);kr.__decorate([(0,ot.AsnProp)({type:ot.AsnPropTypes.BmpString})],In.prototype,"bmpString",void 0);kr.__decorate([(0,ot.AsnProp)({type:ot.AsnPropTypes.Utf8String})],In.prototype,"utf8String",void 0);Ot.DisplayText=In=kr.__decorate([(0,ot.AsnType)({type:ot.AsnTypeTypes.Choice})],In);var Fc=class{constructor(t={}){this.organization=new In,this.noticeNumbers=[],Object.assign(this,t)}};Ot.NoticeReference=Fc;kr.__decorate([(0,ot.AsnProp)({type:In})],Fc.prototype,"organization",void 0);kr.__decorate([(0,ot.AsnProp)({type:ot.AsnPropTypes.Integer,repeated:"sequence"})],Fc.prototype,"noticeNumbers",void 0);var Mc=class{constructor(t={}){Object.assign(this,t)}};Ot.UserNotice=Mc;kr.__decorate([(0,ot.AsnProp)({type:Fc,optional:!0})],Mc.prototype,"noticeRef",void 0);kr.__decorate([(0,ot.AsnProp)({type:In,optional:!0})],Mc.prototype,"explicitText",void 0);var Up=class{constructor(t={}){Object.assign(this,t)}};Ot.Qualifier=Up;kr.__decorate([(0,ot.AsnProp)({type:ot.AsnPropTypes.IA5String})],Up.prototype,"cPSuri",void 0);kr.__decorate([(0,ot.AsnProp)({type:Mc})],Up.prototype,"userNotice",void 0);Ot.Qualifier=Up=kr.__decorate([(0,ot.AsnType)({type:ot.AsnTypeTypes.Choice})],Up);var Vc=class{constructor(t={}){this.policyQualifierId="",this.qualifier=new ArrayBuffer(0),Object.assign(this,t)}};Ot.PolicyQualifierInfo=Vc;kr.__decorate([(0,ot.AsnProp)({type:ot.AsnPropTypes.ObjectIdentifier})],Vc.prototype,"policyQualifierId",void 0);kr.__decorate([(0,ot.AsnProp)({type:ot.AsnPropTypes.Any})],Vc.prototype,"qualifier",void 0);var Kc=class{constructor(t={}){this.policyIdentifier="",Object.assign(this,t)}};Ot.PolicyInformation=Kc;kr.__decorate([(0,ot.AsnProp)({type:ot.AsnPropTypes.ObjectIdentifier})],Kc.prototype,"policyIdentifier",void 0);kr.__decorate([(0,ot.AsnProp)({type:Vc,repeated:"sequence",optional:!0})],Kc.prototype,"policyQualifiers",void 0);var ib=rb=class extends ot.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,rb.prototype)}};Ot.CertificatePolicies=ib;Ot.CertificatePolicies=ib=rb=kr.__decorate([(0,ot.AsnType)({type:ot.AsnTypeTypes.Sequence,itemType:Kc})],ib)});var nb=b(La=>{"use strict";Object.defineProperty(La,"__esModule",{value:!0});La.CRLNumber=La.id_ce_cRLNumber=void 0;var bI=(U(),D(j)),km=H(),wF=_t();La.id_ce_cRLNumber=`${wF.id_ce}.20`;var Pm=class{constructor(t=0){this.value=t}};La.CRLNumber=Pm;bI.__decorate([(0,km.AsnProp)({type:km.AsnPropTypes.Integer})],Pm.prototype,"value",void 0);La.CRLNumber=Pm=bI.__decorate([(0,km.AsnType)({type:km.AsnTypeTypes.Choice})],Pm)});var AI=b(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.BaseCRLNumber=Da.id_ce_deltaCRLIndicator=void 0;var CF=(U(),D(j)),_I=H(),EF=_t(),TF=nb();Da.id_ce_deltaCRLIndicator=`${EF.id_ce}.27`;var sb=class extends TF.CRLNumber{};Da.BaseCRLNumber=sb;Da.BaseCRLNumber=sb=CF.__decorate([(0,_I.AsnType)({type:_I.AsnTypeTypes.Choice})],sb)});var Rm=b(jr=>{"use strict";var ab;Object.defineProperty(jr,"__esModule",{value:!0});jr.CRLDistributionPoints=jr.DistributionPoint=jr.DistributionPointName=jr.Reason=jr.ReasonFlags=jr.id_ce_cRLDistributionPoints=void 0;var ja=(U(),D(j)),Zi=H(),IF=Nc(),SI=Ra(),BF=_t();jr.id_ce_cRLDistributionPoints=`${BF.id_ce}.31`;var Xi;(function(e){e[e.unused=1]="unused",e[e.keyCompromise=2]="keyCompromise",e[e.cACompromise=4]="cACompromise",e[e.affiliationChanged=8]="affiliationChanged",e[e.superseded=16]="superseded",e[e.cessationOfOperation=32]="cessationOfOperation",e[e.certificateHold=64]="certificateHold",e[e.privilegeWithdrawn=128]="privilegeWithdrawn",e[e.aACompromise=256]="aACompromise"})(Xi||(jr.ReasonFlags=Xi={}));var Nm=class extends Zi.BitString{toJSON(){let t=[],r=this.toNumber();return r&Xi.aACompromise&&t.push("aACompromise"),r&Xi.affiliationChanged&&t.push("affiliationChanged"),r&Xi.cACompromise&&t.push("cACompromise"),r&Xi.certificateHold&&t.push("certificateHold"),r&Xi.cessationOfOperation&&t.push("cessationOfOperation"),r&Xi.keyCompromise&&t.push("keyCompromise"),r&Xi.privilegeWithdrawn&&t.push("privilegeWithdrawn"),r&Xi.superseded&&t.push("superseded"),r&Xi.unused&&t.push("unused"),t}toString(){return`[${this.toJSON().join(", ")}]`}};jr.Reason=Nm;var Hc=class{constructor(t={}){Object.assign(this,t)}};jr.DistributionPointName=Hc;ja.__decorate([(0,Zi.AsnProp)({type:SI.GeneralName,context:0,repeated:"sequence",implicit:!0})],Hc.prototype,"fullName",void 0);ja.__decorate([(0,Zi.AsnProp)({type:IF.RelativeDistinguishedName,context:1,implicit:!0})],Hc.prototype,"nameRelativeToCRLIssuer",void 0);jr.DistributionPointName=Hc=ja.__decorate([(0,Zi.AsnType)({type:Zi.AsnTypeTypes.Choice})],Hc);var qa=class{constructor(t={}){Object.assign(this,t)}};jr.DistributionPoint=qa;ja.__decorate([(0,Zi.AsnProp)({type:Hc,context:0,optional:!0})],qa.prototype,"distributionPoint",void 0);ja.__decorate([(0,Zi.AsnProp)({type:Nm,context:1,optional:!0,implicit:!0})],qa.prototype,"reasons",void 0);ja.__decorate([(0,Zi.AsnProp)({type:SI.GeneralName,context:2,optional:!0,repeated:"sequence",implicit:!0})],qa.prototype,"cRLIssuer",void 0);var ob=ab=class extends Zi.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,ab.prototype)}};jr.CRLDistributionPoints=ob;jr.CRLDistributionPoints=ob=ab=ja.__decorate([(0,Zi.AsnType)({type:Zi.AsnTypeTypes.Sequence,itemType:qa})],ob)});var EI=b(Ua=>{"use strict";var cb;Object.defineProperty(Ua,"__esModule",{value:!0});Ua.FreshestCRL=Ua.id_ce_freshestCRL=void 0;var kF=(U(),D(j)),wI=H(),PF=_t(),CI=Rm();Ua.id_ce_freshestCRL=`${PF.id_ce}.46`;var ub=cb=class extends CI.CRLDistributionPoints{constructor(t){super(t),Object.setPrototypeOf(this,cb.prototype)}};Ua.FreshestCRL=ub;Ua.FreshestCRL=ub=cb=kF.__decorate([(0,wI.AsnType)({type:wI.AsnTypeTypes.Sequence,itemType:CI.DistributionPoint})],ub)});var II=b($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});$c.IssuingDistributionPoint=$c.id_ce_issuingDistributionPoint=void 0;var zc=(U(),D(j)),Gc=H(),TI=Rm(),NF=_t(),Om=H();$c.id_ce_issuingDistributionPoint=`${NF.id_ce}.28`;var ni=class e{constructor(t={}){this.onlyContainsUserCerts=e.ONLY,this.onlyContainsCACerts=e.ONLY,this.indirectCRL=e.ONLY,this.onlyContainsAttributeCerts=e.ONLY,Object.assign(this,t)}};$c.IssuingDistributionPoint=ni;ni.ONLY=!1;zc.__decorate([(0,Gc.AsnProp)({type:TI.DistributionPointName,context:0,optional:!0})],ni.prototype,"distributionPoint",void 0);zc.__decorate([(0,Gc.AsnProp)({type:Om.AsnPropTypes.Boolean,context:1,defaultValue:ni.ONLY,implicit:!0})],ni.prototype,"onlyContainsUserCerts",void 0);zc.__decorate([(0,Gc.AsnProp)({type:Om.AsnPropTypes.Boolean,context:2,defaultValue:ni.ONLY,implicit:!0})],ni.prototype,"onlyContainsCACerts",void 0);zc.__decorate([(0,Gc.AsnProp)({type:TI.Reason,context:3,optional:!0,implicit:!0})],ni.prototype,"onlySomeReasons",void 0);zc.__decorate([(0,Gc.AsnProp)({type:Om.AsnPropTypes.Boolean,context:4,defaultValue:ni.ONLY,implicit:!0})],ni.prototype,"indirectCRL",void 0);zc.__decorate([(0,Gc.AsnProp)({type:Om.AsnPropTypes.Boolean,context:5,defaultValue:ni.ONLY,implicit:!0})],ni.prototype,"onlyContainsAttributeCerts",void 0)});var kI=b(ys=>{"use strict";Object.defineProperty(ys,"__esModule",{value:!0});ys.CRLReason=ys.CRLReasons=ys.id_ce_cRLReasons=void 0;var BI=(U(),D(j)),Lm=H(),RF=_t();ys.id_ce_cRLReasons=`${RF.id_ce}.21`;var Fp;(function(e){e[e.unspecified=0]="unspecified",e[e.keyCompromise=1]="keyCompromise",e[e.cACompromise=2]="cACompromise",e[e.affiliationChanged=3]="affiliationChanged",e[e.superseded=4]="superseded",e[e.cessationOfOperation=5]="cessationOfOperation",e[e.certificateHold=6]="certificateHold",e[e.removeFromCRL=8]="removeFromCRL",e[e.privilegeWithdrawn=9]="privilegeWithdrawn",e[e.aACompromise=10]="aACompromise"})(Fp||(ys.CRLReasons=Fp={}));var Dm=class{constructor(t=Fp.unspecified){this.reason=Fp.unspecified,this.reason=t}toJSON(){return Fp[this.reason]}toString(){return this.toJSON()}};ys.CRLReason=Dm;BI.__decorate([(0,Lm.AsnProp)({type:Lm.AsnPropTypes.Enumerated})],Dm.prototype,"reason",void 0);ys.CRLReason=Dm=BI.__decorate([(0,Lm.AsnType)({type:Lm.AsnTypeTypes.Choice})],Dm)});var PI=b(Vt=>{"use strict";var lb;Object.defineProperty(Vt,"__esModule",{value:!0});Vt.id_kp_OCSPSigning=Vt.id_kp_timeStamping=Vt.id_kp_emailProtection=Vt.id_kp_codeSigning=Vt.id_kp_clientAuth=Vt.id_kp_serverAuth=Vt.anyExtendedKeyUsage=Vt.ExtendedKeyUsage=Vt.id_ce_extKeyUsage=void 0;var OF=(U(),D(j)),qm=H(),Fa=_t();Vt.id_ce_extKeyUsage=`${Fa.id_ce}.37`;var pb=lb=class extends qm.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,lb.prototype)}};Vt.ExtendedKeyUsage=pb;Vt.ExtendedKeyUsage=pb=lb=OF.__decorate([(0,qm.AsnType)({type:qm.AsnTypeTypes.Sequence,itemType:qm.AsnPropTypes.ObjectIdentifier})],pb);Vt.anyExtendedKeyUsage=`${Vt.id_ce_extKeyUsage}.0`;Vt.id_kp_serverAuth=`${Fa.id_kp}.1`;Vt.id_kp_clientAuth=`${Fa.id_kp}.2`;Vt.id_kp_codeSigning=`${Fa.id_kp}.3`;Vt.id_kp_emailProtection=`${Fa.id_kp}.4`;Vt.id_kp_timeStamping=`${Fa.id_kp}.8`;Vt.id_kp_OCSPSigning=`${Fa.id_kp}.9`});var RI=b(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.InhibitAnyPolicy=Ma.id_ce_inhibitAnyPolicy=void 0;var NI=(U(),D(j)),Mp=H(),LF=_t();Ma.id_ce_inhibitAnyPolicy=`${LF.id_ce}.54`;var jm=class{constructor(t=new ArrayBuffer(0)){this.value=t}};Ma.InhibitAnyPolicy=jm;NI.__decorate([(0,Mp.AsnProp)({type:Mp.AsnPropTypes.Integer,converter:Mp.AsnIntegerArrayBufferConverter})],jm.prototype,"value",void 0);Ma.InhibitAnyPolicy=jm=NI.__decorate([(0,Mp.AsnType)({type:Mp.AsnTypeTypes.Choice})],jm)});var LI=b(Va=>{"use strict";Object.defineProperty(Va,"__esModule",{value:!0});Va.InvalidityDate=Va.id_ce_invalidityDate=void 0;var OI=(U(),D(j)),Um=H(),DF=_t();Va.id_ce_invalidityDate=`${DF.id_ce}.24`;var Fm=class{constructor(t){this.value=new Date,t&&(this.value=t)}};Va.InvalidityDate=Fm;OI.__decorate([(0,Um.AsnProp)({type:Um.AsnPropTypes.GeneralizedTime})],Fm.prototype,"value",void 0);Va.InvalidityDate=Fm=OI.__decorate([(0,Um.AsnType)({type:Um.AsnTypeTypes.Choice})],Fm)});var qI=b(Ka=>{"use strict";var fb;Object.defineProperty(Ka,"__esModule",{value:!0});Ka.IssueAlternativeName=Ka.id_ce_issuerAltName=void 0;var qF=(U(),D(j)),DI=H(),jF=jp(),UF=_t();Ka.id_ce_issuerAltName=`${UF.id_ce}.18`;var db=fb=class extends jF.GeneralNames{constructor(t){super(t),Object.setPrototypeOf(this,fb.prototype)}};Ka.IssueAlternativeName=db;Ka.IssueAlternativeName=db=fb=qF.__decorate([(0,DI.AsnType)({type:DI.AsnTypeTypes.Sequence})],db)});var jI=b(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Ks.KeyUsage=Ks.KeyUsageFlags=Ks.id_ce_keyUsage=void 0;var FF=H(),MF=_t();Ks.id_ce_keyUsage=`${MF.id_ce}.15`;var en;(function(e){e[e.digitalSignature=1]="digitalSignature",e[e.nonRepudiation=2]="nonRepudiation",e[e.keyEncipherment=4]="keyEncipherment",e[e.dataEncipherment=8]="dataEncipherment",e[e.keyAgreement=16]="keyAgreement",e[e.keyCertSign=32]="keyCertSign",e[e.cRLSign=64]="cRLSign",e[e.encipherOnly=128]="encipherOnly",e[e.decipherOnly=256]="decipherOnly"})(en||(Ks.KeyUsageFlags=en={}));var hb=class extends FF.BitString{toJSON(){let t=this.toNumber(),r=[];return t&en.cRLSign&&r.push("crlSign"),t&en.dataEncipherment&&r.push("dataEncipherment"),t&en.decipherOnly&&r.push("decipherOnly"),t&en.digitalSignature&&r.push("digitalSignature"),t&en.encipherOnly&&r.push("encipherOnly"),t&en.keyAgreement&&r.push("keyAgreement"),t&en.keyCertSign&&r.push("keyCertSign"),t&en.keyEncipherment&&r.push("keyEncipherment"),t&en.nonRepudiation&&r.push("nonRepudiation"),r}toString(){return`[${this.toJSON().join(", ")}]`}};Ks.KeyUsage=hb});var FI=b(tn=>{"use strict";var mb;Object.defineProperty(tn,"__esModule",{value:!0});tn.NameConstraints=tn.GeneralSubtrees=tn.GeneralSubtree=tn.id_ce_nameConstraints=void 0;var Wc=(U(),D(j)),Bn=H(),UI=Ra(),VF=_t();tn.id_ce_nameConstraints=`${VF.id_ce}.30`;var Ha=class{constructor(t={}){this.base=new UI.GeneralName,this.minimum=0,Object.assign(this,t)}};tn.GeneralSubtree=Ha;Wc.__decorate([(0,Bn.AsnProp)({type:UI.GeneralName})],Ha.prototype,"base",void 0);Wc.__decorate([(0,Bn.AsnProp)({type:Bn.AsnPropTypes.Integer,context:0,defaultValue:0,implicit:!0})],Ha.prototype,"minimum",void 0);Wc.__decorate([(0,Bn.AsnProp)({type:Bn.AsnPropTypes.Integer,context:1,optional:!0,implicit:!0})],Ha.prototype,"maximum",void 0);var Vp=mb=class extends Bn.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,mb.prototype)}};tn.GeneralSubtrees=Vp;tn.GeneralSubtrees=Vp=mb=Wc.__decorate([(0,Bn.AsnType)({type:Bn.AsnTypeTypes.Sequence,itemType:Ha})],Vp);var Kp=class{constructor(t={}){Object.assign(this,t)}};tn.NameConstraints=Kp;Wc.__decorate([(0,Bn.AsnProp)({type:Vp,context:0,optional:!0,implicit:!0})],Kp.prototype,"permittedSubtrees",void 0);Wc.__decorate([(0,Bn.AsnProp)({type:Vp,context:1,optional:!0,implicit:!0})],Kp.prototype,"excludedSubtrees",void 0)});var VI=b(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.PolicyConstraints=Qc.id_ce_policyConstraints=void 0;var MI=(U(),D(j)),Yc=H(),KF=_t();Qc.id_ce_policyConstraints=`${KF.id_ce}.36`;var Hp=class{constructor(t={}){Object.assign(this,t)}};Qc.PolicyConstraints=Hp;MI.__decorate([(0,Yc.AsnProp)({type:Yc.AsnPropTypes.Integer,context:0,implicit:!0,optional:!0,converter:Yc.AsnIntegerArrayBufferConverter})],Hp.prototype,"requireExplicitPolicy",void 0);MI.__decorate([(0,Yc.AsnProp)({type:Yc.AsnPropTypes.Integer,context:1,implicit:!0,optional:!0,converter:Yc.AsnIntegerArrayBufferConverter})],Hp.prototype,"inhibitPolicyMapping",void 0)});var KI=b(gs=>{"use strict";var yb;Object.defineProperty(gs,"__esModule",{value:!0});gs.PolicyMappings=gs.PolicyMapping=gs.id_ce_policyMappings=void 0;var vb=(U(),D(j)),$a=H(),HF=_t();gs.id_ce_policyMappings=`${HF.id_ce}.33`;var Jc=class{constructor(t={}){this.issuerDomainPolicy="",this.subjectDomainPolicy="",Object.assign(this,t)}};gs.PolicyMapping=Jc;vb.__decorate([(0,$a.AsnProp)({type:$a.AsnPropTypes.ObjectIdentifier})],Jc.prototype,"issuerDomainPolicy",void 0);vb.__decorate([(0,$a.AsnProp)({type:$a.AsnPropTypes.ObjectIdentifier})],Jc.prototype,"subjectDomainPolicy",void 0);var gb=yb=class extends $a.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,yb.prototype)}};gs.PolicyMappings=gb;gs.PolicyMappings=gb=yb=vb.__decorate([(0,$a.AsnType)({type:$a.AsnTypeTypes.Sequence,itemType:Jc})],gb)});var $I=b(za=>{"use strict";var xb;Object.defineProperty(za,"__esModule",{value:!0});za.SubjectAlternativeName=za.id_ce_subjectAltName=void 0;var $F=(U(),D(j)),HI=H(),zF=jp(),GF=_t();za.id_ce_subjectAltName=`${GF.id_ce}.17`;var bb=xb=class extends zF.GeneralNames{constructor(t){super(t),Object.setPrototypeOf(this,xb.prototype)}};za.SubjectAlternativeName=bb;za.SubjectAlternativeName=bb=xb=$F.__decorate([(0,HI.AsnType)({type:HI.AsnTypeTypes.Sequence})],bb)});var _b=b(Vm=>{"use strict";Object.defineProperty(Vm,"__esModule",{value:!0});Vm.Attribute=void 0;var zI=(U(),D(j)),Mm=H(),$p=class{constructor(t={}){this.type="",this.values=[],Object.assign(this,t)}};Vm.Attribute=$p;zI.__decorate([(0,Mm.AsnProp)({type:Mm.AsnPropTypes.ObjectIdentifier})],$p.prototype,"type",void 0);zI.__decorate([(0,Mm.AsnProp)({type:Mm.AsnPropTypes.Any,repeated:"set"})],$p.prototype,"values",void 0)});var GI=b(Ga=>{"use strict";var Ab;Object.defineProperty(Ga,"__esModule",{value:!0});Ga.SubjectDirectoryAttributes=Ga.id_ce_subjectDirectoryAttributes=void 0;var WF=(U(),D(j)),Sb=H(),YF=_b(),QF=_t();Ga.id_ce_subjectDirectoryAttributes=`${QF.id_ce}.9`;var wb=Ab=class extends Sb.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,Ab.prototype)}};Ga.SubjectDirectoryAttributes=wb;Ga.SubjectDirectoryAttributes=wb=Ab=WF.__decorate([(0,Sb.AsnType)({type:Sb.AsnTypeTypes.Sequence,itemType:YF.Attribute})],wb)});var WI=b(Xc=>{"use strict";Object.defineProperty(Xc,"__esModule",{value:!0});Xc.SubjectKeyIdentifier=Xc.id_ce_subjectKeyIdentifier=void 0;var JF=_t(),XF=Jx();Xc.id_ce_subjectKeyIdentifier=`${JF.id_ce}.14`;var Cb=class extends XF.KeyIdentifier{};Xc.SubjectKeyIdentifier=Cb});var QI=b(Zc=>{"use strict";Object.defineProperty(Zc,"__esModule",{value:!0});Zc.PrivateKeyUsagePeriod=Zc.id_ce_privateKeyUsagePeriod=void 0;var YI=(U(),D(j)),Km=H(),ZF=_t();Zc.id_ce_privateKeyUsagePeriod=`${ZF.id_ce}.16`;var zp=class{constructor(t={}){Object.assign(this,t)}};Zc.PrivateKeyUsagePeriod=zp;YI.__decorate([(0,Km.AsnProp)({type:Km.AsnPropTypes.GeneralizedTime,context:0,implicit:!0,optional:!0})],zp.prototype,"notBefore",void 0);YI.__decorate([(0,Km.AsnProp)({type:Km.AsnPropTypes.GeneralizedTime,context:1,implicit:!0,optional:!0})],zp.prototype,"notAfter",void 0)});var XI=b(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.EntrustVersionInfo=kn.EntrustInfo=kn.EntrustInfoFlags=kn.id_entrust_entrustVersInfo=void 0;var JI=(U(),D(j)),Hm=H();kn.id_entrust_entrustVersInfo="1.2.840.113533.7.65.0";var Gp;(function(e){e[e.keyUpdateAllowed=1]="keyUpdateAllowed",e[e.newExtensions=2]="newExtensions",e[e.pKIXCertificate=4]="pKIXCertificate"})(Gp||(kn.EntrustInfoFlags=Gp={}));var Wp=class extends Hm.BitString{toJSON(){let t=[],r=this.toNumber();return r&Gp.pKIXCertificate&&t.push("pKIXCertificate"),r&Gp.newExtensions&&t.push("newExtensions"),r&Gp.keyUpdateAllowed&&t.push("keyUpdateAllowed"),t}toString(){return`[${this.toJSON().join(", ")}]`}};kn.EntrustInfo=Wp;var Yp=class{constructor(t={}){this.entrustVers="",this.entrustInfoFlags=new Wp,Object.assign(this,t)}};kn.EntrustVersionInfo=Yp;JI.__decorate([(0,Hm.AsnProp)({type:Hm.AsnPropTypes.GeneralString})],Yp.prototype,"entrustVers",void 0);JI.__decorate([(0,Hm.AsnProp)({type:Wp})],Yp.prototype,"entrustInfoFlags",void 0)});var ZI=b(Wa=>{"use strict";var Eb;Object.defineProperty(Wa,"__esModule",{value:!0});Wa.SubjectInfoAccessSyntax=Wa.id_pe_subjectInfoAccess=void 0;var eM=(U(),D(j)),Tb=H(),tM=_t(),rM=Yx();Wa.id_pe_subjectInfoAccess=`${tM.id_pe}.11`;var Ib=Eb=class extends Tb.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,Eb.prototype)}};Wa.SubjectInfoAccessSyntax=Ib;Wa.SubjectInfoAccessSyntax=Ib=Eb=eM.__decorate([(0,Tb.AsnType)({type:Tb.AsnTypeTypes.Sequence,itemType:rM.AccessDescription})],Ib)});var eB=b(mt=>{"use strict";Object.defineProperty(mt,"__esModule",{value:!0});var It=(U(),D(j));It.__exportStar(Yx(),mt);It.__exportStar(Jx(),mt);It.__exportStar(mI(),mt);It.__exportStar(vI(),mt);It.__exportStar(xI(),mt);It.__exportStar(AI(),mt);It.__exportStar(Rm(),mt);It.__exportStar(EI(),mt);It.__exportStar(II(),mt);It.__exportStar(nb(),mt);It.__exportStar(kI(),mt);It.__exportStar(PI(),mt);It.__exportStar(RI(),mt);It.__exportStar(LI(),mt);It.__exportStar(qI(),mt);It.__exportStar(jI(),mt);It.__exportStar(FI(),mt);It.__exportStar(VI(),mt);It.__exportStar(KI(),mt);It.__exportStar($I(),mt);It.__exportStar(GI(),mt);It.__exportStar(WI(),mt);It.__exportStar(QI(),mt);It.__exportStar(XI(),mt);It.__exportStar(ZI(),mt)});var Ya=b(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});zm.AlgorithmIdentifier=void 0;var tB=(U(),D(j)),$m=H(),iM=us(),Qp=class e{constructor(t={}){this.algorithm="",Object.assign(this,t)}isEqual(t){return t instanceof e&&t.algorithm==this.algorithm&&(t.parameters&&this.parameters&&iM.isEqual(t.parameters,this.parameters)||t.parameters===this.parameters)}};zm.AlgorithmIdentifier=Qp;tB.__decorate([(0,$m.AsnProp)({type:$m.AsnPropTypes.ObjectIdentifier})],Qp.prototype,"algorithm",void 0);tB.__decorate([(0,$m.AsnProp)({type:$m.AsnPropTypes.Any,optional:!0})],Qp.prototype,"parameters",void 0)});var kb=b(Gm=>{"use strict";Object.defineProperty(Gm,"__esModule",{value:!0});Gm.SubjectPublicKeyInfo=void 0;var rB=(U(),D(j)),Bb=H(),iB=Ya(),Jp=class{constructor(t={}){this.algorithm=new iB.AlgorithmIdentifier,this.subjectPublicKey=new ArrayBuffer(0),Object.assign(this,t)}};Gm.SubjectPublicKeyInfo=Jp;rB.__decorate([(0,Bb.AsnProp)({type:iB.AlgorithmIdentifier})],Jp.prototype,"algorithm",void 0);rB.__decorate([(0,Bb.AsnProp)({type:Bb.AsnPropTypes.BitString})],Jp.prototype,"subjectPublicKey",void 0)});var Wm=b(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});Zp.Time=void 0;var Pb=(U(),D(j)),eu=H(),Xp=class{constructor(t){if(t)if(typeof t=="string"||typeof t=="number"||t instanceof Date){let r=new Date(t);r.getUTCFullYear()>2049?this.generalTime=r:this.utcTime=r}else Object.assign(this,t)}getTime(){let t=this.utcTime||this.generalTime;if(!t)throw new Error("Cannot get time from CHOICE object");return t}};Zp.Time=Xp;Pb.__decorate([(0,eu.AsnProp)({type:eu.AsnPropTypes.UTCTime})],Xp.prototype,"utcTime",void 0);Pb.__decorate([(0,eu.AsnProp)({type:eu.AsnPropTypes.GeneralizedTime})],Xp.prototype,"generalTime",void 0);Zp.Time=Xp=Pb.__decorate([(0,eu.AsnType)({type:eu.AsnTypeTypes.Choice})],Xp)});var Nb=b(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0});Ym.Validity=void 0;var nB=(U(),D(j)),sB=H(),tu=Wm(),ef=class{constructor(t){this.notBefore=new tu.Time(new Date),this.notAfter=new tu.Time(new Date),t&&(this.notBefore=new tu.Time(t.notBefore),this.notAfter=new tu.Time(t.notAfter))}};Ym.Validity=ef;nB.__decorate([(0,sB.AsnProp)({type:tu.Time})],ef.prototype,"notBefore",void 0);nB.__decorate([(0,sB.AsnProp)({type:tu.Time})],ef.prototype,"notAfter",void 0)});var Jm=b(Qa=>{"use strict";var Rb;Object.defineProperty(Qa,"__esModule",{value:!0});Qa.Extensions=Qa.Extension=void 0;var Qm=(U(),D(j)),Pn=H(),vs=class e{constructor(t={}){this.extnID="",this.critical=e.CRITICAL,this.extnValue=new Pn.OctetString,Object.assign(this,t)}};Qa.Extension=vs;vs.CRITICAL=!1;Qm.__decorate([(0,Pn.AsnProp)({type:Pn.AsnPropTypes.ObjectIdentifier})],vs.prototype,"extnID",void 0);Qm.__decorate([(0,Pn.AsnProp)({type:Pn.AsnPropTypes.Boolean,defaultValue:vs.CRITICAL})],vs.prototype,"critical",void 0);Qm.__decorate([(0,Pn.AsnProp)({type:Pn.OctetString})],vs.prototype,"extnValue",void 0);var Ob=Rb=class extends Pn.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,Rb.prototype)}};Qa.Extensions=Ob;Qa.Extensions=Ob=Rb=Qm.__decorate([(0,Pn.AsnType)({type:Pn.AsnTypeTypes.Sequence,itemType:vs})],Ob)});var Lb=b(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0});Xm.Version=void 0;var aB;(function(e){e[e.v1=0]="v1",e[e.v2=1]="v2",e[e.v3=2]="v3"})(aB||(Xm.Version=aB={}))});var Db=b(e0=>{"use strict";Object.defineProperty(e0,"__esModule",{value:!0});e0.TBSCertificate=void 0;var Nn=(U(),D(j)),zr=H(),oB=Ya(),Zm=Nc(),cB=kb(),uB=Nb(),nM=Jm(),lB=Lb(),Ai=class{constructor(t={}){this.version=lB.Version.v1,this.serialNumber=new ArrayBuffer(0),this.signature=new oB.AlgorithmIdentifier,this.issuer=new Zm.Name,this.validity=new uB.Validity,this.subject=new Zm.Name,this.subjectPublicKeyInfo=new cB.SubjectPublicKeyInfo,Object.assign(this,t)}};e0.TBSCertificate=Ai;Nn.__decorate([(0,zr.AsnProp)({type:zr.AsnPropTypes.Integer,context:0,defaultValue:lB.Version.v1})],Ai.prototype,"version",void 0);Nn.__decorate([(0,zr.AsnProp)({type:zr.AsnPropTypes.Integer,converter:zr.AsnIntegerArrayBufferConverter})],Ai.prototype,"serialNumber",void 0);Nn.__decorate([(0,zr.AsnProp)({type:oB.AlgorithmIdentifier})],Ai.prototype,"signature",void 0);Nn.__decorate([(0,zr.AsnProp)({type:Zm.Name})],Ai.prototype,"issuer",void 0);Nn.__decorate([(0,zr.AsnProp)({type:uB.Validity})],Ai.prototype,"validity",void 0);Nn.__decorate([(0,zr.AsnProp)({type:Zm.Name})],Ai.prototype,"subject",void 0);Nn.__decorate([(0,zr.AsnProp)({type:cB.SubjectPublicKeyInfo})],Ai.prototype,"subjectPublicKeyInfo",void 0);Nn.__decorate([(0,zr.AsnProp)({type:zr.AsnPropTypes.BitString,context:1,implicit:!0,optional:!0})],Ai.prototype,"issuerUniqueID",void 0);Nn.__decorate([(0,zr.AsnProp)({type:zr.AsnPropTypes.BitString,context:2,implicit:!0,optional:!0})],Ai.prototype,"subjectUniqueID",void 0);Nn.__decorate([(0,zr.AsnProp)({type:nM.Extensions,context:3,optional:!0})],Ai.prototype,"extensions",void 0)});var dB=b(r0=>{"use strict";Object.defineProperty(r0,"__esModule",{value:!0});r0.Certificate=void 0;var qb=(U(),D(j)),t0=H(),pB=Ya(),fB=Db(),ru=class{constructor(t={}){this.tbsCertificate=new fB.TBSCertificate,this.signatureAlgorithm=new pB.AlgorithmIdentifier,this.signatureValue=new ArrayBuffer(0),Object.assign(this,t)}};r0.Certificate=ru;qb.__decorate([(0,t0.AsnProp)({type:fB.TBSCertificate,raw:!0})],ru.prototype,"tbsCertificate",void 0);qb.__decorate([(0,t0.AsnProp)({type:pB.AlgorithmIdentifier})],ru.prototype,"signatureAlgorithm",void 0);qb.__decorate([(0,t0.AsnProp)({type:t0.AsnPropTypes.BitString})],ru.prototype,"signatureValue",void 0)});var jb=b(iu=>{"use strict";Object.defineProperty(iu,"__esModule",{value:!0});iu.TBSCertList=iu.RevokedCertificate=void 0;var On=(U(),D(j)),Si=H(),hB=Ya(),mB=Nc(),tf=Wm(),yB=Jm(),Ja=class{constructor(t={}){this.userCertificate=new ArrayBuffer(0),this.revocationDate=new tf.Time,Object.assign(this,t)}};iu.RevokedCertificate=Ja;On.__decorate([(0,Si.AsnProp)({type:Si.AsnPropTypes.Integer,converter:Si.AsnIntegerArrayBufferConverter})],Ja.prototype,"userCertificate",void 0);On.__decorate([(0,Si.AsnProp)({type:tf.Time})],Ja.prototype,"revocationDate",void 0);On.__decorate([(0,Si.AsnProp)({type:yB.Extension,optional:!0,repeated:"sequence"})],Ja.prototype,"crlEntryExtensions",void 0);var Rn=class{constructor(t={}){this.signature=new hB.AlgorithmIdentifier,this.issuer=new mB.Name,this.thisUpdate=new tf.Time,Object.assign(this,t)}};iu.TBSCertList=Rn;On.__decorate([(0,Si.AsnProp)({type:Si.AsnPropTypes.Integer,optional:!0})],Rn.prototype,"version",void 0);On.__decorate([(0,Si.AsnProp)({type:hB.AlgorithmIdentifier})],Rn.prototype,"signature",void 0);On.__decorate([(0,Si.AsnProp)({type:mB.Name})],Rn.prototype,"issuer",void 0);On.__decorate([(0,Si.AsnProp)({type:tf.Time})],Rn.prototype,"thisUpdate",void 0);On.__decorate([(0,Si.AsnProp)({type:tf.Time,optional:!0})],Rn.prototype,"nextUpdate",void 0);On.__decorate([(0,Si.AsnProp)({type:Ja,repeated:"sequence",optional:!0})],Rn.prototype,"revokedCertificates",void 0);On.__decorate([(0,Si.AsnProp)({type:yB.Extension,optional:!0,context:0,repeated:"sequence"})],Rn.prototype,"crlExtensions",void 0)});var xB=b(n0=>{"use strict";Object.defineProperty(n0,"__esModule",{value:!0});n0.CertificateList=void 0;var Ub=(U(),D(j)),i0=H(),gB=Ya(),vB=jb(),nu=class{constructor(t={}){this.tbsCertList=new vB.TBSCertList,this.signatureAlgorithm=new gB.AlgorithmIdentifier,this.signature=new ArrayBuffer(0),Object.assign(this,t)}};n0.CertificateList=nu;Ub.__decorate([(0,i0.AsnProp)({type:vB.TBSCertList,raw:!0})],nu.prototype,"tbsCertList",void 0);Ub.__decorate([(0,i0.AsnProp)({type:gB.AlgorithmIdentifier})],nu.prototype,"signatureAlgorithm",void 0);Ub.__decorate([(0,i0.AsnProp)({type:i0.AsnPropTypes.BitString})],nu.prototype,"signature",void 0)});var Je=b(vr=>{"use strict";Object.defineProperty(vr,"__esModule",{value:!0});var Ur=(U(),D(j));Ur.__exportStar(eB(),vr);Ur.__exportStar(Ya(),vr);Ur.__exportStar(_b(),vr);Ur.__exportStar(dB(),vr);Ur.__exportStar(xB(),vr);Ur.__exportStar(Jm(),vr);Ur.__exportStar(Ra(),vr);Ur.__exportStar(jp(),vr);Ur.__exportStar(Nc(),vr);Ur.__exportStar(_t(),vr);Ur.__exportStar(kb(),vr);Ur.__exportStar(jb(),vr);Ur.__exportStar(Db(),vr);Ur.__exportStar(Wm(),vr);Ur.__exportStar(Lb(),vr);Ur.__exportStar(Nb(),vr)});var nf=b(a0=>{"use strict";Object.defineProperty(a0,"__esModule",{value:!0});a0.IssuerAndSerialNumber=void 0;var bB=(U(),D(j)),s0=H(),_B=Je(),rf=class{constructor(t={}){this.issuer=new _B.Name,this.serialNumber=new ArrayBuffer(0),Object.assign(this,t)}};a0.IssuerAndSerialNumber=rf;bB.__decorate([(0,s0.AsnProp)({type:_B.Name})],rf.prototype,"issuer",void 0);bB.__decorate([(0,s0.AsnProp)({type:s0.AsnPropTypes.Integer,converter:s0.AsnIntegerArrayBufferConverter})],rf.prototype,"serialNumber",void 0)});var Mb=b(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.SignerIdentifier=void 0;var Fb=(U(),D(j)),o0=H(),sM=nf(),aM=Je(),sf=class{constructor(t={}){Object.assign(this,t)}};af.SignerIdentifier=sf;Fb.__decorate([(0,o0.AsnProp)({type:aM.SubjectKeyIdentifier,context:0,implicit:!0})],sf.prototype,"subjectKeyIdentifier",void 0);Fb.__decorate([(0,o0.AsnProp)({type:sM.IssuerAndSerialNumber})],sf.prototype,"issuerAndSerialNumber",void 0);af.SignerIdentifier=sf=Fb.__decorate([(0,o0.AsnType)({type:o0.AsnTypeTypes.Choice})],sf)});var Ln=b(Kt=>{"use strict";Object.defineProperty(Kt,"__esModule",{value:!0});Kt.KeyDerivationAlgorithmIdentifier=Kt.MessageAuthenticationCodeAlgorithm=Kt.ContentEncryptionAlgorithmIdentifier=Kt.KeyEncryptionAlgorithmIdentifier=Kt.SignatureAlgorithmIdentifier=Kt.DigestAlgorithmIdentifier=Kt.CMSVersion=void 0;var su=(U(),D(j)),au=Je(),Di=H(),AB;(function(e){e[e.v0=0]="v0",e[e.v1=1]="v1",e[e.v2=2]="v2",e[e.v3=3]="v3",e[e.v4=4]="v4",e[e.v5=5]="v5"})(AB||(Kt.CMSVersion=AB={}));var Vb=class extends au.AlgorithmIdentifier{};Kt.DigestAlgorithmIdentifier=Vb;Kt.DigestAlgorithmIdentifier=Vb=su.__decorate([(0,Di.AsnType)({type:Di.AsnTypeTypes.Sequence})],Vb);var Kb=class extends au.AlgorithmIdentifier{};Kt.SignatureAlgorithmIdentifier=Kb;Kt.SignatureAlgorithmIdentifier=Kb=su.__decorate([(0,Di.AsnType)({type:Di.AsnTypeTypes.Sequence})],Kb);var Hb=class extends au.AlgorithmIdentifier{};Kt.KeyEncryptionAlgorithmIdentifier=Hb;Kt.KeyEncryptionAlgorithmIdentifier=Hb=su.__decorate([(0,Di.AsnType)({type:Di.AsnTypeTypes.Sequence})],Hb);var $b=class extends au.AlgorithmIdentifier{};Kt.ContentEncryptionAlgorithmIdentifier=$b;Kt.ContentEncryptionAlgorithmIdentifier=$b=su.__decorate([(0,Di.AsnType)({type:Di.AsnTypeTypes.Sequence})],$b);var zb=class extends au.AlgorithmIdentifier{};Kt.MessageAuthenticationCodeAlgorithm=zb;Kt.MessageAuthenticationCodeAlgorithm=zb=su.__decorate([(0,Di.AsnType)({type:Di.AsnTypeTypes.Sequence})],zb);var Gb=class extends au.AlgorithmIdentifier{};Kt.KeyDerivationAlgorithmIdentifier=Gb;Kt.KeyDerivationAlgorithmIdentifier=Gb=su.__decorate([(0,Di.AsnType)({type:Di.AsnTypeTypes.Sequence})],Gb)});var l0=b(u0=>{"use strict";Object.defineProperty(u0,"__esModule",{value:!0});u0.Attribute=void 0;var SB=(U(),D(j)),c0=H(),of=class{constructor(t={}){this.attrType="",this.attrValues=[],Object.assign(this,t)}};u0.Attribute=of;SB.__decorate([(0,c0.AsnProp)({type:c0.AsnPropTypes.ObjectIdentifier})],of.prototype,"attrType",void 0);SB.__decorate([(0,c0.AsnProp)({type:c0.AsnPropTypes.Any,repeated:"set"})],of.prototype,"attrValues",void 0)});var p0=b(Xa=>{"use strict";var Wb;Object.defineProperty(Xa,"__esModule",{value:!0});Xa.SignerInfos=Xa.SignerInfo=void 0;var Hs=(U(),D(j)),wi=H(),wB=Mb(),cf=Ln(),CB=l0(),rn=class{constructor(t={}){this.version=cf.CMSVersion.v0,this.sid=new wB.SignerIdentifier,this.digestAlgorithm=new cf.DigestAlgorithmIdentifier,this.signatureAlgorithm=new cf.SignatureAlgorithmIdentifier,this.signature=new wi.OctetString,Object.assign(this,t)}};Xa.SignerInfo=rn;Hs.__decorate([(0,wi.AsnProp)({type:wi.AsnPropTypes.Integer})],rn.prototype,"version",void 0);Hs.__decorate([(0,wi.AsnProp)({type:wB.SignerIdentifier})],rn.prototype,"sid",void 0);Hs.__decorate([(0,wi.AsnProp)({type:cf.DigestAlgorithmIdentifier})],rn.prototype,"digestAlgorithm",void 0);Hs.__decorate([(0,wi.AsnProp)({type:CB.Attribute,repeated:"set",context:0,implicit:!0,optional:!0,raw:!0})],rn.prototype,"signedAttrs",void 0);Hs.__decorate([(0,wi.AsnProp)({type:cf.SignatureAlgorithmIdentifier})],rn.prototype,"signatureAlgorithm",void 0);Hs.__decorate([(0,wi.AsnProp)({type:wi.OctetString})],rn.prototype,"signature",void 0);Hs.__decorate([(0,wi.AsnProp)({type:CB.Attribute,repeated:"set",context:1,implicit:!0,optional:!0})],rn.prototype,"unsignedAttrs",void 0);var Yb=Wb=class extends wi.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,Wb.prototype)}};Xa.SignerInfos=Yb;Xa.SignerInfos=Yb=Wb=Hs.__decorate([(0,wi.AsnType)({type:wi.AsnTypeTypes.Set,itemType:rn})],Yb)});var TB=b(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.CounterSignature=Za.id_counterSignature=void 0;var oM=(U(),D(j)),EB=H(),cM=p0();Za.id_counterSignature="1.2.840.113549.1.9.6";var Qb=class extends cM.SignerInfo{};Za.CounterSignature=Qb;Za.CounterSignature=Qb=oM.__decorate([(0,EB.AsnType)({type:EB.AsnTypeTypes.Sequence})],Qb)});var IB=b(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.MessageDigest=ou.id_messageDigest=void 0;var uM=H();ou.id_messageDigest="1.2.840.113549.1.9.4";var Jb=class extends uM.OctetString{};ou.MessageDigest=Jb});var kB=b(eo=>{"use strict";Object.defineProperty(eo,"__esModule",{value:!0});eo.SigningTime=eo.id_signingTime=void 0;var lM=(U(),D(j)),pM=Je(),BB=H();eo.id_signingTime="1.2.840.113549.1.9.5";var Xb=class extends pM.Time{};eo.SigningTime=Xb;eo.SigningTime=Xb=lM.__decorate([(0,BB.AsnType)({type:BB.AsnTypeTypes.Choice})],Xb)});var PB=b(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.id_contentType=void 0;var Zb=(U(),D(j));Zb.__exportStar(TB(),to);Zb.__exportStar(IB(),to);Zb.__exportStar(kB(),to);to.id_contentType="1.2.840.113549.1.9.3"});var NB=b(d0=>{"use strict";Object.defineProperty(d0,"__esModule",{value:!0});d0.ACClearAttrs=void 0;var e_=(U(),D(j)),f0=H(),t_=Je(),cu=class{constructor(t={}){this.acIssuer=new t_.GeneralName,this.acSerial=0,this.attrs=[],Object.assign(this,t)}};d0.ACClearAttrs=cu;e_.__decorate([(0,f0.AsnProp)({type:t_.GeneralName})],cu.prototype,"acIssuer",void 0);e_.__decorate([(0,f0.AsnProp)({type:f0.AsnPropTypes.Integer})],cu.prototype,"acSerial",void 0);e_.__decorate([(0,f0.AsnProp)({type:t_.Attribute,repeated:"sequence"})],cu.prototype,"attrs",void 0)});var n_=b(uf=>{"use strict";var r_;Object.defineProperty(uf,"__esModule",{value:!0});uf.AttrSpec=void 0;var fM=(U(),D(j)),h0=H(),i_=r_=class extends h0.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,r_.prototype)}};uf.AttrSpec=i_;uf.AttrSpec=i_=r_=fM.__decorate([(0,h0.AsnType)({type:h0.AsnTypeTypes.Sequence,itemType:h0.AsnPropTypes.ObjectIdentifier})],i_)});var OB=b(y0=>{"use strict";Object.defineProperty(y0,"__esModule",{value:!0});y0.AAControls=void 0;var m0=(U(),D(j)),uu=H(),RB=n_(),ro=class{constructor(t={}){this.permitUnSpecified=!0,Object.assign(this,t)}};y0.AAControls=ro;m0.__decorate([(0,uu.AsnProp)({type:uu.AsnPropTypes.Integer,optional:!0})],ro.prototype,"pathLenConstraint",void 0);m0.__decorate([(0,uu.AsnProp)({type:RB.AttrSpec,implicit:!0,context:0,optional:!0})],ro.prototype,"permittedAttrs",void 0);m0.__decorate([(0,uu.AsnProp)({type:RB.AttrSpec,implicit:!0,context:1,optional:!0})],ro.prototype,"excludedAttrs",void 0);m0.__decorate([(0,uu.AsnProp)({type:uu.AsnPropTypes.Boolean,defaultValue:!0})],ro.prototype,"permitUnSpecified",void 0)});var lf=b(g0=>{"use strict";Object.defineProperty(g0,"__esModule",{value:!0});g0.IssuerSerial=void 0;var s_=(U(),D(j)),lu=H(),LB=Je(),pu=class{constructor(t={}){this.issuer=new LB.GeneralNames,this.serial=new ArrayBuffer(0),this.issuerUID=new ArrayBuffer(0),Object.assign(this,t)}};g0.IssuerSerial=pu;s_.__decorate([(0,lu.AsnProp)({type:LB.GeneralNames})],pu.prototype,"issuer",void 0);s_.__decorate([(0,lu.AsnProp)({type:lu.AsnPropTypes.Integer,converter:lu.AsnIntegerArrayBufferConverter})],pu.prototype,"serial",void 0);s_.__decorate([(0,lu.AsnProp)({type:lu.AsnPropTypes.BitString,optional:!0})],pu.prototype,"issuerUID",void 0)});var pf=b(fu=>{"use strict";Object.defineProperty(fu,"__esModule",{value:!0});fu.ObjectDigestInfo=fu.DigestedObjectType=void 0;var v0=(U(),D(j)),io=H(),DB=Je(),a_;(function(e){e[e.publicKey=0]="publicKey",e[e.publicKeyCert=1]="publicKeyCert",e[e.otherObjectTypes=2]="otherObjectTypes"})(a_||(fu.DigestedObjectType=a_={}));var no=class{constructor(t={}){this.digestedObjectType=a_.publicKey,this.digestAlgorithm=new DB.AlgorithmIdentifier,this.objectDigest=new ArrayBuffer(0),Object.assign(this,t)}};fu.ObjectDigestInfo=no;v0.__decorate([(0,io.AsnProp)({type:io.AsnPropTypes.Enumerated})],no.prototype,"digestedObjectType",void 0);v0.__decorate([(0,io.AsnProp)({type:io.AsnPropTypes.ObjectIdentifier,optional:!0})],no.prototype,"otherObjectTypeID",void 0);v0.__decorate([(0,io.AsnProp)({type:DB.AlgorithmIdentifier})],no.prototype,"digestAlgorithm",void 0);v0.__decorate([(0,io.AsnProp)({type:io.AsnPropTypes.BitString})],no.prototype,"objectDigest",void 0)});var u_=b(x0=>{"use strict";Object.defineProperty(x0,"__esModule",{value:!0});x0.V2Form=void 0;var o_=(U(),D(j)),c_=H(),dM=Je(),hM=lf(),mM=pf(),du=class{constructor(t={}){Object.assign(this,t)}};x0.V2Form=du;o_.__decorate([(0,c_.AsnProp)({type:dM.GeneralNames,optional:!0})],du.prototype,"issuerName",void 0);o_.__decorate([(0,c_.AsnProp)({type:hM.IssuerSerial,context:0,implicit:!0,optional:!0})],du.prototype,"baseCertificateID",void 0);o_.__decorate([(0,c_.AsnProp)({type:mM.ObjectDigestInfo,context:1,implicit:!0,optional:!0})],du.prototype,"objectDigestInfo",void 0)});var p_=b(df=>{"use strict";Object.defineProperty(df,"__esModule",{value:!0});df.AttCertIssuer=void 0;var l_=(U(),D(j)),b0=H(),yM=Je(),gM=u_(),ff=class{constructor(t={}){Object.assign(this,t)}};df.AttCertIssuer=ff;l_.__decorate([(0,b0.AsnProp)({type:yM.GeneralName,repeated:"sequence"})],ff.prototype,"v1Form",void 0);l_.__decorate([(0,b0.AsnProp)({type:gM.V2Form,context:0,implicit:!0})],ff.prototype,"v2Form",void 0);df.AttCertIssuer=ff=l_.__decorate([(0,b0.AsnType)({type:b0.AsnTypeTypes.Choice})],ff)});var f_=b(A0=>{"use strict";Object.defineProperty(A0,"__esModule",{value:!0});A0.AttCertValidityPeriod=void 0;var qB=(U(),D(j)),_0=H(),hf=class{constructor(t={}){this.notBeforeTime=new Date,this.notAfterTime=new Date,Object.assign(this,t)}};A0.AttCertValidityPeriod=hf;qB.__decorate([(0,_0.AsnProp)({type:_0.AsnPropTypes.GeneralizedTime})],hf.prototype,"notBeforeTime",void 0);qB.__decorate([(0,_0.AsnProp)({type:_0.AsnPropTypes.GeneralizedTime})],hf.prototype,"notAfterTime",void 0)});var m_=b(S0=>{"use strict";Object.defineProperty(S0,"__esModule",{value:!0});S0.Holder=void 0;var d_=(U(),D(j)),h_=H(),vM=lf(),xM=Je(),bM=pf(),hu=class{constructor(t={}){Object.assign(this,t)}};S0.Holder=hu;d_.__decorate([(0,h_.AsnProp)({type:vM.IssuerSerial,implicit:!0,context:0,optional:!0})],hu.prototype,"baseCertificateID",void 0);d_.__decorate([(0,h_.AsnProp)({type:xM.GeneralNames,implicit:!0,context:1,optional:!0})],hu.prototype,"entityName",void 0);d_.__decorate([(0,h_.AsnProp)({type:bM.ObjectDigestInfo,implicit:!0,context:2,optional:!0})],hu.prototype,"objectDigestInfo",void 0)});var g_=b(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.AttributeCertificateInfo=mu.AttCertVersion=void 0;var xs=(U(),D(j)),Ci=H(),w0=Je(),jB=m_(),UB=p_(),FB=f_(),y_;(function(e){e[e.v2=1]="v2"})(y_||(mu.AttCertVersion=y_={}));var qi=class{constructor(t={}){this.version=y_.v2,this.holder=new jB.Holder,this.issuer=new UB.AttCertIssuer,this.signature=new w0.AlgorithmIdentifier,this.serialNumber=new ArrayBuffer(0),this.attrCertValidityPeriod=new FB.AttCertValidityPeriod,this.attributes=[],Object.assign(this,t)}};mu.AttributeCertificateInfo=qi;xs.__decorate([(0,Ci.AsnProp)({type:Ci.AsnPropTypes.Integer})],qi.prototype,"version",void 0);xs.__decorate([(0,Ci.AsnProp)({type:jB.Holder})],qi.prototype,"holder",void 0);xs.__decorate([(0,Ci.AsnProp)({type:UB.AttCertIssuer})],qi.prototype,"issuer",void 0);xs.__decorate([(0,Ci.AsnProp)({type:w0.AlgorithmIdentifier})],qi.prototype,"signature",void 0);xs.__decorate([(0,Ci.AsnProp)({type:Ci.AsnPropTypes.Integer,converter:Ci.AsnIntegerArrayBufferConverter})],qi.prototype,"serialNumber",void 0);xs.__decorate([(0,Ci.AsnProp)({type:FB.AttCertValidityPeriod})],qi.prototype,"attrCertValidityPeriod",void 0);xs.__decorate([(0,Ci.AsnProp)({type:w0.Attribute,repeated:"sequence"})],qi.prototype,"attributes",void 0);xs.__decorate([(0,Ci.AsnProp)({type:Ci.AsnPropTypes.BitString,optional:!0})],qi.prototype,"issuerUniqueID",void 0);xs.__decorate([(0,Ci.AsnProp)({type:w0.Extensions,optional:!0})],qi.prototype,"extensions",void 0)});var KB=b(E0=>{"use strict";Object.defineProperty(E0,"__esModule",{value:!0});E0.AttributeCertificate=void 0;var v_=(U(),D(j)),C0=H(),MB=Je(),VB=g_(),yu=class{constructor(t={}){this.acinfo=new VB.AttributeCertificateInfo,this.signatureAlgorithm=new MB.AlgorithmIdentifier,this.signatureValue=new ArrayBuffer(0),Object.assign(this,t)}};E0.AttributeCertificate=yu;v_.__decorate([(0,C0.AsnProp)({type:VB.AttributeCertificateInfo})],yu.prototype,"acinfo",void 0);v_.__decorate([(0,C0.AsnProp)({type:MB.AlgorithmIdentifier})],yu.prototype,"signatureAlgorithm",void 0);v_.__decorate([(0,C0.AsnProp)({type:C0.AsnPropTypes.BitString})],yu.prototype,"signatureValue",void 0)});var b_=b(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.ClassList=gu.ClassListFlags=void 0;var _M=H(),HB;(function(e){e[e.unmarked=1]="unmarked",e[e.unclassified=2]="unclassified",e[e.restricted=4]="restricted",e[e.confidential=8]="confidential",e[e.secret=16]="secret",e[e.topSecret=32]="topSecret"})(HB||(gu.ClassListFlags=HB={}));var x_=class extends _M.BitString{};gu.ClassList=x_});var __=b(I0=>{"use strict";Object.defineProperty(I0,"__esModule",{value:!0});I0.SecurityCategory=void 0;var $B=(U(),D(j)),T0=H(),mf=class{constructor(t={}){this.type="",this.value=new ArrayBuffer(0),Object.assign(this,t)}};I0.SecurityCategory=mf;$B.__decorate([(0,T0.AsnProp)({type:T0.AsnPropTypes.ObjectIdentifier,implicit:!0,context:0})],mf.prototype,"type",void 0);$B.__decorate([(0,T0.AsnProp)({type:T0.AsnPropTypes.Any,implicit:!0,context:1})],mf.prototype,"value",void 0)});var zB=b(k0=>{"use strict";Object.defineProperty(k0,"__esModule",{value:!0});k0.Clearance=void 0;var A_=(U(),D(j)),B0=H(),yf=b_(),AM=__(),vu=class{constructor(t={}){this.policyId="",this.classList=new yf.ClassList(yf.ClassListFlags.unclassified),Object.assign(this,t)}};k0.Clearance=vu;A_.__decorate([(0,B0.AsnProp)({type:B0.AsnPropTypes.ObjectIdentifier})],vu.prototype,"policyId",void 0);A_.__decorate([(0,B0.AsnProp)({type:yf.ClassList,defaultValue:new yf.ClassList(yf.ClassListFlags.unclassified)})],vu.prototype,"classList",void 0);A_.__decorate([(0,B0.AsnProp)({type:AM.SecurityCategory,repeated:"set"})],vu.prototype,"securityCategories",void 0)});var GB=b(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.IetfAttrSyntax=xu.IetfAttrSyntaxValueChoices=void 0;var vf=(U(),D(j)),$s=H(),SM=Je(),so=class{constructor(t={}){Object.assign(this,t)}};xu.IetfAttrSyntaxValueChoices=so;vf.__decorate([(0,$s.AsnProp)({type:$s.OctetString})],so.prototype,"cotets",void 0);vf.__decorate([(0,$s.AsnProp)({type:$s.AsnPropTypes.ObjectIdentifier})],so.prototype,"oid",void 0);vf.__decorate([(0,$s.AsnProp)({type:$s.AsnPropTypes.Utf8String})],so.prototype,"string",void 0);var gf=class{constructor(t={}){this.values=[],Object.assign(this,t)}};xu.IetfAttrSyntax=gf;vf.__decorate([(0,$s.AsnProp)({type:SM.GeneralNames,implicit:!0,context:0,optional:!0})],gf.prototype,"policyAuthority",void 0);vf.__decorate([(0,$s.AsnProp)({type:so,repeated:"sequence"})],gf.prototype,"values",void 0)});var WB=b(Xe=>{"use strict";Object.defineProperty(Xe,"__esModule",{value:!0});Xe.id_at_clearance=Xe.id_at_role=Xe.id_at=Xe.id_aca_encAttrs=Xe.id_aca_group=Xe.id_aca_chargingIdentity=Xe.id_aca_accessIdentity=Xe.id_aca_authenticationInfo=Xe.id_aca=Xe.id_ce_targetInformation=Xe.id_pe_ac_proxying=Xe.id_pe_aaControls=Xe.id_pe_ac_auditIdentity=void 0;var xf=Je();Xe.id_pe_ac_auditIdentity=`${xf.id_pe}.4`;Xe.id_pe_aaControls=`${xf.id_pe}.6`;Xe.id_pe_ac_proxying=`${xf.id_pe}.10`;Xe.id_ce_targetInformation=`${xf.id_ce}.55`;Xe.id_aca=`${xf.id_pkix}.10`;Xe.id_aca_authenticationInfo=`${Xe.id_aca}.1`;Xe.id_aca_accessIdentity=`${Xe.id_aca}.2`;Xe.id_aca_chargingIdentity=`${Xe.id_aca}.3`;Xe.id_aca_group=`${Xe.id_aca}.4`;Xe.id_aca_encAttrs=`${Xe.id_aca}.6`;Xe.id_at="2.5.4";Xe.id_at_role=`${Xe.id_at}.72`;Xe.id_at_clearance="2.5.1.5.55"});var E_=b(Dn=>{"use strict";var S_;Object.defineProperty(Dn,"__esModule",{value:!0});Dn.Targets=Dn.Target=Dn.TargetCert=void 0;var zs=(U(),D(j)),nn=H(),C_=Je(),YB=lf(),wM=pf(),ao=class{constructor(t={}){this.targetCertificate=new YB.IssuerSerial,Object.assign(this,t)}};Dn.TargetCert=ao;zs.__decorate([(0,nn.AsnProp)({type:YB.IssuerSerial})],ao.prototype,"targetCertificate",void 0);zs.__decorate([(0,nn.AsnProp)({type:C_.GeneralName,optional:!0})],ao.prototype,"targetName",void 0);zs.__decorate([(0,nn.AsnProp)({type:wM.ObjectDigestInfo,optional:!0})],ao.prototype,"certDigestInfo",void 0);var oo=class{constructor(t={}){Object.assign(this,t)}};Dn.Target=oo;zs.__decorate([(0,nn.AsnProp)({type:C_.GeneralName,context:0,implicit:!0})],oo.prototype,"targetName",void 0);zs.__decorate([(0,nn.AsnProp)({type:C_.GeneralName,context:1,implicit:!0})],oo.prototype,"targetGroup",void 0);zs.__decorate([(0,nn.AsnProp)({type:ao,context:2,implicit:!0})],oo.prototype,"targetCert",void 0);Dn.Target=oo=zs.__decorate([(0,nn.AsnType)({type:nn.AsnTypeTypes.Choice})],oo);var w_=S_=class extends nn.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,S_.prototype)}};Dn.Targets=w_;Dn.Targets=w_=S_=zs.__decorate([(0,nn.AsnType)({type:nn.AsnTypeTypes.Sequence,itemType:oo})],w_)});var QB=b(bf=>{"use strict";var T_;Object.defineProperty(bf,"__esModule",{value:!0});bf.ProxyInfo=void 0;var CM=(U(),D(j)),I_=H(),EM=E_(),B_=T_=class extends I_.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,T_.prototype)}};bf.ProxyInfo=B_;bf.ProxyInfo=B_=T_=CM.__decorate([(0,I_.AsnType)({type:I_.AsnTypeTypes.Sequence,itemType:EM.Targets})],B_)});var ek=b(P0=>{"use strict";Object.defineProperty(P0,"__esModule",{value:!0});P0.RoleSyntax=void 0;var JB=(U(),D(j)),XB=H(),ZB=Je(),_f=class{constructor(t={}){Object.assign(this,t)}};P0.RoleSyntax=_f;JB.__decorate([(0,XB.AsnProp)({type:ZB.GeneralNames,implicit:!0,context:0,optional:!0})],_f.prototype,"roleAuthority",void 0);JB.__decorate([(0,XB.AsnProp)({type:ZB.GeneralName,implicit:!0,context:1})],_f.prototype,"roleName",void 0)});var tk=b(O0=>{"use strict";Object.defineProperty(O0,"__esModule",{value:!0});O0.SvceAuthInfo=void 0;var k_=(U(),D(j)),N0=H(),R0=Je(),bu=class{constructor(t={}){this.service=new R0.GeneralName,this.ident=new R0.GeneralName,Object.assign(this,t)}};O0.SvceAuthInfo=bu;k_.__decorate([(0,N0.AsnProp)({type:R0.GeneralName})],bu.prototype,"service",void 0);k_.__decorate([(0,N0.AsnProp)({type:R0.GeneralName})],bu.prototype,"ident",void 0);k_.__decorate([(0,N0.AsnProp)({type:N0.OctetString,optional:!0})],bu.prototype,"authInfo",void 0)});var P_=b(Ht=>{"use strict";Object.defineProperty(Ht,"__esModule",{value:!0});var ir=(U(),D(j));ir.__exportStar(NB(),Ht);ir.__exportStar(OB(),Ht);ir.__exportStar(p_(),Ht);ir.__exportStar(f_(),Ht);ir.__exportStar(n_(),Ht);ir.__exportStar(KB(),Ht);ir.__exportStar(g_(),Ht);ir.__exportStar(b_(),Ht);ir.__exportStar(zB(),Ht);ir.__exportStar(m_(),Ht);ir.__exportStar(GB(),Ht);ir.__exportStar(lf(),Ht);ir.__exportStar(pf(),Ht);ir.__exportStar(WB(),Ht);ir.__exportStar(QB(),Ht);ir.__exportStar(ek(),Ht);ir.__exportStar(__(),Ht);ir.__exportStar(tk(),Ht);ir.__exportStar(E_(),Ht);ir.__exportStar(u_(),Ht)});var L0=b(qn=>{"use strict";var N_;Object.defineProperty(qn,"__esModule",{value:!0});qn.CertificateSet=qn.CertificateChoices=qn.OtherCertificateFormat=void 0;var uo=(U(),D(j)),ji=H(),TM=Je(),IM=P_(),_u=class{constructor(t={}){this.otherCertFormat="",this.otherCert=new ArrayBuffer(0),Object.assign(this,t)}};qn.OtherCertificateFormat=_u;uo.__decorate([(0,ji.AsnProp)({type:ji.AsnPropTypes.ObjectIdentifier})],_u.prototype,"otherCertFormat",void 0);uo.__decorate([(0,ji.AsnProp)({type:ji.AsnPropTypes.Any})],_u.prototype,"otherCert",void 0);var co=class{constructor(t={}){Object.assign(this,t)}};qn.CertificateChoices=co;uo.__decorate([(0,ji.AsnProp)({type:TM.Certificate})],co.prototype,"certificate",void 0);uo.__decorate([(0,ji.AsnProp)({type:IM.AttributeCertificate,context:2,implicit:!0})],co.prototype,"v2AttrCert",void 0);uo.__decorate([(0,ji.AsnProp)({type:_u,context:3,implicit:!0})],co.prototype,"other",void 0);qn.CertificateChoices=co=uo.__decorate([(0,ji.AsnType)({type:ji.AsnTypeTypes.Choice})],co);var R_=N_=class extends ji.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,N_.prototype)}};qn.CertificateSet=R_;qn.CertificateSet=R_=N_=uo.__decorate([(0,ji.AsnType)({type:ji.AsnTypeTypes.Set,itemType:co})],R_)});var ik=b(q0=>{"use strict";Object.defineProperty(q0,"__esModule",{value:!0});q0.ContentInfo=void 0;var rk=(U(),D(j)),D0=H(),Af=class{constructor(t={}){this.contentType="",this.content=new ArrayBuffer(0),Object.assign(this,t)}};q0.ContentInfo=Af;rk.__decorate([(0,D0.AsnProp)({type:D0.AsnPropTypes.ObjectIdentifier})],Af.prototype,"contentType",void 0);rk.__decorate([(0,D0.AsnProp)({type:D0.AsnPropTypes.Any,context:0})],Af.prototype,"content",void 0)});var O_=b(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.EncapsulatedContentInfo=lo.EncapsulatedContent=void 0;var wf=(U(),D(j)),bs=H(),Au=class{constructor(t={}){Object.assign(this,t)}};lo.EncapsulatedContent=Au;wf.__decorate([(0,bs.AsnProp)({type:bs.OctetString})],Au.prototype,"single",void 0);wf.__decorate([(0,bs.AsnProp)({type:bs.AsnPropTypes.Any})],Au.prototype,"any",void 0);lo.EncapsulatedContent=Au=wf.__decorate([(0,bs.AsnType)({type:bs.AsnTypeTypes.Choice})],Au);var Sf=class{constructor(t={}){this.eContentType="",Object.assign(this,t)}};lo.EncapsulatedContentInfo=Sf;wf.__decorate([(0,bs.AsnProp)({type:bs.AsnPropTypes.ObjectIdentifier})],Sf.prototype,"eContentType",void 0);wf.__decorate([(0,bs.AsnProp)({type:Au,context:0,optional:!0})],Sf.prototype,"eContent",void 0)});var L_=b(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.EncryptedContentInfo=po.EncryptedContent=void 0;var Cu=(U(),D(j)),sn=H(),nk=Ln(),Su=class{constructor(t={}){Object.assign(this,t)}};po.EncryptedContent=Su;Cu.__decorate([(0,sn.AsnProp)({type:sn.OctetString,context:0,implicit:!0,optional:!0})],Su.prototype,"value",void 0);Cu.__decorate([(0,sn.AsnProp)({type:sn.OctetString,converter:sn.AsnConstructedOctetStringConverter,context:0,implicit:!0,optional:!0,repeated:"sequence"})],Su.prototype,"constructedValue",void 0);po.EncryptedContent=Su=Cu.__decorate([(0,sn.AsnType)({type:sn.AsnTypeTypes.Choice})],Su);var wu=class{constructor(t={}){this.contentType="",this.contentEncryptionAlgorithm=new nk.ContentEncryptionAlgorithmIdentifier,Object.assign(this,t)}};po.EncryptedContentInfo=wu;Cu.__decorate([(0,sn.AsnProp)({type:sn.AsnPropTypes.ObjectIdentifier})],wu.prototype,"contentType",void 0);Cu.__decorate([(0,sn.AsnProp)({type:nk.ContentEncryptionAlgorithmIdentifier})],wu.prototype,"contentEncryptionAlgorithm",void 0);Cu.__decorate([(0,sn.AsnProp)({type:Su,optional:!0})],wu.prototype,"encryptedContent",void 0)});var D_=b(U0=>{"use strict";Object.defineProperty(U0,"__esModule",{value:!0});U0.OtherKeyAttribute=void 0;var sk=(U(),D(j)),j0=H(),Cf=class{constructor(t={}){this.keyAttrId="",Object.assign(this,t)}};U0.OtherKeyAttribute=Cf;sk.__decorate([(0,j0.AsnProp)({type:j0.AsnPropTypes.ObjectIdentifier})],Cf.prototype,"keyAttrId",void 0);sk.__decorate([(0,j0.AsnProp)({type:j0.AsnPropTypes.Any,optional:!0})],Cf.prototype,"keyAttr",void 0)});var U_=b(dr=>{"use strict";var q_;Object.defineProperty(dr,"__esModule",{value:!0});dr.KeyAgreeRecipientInfo=dr.OriginatorIdentifierOrKey=dr.OriginatorPublicKey=dr.RecipientEncryptedKeys=dr.RecipientEncryptedKey=dr.KeyAgreeRecipientIdentifier=dr.RecipientKeyIdentifier=void 0;var nr=(U(),D(j)),ct=H(),j_=Ln(),ak=nf(),Tf=Je(),BM=D_(),fo=class{constructor(t={}){this.subjectKeyIdentifier=new Tf.SubjectKeyIdentifier,Object.assign(this,t)}};dr.RecipientKeyIdentifier=fo;nr.__decorate([(0,ct.AsnProp)({type:Tf.SubjectKeyIdentifier})],fo.prototype,"subjectKeyIdentifier",void 0);nr.__decorate([(0,ct.AsnProp)({type:ct.AsnPropTypes.GeneralizedTime,optional:!0})],fo.prototype,"date",void 0);nr.__decorate([(0,ct.AsnProp)({type:BM.OtherKeyAttribute,optional:!0})],fo.prototype,"other",void 0);var ho=class{constructor(t={}){Object.assign(this,t)}};dr.KeyAgreeRecipientIdentifier=ho;nr.__decorate([(0,ct.AsnProp)({type:fo,context:0,implicit:!0,optional:!0})],ho.prototype,"rKeyId",void 0);nr.__decorate([(0,ct.AsnProp)({type:ak.IssuerAndSerialNumber,optional:!0})],ho.prototype,"issuerAndSerialNumber",void 0);dr.KeyAgreeRecipientIdentifier=ho=nr.__decorate([(0,ct.AsnType)({type:ct.AsnTypeTypes.Choice})],ho);var Eu=class{constructor(t={}){this.rid=new ho,this.encryptedKey=new ct.OctetString,Object.assign(this,t)}};dr.RecipientEncryptedKey=Eu;nr.__decorate([(0,ct.AsnProp)({type:ho})],Eu.prototype,"rid",void 0);nr.__decorate([(0,ct.AsnProp)({type:ct.OctetString})],Eu.prototype,"encryptedKey",void 0);var Ef=q_=class extends ct.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,q_.prototype)}};dr.RecipientEncryptedKeys=Ef;dr.RecipientEncryptedKeys=Ef=q_=nr.__decorate([(0,ct.AsnType)({type:ct.AsnTypeTypes.Sequence,itemType:Eu})],Ef);var Tu=class{constructor(t={}){this.algorithm=new Tf.AlgorithmIdentifier,this.publicKey=new ArrayBuffer(0),Object.assign(this,t)}};dr.OriginatorPublicKey=Tu;nr.__decorate([(0,ct.AsnProp)({type:Tf.AlgorithmIdentifier})],Tu.prototype,"algorithm",void 0);nr.__decorate([(0,ct.AsnProp)({type:ct.AsnPropTypes.BitString})],Tu.prototype,"publicKey",void 0);var Gs=class{constructor(t={}){Object.assign(this,t)}};dr.OriginatorIdentifierOrKey=Gs;nr.__decorate([(0,ct.AsnProp)({type:Tf.SubjectKeyIdentifier,context:0,implicit:!0,optional:!0})],Gs.prototype,"subjectKeyIdentifier",void 0);nr.__decorate([(0,ct.AsnProp)({type:Tu,context:1,implicit:!0,optional:!0})],Gs.prototype,"originatorKey",void 0);nr.__decorate([(0,ct.AsnProp)({type:ak.IssuerAndSerialNumber,optional:!0})],Gs.prototype,"issuerAndSerialNumber",void 0);dr.OriginatorIdentifierOrKey=Gs=nr.__decorate([(0,ct.AsnType)({type:ct.AsnTypeTypes.Choice})],Gs);var Ws=class{constructor(t={}){this.version=j_.CMSVersion.v3,this.originator=new Gs,this.keyEncryptionAlgorithm=new j_.KeyEncryptionAlgorithmIdentifier,this.recipientEncryptedKeys=new Ef,Object.assign(this,t)}};dr.KeyAgreeRecipientInfo=Ws;nr.__decorate([(0,ct.AsnProp)({type:ct.AsnPropTypes.Integer})],Ws.prototype,"version",void 0);nr.__decorate([(0,ct.AsnProp)({type:Gs,context:0})],Ws.prototype,"originator",void 0);nr.__decorate([(0,ct.AsnProp)({type:ct.OctetString,context:1,optional:!0})],Ws.prototype,"ukm",void 0);nr.__decorate([(0,ct.AsnProp)({type:j_.KeyEncryptionAlgorithmIdentifier})],Ws.prototype,"keyEncryptionAlgorithm",void 0);nr.__decorate([(0,ct.AsnProp)({type:Ef})],Ws.prototype,"recipientEncryptedKeys",void 0)});var M_=b(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.KeyTransRecipientInfo=go.RecipientIdentifier=void 0;var vo=(U(),D(j)),an=H(),F_=Ln(),kM=nf(),PM=Je(),mo=class{constructor(t={}){Object.assign(this,t)}};go.RecipientIdentifier=mo;vo.__decorate([(0,an.AsnProp)({type:PM.SubjectKeyIdentifier,context:0,implicit:!0})],mo.prototype,"subjectKeyIdentifier",void 0);vo.__decorate([(0,an.AsnProp)({type:kM.IssuerAndSerialNumber})],mo.prototype,"issuerAndSerialNumber",void 0);go.RecipientIdentifier=mo=vo.__decorate([(0,an.AsnType)({type:an.AsnTypeTypes.Choice})],mo);var yo=class{constructor(t={}){this.version=F_.CMSVersion.v0,this.rid=new mo,this.keyEncryptionAlgorithm=new F_.KeyEncryptionAlgorithmIdentifier,this.encryptedKey=new an.OctetString,Object.assign(this,t)}};go.KeyTransRecipientInfo=yo;vo.__decorate([(0,an.AsnProp)({type:an.AsnPropTypes.Integer})],yo.prototype,"version",void 0);vo.__decorate([(0,an.AsnProp)({type:mo})],yo.prototype,"rid",void 0);vo.__decorate([(0,an.AsnProp)({type:F_.KeyEncryptionAlgorithmIdentifier})],yo.prototype,"keyEncryptionAlgorithm",void 0);vo.__decorate([(0,an.AsnProp)({type:an.OctetString})],yo.prototype,"encryptedKey",void 0)});var K_=b(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.KEKRecipientInfo=Iu.KEKIdentifier=void 0;var bo=(U(),D(j)),Ei=H(),NM=D_(),V_=Ln(),Ys=class{constructor(t={}){this.keyIdentifier=new Ei.OctetString,Object.assign(this,t)}};Iu.KEKIdentifier=Ys;bo.__decorate([(0,Ei.AsnProp)({type:Ei.OctetString})],Ys.prototype,"keyIdentifier",void 0);bo.__decorate([(0,Ei.AsnProp)({type:Ei.AsnPropTypes.GeneralizedTime,optional:!0})],Ys.prototype,"date",void 0);bo.__decorate([(0,Ei.AsnProp)({type:NM.OtherKeyAttribute,optional:!0})],Ys.prototype,"other",void 0);var xo=class{constructor(t={}){this.version=V_.CMSVersion.v4,this.kekid=new Ys,this.keyEncryptionAlgorithm=new V_.KeyEncryptionAlgorithmIdentifier,this.encryptedKey=new Ei.OctetString,Object.assign(this,t)}};Iu.KEKRecipientInfo=xo;bo.__decorate([(0,Ei.AsnProp)({type:Ei.AsnPropTypes.Integer})],xo.prototype,"version",void 0);bo.__decorate([(0,Ei.AsnProp)({type:Ys})],xo.prototype,"kekid",void 0);bo.__decorate([(0,Ei.AsnProp)({type:V_.KeyEncryptionAlgorithmIdentifier})],xo.prototype,"keyEncryptionAlgorithm",void 0);bo.__decorate([(0,Ei.AsnProp)({type:Ei.OctetString})],xo.prototype,"encryptedKey",void 0)});var H_=b(V0=>{"use strict";Object.defineProperty(V0,"__esModule",{value:!0});V0.PasswordRecipientInfo=void 0;var M0=(U(),D(j)),_o=H(),F0=Ln(),Ao=class{constructor(t={}){this.version=F0.CMSVersion.v0,this.keyEncryptionAlgorithm=new F0.KeyEncryptionAlgorithmIdentifier,this.encryptedKey=new _o.OctetString,Object.assign(this,t)}};V0.PasswordRecipientInfo=Ao;M0.__decorate([(0,_o.AsnProp)({type:_o.AsnPropTypes.Integer})],Ao.prototype,"version",void 0);M0.__decorate([(0,_o.AsnProp)({type:F0.KeyDerivationAlgorithmIdentifier,context:0,optional:!0})],Ao.prototype,"keyDerivationAlgorithm",void 0);M0.__decorate([(0,_o.AsnProp)({type:F0.KeyEncryptionAlgorithmIdentifier})],Ao.prototype,"keyEncryptionAlgorithm",void 0);M0.__decorate([(0,_o.AsnProp)({type:_o.OctetString})],Ao.prototype,"encryptedKey",void 0)});var $_=b(So=>{"use strict";Object.defineProperty(So,"__esModule",{value:!0});So.RecipientInfo=So.OtherRecipientInfo=void 0;var Js=(U(),D(j)),on=H(),RM=U_(),OM=M_(),LM=K_(),DM=H_(),Bu=class{constructor(t={}){this.oriType="",this.oriValue=new ArrayBuffer(0),Object.assign(this,t)}};So.OtherRecipientInfo=Bu;Js.__decorate([(0,on.AsnProp)({type:on.AsnPropTypes.ObjectIdentifier})],Bu.prototype,"oriType",void 0);Js.__decorate([(0,on.AsnProp)({type:on.AsnPropTypes.Any})],Bu.prototype,"oriValue",void 0);var Qs=class{constructor(t={}){Object.assign(this,t)}};So.RecipientInfo=Qs;Js.__decorate([(0,on.AsnProp)({type:OM.KeyTransRecipientInfo,optional:!0})],Qs.prototype,"ktri",void 0);Js.__decorate([(0,on.AsnProp)({type:RM.KeyAgreeRecipientInfo,context:1,implicit:!0,optional:!0})],Qs.prototype,"kari",void 0);Js.__decorate([(0,on.AsnProp)({type:LM.KEKRecipientInfo,context:2,implicit:!0,optional:!0})],Qs.prototype,"kekri",void 0);Js.__decorate([(0,on.AsnProp)({type:DM.PasswordRecipientInfo,context:3,implicit:!0,optional:!0})],Qs.prototype,"pwri",void 0);Js.__decorate([(0,on.AsnProp)({type:Bu,context:4,implicit:!0,optional:!0})],Qs.prototype,"ori",void 0);So.RecipientInfo=Qs=Js.__decorate([(0,on.AsnType)({type:on.AsnTypeTypes.Choice})],Qs)});var Y_=b(If=>{"use strict";var z_;Object.defineProperty(If,"__esModule",{value:!0});If.RecipientInfos=void 0;var qM=(U(),D(j)),G_=H(),jM=$_(),W_=z_=class extends G_.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,z_.prototype)}};If.RecipientInfos=W_;If.RecipientInfos=W_=z_=qM.__decorate([(0,G_.AsnType)({type:G_.AsnTypeTypes.Set,itemType:jM.RecipientInfo})],W_)});var K0=b(xr=>{"use strict";var Q_;Object.defineProperty(xr,"__esModule",{value:!0});xr.RevocationInfoChoices=xr.RevocationInfoChoice=xr.OtherRevocationInfoFormat=xr.id_ri_scvp=xr.id_ri_ocsp_response=xr.id_ri=void 0;var kf=(U(),D(j)),jn=H(),UM=Je();xr.id_ri=`${UM.id_pkix}.16`;xr.id_ri_ocsp_response=`${xr.id_ri}.2`;xr.id_ri_scvp=`${xr.id_ri}.4`;var wo=class{constructor(t={}){this.otherRevInfoFormat="",this.otherRevInfo=new ArrayBuffer(0),Object.assign(this,t)}};xr.OtherRevocationInfoFormat=wo;kf.__decorate([(0,jn.AsnProp)({type:jn.AsnPropTypes.ObjectIdentifier})],wo.prototype,"otherRevInfoFormat",void 0);kf.__decorate([(0,jn.AsnProp)({type:jn.AsnPropTypes.Any})],wo.prototype,"otherRevInfo",void 0);var Bf=class{constructor(t={}){this.other=new wo,Object.assign(this,t)}};xr.RevocationInfoChoice=Bf;kf.__decorate([(0,jn.AsnProp)({type:wo,context:1,implicit:!0})],Bf.prototype,"other",void 0);xr.RevocationInfoChoice=Bf=kf.__decorate([(0,jn.AsnType)({type:jn.AsnTypeTypes.Choice})],Bf);var J_=Q_=class extends jn.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,Q_.prototype)}};xr.RevocationInfoChoices=J_;xr.RevocationInfoChoices=J_=Q_=kf.__decorate([(0,jn.AsnType)({type:jn.AsnTypeTypes.Set,itemType:Bf})],J_)});var X_=b(H0=>{"use strict";Object.defineProperty(H0,"__esModule",{value:!0});H0.OriginatorInfo=void 0;var ok=(U(),D(j)),ck=H(),FM=L0(),MM=K0(),Pf=class{constructor(t={}){Object.assign(this,t)}};H0.OriginatorInfo=Pf;ok.__decorate([(0,ck.AsnProp)({type:FM.CertificateSet,context:0,implicit:!0,optional:!0})],Pf.prototype,"certs",void 0);ok.__decorate([(0,ck.AsnProp)({type:MM.RevocationInfoChoices,context:1,implicit:!0,optional:!0})],Pf.prototype,"crls",void 0)});var pk=b(Co=>{"use strict";var Z_;Object.defineProperty(Co,"__esModule",{value:!0});Co.EnvelopedData=Co.UnprotectedAttributes=void 0;var ku=(U(),D(j)),_s=H(),VM=Ln(),KM=l0(),uk=Y_(),HM=X_(),lk=L_(),$0=Z_=class extends _s.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,Z_.prototype)}};Co.UnprotectedAttributes=$0;Co.UnprotectedAttributes=$0=Z_=ku.__decorate([(0,_s.AsnType)({type:_s.AsnTypeTypes.Set,itemType:KM.Attribute})],$0);var Xs=class{constructor(t={}){this.version=VM.CMSVersion.v0,this.recipientInfos=new uk.RecipientInfos,this.encryptedContentInfo=new lk.EncryptedContentInfo,Object.assign(this,t)}};Co.EnvelopedData=Xs;ku.__decorate([(0,_s.AsnProp)({type:_s.AsnPropTypes.Integer})],Xs.prototype,"version",void 0);ku.__decorate([(0,_s.AsnProp)({type:HM.OriginatorInfo,context:0,implicit:!0,optional:!0})],Xs.prototype,"originatorInfo",void 0);ku.__decorate([(0,_s.AsnProp)({type:uk.RecipientInfos})],Xs.prototype,"recipientInfos",void 0);ku.__decorate([(0,_s.AsnProp)({type:lk.EncryptedContentInfo})],Xs.prototype,"encryptedContentInfo",void 0);ku.__decorate([(0,_s.AsnProp)({type:$0,context:1,implicit:!0,optional:!0})],Xs.prototype,"unprotectedAttrs",void 0)});var fk=b(Fr=>{"use strict";Object.defineProperty(Fr,"__esModule",{value:!0});Fr.id_authData=Fr.id_encryptedData=Fr.id_digestedData=Fr.id_envelopedData=Fr.id_signedData=Fr.id_data=Fr.id_ct_contentInfo=void 0;Fr.id_ct_contentInfo="1.2.840.113549.1.9.16.1.6";Fr.id_data="1.2.840.113549.1.7.1";Fr.id_signedData="1.2.840.113549.1.7.2";Fr.id_envelopedData="1.2.840.113549.1.7.3";Fr.id_digestedData="1.2.840.113549.1.7.5";Fr.id_encryptedData="1.2.840.113549.1.7.6";Fr.id_authData="1.2.840.113549.1.9.16.1.2"});var yk=b(Eo=>{"use strict";var e1;Object.defineProperty(Eo,"__esModule",{value:!0});Eo.SignedData=Eo.DigestAlgorithmIdentifiers=void 0;var To=(U(),D(j)),Un=H(),$M=L0(),dk=Ln(),hk=O_(),zM=K0(),mk=p0(),Nf=e1=class extends Un.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,e1.prototype)}};Eo.DigestAlgorithmIdentifiers=Nf;Eo.DigestAlgorithmIdentifiers=Nf=e1=To.__decorate([(0,Un.AsnType)({type:Un.AsnTypeTypes.Set,itemType:dk.DigestAlgorithmIdentifier})],Nf);var As=class{constructor(t={}){this.version=dk.CMSVersion.v0,this.digestAlgorithms=new Nf,this.encapContentInfo=new hk.EncapsulatedContentInfo,this.signerInfos=new mk.SignerInfos,Object.assign(this,t)}};Eo.SignedData=As;To.__decorate([(0,Un.AsnProp)({type:Un.AsnPropTypes.Integer})],As.prototype,"version",void 0);To.__decorate([(0,Un.AsnProp)({type:Nf})],As.prototype,"digestAlgorithms",void 0);To.__decorate([(0,Un.AsnProp)({type:hk.EncapsulatedContentInfo})],As.prototype,"encapContentInfo",void 0);To.__decorate([(0,Un.AsnProp)({type:$M.CertificateSet,context:0,implicit:!0,optional:!0})],As.prototype,"certificates",void 0);To.__decorate([(0,Un.AsnProp)({type:zM.RevocationInfoChoices,context:1,implicit:!0,optional:!0})],As.prototype,"crls",void 0);To.__decorate([(0,Un.AsnProp)({type:mk.SignerInfos})],As.prototype,"signerInfos",void 0)});var Rf=b(qt=>{"use strict";Object.defineProperty(qt,"__esModule",{value:!0});var Qt=(U(),D(j));Qt.__exportStar(PB(),qt);Qt.__exportStar(l0(),qt);Qt.__exportStar(L0(),qt);Qt.__exportStar(ik(),qt);Qt.__exportStar(O_(),qt);Qt.__exportStar(L_(),qt);Qt.__exportStar(pk(),qt);Qt.__exportStar(nf(),qt);Qt.__exportStar(K_(),qt);Qt.__exportStar(U_(),qt);Qt.__exportStar(M_(),qt);Qt.__exportStar(fk(),qt);Qt.__exportStar(X_(),qt);Qt.__exportStar(H_(),qt);Qt.__exportStar($_(),qt);Qt.__exportStar(Y_(),qt);Qt.__exportStar(K0(),qt);Qt.__exportStar(yk(),qt);Qt.__exportStar(Mb(),qt);Qt.__exportStar(p0(),qt);Qt.__exportStar(Ln(),qt)});var t1=b(ke=>{"use strict";Object.defineProperty(ke,"__esModule",{value:!0});ke.id_sect571r1=ke.id_sect571k1=ke.id_secp521r1=ke.id_sect409r1=ke.id_sect409k1=ke.id_secp384r1=ke.id_sect283r1=ke.id_sect283k1=ke.id_secp256r1=ke.id_sect233r1=ke.id_sect233k1=ke.id_secp224r1=ke.id_sect163r2=ke.id_sect163k1=ke.id_secp192r1=ke.id_ecdsaWithSHA512=ke.id_ecdsaWithSHA384=ke.id_ecdsaWithSHA256=ke.id_ecdsaWithSHA224=ke.id_ecdsaWithSHA1=ke.id_ecMQV=ke.id_ecDH=ke.id_ecPublicKey=void 0;ke.id_ecPublicKey="1.2.840.10045.2.1";ke.id_ecDH="1.3.132.1.12";ke.id_ecMQV="1.3.132.1.13";ke.id_ecdsaWithSHA1="1.2.840.10045.4.1";ke.id_ecdsaWithSHA224="1.2.840.10045.4.3.1";ke.id_ecdsaWithSHA256="1.2.840.10045.4.3.2";ke.id_ecdsaWithSHA384="1.2.840.10045.4.3.3";ke.id_ecdsaWithSHA512="1.2.840.10045.4.3.4";ke.id_secp192r1="1.2.840.10045.3.1.1";ke.id_sect163k1="1.3.132.0.1";ke.id_sect163r2="1.3.132.0.15";ke.id_secp224r1="1.3.132.0.33";ke.id_sect233k1="1.3.132.0.26";ke.id_sect233r1="1.3.132.0.27";ke.id_secp256r1="1.2.840.10045.3.1.7";ke.id_sect283k1="1.3.132.0.16";ke.id_sect283r1="1.3.132.0.17";ke.id_secp384r1="1.3.132.0.34";ke.id_sect409k1="1.3.132.0.36";ke.id_sect409r1="1.3.132.0.37";ke.id_secp521r1="1.3.132.0.35";ke.id_sect571k1="1.3.132.0.38";ke.id_sect571r1="1.3.132.0.39"});var gk=b(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.ecdsaWithSHA512=Ui.ecdsaWithSHA384=Ui.ecdsaWithSHA256=Ui.ecdsaWithSHA224=Ui.ecdsaWithSHA1=void 0;var GM=Je(),Of=t1();function Lf(e){return new GM.AlgorithmIdentifier({algorithm:e})}Ui.ecdsaWithSHA1=Lf(Of.id_ecdsaWithSHA1);Ui.ecdsaWithSHA224=Lf(Of.id_ecdsaWithSHA224);Ui.ecdsaWithSHA256=Lf(Of.id_ecdsaWithSHA256);Ui.ecdsaWithSHA384=Lf(Of.id_ecdsaWithSHA384);Ui.ecdsaWithSHA512=Lf(Of.id_ecdsaWithSHA512)});var n1=b(Pr=>{"use strict";Object.defineProperty(Pr,"__esModule",{value:!0});Pr.SpecifiedECDomain=Pr.ECPVer=Pr.Curve=Pr.FieldElement=Pr.ECPoint=Pr.FieldID=void 0;var si=(U(),D(j)),ft=H(),Pu=class{constructor(t={}){Object.assign(this,t)}};Pr.FieldID=Pu;si.__decorate([(0,ft.AsnProp)({type:ft.AsnPropTypes.ObjectIdentifier})],Pu.prototype,"fieldType",void 0);si.__decorate([(0,ft.AsnProp)({type:ft.AsnPropTypes.Any})],Pu.prototype,"parameters",void 0);Pr.FieldID=Pu=si.__decorate([(0,ft.AsnType)({type:ft.AsnTypeTypes.Sequence})],Pu);var z0=class extends ft.OctetString{};Pr.ECPoint=z0;var r1=class extends ft.OctetString{};Pr.FieldElement=r1;var Io=class{constructor(t={}){Object.assign(this,t)}};Pr.Curve=Io;si.__decorate([(0,ft.AsnProp)({type:ft.AsnPropTypes.OctetString})],Io.prototype,"a",void 0);si.__decorate([(0,ft.AsnProp)({type:ft.AsnPropTypes.OctetString})],Io.prototype,"b",void 0);si.__decorate([(0,ft.AsnProp)({type:ft.AsnPropTypes.BitString,optional:!0})],Io.prototype,"seed",void 0);Pr.Curve=Io=si.__decorate([(0,ft.AsnType)({type:ft.AsnTypeTypes.Sequence})],Io);var i1;(function(e){e[e.ecpVer1=1]="ecpVer1"})(i1||(Pr.ECPVer=i1={}));var Ss=class{constructor(t={}){this.version=i1.ecpVer1,Object.assign(this,t)}};Pr.SpecifiedECDomain=Ss;si.__decorate([(0,ft.AsnProp)({type:ft.AsnPropTypes.Integer})],Ss.prototype,"version",void 0);si.__decorate([(0,ft.AsnProp)({type:Pu})],Ss.prototype,"fieldID",void 0);si.__decorate([(0,ft.AsnProp)({type:Io})],Ss.prototype,"curve",void 0);si.__decorate([(0,ft.AsnProp)({type:z0})],Ss.prototype,"base",void 0);si.__decorate([(0,ft.AsnProp)({type:ft.AsnPropTypes.Integer,converter:ft.AsnIntegerArrayBufferConverter})],Ss.prototype,"order",void 0);si.__decorate([(0,ft.AsnProp)({type:ft.AsnPropTypes.Integer,optional:!0})],Ss.prototype,"cofactor",void 0);Pr.SpecifiedECDomain=Ss=si.__decorate([(0,ft.AsnType)({type:ft.AsnTypeTypes.Sequence})],Ss)});var s1=b(Df=>{"use strict";Object.defineProperty(Df,"__esModule",{value:!0});Df.ECParameters=void 0;var G0=(U(),D(j)),Bo=H(),WM=n1(),Nu=class{constructor(t={}){Object.assign(this,t)}};Df.ECParameters=Nu;G0.__decorate([(0,Bo.AsnProp)({type:Bo.AsnPropTypes.ObjectIdentifier})],Nu.prototype,"namedCurve",void 0);G0.__decorate([(0,Bo.AsnProp)({type:Bo.AsnPropTypes.Null})],Nu.prototype,"implicitCurve",void 0);G0.__decorate([(0,Bo.AsnProp)({type:WM.SpecifiedECDomain})],Nu.prototype,"specifiedCurve",void 0);Df.ECParameters=Nu=G0.__decorate([(0,Bo.AsnType)({type:Bo.AsnTypeTypes.Choice})],Nu)});var vk=b(Y0=>{"use strict";Object.defineProperty(Y0,"__esModule",{value:!0});Y0.ECPrivateKey=void 0;var W0=(U(),D(j)),Zs=H(),YM=s1(),ko=class{constructor(t={}){this.version=1,this.privateKey=new Zs.OctetString,Object.assign(this,t)}};Y0.ECPrivateKey=ko;W0.__decorate([(0,Zs.AsnProp)({type:Zs.AsnPropTypes.Integer})],ko.prototype,"version",void 0);W0.__decorate([(0,Zs.AsnProp)({type:Zs.OctetString})],ko.prototype,"privateKey",void 0);W0.__decorate([(0,Zs.AsnProp)({type:YM.ECParameters,context:0,optional:!0})],ko.prototype,"parameters",void 0);W0.__decorate([(0,Zs.AsnProp)({type:Zs.AsnPropTypes.BitString,context:1,optional:!0})],ko.prototype,"publicKey",void 0)});var bk=b(Q0=>{"use strict";Object.defineProperty(Q0,"__esModule",{value:!0});Q0.ECDSASigValue=void 0;var xk=(U(),D(j)),Ru=H(),qf=class{constructor(t={}){this.r=new ArrayBuffer(0),this.s=new ArrayBuffer(0),Object.assign(this,t)}};Q0.ECDSASigValue=qf;xk.__decorate([(0,Ru.AsnProp)({type:Ru.AsnPropTypes.Integer,converter:Ru.AsnIntegerArrayBufferConverter})],qf.prototype,"r",void 0);xk.__decorate([(0,Ru.AsnProp)({type:Ru.AsnPropTypes.Integer,converter:Ru.AsnIntegerArrayBufferConverter})],qf.prototype,"s",void 0)});var _k=b(ea=>{"use strict";Object.defineProperty(ea,"__esModule",{value:!0});var Ou=(U(),D(j));Ou.__exportStar(gk(),ea);Ou.__exportStar(s1(),ea);Ou.__exportStar(vk(),ea);Ou.__exportStar(bk(),ea);Ou.__exportStar(t1(),ea);Ou.__exportStar(n1(),ea)});var jf=b(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.id_mgf1=he.id_md5=he.id_md2=he.id_sha512_256=he.id_sha512_224=he.id_sha512=he.id_sha384=he.id_sha256=he.id_sha224=he.id_sha1=he.id_sha512_256WithRSAEncryption=he.id_sha512_224WithRSAEncryption=he.id_sha512WithRSAEncryption=he.id_sha384WithRSAEncryption=he.id_sha256WithRSAEncryption=he.id_ssha224WithRSAEncryption=he.id_sha224WithRSAEncryption=he.id_sha1WithRSAEncryption=he.id_md5WithRSAEncryption=he.id_md2WithRSAEncryption=he.id_RSASSA_PSS=he.id_pSpecified=he.id_RSAES_OAEP=he.id_rsaEncryption=he.id_pkcs_1=void 0;he.id_pkcs_1="1.2.840.113549.1.1";he.id_rsaEncryption=`${he.id_pkcs_1}.1`;he.id_RSAES_OAEP=`${he.id_pkcs_1}.7`;he.id_pSpecified=`${he.id_pkcs_1}.9`;he.id_RSASSA_PSS=`${he.id_pkcs_1}.10`;he.id_md2WithRSAEncryption=`${he.id_pkcs_1}.2`;he.id_md5WithRSAEncryption=`${he.id_pkcs_1}.4`;he.id_sha1WithRSAEncryption=`${he.id_pkcs_1}.5`;he.id_sha224WithRSAEncryption=`${he.id_pkcs_1}.14`;he.id_ssha224WithRSAEncryption=he.id_sha224WithRSAEncryption;he.id_sha256WithRSAEncryption=`${he.id_pkcs_1}.11`;he.id_sha384WithRSAEncryption=`${he.id_pkcs_1}.12`;he.id_sha512WithRSAEncryption=`${he.id_pkcs_1}.13`;he.id_sha512_224WithRSAEncryption=`${he.id_pkcs_1}.15`;he.id_sha512_256WithRSAEncryption=`${he.id_pkcs_1}.16`;he.id_sha1="1.3.14.3.2.26";he.id_sha224="2.16.840.1.101.3.4.2.4";he.id_sha256="2.16.840.1.101.3.4.2.1";he.id_sha384="2.16.840.1.101.3.4.2.2";he.id_sha512="2.16.840.1.101.3.4.2.3";he.id_sha512_224="2.16.840.1.101.3.4.2.5";he.id_sha512_256="2.16.840.1.101.3.4.2.6";he.id_md2="1.2.840.113549.2.2";he.id_md5="1.2.840.113549.2.5";he.id_mgf1=`${he.id_pkcs_1}.8`});var J0=b(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.sha512_256WithRSAEncryption=Re.sha512_224WithRSAEncryption=Re.sha512WithRSAEncryption=Re.sha384WithRSAEncryption=Re.sha256WithRSAEncryption=Re.sha224WithRSAEncryption=Re.sha1WithRSAEncryption=Re.md5WithRSAEncryption=Re.md2WithRSAEncryption=Re.rsaEncryption=Re.pSpecifiedEmpty=Re.mgf1SHA1=Re.sha512_256=Re.sha512_224=Re.sha512=Re.sha384=Re.sha256=Re.sha224=Re.sha1=Re.md4=Re.md2=void 0;var a1=H(),o1=Je(),Jt=jf();function hr(e){return new o1.AlgorithmIdentifier({algorithm:e,parameters:null})}Re.md2=hr(Jt.id_md2);Re.md4=hr(Jt.id_md5);Re.sha1=hr(Jt.id_sha1);Re.sha224=hr(Jt.id_sha224);Re.sha256=hr(Jt.id_sha256);Re.sha384=hr(Jt.id_sha384);Re.sha512=hr(Jt.id_sha512);Re.sha512_224=hr(Jt.id_sha512_224);Re.sha512_256=hr(Jt.id_sha512_256);Re.mgf1SHA1=new o1.AlgorithmIdentifier({algorithm:Jt.id_mgf1,parameters:a1.AsnConvert.serialize(Re.sha1)});Re.pSpecifiedEmpty=new o1.AlgorithmIdentifier({algorithm:Jt.id_pSpecified,parameters:a1.AsnConvert.serialize(a1.AsnOctetStringConverter.toASN(new Uint8Array([218,57,163,238,94,107,75,13,50,85,191,239,149,96,24,144,175,216,7,9]).buffer))});Re.rsaEncryption=hr(Jt.id_rsaEncryption);Re.md2WithRSAEncryption=hr(Jt.id_md2WithRSAEncryption);Re.md5WithRSAEncryption=hr(Jt.id_md5WithRSAEncryption);Re.sha1WithRSAEncryption=hr(Jt.id_sha1WithRSAEncryption);Re.sha224WithRSAEncryption=hr(Jt.id_sha512_224WithRSAEncryption);Re.sha256WithRSAEncryption=hr(Jt.id_sha512_256WithRSAEncryption);Re.sha384WithRSAEncryption=hr(Jt.id_sha384WithRSAEncryption);Re.sha512WithRSAEncryption=hr(Jt.id_sha512WithRSAEncryption);Re.sha512_224WithRSAEncryption=hr(Jt.id_sha512_224WithRSAEncryption);Re.sha512_256WithRSAEncryption=hr(Jt.id_sha512_256WithRSAEncryption)});var Sk=b(Du=>{"use strict";Object.defineProperty(Du,"__esModule",{value:!0});Du.RSAES_OAEP=Du.RsaEsOaepParams=void 0;var c1=(U(),D(j)),Uf=H(),Po=Je(),Ak=jf(),Lu=J0(),No=class{constructor(t={}){this.hashAlgorithm=new Po.AlgorithmIdentifier(Lu.sha1),this.maskGenAlgorithm=new Po.AlgorithmIdentifier({algorithm:Ak.id_mgf1,parameters:Uf.AsnConvert.serialize(Lu.sha1)}),this.pSourceAlgorithm=new Po.AlgorithmIdentifier(Lu.pSpecifiedEmpty),Object.assign(this,t)}};Du.RsaEsOaepParams=No;c1.__decorate([(0,Uf.AsnProp)({type:Po.AlgorithmIdentifier,context:0,defaultValue:Lu.sha1})],No.prototype,"hashAlgorithm",void 0);c1.__decorate([(0,Uf.AsnProp)({type:Po.AlgorithmIdentifier,context:1,defaultValue:Lu.mgf1SHA1})],No.prototype,"maskGenAlgorithm",void 0);c1.__decorate([(0,Uf.AsnProp)({type:Po.AlgorithmIdentifier,context:2,defaultValue:Lu.pSpecifiedEmpty})],No.prototype,"pSourceAlgorithm",void 0);Du.RSAES_OAEP=new Po.AlgorithmIdentifier({algorithm:Ak.id_RSAES_OAEP,parameters:Uf.AsnConvert.serialize(new No)})});var Ck=b(qu=>{"use strict";Object.defineProperty(qu,"__esModule",{value:!0});qu.RSASSA_PSS=qu.RsaSaPssParams=void 0;var Z0=(U(),D(j)),ta=H(),Ff=Je(),wk=jf(),X0=J0(),ra=class{constructor(t={}){this.hashAlgorithm=new Ff.AlgorithmIdentifier(X0.sha1),this.maskGenAlgorithm=new Ff.AlgorithmIdentifier({algorithm:wk.id_mgf1,parameters:ta.AsnConvert.serialize(X0.sha1)}),this.saltLength=20,this.trailerField=1,Object.assign(this,t)}};qu.RsaSaPssParams=ra;Z0.__decorate([(0,ta.AsnProp)({type:Ff.AlgorithmIdentifier,context:0,defaultValue:X0.sha1})],ra.prototype,"hashAlgorithm",void 0);Z0.__decorate([(0,ta.AsnProp)({type:Ff.AlgorithmIdentifier,context:1,defaultValue:X0.mgf1SHA1})],ra.prototype,"maskGenAlgorithm",void 0);Z0.__decorate([(0,ta.AsnProp)({type:ta.AsnPropTypes.Integer,context:2,defaultValue:20})],ra.prototype,"saltLength",void 0);Z0.__decorate([(0,ta.AsnProp)({type:ta.AsnPropTypes.Integer,context:3,defaultValue:1})],ra.prototype,"trailerField",void 0);qu.RSASSA_PSS=new Ff.AlgorithmIdentifier({algorithm:wk.id_RSASSA_PSS,parameters:ta.AsnConvert.serialize(new ra)})});var Ik=b(ty=>{"use strict";Object.defineProperty(ty,"__esModule",{value:!0});ty.DigestInfo=void 0;var Ek=(U(),D(j)),Tk=Je(),ey=H(),Mf=class{constructor(t={}){this.digestAlgorithm=new Tk.AlgorithmIdentifier,this.digest=new ey.OctetString,Object.assign(this,t)}};ty.DigestInfo=Mf;Ek.__decorate([(0,ey.AsnProp)({type:Tk.AlgorithmIdentifier})],Mf.prototype,"digestAlgorithm",void 0);Ek.__decorate([(0,ey.AsnProp)({type:ey.OctetString})],Mf.prototype,"digest",void 0)});var Bk=b(Vf=>{"use strict";Object.defineProperty(Vf,"__esModule",{value:!0});var u1=(U(),D(j));u1.__exportStar(Sk(),Vf);u1.__exportStar(Ck(),Vf);u1.__exportStar(Ik(),Vf)});var f1=b(Oo=>{"use strict";var l1;Object.defineProperty(Oo,"__esModule",{value:!0});Oo.OtherPrimeInfos=Oo.OtherPrimeInfo=void 0;var ry=(U(),D(j)),Fi=H(),Ro=class{constructor(t={}){this.prime=new ArrayBuffer(0),this.exponent=new ArrayBuffer(0),this.coefficient=new ArrayBuffer(0),Object.assign(this,t)}};Oo.OtherPrimeInfo=Ro;ry.__decorate([(0,Fi.AsnProp)({type:Fi.AsnPropTypes.Integer,converter:Fi.AsnIntegerArrayBufferConverter})],Ro.prototype,"prime",void 0);ry.__decorate([(0,Fi.AsnProp)({type:Fi.AsnPropTypes.Integer,converter:Fi.AsnIntegerArrayBufferConverter})],Ro.prototype,"exponent",void 0);ry.__decorate([(0,Fi.AsnProp)({type:Fi.AsnPropTypes.Integer,converter:Fi.AsnIntegerArrayBufferConverter})],Ro.prototype,"coefficient",void 0);var p1=l1=class extends Fi.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,l1.prototype)}};Oo.OtherPrimeInfos=p1;Oo.OtherPrimeInfos=p1=l1=ry.__decorate([(0,Fi.AsnType)({type:Fi.AsnTypeTypes.Sequence,itemType:Ro})],p1)});var kk=b(iy=>{"use strict";Object.defineProperty(iy,"__esModule",{value:!0});iy.RSAPrivateKey=void 0;var Fn=(U(),D(j)),yt=H(),QM=f1(),Ti=class{constructor(t={}){this.version=0,this.modulus=new ArrayBuffer(0),this.publicExponent=new ArrayBuffer(0),this.privateExponent=new ArrayBuffer(0),this.prime1=new ArrayBuffer(0),this.prime2=new ArrayBuffer(0),this.exponent1=new ArrayBuffer(0),this.exponent2=new ArrayBuffer(0),this.coefficient=new ArrayBuffer(0),Object.assign(this,t)}};iy.RSAPrivateKey=Ti;Fn.__decorate([(0,yt.AsnProp)({type:yt.AsnPropTypes.Integer})],Ti.prototype,"version",void 0);Fn.__decorate([(0,yt.AsnProp)({type:yt.AsnPropTypes.Integer,converter:yt.AsnIntegerArrayBufferConverter})],Ti.prototype,"modulus",void 0);Fn.__decorate([(0,yt.AsnProp)({type:yt.AsnPropTypes.Integer,converter:yt.AsnIntegerArrayBufferConverter})],Ti.prototype,"publicExponent",void 0);Fn.__decorate([(0,yt.AsnProp)({type:yt.AsnPropTypes.Integer,converter:yt.AsnIntegerArrayBufferConverter})],Ti.prototype,"privateExponent",void 0);Fn.__decorate([(0,yt.AsnProp)({type:yt.AsnPropTypes.Integer,converter:yt.AsnIntegerArrayBufferConverter})],Ti.prototype,"prime1",void 0);Fn.__decorate([(0,yt.AsnProp)({type:yt.AsnPropTypes.Integer,converter:yt.AsnIntegerArrayBufferConverter})],Ti.prototype,"prime2",void 0);Fn.__decorate([(0,yt.AsnProp)({type:yt.AsnPropTypes.Integer,converter:yt.AsnIntegerArrayBufferConverter})],Ti.prototype,"exponent1",void 0);Fn.__decorate([(0,yt.AsnProp)({type:yt.AsnPropTypes.Integer,converter:yt.AsnIntegerArrayBufferConverter})],Ti.prototype,"exponent2",void 0);Fn.__decorate([(0,yt.AsnProp)({type:yt.AsnPropTypes.Integer,converter:yt.AsnIntegerArrayBufferConverter})],Ti.prototype,"coefficient",void 0);Fn.__decorate([(0,yt.AsnProp)({type:QM.OtherPrimeInfos,optional:!0})],Ti.prototype,"otherPrimeInfos",void 0)});var Nk=b(ny=>{"use strict";Object.defineProperty(ny,"__esModule",{value:!0});ny.RSAPublicKey=void 0;var Pk=(U(),D(j)),ju=H(),Kf=class{constructor(t={}){this.modulus=new ArrayBuffer(0),this.publicExponent=new ArrayBuffer(0),Object.assign(this,t)}};ny.RSAPublicKey=Kf;Pk.__decorate([(0,ju.AsnProp)({type:ju.AsnPropTypes.Integer,converter:ju.AsnIntegerArrayBufferConverter})],Kf.prototype,"modulus",void 0);Pk.__decorate([(0,ju.AsnProp)({type:ju.AsnPropTypes.Integer,converter:ju.AsnIntegerArrayBufferConverter})],Kf.prototype,"publicExponent",void 0)});var d1=b(ia=>{"use strict";Object.defineProperty(ia,"__esModule",{value:!0});var Uu=(U(),D(j));Uu.__exportStar(Bk(),ia);Uu.__exportStar(J0(),ia);Uu.__exportStar(jf(),ia);Uu.__exportStar(f1(),ia);Uu.__exportStar(kk(),ia);Uu.__exportStar(Nk(),ia)});var sy={};wE(sy,{__assign:()=>m1,__asyncDelegator:()=>uV,__asyncGenerator:()=>cV,__asyncValues:()=>lV,__await:()=>Hf,__awaiter:()=>rV,__classPrivateFieldGet:()=>hV,__classPrivateFieldSet:()=>mV,__createBinding:()=>nV,__decorate:()=>ZM,__exportStar:()=>sV,__extends:()=>JM,__generator:()=>iV,__importDefault:()=>dV,__importStar:()=>fV,__makeTemplateObject:()=>pV,__metadata:()=>tV,__param:()=>eV,__read:()=>Rk,__rest:()=>XM,__spread:()=>aV,__spreadArrays:()=>oV,__values:()=>y1});function JM(e,t){h1(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function XM(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]]);return r}function ZM(e,t,r,i){var n=arguments.length,s=n<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,r):i,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(e,t,r,i);else for(var o=e.length-1;o>=0;o--)(a=e[o])&&(s=(n<3?a(s):n>3?a(t,r,s):a(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s}function eV(e,t){return function(r,i){t(r,i,e)}}function tV(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function rV(e,t,r,i){function n(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(l){try{u(i.next(l))}catch(p){a(p)}}function c(l){try{u(i.throw(l))}catch(p){a(p)}}function u(l){l.done?s(l.value):n(l.value).then(o,c)}u((i=i.apply(e,t||[])).next())})}function iV(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(u){return function(l){return c([u,l])}}function c(u){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,n&&(s=u[0]&2?n.return:u[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,u[1])).done)return s;switch(n=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,n=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){r.label=u[1];break}if(u[0]===6&&r.label<s[1]){r.label=s[1],s=u;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(u);break}s[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(l){u=[6,l],n=0}finally{i=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function nV(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]}function sV(e,t){for(var r in e)r!=="default"&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function y1(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Rk(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var i=r.call(e),n,s=[],a;try{for(;(t===void 0||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(o){a={error:o}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return s}function aV(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Rk(arguments[t]));return e}function oV(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var i=Array(e),n=0,t=0;t<r;t++)for(var s=arguments[t],a=0,o=s.length;a<o;a++,n++)i[n]=s[a];return i}function Hf(e){return this instanceof Hf?(this.v=e,this):new Hf(e)}function cV(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=r.apply(e,t||[]),n,s=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(d){i[d]&&(n[d]=function(h){return new Promise(function(f,m){s.push([d,h,f,m])>1||o(d,h)})})}function o(d,h){try{c(i[d](h))}catch(f){p(s[0][3],f)}}function c(d){d.value instanceof Hf?Promise.resolve(d.value.v).then(u,l):p(s[0][2],d)}function u(d){o("next",d)}function l(d){o("throw",d)}function p(d,h){d(h),s.shift(),s.length&&o(s[0][0],s[0][1])}}function uV(e){var t,r;return t={},i("next"),i("throw",function(n){throw n}),i("return"),t[Symbol.iterator]=function(){return this},t;function i(n,s){t[n]=e[n]?function(a){return(r=!r)?{value:Hf(e[n](a)),done:n==="return"}:s?s(a):a}:s}}function lV(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof y1=="function"?y1(e):e[Symbol.iterator](),r={},i("next"),i("throw"),i("return"),r[Symbol.asyncIterator]=function(){return this},r);function i(s){r[s]=e[s]&&function(a){return new Promise(function(o,c){a=e[s](a),n(o,c,a.done,a.value)})}}function n(s,a,o,c){Promise.resolve(c).then(function(u){s({value:u,done:o})},a)}}function pV(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function fV(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function dV(e){return e&&e.__esModule?e:{default:e}}function hV(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function mV(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}var h1,m1,ay=SE(()=>{h1=function(e,t){return h1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var n in i)i.hasOwnProperty(n)&&(r[n]=i[n])},h1(e,t)};m1=function(){return m1=Object.assign||function(t){for(var r,i=1,n=arguments.length;i<n;i++){r=arguments[i];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=r[s])}return t},m1.apply(this,arguments)}});var x1=b(v1=>{"use strict";Object.defineProperty(v1,"__esModule",{value:!0});var g1;(function(e){e[e.Transient=0]="Transient",e[e.Singleton=1]="Singleton",e[e.ResolutionScoped=2]="ResolutionScoped",e[e.ContainerScoped=3]="ContainerScoped"})(g1||(g1={}));v1.default=g1});var Ok=b(b1=>{"use strict";Object.defineProperty(b1,"__esModule",{value:!0});var yV=x1();Object.defineProperty(b1,"Lifecycle",{enumerable:!0,get:function(){return yV.default}})});var Lo=b(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.defineInjectionTokenMetadata=cn.getParamInfo=cn.INJECTION_TOKEN_METADATA_KEY=void 0;cn.INJECTION_TOKEN_METADATA_KEY="injectionTokens";function gV(e){let t=Reflect.getMetadata("design:paramtypes",e)||[],r=Reflect.getOwnMetadata(cn.INJECTION_TOKEN_METADATA_KEY,e)||{};return Object.keys(r).forEach(i=>{t[+i]=r[i]}),t}cn.getParamInfo=gV;function vV(e,t){return function(r,i,n){let s=Reflect.getOwnMetadata(cn.INJECTION_TOKEN_METADATA_KEY,r)||{};s[n]=t?{token:e,transform:t.transformToken,transformArgs:t.args||[]}:e,Reflect.defineMetadata(cn.INJECTION_TOKEN_METADATA_KEY,s,r)}}cn.defineInjectionTokenMetadata=vV});var _1=b(oy=>{"use strict";Object.defineProperty(oy,"__esModule",{value:!0});oy.isClassProvider=void 0;function xV(e){return!!e.useClass}oy.isClassProvider=xV});var A1=b(cy=>{"use strict";Object.defineProperty(cy,"__esModule",{value:!0});cy.isFactoryProvider=void 0;function bV(e){return!!e.useFactory}cy.isFactoryProvider=bV});var ly=b(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});Fu.delay=Fu.DelayedConstructor=void 0;var uy=class{constructor(t){this.wrap=t,this.reflectMethods=["get","getPrototypeOf","setPrototypeOf","getOwnPropertyDescriptor","defineProperty","has","set","deleteProperty","apply","construct","ownKeys"]}createProxy(t){let r={},i=!1,n,s=()=>(i||(n=t(this.wrap()),i=!0),n);return new Proxy(r,this.createHandler(s))}createHandler(t){let r={},i=n=>{r[n]=(...s)=>{s[0]=t();let a=Reflect[n];return a(...s)}};return this.reflectMethods.forEach(i),r}};Fu.DelayedConstructor=uy;function _V(e){if(typeof e>"u")throw new Error("Attempt to `delay` undefined. Constructor must be wrapped in a callback");return new uy(e)}Fu.delay=_V});var py=b(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.isConstructorToken=Mn.isTransformDescriptor=Mn.isTokenDescriptor=Mn.isNormalToken=void 0;var AV=ly();function SV(e){return typeof e=="string"||typeof e=="symbol"}Mn.isNormalToken=SV;function wV(e){return typeof e=="object"&&"token"in e&&"multiple"in e}Mn.isTokenDescriptor=wV;function CV(e){return typeof e=="object"&&"token"in e&&"transform"in e}Mn.isTransformDescriptor=CV;function EV(e){return typeof e=="function"||e instanceof AV.DelayedConstructor}Mn.isConstructorToken=EV});var S1=b(fy=>{"use strict";Object.defineProperty(fy,"__esModule",{value:!0});fy.isTokenProvider=void 0;function TV(e){return!!e.useToken}fy.isTokenProvider=TV});var w1=b(dy=>{"use strict";Object.defineProperty(dy,"__esModule",{value:!0});dy.isValueProvider=void 0;function IV(e){return e.useValue!=null}dy.isValueProvider=IV});var C1=b(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});var BV=_1();Object.defineProperty(Do,"isClassProvider",{enumerable:!0,get:function(){return BV.isClassProvider}});var kV=A1();Object.defineProperty(Do,"isFactoryProvider",{enumerable:!0,get:function(){return kV.isFactoryProvider}});var PV=py();Object.defineProperty(Do,"isNormalToken",{enumerable:!0,get:function(){return PV.isNormalToken}});var NV=S1();Object.defineProperty(Do,"isTokenProvider",{enumerable:!0,get:function(){return NV.isTokenProvider}});var RV=w1();Object.defineProperty(Do,"isValueProvider",{enumerable:!0,get:function(){return RV.isValueProvider}})});var Lk=b(hy=>{"use strict";Object.defineProperty(hy,"__esModule",{value:!0});hy.isProvider=void 0;var OV=_1(),LV=w1(),DV=S1(),qV=A1();function jV(e){return OV.isClassProvider(e)||LV.isValueProvider(e)||DV.isTokenProvider(e)||qV.isFactoryProvider(e)}hy.isProvider=jV});var I1=b(T1=>{"use strict";Object.defineProperty(T1,"__esModule",{value:!0});var E1=class{constructor(){this._registryMap=new Map}entries(){return this._registryMap.entries()}getAll(t){return this.ensure(t),this._registryMap.get(t)}get(t){this.ensure(t);let r=this._registryMap.get(t);return r[r.length-1]||null}set(t,r){this.ensure(t),this._registryMap.get(t).push(r)}setAll(t,r){this._registryMap.set(t,r)}has(t){return this.ensure(t),this._registryMap.get(t).length>0}clear(){this._registryMap.clear()}ensure(t){this._registryMap.has(t)||this._registryMap.set(t,[])}};T1.default=E1});var Dk=b(k1=>{"use strict";Object.defineProperty(k1,"__esModule",{value:!0});var UV=I1(),B1=class extends UV.default{};k1.default=B1});var qk=b(N1=>{"use strict";Object.defineProperty(N1,"__esModule",{value:!0});var P1=class{constructor(){this.scopedResolutions=new Map}};N1.default=P1});var R1=b(my=>{"use strict";Object.defineProperty(my,"__esModule",{value:!0});my.formatErrorCtor=void 0;function FV(e,t){return e===null?`at position #${t}`:`"${e.split(",")[t].trim()}" at position #${t}`}function MV(e,t,r=" "){return[e,...t.message.split(`
|
|
7
|
+
`).map(i=>r+i)].join(`
|
|
8
|
+
`)}function VV(e,t,r){let[,i=null]=e.toString().match(/constructor\(([\w, ]+)\)/)||[],n=FV(i,t);return MV(`Cannot inject the dependency ${n} of "${e.name}" constructor. Reason:`,r)}my.formatErrorCtor=VV});var jk=b(yy=>{"use strict";Object.defineProperty(yy,"__esModule",{value:!0});yy.isDisposable=void 0;function KV(e){return!(typeof e.dispose!="function"||e.dispose.length>0)}yy.isDisposable=KV});var Fk=b(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});qo.PostResolutionInterceptors=qo.PreResolutionInterceptors=void 0;var Uk=I1(),gy=class extends Uk.default{};qo.PreResolutionInterceptors=gy;var vy=class extends Uk.default{};qo.PostResolutionInterceptors=vy;var O1=class{constructor(){this.preResolution=new gy,this.postResolution=new vy}};qo.default=O1});var na=b(ws=>{"use strict";Object.defineProperty(ws,"__esModule",{value:!0});ws.instance=ws.typeInfo=void 0;var HV=(ay(),D(sy)),Gr=C1(),$V=Lk(),xy=py(),zV=Dk(),ai=x1(),by=qk(),GV=R1(),WV=ly(),YV=jk(),QV=Fk();ws.typeInfo=new Map;var L1=class e{constructor(t){this.parent=t,this._registry=new zV.default,this.interceptors=new QV.default,this.disposed=!1,this.disposables=new Set}register(t,r,i={lifecycle:ai.default.Transient}){this.ensureNotDisposed();let n;if($V.isProvider(r)?n=r:n={useClass:r},Gr.isTokenProvider(n)){let s=[t],a=n;for(;a!=null;){let o=a.useToken;if(s.includes(o))throw new Error(`Token registration cycle detected! ${[...s,o].join(" -> ")}`);s.push(o);let c=this._registry.get(o);c&&Gr.isTokenProvider(c.provider)?a=c.provider:a=null}}if((i.lifecycle===ai.default.Singleton||i.lifecycle==ai.default.ContainerScoped||i.lifecycle==ai.default.ResolutionScoped)&&(Gr.isValueProvider(n)||Gr.isFactoryProvider(n)))throw new Error(`Cannot use lifecycle "${ai.default[i.lifecycle]}" with ValueProviders or FactoryProviders`);return this._registry.set(t,{provider:n,options:i}),this}registerType(t,r){return this.ensureNotDisposed(),Gr.isNormalToken(r)?this.register(t,{useToken:r}):this.register(t,{useClass:r})}registerInstance(t,r){return this.ensureNotDisposed(),this.register(t,{useValue:r})}registerSingleton(t,r){if(this.ensureNotDisposed(),Gr.isNormalToken(t)){if(Gr.isNormalToken(r))return this.register(t,{useToken:r},{lifecycle:ai.default.Singleton});if(r)return this.register(t,{useClass:r},{lifecycle:ai.default.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}let i=t;return r&&!Gr.isNormalToken(r)&&(i=r),this.register(t,{useClass:i},{lifecycle:ai.default.Singleton})}resolve(t,r=new by.default,i=!1){this.ensureNotDisposed();let n=this.getRegistration(t);if(!n&&Gr.isNormalToken(t)){if(i)return;throw new Error(`Attempted to resolve unregistered dependency token: "${t.toString()}"`)}if(this.executePreResolutionInterceptor(t,"Single"),n){let s=this.resolveRegistration(n,r);return this.executePostResolutionInterceptor(t,s,"Single"),s}if(xy.isConstructorToken(t)){let s=this.construct(t,r);return this.executePostResolutionInterceptor(t,s,"Single"),s}throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")}executePreResolutionInterceptor(t,r){if(this.interceptors.preResolution.has(t)){let i=[];for(let n of this.interceptors.preResolution.getAll(t))n.options.frequency!="Once"&&i.push(n),n.callback(t,r);this.interceptors.preResolution.setAll(t,i)}}executePostResolutionInterceptor(t,r,i){if(this.interceptors.postResolution.has(t)){let n=[];for(let s of this.interceptors.postResolution.getAll(t))s.options.frequency!="Once"&&n.push(s),s.callback(t,r,i);this.interceptors.postResolution.setAll(t,n)}}resolveRegistration(t,r){if(this.ensureNotDisposed(),t.options.lifecycle===ai.default.ResolutionScoped&&r.scopedResolutions.has(t))return r.scopedResolutions.get(t);let i=t.options.lifecycle===ai.default.Singleton,n=t.options.lifecycle===ai.default.ContainerScoped,s=i||n,a;return Gr.isValueProvider(t.provider)?a=t.provider.useValue:Gr.isTokenProvider(t.provider)?a=s?t.instance||(t.instance=this.resolve(t.provider.useToken,r)):this.resolve(t.provider.useToken,r):Gr.isClassProvider(t.provider)?a=s?t.instance||(t.instance=this.construct(t.provider.useClass,r)):this.construct(t.provider.useClass,r):Gr.isFactoryProvider(t.provider)?a=t.provider.useFactory(this):a=this.construct(t.provider,r),t.options.lifecycle===ai.default.ResolutionScoped&&r.scopedResolutions.set(t,a),a}resolveAll(t,r=new by.default,i=!1){this.ensureNotDisposed();let n=this.getAllRegistrations(t);if(!n&&Gr.isNormalToken(t)){if(i)return[];throw new Error(`Attempted to resolve unregistered dependency token: "${t.toString()}"`)}if(this.executePreResolutionInterceptor(t,"All"),n){let a=n.map(o=>this.resolveRegistration(o,r));return this.executePostResolutionInterceptor(t,a,"All"),a}let s=[this.construct(t,r)];return this.executePostResolutionInterceptor(t,s,"All"),s}isRegistered(t,r=!1){return this.ensureNotDisposed(),this._registry.has(t)||r&&(this.parent||!1)&&this.parent.isRegistered(t,!0)}reset(){this.ensureNotDisposed(),this._registry.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()}clearInstances(){this.ensureNotDisposed();for(let[t,r]of this._registry.entries())this._registry.setAll(t,r.filter(i=>!Gr.isValueProvider(i.provider)).map(i=>(i.instance=void 0,i)))}createChildContainer(){this.ensureNotDisposed();let t=new e(this);for(let[r,i]of this._registry.entries())i.some(({options:n})=>n.lifecycle===ai.default.ContainerScoped)&&t._registry.setAll(r,i.map(n=>n.options.lifecycle===ai.default.ContainerScoped?{provider:n.provider,options:n.options}:n));return t}beforeResolution(t,r,i={frequency:"Always"}){this.interceptors.preResolution.set(t,{callback:r,options:i})}afterResolution(t,r,i={frequency:"Always"}){this.interceptors.postResolution.set(t,{callback:r,options:i})}dispose(){return HV.__awaiter(this,void 0,void 0,function*(){this.disposed=!0;let t=[];this.disposables.forEach(r=>{let i=r.dispose();i&&t.push(i)}),yield Promise.all(t)})}getRegistration(t){return this.isRegistered(t)?this._registry.get(t):this.parent?this.parent.getRegistration(t):null}getAllRegistrations(t){return this.isRegistered(t)?this._registry.getAll(t):this.parent?this.parent.getAllRegistrations(t):null}construct(t,r){if(t instanceof WV.DelayedConstructor)return t.createProxy(n=>this.resolve(n,r));let i=(()=>{let n=ws.typeInfo.get(t);if(!n||n.length===0){if(t.length===0)return new t;throw new Error(`TypeInfo not known for "${t.name}"`)}let s=n.map(this.resolveParams(r,t));return new t(...s)})();return YV.isDisposable(i)&&this.disposables.add(i),i}resolveParams(t,r){return(i,n)=>{try{return xy.isTokenDescriptor(i)?xy.isTransformDescriptor(i)?i.multiple?this.resolve(i.transform).transform(this.resolveAll(i.token,new by.default,i.isOptional),...i.transformArgs):this.resolve(i.transform).transform(this.resolve(i.token,t,i.isOptional),...i.transformArgs):i.multiple?this.resolveAll(i.token,new by.default,i.isOptional):this.resolve(i.token,t,i.isOptional):xy.isTransformDescriptor(i)?this.resolve(i.transform,t).transform(this.resolve(i.token,t),...i.transformArgs):this.resolve(i,t)}catch(s){throw new Error(GV.formatErrorCtor(r,n,s))}}}ensureNotDisposed(){if(this.disposed)throw new Error("This container has been disposed, you cannot interact with a disposed container")}};ws.instance=new L1;ws.default=ws.instance});var Mk=b(q1=>{"use strict";Object.defineProperty(q1,"__esModule",{value:!0});var JV=Lo(),Cs=na(),D1=py(),XV=R1();function ZV(){return function(e){let t=JV.getParamInfo(e);return class extends e{constructor(...r){super(...r.concat(t.slice(r.length).map((i,n)=>{try{return D1.isTokenDescriptor(i)?D1.isTransformDescriptor(i)?i.multiple?Cs.instance.resolve(i.transform).transform(Cs.instance.resolveAll(i.token),...i.transformArgs):Cs.instance.resolve(i.transform).transform(Cs.instance.resolve(i.token),...i.transformArgs):i.multiple?Cs.instance.resolveAll(i.token):Cs.instance.resolve(i.token):D1.isTransformDescriptor(i)?Cs.instance.resolve(i.transform).transform(Cs.instance.resolve(i.token),...i.transformArgs):Cs.instance.resolve(i)}catch(s){let a=n+r.length;throw new Error(XV.formatErrorCtor(e,a,s))}})))}}}}q1.default=ZV});var Vk=b(j1=>{"use strict";Object.defineProperty(j1,"__esModule",{value:!0});var eK=Lo();function tK(e,t){let r={token:e,multiple:!1,isOptional:t&&t.isOptional};return eK.defineInjectionTokenMetadata(r)}j1.default=tK});var _y=b(U1=>{"use strict";Object.defineProperty(U1,"__esModule",{value:!0});var rK=Lo(),iK=na(),Kk=na();function nK(e){return function(t){iK.typeInfo.set(t,rK.getParamInfo(t)),e&&e.token&&(Array.isArray(e.token)?e.token.forEach(r=>{Kk.instance.register(r,t)}):Kk.instance.register(e.token,t))}}U1.default=nK});var Hk=b(F1=>{"use strict";Object.defineProperty(F1,"__esModule",{value:!0});var sK=(ay(),D(sy)),aK=na();function oK(e=[]){return function(t){return e.forEach(r=>{var{token:i,options:n}=r,s=sK.__rest(r,["token","options"]);return aK.instance.register(i,s,n)}),t}}F1.default=oK});var $k=b(M1=>{"use strict";Object.defineProperty(M1,"__esModule",{value:!0});var cK=_y(),uK=na();function lK(){return function(e){cK.default()(e),uK.instance.registerSingleton(e)}}M1.default=lK});var zk=b(V1=>{"use strict";Object.defineProperty(V1,"__esModule",{value:!0});var pK=Lo();function fK(e,t){let r={token:e,multiple:!0,isOptional:t&&t.isOptional};return pK.defineInjectionTokenMetadata(r)}V1.default=fK});var Gk=b(K1=>{"use strict";Object.defineProperty(K1,"__esModule",{value:!0});var dK=Lo();function hK(e,t,...r){let i={token:e,multiple:!0,transform:t,transformArgs:r};return dK.defineInjectionTokenMetadata(i)}K1.default=hK});var Wk=b(H1=>{"use strict";Object.defineProperty(H1,"__esModule",{value:!0});var mK=Lo();function yK(e,t,...r){return mK.defineInjectionTokenMetadata(e,{transformToken:t,args:r})}H1.default=yK});var Yk=b($1=>{"use strict";Object.defineProperty($1,"__esModule",{value:!0});var gK=_y(),vK=na();function xK(e,t){return function(r){gK.default()(r),vK.instance.register(t||r,r,{lifecycle:e})}}$1.default=xK});var Qk=b(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});var bK=Mk();Object.defineProperty(un,"autoInjectable",{enumerable:!0,get:function(){return bK.default}});var _K=Vk();Object.defineProperty(un,"inject",{enumerable:!0,get:function(){return _K.default}});var AK=_y();Object.defineProperty(un,"injectable",{enumerable:!0,get:function(){return AK.default}});var SK=Hk();Object.defineProperty(un,"registry",{enumerable:!0,get:function(){return SK.default}});var wK=$k();Object.defineProperty(un,"singleton",{enumerable:!0,get:function(){return wK.default}});var CK=zk();Object.defineProperty(un,"injectAll",{enumerable:!0,get:function(){return CK.default}});var EK=Gk();Object.defineProperty(un,"injectAllWithTransform",{enumerable:!0,get:function(){return EK.default}});var TK=Wk();Object.defineProperty(un,"injectWithTransform",{enumerable:!0,get:function(){return TK.default}});var IK=Yk();Object.defineProperty(un,"scoped",{enumerable:!0,get:function(){return IK.default}})});var Jk=b(z1=>{"use strict";Object.defineProperty(z1,"__esModule",{value:!0});function BK(e){let t;return r=>(t==null&&(t=e(r)),t)}z1.default=BK});var Xk=b(G1=>{"use strict";Object.defineProperty(G1,"__esModule",{value:!0});function kK(e){let t=new WeakMap;return r=>{let i=t.get(r);return i==null&&(i=e(r),t.set(r,i)),i}}G1.default=kK});var Zk=b(W1=>{"use strict";Object.defineProperty(W1,"__esModule",{value:!0});function PK(e,t,r,i=!0){let n,s;return a=>{let o=e(a);return(!i||s!==o)&&((s=o)?n=a.resolve(t):n=a.resolve(r)),n}}W1.default=PK});var eP=b($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});var NK=Jk();Object.defineProperty($f,"instanceCachingFactory",{enumerable:!0,get:function(){return NK.default}});var RK=Xk();Object.defineProperty($f,"instancePerContainerCachingFactory",{enumerable:!0,get:function(){return RK.default}});var OK=Zk();Object.defineProperty($f,"predicateAwareClassFactory",{enumerable:!0,get:function(){return OK.default}})});var tP=b(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});var Y1=(ay(),D(sy));if(typeof Reflect>"u"||!Reflect.getMetadata)throw new Error(`tsyringe requires a reflect polyfill. Please add 'import "reflect-metadata"' to the top of your entry point.`);var LK=Ok();Object.defineProperty(sa,"Lifecycle",{enumerable:!0,get:function(){return LK.Lifecycle}});Y1.__exportStar(Qk(),sa);Y1.__exportStar(eP(),sa);Y1.__exportStar(C1(),sa);var DK=ly();Object.defineProperty(sa,"delay",{enumerable:!0,get:function(){return DK.delay}});var qK=na();Object.defineProperty(sa,"container",{enumerable:!0,get:function(){return qK.instance}})});var Z1=b(Uo=>{"use strict";var Q1;Object.defineProperty(Uo,"__esModule",{value:!0});Uo.PKCS12AttrSet=Uo.PKCS12Attribute=void 0;var X1=(U(),D(j)),jo=H(),Mu=class{constructor(t={}){this.attrId="",this.attrValues=[],Object.assign(t)}};Uo.PKCS12Attribute=Mu;X1.__decorate([(0,jo.AsnProp)({type:jo.AsnPropTypes.ObjectIdentifier})],Mu.prototype,"attrId",void 0);X1.__decorate([(0,jo.AsnProp)({type:jo.AsnPropTypes.Any,repeated:"set"})],Mu.prototype,"attrValues",void 0);var J1=Q1=class extends jo.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,Q1.prototype)}};Uo.PKCS12AttrSet=J1;Uo.PKCS12AttrSet=J1=Q1=X1.__decorate([(0,jo.AsnType)({type:jo.AsnTypeTypes.Sequence,itemType:Mu})],J1)});var rP=b(zf=>{"use strict";var eA;Object.defineProperty(zf,"__esModule",{value:!0});zf.AuthenticatedSafe=void 0;var jK=(U(),D(j)),tA=H(),UK=Rf(),rA=eA=class extends tA.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,eA.prototype)}};zf.AuthenticatedSafe=rA;zf.AuthenticatedSafe=rA=eA=jK.__decorate([(0,tA.AsnType)({type:tA.AsnTypeTypes.Sequence,itemType:UK.ContentInfo})],rA)});var iA=b(Ze=>{"use strict";Object.defineProperty(Ze,"__esModule",{value:!0});Ze.id_bagtypes=Ze.id_pbewithSHAAnd40BitRC2_CBC=Ze.id_pbeWithSHAAnd128BitRC2_CBC=Ze.id_pbeWithSHAAnd2_KeyTripleDES_CBC=Ze.id_pbeWithSHAAnd3_KeyTripleDES_CBC=Ze.id_pbeWithSHAAnd40BitRC4=Ze.id_pbeWithSHAAnd128BitRC4=Ze.id_pkcs_12PbeIds=Ze.id_pkcs_12=Ze.id_pkcs=Ze.id_rsadsi=void 0;Ze.id_rsadsi="1.2.840.113549";Ze.id_pkcs=`${Ze.id_rsadsi}.1`;Ze.id_pkcs_12=`${Ze.id_pkcs}.12`;Ze.id_pkcs_12PbeIds=`${Ze.id_pkcs_12}.1`;Ze.id_pbeWithSHAAnd128BitRC4=`${Ze.id_pkcs_12PbeIds}.1`;Ze.id_pbeWithSHAAnd40BitRC4=`${Ze.id_pkcs_12PbeIds}.2`;Ze.id_pbeWithSHAAnd3_KeyTripleDES_CBC=`${Ze.id_pkcs_12PbeIds}.3`;Ze.id_pbeWithSHAAnd2_KeyTripleDES_CBC=`${Ze.id_pkcs_12PbeIds}.4`;Ze.id_pbeWithSHAAnd128BitRC2_CBC=`${Ze.id_pkcs_12PbeIds}.5`;Ze.id_pbewithSHAAnd40BitRC2_CBC=`${Ze.id_pkcs_12PbeIds}.6`;Ze.id_bagtypes=`${Ze.id_pkcs_12}.10.1`});var Ay=b(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.id_pkcs_9=Mr.id_SafeContents=Mr.id_SecretBag=Mr.id_CRLBag=Mr.id_certBag=Mr.id_pkcs8ShroudedKeyBag=Mr.id_keyBag=void 0;var Vu=iA();Mr.id_keyBag=`${Vu.id_bagtypes}.1`;Mr.id_pkcs8ShroudedKeyBag=`${Vu.id_bagtypes}.2`;Mr.id_certBag=`${Vu.id_bagtypes}.3`;Mr.id_CRLBag=`${Vu.id_bagtypes}.4`;Mr.id_SecretBag=`${Vu.id_bagtypes}.5`;Mr.id_SafeContents=`${Vu.id_bagtypes}.6`;Mr.id_pkcs_9="1.2.840.113549.1.9"});var nP=b(Mi=>{"use strict";Object.defineProperty(Mi,"__esModule",{value:!0});Mi.id_sdsiCertificate=Mi.id_x509Certificate=Mi.id_certTypes=Mi.CertBag=void 0;var iP=(U(),D(j)),Sy=H(),FK=Ay(),Gf=class{constructor(t={}){this.certId="",this.certValue=new ArrayBuffer(0),Object.assign(this,t)}};Mi.CertBag=Gf;iP.__decorate([(0,Sy.AsnProp)({type:Sy.AsnPropTypes.ObjectIdentifier})],Gf.prototype,"certId",void 0);iP.__decorate([(0,Sy.AsnProp)({type:Sy.AsnPropTypes.Any,context:0})],Gf.prototype,"certValue",void 0);Mi.id_certTypes=`${FK.id_pkcs_9}.22`;Mi.id_x509Certificate=`${Mi.id_certTypes}.1`;Mi.id_sdsiCertificate=`${Mi.id_certTypes}.2`});var aP=b(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.id_x509CRL=Es.id_crlTypes=Es.CRLBag=void 0;var sP=(U(),D(j)),wy=H(),MK=Ay(),Wf=class{constructor(t={}){this.crlId="",this.crltValue=new ArrayBuffer(0),Object.assign(this,t)}};Es.CRLBag=Wf;sP.__decorate([(0,wy.AsnProp)({type:wy.AsnPropTypes.ObjectIdentifier})],Wf.prototype,"crlId",void 0);sP.__decorate([(0,wy.AsnProp)({type:wy.AsnPropTypes.Any,context:0})],Wf.prototype,"crltValue",void 0);Es.id_crlTypes=`${MK.id_pkcs_9}.23`;Es.id_x509CRL=`${Es.id_crlTypes}.1`});var uP=b(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});Ku.EncryptedPrivateKeyInfo=Ku.EncryptedData=void 0;var oP=(U(),D(j)),nA=H(),cP=Je(),Yf=class extends nA.OctetString{};Ku.EncryptedData=Yf;var Qf=class{constructor(t={}){this.encryptionAlgorithm=new cP.AlgorithmIdentifier,this.encryptedData=new Yf,Object.assign(this,t)}};Ku.EncryptedPrivateKeyInfo=Qf;oP.__decorate([(0,nA.AsnProp)({type:cP.AlgorithmIdentifier})],Qf.prototype,"encryptionAlgorithm",void 0);oP.__decorate([(0,nA.AsnProp)({type:Yf})],Qf.prototype,"encryptedData",void 0)});var lP=b(ln=>{"use strict";var sA;Object.defineProperty(ln,"__esModule",{value:!0});ln.PrivateKeyInfo=ln.Attributes=ln.PrivateKey=ln.Version=void 0;var Xf=(U(),D(j)),Ts=H(),oA=Je(),aA;(function(e){e[e.v1=0]="v1"})(aA||(ln.Version=aA={}));var Jf=class extends Ts.OctetString{};ln.PrivateKey=Jf;var Cy=sA=class extends Ts.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,sA.prototype)}};ln.Attributes=Cy;ln.Attributes=Cy=sA=Xf.__decorate([(0,Ts.AsnType)({type:Ts.AsnTypeTypes.Sequence,itemType:oA.Attribute})],Cy);var Fo=class{constructor(t={}){this.version=aA.v1,this.privateKeyAlgorithm=new oA.AlgorithmIdentifier,this.privateKey=new Jf,Object.assign(this,t)}};ln.PrivateKeyInfo=Fo;Xf.__decorate([(0,Ts.AsnProp)({type:Ts.AsnPropTypes.Integer})],Fo.prototype,"version",void 0);Xf.__decorate([(0,Ts.AsnProp)({type:oA.AlgorithmIdentifier})],Fo.prototype,"privateKeyAlgorithm",void 0);Xf.__decorate([(0,Ts.AsnProp)({type:Jf})],Fo.prototype,"privateKey",void 0);Xf.__decorate([(0,Ts.AsnProp)({type:Cy,implicit:!0,context:0,optional:!0})],Fo.prototype,"attributes",void 0)});var Ty=b(Ey=>{"use strict";Object.defineProperty(Ey,"__esModule",{value:!0});var pP=(U(),D(j));pP.__exportStar(uP(),Ey);pP.__exportStar(lP(),Ey)});var dP=b(Zf=>{"use strict";Object.defineProperty(Zf,"__esModule",{value:!0});Zf.KeyBag=void 0;var VK=(U(),D(j)),KK=Ty(),fP=H(),cA=class extends KK.PrivateKeyInfo{};Zf.KeyBag=cA;Zf.KeyBag=cA=VK.__decorate([(0,fP.AsnType)({type:fP.AsnTypeTypes.Sequence})],cA)});var mP=b(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});ed.PKCS8ShroudedKeyBag=void 0;var HK=(U(),D(j)),$K=Ty(),hP=H(),uA=class extends $K.EncryptedPrivateKeyInfo{};ed.PKCS8ShroudedKeyBag=uA;ed.PKCS8ShroudedKeyBag=uA=HK.__decorate([(0,hP.AsnType)({type:hP.AsnTypeTypes.Sequence})],uA)});var gP=b(By=>{"use strict";Object.defineProperty(By,"__esModule",{value:!0});By.SecretBag=void 0;var yP=(U(),D(j)),Iy=H(),td=class{constructor(t={}){this.secretTypeId="",this.secretValue=new ArrayBuffer(0),Object.assign(this,t)}};By.SecretBag=td;yP.__decorate([(0,Iy.AsnProp)({type:Iy.AsnPropTypes.ObjectIdentifier})],td.prototype,"secretTypeId",void 0);yP.__decorate([(0,Iy.AsnProp)({type:Iy.AsnPropTypes.Any,context:0})],td.prototype,"secretValue",void 0)});var vP=b(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});var Hu=(U(),D(j));Hu.__exportStar(nP(),aa);Hu.__exportStar(aP(),aa);Hu.__exportStar(dP(),aa);Hu.__exportStar(mP(),aa);Hu.__exportStar(gP(),aa);Hu.__exportStar(Ay(),aa)});var pA=b(ky=>{"use strict";Object.defineProperty(ky,"__esModule",{value:!0});ky.MacData=void 0;var lA=(U(),D(j)),xP=d1(),$u=H(),zu=class{constructor(t={}){this.mac=new xP.DigestInfo,this.macSalt=new $u.OctetString,this.iterations=1,Object.assign(this,t)}};ky.MacData=zu;lA.__decorate([(0,$u.AsnProp)({type:xP.DigestInfo})],zu.prototype,"mac",void 0);lA.__decorate([(0,$u.AsnProp)({type:$u.OctetString})],zu.prototype,"macSalt",void 0);lA.__decorate([(0,$u.AsnProp)({type:$u.AsnPropTypes.Integer,defaultValue:1})],zu.prototype,"iterations",void 0)});var AP=b(Ny=>{"use strict";Object.defineProperty(Ny,"__esModule",{value:!0});Ny.PFX=void 0;var fA=(U(),D(j)),Py=H(),bP=Rf(),_P=pA(),Gu=class{constructor(t={}){this.version=3,this.authSafe=new bP.ContentInfo,this.macData=new _P.MacData,Object.assign(this,t)}};Ny.PFX=Gu;fA.__decorate([(0,Py.AsnProp)({type:Py.AsnPropTypes.Integer})],Gu.prototype,"version",void 0);fA.__decorate([(0,Py.AsnProp)({type:bP.ContentInfo})],Gu.prototype,"authSafe",void 0);fA.__decorate([(0,Py.AsnProp)({type:_P.MacData,optional:!0})],Gu.prototype,"macData",void 0)});var SP=b(Vo=>{"use strict";var dA;Object.defineProperty(Vo,"__esModule",{value:!0});Vo.SafeContents=Vo.SafeBag=void 0;var Ry=(U(),D(j)),oa=H(),zK=Z1(),Mo=class{constructor(t={}){this.bagId="",this.bagValue=new ArrayBuffer(0),Object.assign(this,t)}};Vo.SafeBag=Mo;Ry.__decorate([(0,oa.AsnProp)({type:oa.AsnPropTypes.ObjectIdentifier})],Mo.prototype,"bagId",void 0);Ry.__decorate([(0,oa.AsnProp)({type:oa.AsnPropTypes.Any,context:0})],Mo.prototype,"bagValue",void 0);Ry.__decorate([(0,oa.AsnProp)({type:zK.PKCS12Attribute,repeated:"set",optional:!0})],Mo.prototype,"bagAttributes",void 0);var hA=dA=class extends oa.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,dA.prototype)}};Vo.SafeContents=hA;Vo.SafeContents=hA=dA=Ry.__decorate([(0,oa.AsnType)({type:oa.AsnTypeTypes.Sequence,itemType:Mo})],hA)});var wP=b(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});var Ko=(U(),D(j));Ko.__exportStar(Z1(),Is);Ko.__exportStar(rP(),Is);Ko.__exportStar(vP(),Is);Ko.__exportStar(pA(),Is);Ko.__exportStar(iA(),Is);Ko.__exportStar(AP(),Is);Ko.__exportStar(SP(),Is)});var CP=b(E=>{"use strict";var mA,yA,gA;Object.defineProperty(E,"__esModule",{value:!0});E.DateOfBirth=E.UnstructuredAddress=E.UnstructuredName=E.EmailAddress=E.EncryptedPrivateKeyInfo=E.UserPKCS12=E.Pkcs7PDU=E.PKCS9String=E.id_at_pseudonym=E.crlTypes=E.id_certTypes=E.id_smime=E.id_pkcs9_mr_signingTimeMatch=E.id_pkcs9_mr_caseIgnoreMatch=E.id_pkcs9_sx_signingTime=E.id_pkcs9_sx_pkcs9String=E.id_pkcs9_at_countryOfResidence=E.id_pkcs9_at_countryOfCitizenship=E.id_pkcs9_at_gender=E.id_pkcs9_at_placeOfBirth=E.id_pkcs9_at_dateOfBirth=E.id_ietf_at=E.id_pkcs9_at_pkcs7PDU=E.id_pkcs9_at_sequenceNumber=E.id_pkcs9_at_randomNonce=E.id_pkcs9_at_encryptedPrivateKeyInfo=E.id_pkcs9_at_pkcs15Token=E.id_pkcs9_at_userPKCS12=E.id_pkcs9_at_localKeyId=E.id_pkcs9_at_friendlyName=E.id_pkcs9_at_smimeCapabilities=E.id_pkcs9_at_extensionRequest=E.id_pkcs9_at_signingDescription=E.id_pkcs9_at_extendedCertificateAttributes=E.id_pkcs9_at_unstructuredAddress=E.id_pkcs9_at_challengePassword=E.id_pkcs9_at_counterSignature=E.id_pkcs9_at_signingTime=E.id_pkcs9_at_messageDigest=E.id_pkcs9_at_contentType=E.id_pkcs9_at_unstructuredName=E.id_pkcs9_at_emailAddress=E.id_pkcs9_oc_naturalPerson=E.id_pkcs9_oc_pkcsEntity=E.id_pkcs9_mr=E.id_pkcs9_sx=E.id_pkcs9_at=E.id_pkcs9_oc=E.id_pkcs9_mo=E.id_pkcs9=void 0;E.SMIMECapabilities=E.SMIMECapability=E.SigningDescription=E.LocalKeyId=E.FriendlyName=E.ExtendedCertificateAttributes=E.ExtensionRequest=E.ChallengePassword=E.CounterSignature=E.SequenceNumber=E.RandomNonce=E.SigningTime=E.MessageDigest=E.ContentType=E.Pseudonym=E.CountryOfResidence=E.CountryOfCitizenship=E.Gender=E.PlaceOfBirth=void 0;var at=(U(),D(j)),me=H(),DA=Rf(),GK=wP(),WK=Ty(),Bs=Je(),YK=P_();E.id_pkcs9="1.2.840.113549.1.9";E.id_pkcs9_mo=`${E.id_pkcs9}.0`;E.id_pkcs9_oc=`${E.id_pkcs9}.24`;E.id_pkcs9_at=`${E.id_pkcs9}.25`;E.id_pkcs9_sx=`${E.id_pkcs9}.26`;E.id_pkcs9_mr=`${E.id_pkcs9}.27`;E.id_pkcs9_oc_pkcsEntity=`${E.id_pkcs9_oc}.1`;E.id_pkcs9_oc_naturalPerson=`${E.id_pkcs9_oc}.2`;E.id_pkcs9_at_emailAddress=`${E.id_pkcs9}.1`;E.id_pkcs9_at_unstructuredName=`${E.id_pkcs9}.2`;E.id_pkcs9_at_contentType=`${E.id_pkcs9}.3`;E.id_pkcs9_at_messageDigest=`${E.id_pkcs9}.4`;E.id_pkcs9_at_signingTime=`${E.id_pkcs9}.5`;E.id_pkcs9_at_counterSignature=`${E.id_pkcs9}.6`;E.id_pkcs9_at_challengePassword=`${E.id_pkcs9}.7`;E.id_pkcs9_at_unstructuredAddress=`${E.id_pkcs9}.8`;E.id_pkcs9_at_extendedCertificateAttributes=`${E.id_pkcs9}.9`;E.id_pkcs9_at_signingDescription=`${E.id_pkcs9}.13`;E.id_pkcs9_at_extensionRequest=`${E.id_pkcs9}.14`;E.id_pkcs9_at_smimeCapabilities=`${E.id_pkcs9}.15`;E.id_pkcs9_at_friendlyName=`${E.id_pkcs9}.20`;E.id_pkcs9_at_localKeyId=`${E.id_pkcs9}.21`;E.id_pkcs9_at_userPKCS12="2.16.840.1.113730.3.1.216";E.id_pkcs9_at_pkcs15Token=`${E.id_pkcs9_at}.1`;E.id_pkcs9_at_encryptedPrivateKeyInfo=`${E.id_pkcs9_at}.2`;E.id_pkcs9_at_randomNonce=`${E.id_pkcs9_at}.3`;E.id_pkcs9_at_sequenceNumber=`${E.id_pkcs9_at}.4`;E.id_pkcs9_at_pkcs7PDU=`${E.id_pkcs9_at}.5`;E.id_ietf_at="1.3.6.1.5.5.7.9";E.id_pkcs9_at_dateOfBirth=`${E.id_ietf_at}.1`;E.id_pkcs9_at_placeOfBirth=`${E.id_ietf_at}.2`;E.id_pkcs9_at_gender=`${E.id_ietf_at}.3`;E.id_pkcs9_at_countryOfCitizenship=`${E.id_ietf_at}.4`;E.id_pkcs9_at_countryOfResidence=`${E.id_ietf_at}.5`;E.id_pkcs9_sx_pkcs9String=`${E.id_pkcs9_sx}.1`;E.id_pkcs9_sx_signingTime=`${E.id_pkcs9_sx}.2`;E.id_pkcs9_mr_caseIgnoreMatch=`${E.id_pkcs9_mr}.1`;E.id_pkcs9_mr_signingTimeMatch=`${E.id_pkcs9_mr}.2`;E.id_smime=`${E.id_pkcs9}.16`;E.id_certTypes=`${E.id_pkcs9}.22`;E.crlTypes=`${E.id_pkcs9}.23`;E.id_at_pseudonym=`${YK.id_at}.65`;var rd=class extends Bs.DirectoryString{constructor(t={}){super(t)}toString(){return{}.toString(),this.ia5String||super.toString()}};E.PKCS9String=rd;at.__decorate([(0,me.AsnProp)({type:me.AsnPropTypes.IA5String})],rd.prototype,"ia5String",void 0);E.PKCS9String=rd=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Choice})],rd);var vA=class extends DA.ContentInfo{};E.Pkcs7PDU=vA;E.Pkcs7PDU=vA=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Sequence})],vA);var xA=class extends GK.PFX{};E.UserPKCS12=xA;E.UserPKCS12=xA=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Sequence})],xA);var bA=class extends WK.EncryptedPrivateKeyInfo{};E.EncryptedPrivateKeyInfo=bA;E.EncryptedPrivateKeyInfo=bA=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Sequence})],bA);var Oy=class{constructor(t=""){this.value=t}toString(){return this.value}};E.EmailAddress=Oy;at.__decorate([(0,me.AsnProp)({type:me.AsnPropTypes.IA5String})],Oy.prototype,"value",void 0);E.EmailAddress=Oy=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Choice})],Oy);var _A=class extends rd{};E.UnstructuredName=_A;E.UnstructuredName=_A=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Choice})],_A);var AA=class extends Bs.DirectoryString{};E.UnstructuredAddress=AA;E.UnstructuredAddress=AA=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Choice})],AA);var Ly=class{constructor(t=new Date){this.value=t}};E.DateOfBirth=Ly;at.__decorate([(0,me.AsnProp)({type:me.AsnPropTypes.GeneralizedTime})],Ly.prototype,"value",void 0);E.DateOfBirth=Ly=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Choice})],Ly);var SA=class extends Bs.DirectoryString{};E.PlaceOfBirth=SA;E.PlaceOfBirth=SA=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Choice})],SA);var Dy=class{constructor(t="M"){this.value=t}toString(){return this.value}};E.Gender=Dy;at.__decorate([(0,me.AsnProp)({type:me.AsnPropTypes.PrintableString})],Dy.prototype,"value",void 0);E.Gender=Dy=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Choice})],Dy);var id=class{constructor(t=""){this.value=t}toString(){return this.value}};E.CountryOfCitizenship=id;at.__decorate([(0,me.AsnProp)({type:me.AsnPropTypes.PrintableString})],id.prototype,"value",void 0);E.CountryOfCitizenship=id=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Choice})],id);var wA=class extends id{};E.CountryOfResidence=wA;E.CountryOfResidence=wA=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Choice})],wA);var CA=class extends Bs.DirectoryString{};E.Pseudonym=CA;E.Pseudonym=CA=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Choice})],CA);var qy=class{constructor(t=""){this.value=t}toString(){return this.value}};E.ContentType=qy;at.__decorate([(0,me.AsnProp)({type:me.AsnPropTypes.ObjectIdentifier})],qy.prototype,"value",void 0);E.ContentType=qy=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Choice})],qy);var EA=class extends me.OctetString{};E.MessageDigest=EA;var TA=class extends Bs.Time{};E.SigningTime=TA;E.SigningTime=TA=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Choice})],TA);var IA=class extends me.OctetString{};E.RandomNonce=IA;var jy=class{constructor(t=0){this.value=t}toString(){return this.value.toString()}};E.SequenceNumber=jy;at.__decorate([(0,me.AsnProp)({type:me.AsnPropTypes.Integer})],jy.prototype,"value",void 0);E.SequenceNumber=jy=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Choice})],jy);var BA=class extends DA.SignerInfo{};E.CounterSignature=BA;E.CounterSignature=BA=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Sequence})],BA);var kA=class extends Bs.DirectoryString{};E.ChallengePassword=kA;E.ChallengePassword=kA=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Choice})],kA);var PA=mA=class extends Bs.Extensions{constructor(t){super(t),Object.setPrototypeOf(this,mA.prototype)}};E.ExtensionRequest=PA;E.ExtensionRequest=PA=mA=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Sequence})],PA);var NA=yA=class extends me.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,yA.prototype)}};E.ExtendedCertificateAttributes=NA;E.ExtendedCertificateAttributes=NA=yA=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Set,itemType:DA.Attribute})],NA);var Uy=class{constructor(t=""){this.value=t}toString(){return this.value}};E.FriendlyName=Uy;at.__decorate([(0,me.AsnProp)({type:me.AsnPropTypes.BmpString})],Uy.prototype,"value",void 0);E.FriendlyName=Uy=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Choice})],Uy);var RA=class extends me.OctetString{};E.LocalKeyId=RA;var OA=class extends Bs.DirectoryString{};E.SigningDescription=OA;var Fy=class extends Bs.AlgorithmIdentifier{};E.SMIMECapability=Fy;E.SMIMECapability=Fy=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Sequence})],Fy);var LA=gA=class extends me.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,gA.prototype)}};E.SMIMECapabilities=LA;E.SMIMECapabilities=LA=gA=at.__decorate([(0,me.AsnType)({type:me.AsnTypeTypes.Sequence,itemType:Fy})],LA)});var FA=b(nd=>{"use strict";var qA;Object.defineProperty(nd,"__esModule",{value:!0});nd.Attributes=void 0;var QK=(U(),D(j)),jA=H(),JK=Je(),UA=qA=class extends jA.AsnArray{constructor(t){super(t),Object.setPrototypeOf(this,qA.prototype)}};nd.Attributes=UA;nd.Attributes=UA=qA=QK.__decorate([(0,jA.AsnType)({type:jA.AsnTypeTypes.Sequence,itemType:JK.Attribute})],UA)});var MA=b(Ky=>{"use strict";Object.defineProperty(Ky,"__esModule",{value:!0});Ky.CertificationRequestInfo=void 0;var Vy=(U(),D(j)),sd=H(),My=Je(),EP=FA(),Ho=class{constructor(t={}){this.version=0,this.subject=new My.Name,this.subjectPKInfo=new My.SubjectPublicKeyInfo,this.attributes=new EP.Attributes,Object.assign(this,t)}};Ky.CertificationRequestInfo=Ho;Vy.__decorate([(0,sd.AsnProp)({type:sd.AsnPropTypes.Integer})],Ho.prototype,"version",void 0);Vy.__decorate([(0,sd.AsnProp)({type:My.Name})],Ho.prototype,"subject",void 0);Vy.__decorate([(0,sd.AsnProp)({type:My.SubjectPublicKeyInfo})],Ho.prototype,"subjectPKInfo",void 0);Vy.__decorate([(0,sd.AsnProp)({type:EP.Attributes,implicit:!0,context:0,optional:!0})],Ho.prototype,"attributes",void 0)});var BP=b($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0});$y.CertificationRequest=void 0;var VA=(U(),D(j)),Hy=H(),TP=MA(),IP=Je(),Wu=class{constructor(t={}){this.certificationRequestInfo=new TP.CertificationRequestInfo,this.signatureAlgorithm=new IP.AlgorithmIdentifier,this.signature=new ArrayBuffer(0),Object.assign(this,t)}};$y.CertificationRequest=Wu;VA.__decorate([(0,Hy.AsnProp)({type:TP.CertificationRequestInfo,raw:!0})],Wu.prototype,"certificationRequestInfo",void 0);VA.__decorate([(0,Hy.AsnProp)({type:IP.AlgorithmIdentifier})],Wu.prototype,"signatureAlgorithm",void 0);VA.__decorate([(0,Hy.AsnProp)({type:Hy.AsnPropTypes.BitString})],Wu.prototype,"signature",void 0)});var kP=b(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});var KA=(U(),D(j));KA.__exportStar(FA(),ad);KA.__exportStar(BP(),ad);KA.__exportStar(MA(),ad)});var hN=b(Z=>{"use strict";x2();var V=H(),ge=Je(),X=us(),$=(U(),D(j)),XK=Rf(),sg=_k(),ci=d1(),vt=tP(),QA=CP(),ag=kP();function Yd(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(r){if(r!=="default"){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}}),t.default=e,Object.freeze(t)}var M=Yd(ge),oi=Yd(XK),Bt=Yd(sg),gt=Yd(ci),rl=Yd(QA),ol="crypto.algorithm",og=class{getAlgorithms(){return vt.container.resolveAll(ol)}toAsnAlgorithm(t){({...t});for(let r of this.getAlgorithms()){let i=r.toAsnAlgorithm(t);if(i)return i}if(/^[0-9.]+$/.test(t.name)){let r=new ge.AlgorithmIdentifier({algorithm:t.name});if("parameters"in t){let i=t;r.parameters=i.parameters}return r}throw new Error("Cannot convert WebCrypto algorithm to ASN.1 algorithm")}toWebAlgorithm(t){for(let i of this.getAlgorithms()){let n=i.toWebAlgorithm(t);if(n)return n}return{name:t.algorithm,parameters:t.parameters}}},dn="crypto.algorithmProvider";vt.container.registerSingleton(dn,og);var Wy,fi="1.3.36.3.3.2.8.1.1",PP=`${fi}.1`,NP=`${fi}.2`,RP=`${fi}.3`,OP=`${fi}.4`,LP=`${fi}.5`,DP=`${fi}.6`,qP=`${fi}.7`,jP=`${fi}.8`,UP=`${fi}.9`,FP=`${fi}.10`,MP=`${fi}.11`,VP=`${fi}.12`,KP=`${fi}.13`,HP=`${fi}.14`,$P="brainpoolP160r1",zP="brainpoolP160t1",GP="brainpoolP192r1",WP="brainpoolP192t1",YP="brainpoolP224r1",QP="brainpoolP224t1",JP="brainpoolP256r1",XP="brainpoolP256t1",ZP="brainpoolP320r1",eN="brainpoolP320t1",tN="brainpoolP384r1",rN="brainpoolP384t1",iN="brainpoolP512r1",nN="brainpoolP512t1",jt="ECDSA";Z.EcAlgorithm=Wy=class{toAsnAlgorithm(t){switch(t.name.toLowerCase()){case jt.toLowerCase():if("hash"in t)switch((typeof t.hash=="string"?t.hash:t.hash.name).toLowerCase()){case"sha-1":return Bt.ecdsaWithSHA1;case"sha-256":return Bt.ecdsaWithSHA256;case"sha-384":return Bt.ecdsaWithSHA384;case"sha-512":return Bt.ecdsaWithSHA512}else if("namedCurve"in t){let r="";switch(t.namedCurve){case"P-256":r=Bt.id_secp256r1;break;case"K-256":r=Wy.SECP256K1;break;case"P-384":r=Bt.id_secp384r1;break;case"P-521":r=Bt.id_secp521r1;break;case $P:r=PP;break;case zP:r=NP;break;case GP:r=RP;break;case WP:r=OP;break;case YP:r=LP;break;case QP:r=DP;break;case JP:r=qP;break;case XP:r=jP;break;case ZP:r=UP;break;case eN:r=FP;break;case tN:r=MP;break;case rN:r=VP;break;case iN:r=KP;break;case nN:r=HP;break}if(r)return new ge.AlgorithmIdentifier({algorithm:Bt.id_ecPublicKey,parameters:V.AsnConvert.serialize(new Bt.ECParameters({namedCurve:r}))})}}return null}toWebAlgorithm(t){switch(t.algorithm){case Bt.id_ecdsaWithSHA1:return{name:jt,hash:{name:"SHA-1"}};case Bt.id_ecdsaWithSHA256:return{name:jt,hash:{name:"SHA-256"}};case Bt.id_ecdsaWithSHA384:return{name:jt,hash:{name:"SHA-384"}};case Bt.id_ecdsaWithSHA512:return{name:jt,hash:{name:"SHA-512"}};case Bt.id_ecPublicKey:{if(!t.parameters)throw new TypeError("Cannot get required parameters from EC algorithm");switch(V.AsnConvert.parse(t.parameters,Bt.ECParameters).namedCurve){case Bt.id_secp256r1:return{name:jt,namedCurve:"P-256"};case Wy.SECP256K1:return{name:jt,namedCurve:"K-256"};case Bt.id_secp384r1:return{name:jt,namedCurve:"P-384"};case Bt.id_secp521r1:return{name:jt,namedCurve:"P-521"};case PP:return{name:jt,namedCurve:$P};case NP:return{name:jt,namedCurve:zP};case RP:return{name:jt,namedCurve:GP};case OP:return{name:jt,namedCurve:WP};case LP:return{name:jt,namedCurve:YP};case DP:return{name:jt,namedCurve:QP};case qP:return{name:jt,namedCurve:JP};case jP:return{name:jt,namedCurve:XP};case UP:return{name:jt,namedCurve:ZP};case FP:return{name:jt,namedCurve:eN};case MP:return{name:jt,namedCurve:tN};case VP:return{name:jt,namedCurve:rN};case KP:return{name:jt,namedCurve:iN};case HP:return{name:jt,namedCurve:nN}}}}return null}};Z.EcAlgorithm.SECP256K1="1.3.132.0.10";Z.EcAlgorithm=Wy=$.__decorate([vt.injectable()],Z.EcAlgorithm);vt.container.registerSingleton(ol,Z.EcAlgorithm);var lN=Symbol("name"),pN=Symbol("value"),Fe=class{constructor(t,r={},i=""){this[lN]=t,this[pN]=i;for(let n in r)this[n]=r[n]}};Fe.NAME=lN;Fe.VALUE=pN;var cg=class{static toTextObject(t){let r=new Fe("Algorithm Identifier",{},Vi.toString(t.algorithm));if(t.parameters)if(t.algorithm===Bt.id_ecPublicKey){let i=new Z.EcAlgorithm().toWebAlgorithm(t);i&&"namedCurve"in i?r["Named Curve"]=i.namedCurve:r.Parameters=t.parameters}else r.Parameters=t.parameters;return r}},Vi=class{static toString(t){let r=this.items[t];return r||t}};Vi.items={[gt.id_sha1]:"sha1",[gt.id_sha224]:"sha224",[gt.id_sha256]:"sha256",[gt.id_sha384]:"sha384",[gt.id_sha512]:"sha512",[gt.id_rsaEncryption]:"rsaEncryption",[gt.id_sha1WithRSAEncryption]:"sha1WithRSAEncryption",[gt.id_sha224WithRSAEncryption]:"sha224WithRSAEncryption",[gt.id_sha256WithRSAEncryption]:"sha256WithRSAEncryption",[gt.id_sha384WithRSAEncryption]:"sha384WithRSAEncryption",[gt.id_sha512WithRSAEncryption]:"sha512WithRSAEncryption",[Bt.id_ecPublicKey]:"ecPublicKey",[Bt.id_ecdsaWithSHA1]:"ecdsaWithSHA1",[Bt.id_ecdsaWithSHA224]:"ecdsaWithSHA224",[Bt.id_ecdsaWithSHA256]:"ecdsaWithSHA256",[Bt.id_ecdsaWithSHA384]:"ecdsaWithSHA384",[Bt.id_ecdsaWithSHA512]:"ecdsaWithSHA512",[M.id_kp_serverAuth]:"TLS WWW server authentication",[M.id_kp_clientAuth]:"TLS WWW client authentication",[M.id_kp_codeSigning]:"Code Signing",[M.id_kp_emailProtection]:"E-mail Protection",[M.id_kp_timeStamping]:"Time Stamping",[M.id_kp_OCSPSigning]:"OCSP Signing",[oi.id_signedData]:"Signed Data"};var hn=class{static serialize(t){return this.serializeObj(t).join(`
|
|
9
|
+
`)}static pad(t=0){return"".padStart(2*t," ")}static serializeObj(t,r=0){let i=[],n=this.pad(r++),s="",a=t[Fe.VALUE];a&&(s=` ${a}`),i.push(`${n}${t[Fe.NAME]}:${s}`),n=this.pad(r);for(let o in t){if(typeof o=="symbol")continue;let c=t[o],u=o?`${o}: `:"";if(typeof c=="string"||typeof c=="number"||typeof c=="boolean")i.push(`${n}${u}${c}`);else if(c instanceof Date)i.push(`${n}${u}${c.toUTCString()}`);else if(Array.isArray(c))for(let l of c)l[Fe.NAME]=o,i.push(...this.serializeObj(l,r));else if(c instanceof Fe)c[Fe.NAME]=o,i.push(...this.serializeObj(c,r));else if(X.BufferSourceConverter.isBufferSource(c))o?(i.push(`${n}${u}`),i.push(...this.serializeBufferSource(c,r+1))):i.push(...this.serializeBufferSource(c,r));else if("toTextObject"in c){let l=c.toTextObject();l[Fe.NAME]=o,i.push(...this.serializeObj(l,r))}else throw new TypeError("Cannot serialize data in text format. Unsupported type.")}return i}static serializeBufferSource(t,r=0){let i=this.pad(r),n=X.BufferSourceConverter.toUint8Array(t),s=[];for(let a=0;a<n.length;){let o=[];for(let c=0;c<16&&a<n.length;c++){c===8&&o.push("");let u=n[a++].toString(16).padStart(2,"0");o.push(u)}s.push(`${i}${o.join(" ")}`)}return s}static serializeAlgorithm(t){return this.algorithmSerializer.toTextObject(t)}};hn.oidSerializer=Vi;hn.algorithmSerializer=cg;var Yu,Vn=class e{get rawData(){return $.__classPrivateFieldGet(this,Yu,"f")||$.__classPrivateFieldSet(this,Yu,V.AsnConvert.serialize(this.asn),"f"),$.__classPrivateFieldGet(this,Yu,"f")}constructor(...t){Yu.set(this,void 0),X.BufferSourceConverter.isBufferSource(t[0])?(this.asn=V.AsnConvert.parse(t[0],t[1]),$.__classPrivateFieldSet(this,Yu,X.BufferSourceConverter.toArrayBuffer(t[0]),"f"),this.onInit(this.asn)):(this.asn=t[0],this.onInit(this.asn))}equal(t){return t instanceof e?X.isEqual(t.rawData,this.rawData):!1}toString(t="text"){switch(t){case"asn":return V.AsnConvert.toString(this.rawData);case"text":return hn.serialize(this.toTextObject());case"hex":return X.Convert.ToHex(this.rawData);case"base64":return X.Convert.ToBase64(this.rawData);case"base64url":return X.Convert.ToBase64Url(this.rawData);default:throw TypeError("Argument 'format' is unsupported value")}}getTextName(){return this.constructor.NAME}toTextObject(){let t=this.toTextObjectEmpty();return t[""]=this.rawData,t}toTextObjectEmpty(t){return new Fe(this.getTextName(),{},t)}};Yu=new WeakMap;Vn.NAME="ASN";var ui=class e extends Vn{constructor(...t){let r;X.BufferSourceConverter.isBufferSource(t[0])?r=X.BufferSourceConverter.toArrayBuffer(t[0]):r=V.AsnConvert.serialize(new ge.Extension({extnID:t[0],critical:t[1],extnValue:new V.OctetString(X.BufferSourceConverter.toArrayBuffer(t[2]))})),super(r,ge.Extension)}onInit(t){this.type=t.extnID,this.critical=t.critical,this.value=t.extnValue.buffer}toTextObject(){let t=this.toTextObjectWithoutValue();return t[""]=this.value,t}toTextObjectWithoutValue(){let t=this.toTextObjectEmpty(this.critical?"critical":void 0);return t[Fe.NAME]===e.NAME&&(t[Fe.NAME]=Vi.toString(this.type)),t}},fN,il=class e{static isCryptoKeyPair(t){return t&&t.privateKey&&t.publicKey}static isCryptoKey(t){return t&&t.usages&&t.type&&t.algorithm&&t.extractable!==void 0}constructor(){this.items=new Map,this[fN]="CryptoProvider",typeof self<"u"&&typeof crypto<"u"?this.set(e.DEFAULT,crypto):typeof global<"u"&&global.crypto&&global.crypto.subtle&&this.set(e.DEFAULT,global.crypto)}clear(){this.items.clear()}delete(t){return this.items.delete(t)}forEach(t,r){return this.items.forEach(t,r)}has(t){return this.items.has(t)}get size(){return this.items.size}entries(){return this.items.entries()}keys(){return this.items.keys()}values(){return this.items.values()}[Symbol.iterator](){return this.items[Symbol.iterator]()}get(t=e.DEFAULT){let r=this.items.get(t.toLowerCase());if(!r)throw new Error(`Cannot get Crypto by name '${t}'`);return r}set(t,r){if(typeof t=="string"){if(!r)throw new TypeError("Argument 'value' is required");this.items.set(t.toLowerCase(),r)}else this.items.set(e.DEFAULT,t);return this}};fN=Symbol.toStringTag;il.DEFAULT="default";var kt=new il,ZK=/^[0-2](?:\.[1-9][0-9]*)+$/;function e9(e){return new RegExp(ZK).test(e)}var Ld=class{constructor(t={}){this.items={};for(let r in t)this.register(r,t[r])}get(t){return this.items[t]||null}findId(t){return e9(t)?t:this.get(t)}register(t,r){this.items[t]=r,this.items[r]=t}},li=new Ld;li.register("CN","2.5.4.3");li.register("L","2.5.4.7");li.register("ST","2.5.4.8");li.register("O","2.5.4.10");li.register("OU","2.5.4.11");li.register("C","2.5.4.6");li.register("DC","0.9.2342.19200300.100.1.25");li.register("E","1.2.840.113549.1.9.1");li.register("G","2.5.4.42");li.register("I","2.5.4.43");li.register("SN","2.5.4.4");li.register("T","2.5.4.12");function t9(e,t){return`\\${X.Convert.ToHex(X.Convert.FromUtf8String(t)).toUpperCase()}`}function r9(e){return e.replace(/([,+"\\<>;])/g,"\\$1").replace(/^([ #])/,"\\$1").replace(/([ ]$)/,"\\$1").replace(/([\r\n\t])/,t9)}var mr=class e{static isASCII(t){for(let r=0;r<t.length;r++)if(t.charCodeAt(r)>255)return!1;return!0}static isPrintableString(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/g.test(t)}constructor(t,r={}){this.extraNames=new Ld,this.asn=new ge.Name;for(let i in r)if(Object.prototype.hasOwnProperty.call(r,i)){let n=r[i];this.extraNames.register(i,n)}typeof t=="string"?this.asn=this.fromString(t):t instanceof ge.Name?this.asn=t:X.BufferSourceConverter.isBufferSource(t)?this.asn=V.AsnConvert.parse(t,ge.Name):this.asn=this.fromJSON(t)}getField(t){let r=this.extraNames.findId(t)||li.findId(t),i=[];for(let n of this.asn)for(let s of n)s.type===r&&i.push(s.value.toString());return i}getName(t){return this.extraNames.get(t)||li.get(t)}toString(){return this.asn.map(t=>t.map(r=>{let i=this.getName(r.type)||r.type,n=r.value.anyValue?`#${X.Convert.ToHex(r.value.anyValue)}`:r9(r.value.toString());return`${i}=${n}`}).join("+")).join(", ")}toJSON(){var t;let r=[];for(let i of this.asn){let n={};for(let s of i){let a=this.getName(s.type)||s.type;(t=n[a])!==null&&t!==void 0||(n[a]=[]),n[a].push(s.value.anyValue?`#${X.Convert.ToHex(s.value.anyValue)}`:s.value.toString())}r.push(n)}return r}fromString(t){let r=new ge.Name,i=/(\d\.[\d.]*\d|[A-Za-z]+)=((?:"")|(?:".*?[^\\]")|(?:[^,+"\\](?=[,+]|$))|(?:[^,+].*?(?:[^\\][,+]))|(?:))([,+])?/g,n=null,s=",";for(;n=i.exec(`${t},`);){let[,a,o]=n,c=o[o.length-1];(c===","||c==="+")&&(o=o.slice(0,o.length-1),n[3]=c);let u=n[3];a=this.getTypeOid(a);let l=this.createAttribute(a,o);s==="+"?r[r.length-1].push(l):r.push(new ge.RelativeDistinguishedName([l])),s=u}return r}fromJSON(t){let r=new ge.Name;for(let i of t){let n=new ge.RelativeDistinguishedName;for(let s in i){let a=this.getTypeOid(s),o=i[s];for(let c of o){let u=this.createAttribute(a,c);n.push(u)}}r.push(n)}return r}getTypeOid(t){if(/[\d.]+/.test(t)||(t=this.getName(t)||""),!t)throw new Error(`Cannot get OID for name type '${t}'`);return t}createAttribute(t,r){let i=new ge.AttributeTypeAndValue({type:t});if(typeof r=="object")for(let n in r)switch(n){case"ia5String":i.value.ia5String=r[n];break;case"utf8String":i.value.utf8String=r[n];break;case"universalString":i.value.universalString=r[n];break;case"bmpString":i.value.bmpString=r[n];break;case"printableString":i.value.printableString=r[n];break}else if(r[0]==="#")i.value.anyValue=X.Convert.FromHex(r.slice(1));else{let n=this.processStringValue(r);t===this.getName("E")||t===this.getName("DC")?i.value.ia5String=n:e.isPrintableString(n)?i.value.printableString=n:i.value.utf8String=n}return i}processStringValue(t){let r=/"(.*?[^\\])?"/.exec(t);return r&&(t=r[1]),t.replace(/\\0a/ig,`
|
|
10
|
+
`).replace(/\\0d/ig,"\r").replace(/\\0g/ig," ").replace(/\\(.)/g,"$1")}toArrayBuffer(){return V.AsnConvert.serialize(this.asn)}async getThumbprint(...t){var r;let i,n="SHA-1";return t.length>=1&&!(!((r=t[0])===null||r===void 0)&&r.subtle)?(n=t[0]||n,i=t[1]||kt.get()):i=t[0]||kt.get(),await i.subtle.digest(n,this.toArrayBuffer())}},dN="Cannot initialize GeneralName from ASN.1 data.",sN=`${dN} Unsupported string format in use.`,i9=`${dN} Value doesn't match to GUID regular expression.`,aN=/^([0-9a-f]{8})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{4})-?([0-9a-f]{12})$/i,oN="1.3.6.1.4.1.311.25.1",cN="1.3.6.1.4.1.311.20.2.3",Yy="dns",Qy="dn",Jy="email",Xy="ip",Zy="url",eg="guid",tg="upn",od="id",pn=class extends Vn{constructor(...t){let r;if(t.length===2)switch(t[0]){case Qy:{let i=new mr(t[1]).toArrayBuffer(),n=V.AsnConvert.parse(i,M.Name);r=new M.GeneralName({directoryName:n});break}case Yy:r=new M.GeneralName({dNSName:t[1]});break;case Jy:r=new M.GeneralName({rfc822Name:t[1]});break;case eg:{let i=new RegExp(aN,"i").exec(t[1]);if(!i)throw new Error("Cannot parse GUID value. Value doesn't match to regular expression");let n=i.slice(1).map((s,a)=>a<3?X.Convert.ToHex(new Uint8Array(X.Convert.FromHex(s)).reverse()):s).join("");r=new M.GeneralName({otherName:new M.OtherName({typeId:oN,value:V.AsnConvert.serialize(new V.OctetString(X.Convert.FromHex(n)))})});break}case Xy:r=new M.GeneralName({iPAddress:t[1]});break;case od:r=new M.GeneralName({registeredID:t[1]});break;case tg:{r=new M.GeneralName({otherName:new M.OtherName({typeId:cN,value:V.AsnConvert.serialize(V.AsnUtf8StringConverter.toASN(t[1]))})});break}case Zy:r=new M.GeneralName({uniformResourceIdentifier:t[1]});break;default:throw new Error("Cannot create GeneralName. Unsupported type of the name")}else X.BufferSourceConverter.isBufferSource(t[0])?r=V.AsnConvert.parse(t[0],M.GeneralName):r=t[0];super(r)}onInit(t){if(t.dNSName!=null)this.type=Yy,this.value=t.dNSName;else if(t.rfc822Name!=null)this.type=Jy,this.value=t.rfc822Name;else if(t.iPAddress!=null)this.type=Xy,this.value=t.iPAddress;else if(t.uniformResourceIdentifier!=null)this.type=Zy,this.value=t.uniformResourceIdentifier;else if(t.registeredID!=null)this.type=od,this.value=t.registeredID;else if(t.directoryName!=null)this.type=Qy,this.value=new mr(t.directoryName).toString();else if(t.otherName!=null)if(t.otherName.typeId===oN){this.type=eg;let r=V.AsnConvert.parse(t.otherName.value,V.OctetString),i=new RegExp(aN,"i").exec(X.Convert.ToHex(r));if(!i)throw new Error(i9);this.value=i.slice(1).map((n,s)=>s<3?X.Convert.ToHex(new Uint8Array(X.Convert.FromHex(n)).reverse()):n).join("-")}else if(t.otherName.typeId===cN)this.type=tg,this.value=V.AsnConvert.parse(t.otherName.value,M.DirectoryString).toString();else throw new Error(sN);else throw new Error(sN)}toJSON(){return{type:this.type,value:this.value}}toTextObject(){let t;switch(this.type){case Qy:case Yy:case eg:case Xy:case od:case tg:case Zy:t=this.type.toUpperCase();break;case Jy:t="Email";break;default:throw new Error("Unsupported GeneralName type")}let r=this.value;return this.type===od&&(r=Vi.toString(r)),new Fe(t,void 0,r)}},Kn=class extends Vn{constructor(t){let r;if(t instanceof M.GeneralNames)r=t;else if(Array.isArray(t)){let i=[];for(let n of t)if(n instanceof M.GeneralName)i.push(n);else{let s=V.AsnConvert.parse(new pn(n.type,n.value).rawData,M.GeneralName);i.push(s)}r=new M.GeneralNames(i)}else if(X.BufferSourceConverter.isBufferSource(t))r=V.AsnConvert.parse(t,M.GeneralNames);else throw new Error("Cannot initialize GeneralNames. Incorrect incoming arguments");super(r)}onInit(t){let r=[];for(let i of t){let n=null;try{n=new pn(i)}catch{continue}r.push(n)}this.items=r}toJSON(){return this.items.map(t=>t.toJSON())}toTextObject(){let t=super.toTextObjectEmpty();for(let r of this.items){let i=r.toTextObject(),n=t[i[Fe.NAME]];Array.isArray(n)||(n=[],t[i[Fe.NAME]]=n),n.push(i)}return t}};Kn.NAME="GeneralNames";var Od="-{5}",Dd="\\n",n9=`[^${Dd}]+`,s9=`${Od}BEGIN (${n9}(?=${Od}))${Od}`,a9=`${Od}END \\1${Od}`,nl="\\n",o9=`[^:${Dd}]+`,c9=`(?:[^${Dd}]+${nl}(?: +[^${Dd}]+${nl})*)`,u9="[a-zA-Z0-9=+/]+",l9=`(?:${u9}${nl})+`,uN=`${s9}${nl}(?:((?:${o9}: ${c9})+))?${nl}?(${l9})${a9}`,br=class{static isPem(t){return typeof t=="string"&&new RegExp(uN,"g").test(t.replace(/\r/g,""))}static decodeWithHeaders(t){t=t.replace(/\r/g,"");let r=new RegExp(uN,"g"),i=[],n=null;for(;n=r.exec(t);){let s=n[3].replace(new RegExp(`[${Dd}]+`,"g"),""),a={type:n[1],headers:[],rawData:X.Convert.FromBase64(s)},o=n[2];if(o){let c=o.split(new RegExp(nl,"g")),u=null;for(let l of c){let[p,d]=l.split(/:(.*)/);if(d===void 0){if(!u)throw new Error("Cannot parse PEM string. Incorrect header value");u.value+=p.trim()}else u&&a.headers.push(u),u={key:p,value:d.trim()}}u&&a.headers.push(u)}i.push(a)}return i}static decode(t){return this.decodeWithHeaders(t).map(i=>i.rawData)}static decodeFirst(t){let r=this.decode(t);if(!r.length)throw new RangeError("PEM string doesn't contain any objects");return r[0]}static encode(t,r){if(Array.isArray(t)){let i=new Array;return r?t.forEach(n=>{if(!X.BufferSourceConverter.isBufferSource(n))throw new TypeError("Cannot encode array of BufferSource in PEM format. Not all items of the array are BufferSource");i.push(this.encodeStruct({type:r,rawData:X.BufferSourceConverter.toArrayBuffer(n)}))}):t.forEach(n=>{if(!("type"in n))throw new TypeError("Cannot encode array of PemStruct in PEM format. Not all items of the array are PemStrut");i.push(this.encodeStruct(n))}),i.join(`
|
|
11
|
+
`)}else{if(!r)throw new Error("Required argument 'tag' is missed");return this.encodeStruct({type:r,rawData:X.BufferSourceConverter.toArrayBuffer(t)})}}static encodeStruct(t){var r;let i=t.type.toLocaleUpperCase(),n=[];if(n.push(`-----BEGIN ${i}-----`),!((r=t.headers)===null||r===void 0)&&r.length){for(let u of t.headers)n.push(`${u.key}: ${u.value}`);n.push("")}let s=X.Convert.ToBase64(t.rawData),a,o=0,c=Array();for(;o<s.length&&(s.length-o<64?a=s.substring(o):(a=s.substring(o,o+64),o+=64),a.length!==0);)if(c.push(a),a.length<64)break;return n.push(...c),n.push(`-----END ${i}-----`),n.join(`
|
|
12
|
+
`)}};br.CertificateTag="CERTIFICATE";br.CrlTag="CRL";br.CertificateRequestTag="CERTIFICATE REQUEST";br.PublicKeyTag="PUBLIC KEY";br.PrivateKeyTag="PRIVATE KEY";var pi=class e extends Vn{static isAsnEncoded(t){return X.BufferSourceConverter.isBufferSource(t)||typeof t=="string"}static toArrayBuffer(t){if(typeof t=="string"){if(br.isPem(t))return br.decode(t)[0];if(X.Convert.isHex(t))return X.Convert.FromHex(t);if(X.Convert.isBase64(t))return X.Convert.FromBase64(t);if(X.Convert.isBase64Url(t))return X.Convert.FromBase64Url(t);throw new TypeError("Unsupported format of 'raw' argument. Must be one of DER, PEM, HEX, Base64, or Base4Url")}else{let r=X.BufferSourceConverter.toUint8Array(t);if(r.length>0&&r[0]===48)return X.BufferSourceConverter.toArrayBuffer(t);let i=X.Convert.ToBinary(t);if(br.isPem(i))return br.decode(i)[0];if(X.Convert.isHex(i))return X.Convert.FromHex(i);if(X.Convert.isBase64(i))return X.Convert.FromBase64(i);if(X.Convert.isBase64Url(i))return X.Convert.FromBase64Url(i);throw new TypeError("Unsupported format of 'raw' argument. Must be one of DER, PEM, HEX, Base64, or Base4Url")}}constructor(...t){e.isAsnEncoded(t[0])?super(e.toArrayBuffer(t[0]),t[1]):super(t[0])}toString(t="pem"){return t==="pem"?br.encode(this.rawData,this.tag):super.toString(t)}},fn=class e extends pi{static async create(t,r=kt.get()){if(t instanceof e)return t;if(il.isCryptoKey(t)){if(t.type!=="public")throw new TypeError("Public key is required");let i=await r.subtle.exportKey("spki",t);return new e(i)}else{if(t.publicKey)return t.publicKey;if(X.BufferSourceConverter.isBufferSource(t))return new e(t);throw new TypeError("Unsupported PublicKeyType")}}constructor(t){pi.isAsnEncoded(t)?super(t,ge.SubjectPublicKeyInfo):super(t),this.tag=br.PublicKeyTag}async export(...t){let r,i=["verify"],n={hash:"SHA-256",...this.algorithm};t.length>1?(n=t[0]||n,i=t[1]||i,r=t[2]||kt.get()):r=t[0]||kt.get();let s=this.rawData,a=V.AsnConvert.parse(this.rawData,ge.SubjectPublicKeyInfo);return a.algorithm.algorithm===ci.id_RSASSA_PSS&&(s=p9(a,s)),r.subtle.importKey("spki",s,n,!0,i)}onInit(t){let r=vt.container.resolve(dn),i=this.algorithm=r.toWebAlgorithm(t.algorithm);if(t.algorithm.algorithm===ci.id_rsaEncryption){let n=V.AsnConvert.parse(t.subjectPublicKey,ci.RSAPublicKey),s=X.BufferSourceConverter.toUint8Array(n.modulus);i.publicExponent=X.BufferSourceConverter.toUint8Array(n.publicExponent),i.modulusLength=(s[0]?s:s.slice(1)).byteLength<<3}}async getThumbprint(...t){var r;let i,n="SHA-1";return t.length>=1&&!(!((r=t[0])===null||r===void 0)&&r.subtle)?(n=t[0]||n,i=t[1]||kt.get()):i=t[0]||kt.get(),await i.subtle.digest(n,this.rawData)}async getKeyIdentifier(...t){let r,i="SHA-1";t.length===1?typeof t[0]=="string"?(i=t[0],r=kt.get()):r=t[0]:t.length===2?(i=t[0],r=t[1]):r=kt.get();let n=V.AsnConvert.parse(this.rawData,ge.SubjectPublicKeyInfo);return await r.subtle.digest(i,n.subjectPublicKey)}toTextObject(){let t=this.toTextObjectEmpty(),r=V.AsnConvert.parse(this.rawData,ge.SubjectPublicKeyInfo);switch(t.Algorithm=hn.serializeAlgorithm(r.algorithm),r.algorithm.algorithm){case sg.id_ecPublicKey:t["EC Point"]=r.subjectPublicKey;break;case ci.id_rsaEncryption:default:t["Raw Data"]=r.subjectPublicKey}return t}};function p9(e,t){return e.algorithm=new ge.AlgorithmIdentifier({algorithm:ci.id_rsaEncryption,parameters:null}),t=V.AsnConvert.serialize(e),t}var qd=class e extends ui{static async create(t,r=!1,i=kt.get()){if("name"in t&&"serialNumber"in t)return new e(t,r);let s=await(await fn.create(t,i)).getKeyIdentifier(i);return new e(X.Convert.ToHex(s),r)}constructor(...t){if(X.BufferSourceConverter.isBufferSource(t[0]))super(t[0]);else if(typeof t[0]=="string"){let r=new M.AuthorityKeyIdentifier({keyIdentifier:new M.KeyIdentifier(X.Convert.FromHex(t[0]))});super(M.id_ce_authorityKeyIdentifier,t[1],V.AsnConvert.serialize(r))}else{let r=t[0],i=r.name instanceof Kn?V.AsnConvert.parse(r.name.rawData,M.GeneralNames):r.name,n=new M.AuthorityKeyIdentifier({authorityCertIssuer:i,authorityCertSerialNumber:X.Convert.FromHex(r.serialNumber)});super(M.id_ce_authorityKeyIdentifier,t[1],V.AsnConvert.serialize(n))}}onInit(t){super.onInit(t);let r=V.AsnConvert.parse(t.extnValue,M.AuthorityKeyIdentifier);r.keyIdentifier&&(this.keyId=X.Convert.ToHex(r.keyIdentifier)),(r.authorityCertIssuer||r.authorityCertSerialNumber)&&(this.certId={name:r.authorityCertIssuer||[],serialNumber:r.authorityCertSerialNumber?X.Convert.ToHex(r.authorityCertSerialNumber):""})}toTextObject(){let t=this.toTextObjectWithoutValue(),r=V.AsnConvert.parse(this.value,M.AuthorityKeyIdentifier);return r.authorityCertIssuer&&(t["Authority Issuer"]=new Kn(r.authorityCertIssuer).toTextObject()),r.authorityCertSerialNumber&&(t["Authority Serial Number"]=r.authorityCertSerialNumber),r.keyIdentifier&&(t[""]=r.keyIdentifier),t}};qd.NAME="Authority Key Identifier";var jd=class extends ui{constructor(...t){if(X.BufferSourceConverter.isBufferSource(t[0])){super(t[0]);let r=V.AsnConvert.parse(this.value,ge.BasicConstraints);this.ca=r.cA,this.pathLength=r.pathLenConstraint}else{let r=new ge.BasicConstraints({cA:t[0],pathLenConstraint:t[1]});super(ge.id_ce_basicConstraints,t[2],V.AsnConvert.serialize(r)),this.ca=t[0],this.pathLength=t[1]}}toTextObject(){let t=this.toTextObjectWithoutValue();return this.ca&&(t.CA=this.ca),this.pathLength!==void 0&&(t["Path Length"]=this.pathLength),t}};jd.NAME="Basic Constraints";Z.ExtendedKeyUsage=void 0;(function(e){e.serverAuth="1.3.6.1.5.5.7.3.1",e.clientAuth="1.3.6.1.5.5.7.3.2",e.codeSigning="1.3.6.1.5.5.7.3.3",e.emailProtection="1.3.6.1.5.5.7.3.4",e.timeStamping="1.3.6.1.5.5.7.3.8",e.ocspSigning="1.3.6.1.5.5.7.3.9"})(Z.ExtendedKeyUsage||(Z.ExtendedKeyUsage={}));var Ud=class extends ui{constructor(...t){if(X.BufferSourceConverter.isBufferSource(t[0])){super(t[0]);let r=V.AsnConvert.parse(this.value,M.ExtendedKeyUsage);this.usages=r.map(i=>i)}else{let r=new M.ExtendedKeyUsage(t[0]);super(M.id_ce_extKeyUsage,t[1],V.AsnConvert.serialize(r)),this.usages=t[0]}}toTextObject(){let t=this.toTextObjectWithoutValue();return t[""]=this.usages.map(r=>Vi.toString(r)).join(", "),t}};Ud.NAME="Extended Key Usages";Z.KeyUsageFlags=void 0;(function(e){e[e.digitalSignature=1]="digitalSignature",e[e.nonRepudiation=2]="nonRepudiation",e[e.keyEncipherment=4]="keyEncipherment",e[e.dataEncipherment=8]="dataEncipherment",e[e.keyAgreement=16]="keyAgreement",e[e.keyCertSign=32]="keyCertSign",e[e.cRLSign=64]="cRLSign",e[e.encipherOnly=128]="encipherOnly",e[e.decipherOnly=256]="decipherOnly"})(Z.KeyUsageFlags||(Z.KeyUsageFlags={}));var Fd=class extends ui{constructor(...t){if(X.BufferSourceConverter.isBufferSource(t[0])){super(t[0]);let r=V.AsnConvert.parse(this.value,ge.KeyUsage);this.usages=r.toNumber()}else{let r=new ge.KeyUsage(t[0]);super(ge.id_ce_keyUsage,t[1],V.AsnConvert.serialize(r)),this.usages=t[0]}}toTextObject(){let t=this.toTextObjectWithoutValue(),r=V.AsnConvert.parse(this.value,ge.KeyUsage);return t[""]=r.toJSON().join(", "),t}};Fd.NAME="Key Usages";var Md=class e extends ui{static async create(t,r=!1,i=kt.get()){let s=await(await fn.create(t,i)).getKeyIdentifier(i);return new e(X.Convert.ToHex(s),r)}constructor(...t){if(X.BufferSourceConverter.isBufferSource(t[0])){super(t[0]);let r=V.AsnConvert.parse(this.value,M.SubjectKeyIdentifier);this.keyId=X.Convert.ToHex(r)}else{let r=typeof t[0]=="string"?X.Convert.FromHex(t[0]):t[0],i=new M.SubjectKeyIdentifier(r);super(M.id_ce_subjectKeyIdentifier,t[1],V.AsnConvert.serialize(i)),this.keyId=X.Convert.ToHex(r)}}toTextObject(){let t=this.toTextObjectWithoutValue(),r=V.AsnConvert.parse(this.value,M.SubjectKeyIdentifier);return t[""]=r,t}};Md.NAME="Subject Key Identifier";var Vd=class extends ui{constructor(...t){X.BufferSourceConverter.isBufferSource(t[0])?super(t[0]):super(M.id_ce_subjectAltName,t[1],new Kn(t[0]||[]).rawData)}onInit(t){super.onInit(t);let r=V.AsnConvert.parse(t.extnValue,M.SubjectAlternativeName);this.names=new Kn(r)}toTextObject(){let t=this.toTextObjectWithoutValue(),r=this.names.toTextObject();for(let i in r)t[i]=r[i];return t}};Vd.NAME="Subject Alternative Name";var _r=class{static register(t,r){this.items.set(t,r)}static create(t){let r=new ui(t),i=this.items.get(r.type);return i?new i(t):r}};_r.items=new Map;var Kd=class extends ui{constructor(...t){var r;if(X.BufferSourceConverter.isBufferSource(t[0])){super(t[0]);let i=V.AsnConvert.parse(this.value,M.CertificatePolicies);this.policies=i.map(n=>n.policyIdentifier)}else{let i=t[0],n=(r=t[1])!==null&&r!==void 0?r:!1,s=new M.CertificatePolicies(i.map(a=>new M.PolicyInformation({policyIdentifier:a})));super(M.id_ce_certificatePolicies,n,V.AsnConvert.serialize(s)),this.policies=i}}toTextObject(){let t=this.toTextObjectWithoutValue();return t.Policy=this.policies.map(r=>new Fe("",{},Vi.toString(r))),t}};Kd.NAME="Certificate Policies";_r.register(M.id_ce_certificatePolicies,Kd);var Hd=class extends ui{constructor(...t){var r;if(X.BufferSourceConverter.isBufferSource(t[0]))super(t[0]);else if(Array.isArray(t[0])&&typeof t[0][0]=="string"){let n=t[0].map(a=>new M.DistributionPoint({distributionPoint:new M.DistributionPointName({fullName:[new M.GeneralName({uniformResourceIdentifier:a})]})})),s=new M.CRLDistributionPoints(n);super(M.id_ce_cRLDistributionPoints,t[1],V.AsnConvert.serialize(s))}else{let i=new M.CRLDistributionPoints(t[0]);super(M.id_ce_cRLDistributionPoints,t[1],V.AsnConvert.serialize(i))}(r=this.distributionPoints)!==null&&r!==void 0||(this.distributionPoints=[])}onInit(t){super.onInit(t);let r=V.AsnConvert.parse(t.extnValue,M.CRLDistributionPoints);this.distributionPoints=r}toTextObject(){let t=this.toTextObjectWithoutValue();return t["Distribution Point"]=this.distributionPoints.map(r=>{var i;let n={};return r.distributionPoint&&(n[""]=(i=r.distributionPoint.fullName)===null||i===void 0?void 0:i.map(s=>new pn(s).toString()).join(", ")),r.reasons&&(n.Reasons=r.reasons.toString()),r.cRLIssuer&&(n["CRL Issuer"]=r.cRLIssuer.map(s=>s.toString()).join(", ")),n}),t}};Hd.NAME="CRL Distribution Points";var $d=class extends ui{constructor(...t){var r,i,n,s;if(X.BufferSourceConverter.isBufferSource(t[0]))super(t[0]);else if(t[0]instanceof M.AuthorityInfoAccessSyntax){let a=new M.AuthorityInfoAccessSyntax(t[0]);super(M.id_pe_authorityInfoAccess,t[1],V.AsnConvert.serialize(a))}else{let a=t[0],o=new M.AuthorityInfoAccessSyntax;Gy(o,a,M.id_ad_ocsp,"ocsp"),Gy(o,a,M.id_ad_caIssuers,"caIssuers"),Gy(o,a,M.id_ad_timeStamping,"timeStamping"),Gy(o,a,M.id_ad_caRepository,"caRepository"),super(M.id_pe_authorityInfoAccess,t[1],V.AsnConvert.serialize(o))}(r=this.ocsp)!==null&&r!==void 0||(this.ocsp=[]),(i=this.caIssuers)!==null&&i!==void 0||(this.caIssuers=[]),(n=this.timeStamping)!==null&&n!==void 0||(this.timeStamping=[]),(s=this.caRepository)!==null&&s!==void 0||(this.caRepository=[])}onInit(t){super.onInit(t),this.ocsp=[],this.caIssuers=[],this.timeStamping=[],this.caRepository=[],V.AsnConvert.parse(t.extnValue,M.AuthorityInfoAccessSyntax).forEach(i=>{switch(i.accessMethod){case M.id_ad_ocsp:this.ocsp.push(new pn(i.accessLocation));break;case M.id_ad_caIssuers:this.caIssuers.push(new pn(i.accessLocation));break;case M.id_ad_timeStamping:this.timeStamping.push(new pn(i.accessLocation));break;case M.id_ad_caRepository:this.caRepository.push(new pn(i.accessLocation));break}})}toTextObject(){let t=this.toTextObjectWithoutValue();return this.ocsp.length&&zy(t,"OCSP",this.ocsp),this.caIssuers.length&&zy(t,"CA Issuers",this.caIssuers),this.timeStamping.length&&zy(t,"Time Stamping",this.timeStamping),this.caRepository.length&&zy(t,"CA Repository",this.caRepository),t}};$d.NAME="Authority Info Access";function zy(e,t,r){if(r.length===1)e[t]=r[0].toTextObject();else{let i=new Fe("");r.forEach((n,s)=>{let a=n.toTextObject(),o=`${a[Fe.NAME]} ${s+1}`,c=i[o];Array.isArray(c)||(c=[],i[o]=c),c.push(a)}),e[t]=i}}function Gy(e,t,r,i){let n=t[i];n&&(Array.isArray(n)?n:[n]).forEach(a=>{typeof a=="string"&&(a=new pn("url",a)),e.push(new M.AccessDescription({accessMethod:r,accessLocation:V.AsnConvert.parse(a.rawData,M.GeneralName)}))})}var zd=class extends ui{constructor(...t){X.BufferSourceConverter.isBufferSource(t[0])?super(t[0]):super(M.id_ce_issuerAltName,t[1],new Kn(t[0]||[]).rawData)}onInit(t){super.onInit(t);let r=V.AsnConvert.parse(t.extnValue,M.GeneralNames);this.names=new Kn(r)}toTextObject(){let t=this.toTextObjectWithoutValue(),r=this.names.toTextObject();for(let i in r)t[i]=r[i];return t}};zd.NAME="Issuer Alternative Name";var $o=class e extends Vn{constructor(...t){let r;if(X.BufferSourceConverter.isBufferSource(t[0]))r=X.BufferSourceConverter.toArrayBuffer(t[0]);else{let i=t[0],n=Array.isArray(t[1])?t[1].map(s=>X.BufferSourceConverter.toArrayBuffer(s)):[];r=V.AsnConvert.serialize(new ge.Attribute({type:i,values:n}))}super(r,ge.Attribute)}onInit(t){this.type=t.type,this.values=t.values}toTextObject(){let t=this.toTextObjectWithoutValue();return t.Value=this.values.map(r=>new Fe("",{"":r})),t}toTextObjectWithoutValue(){let t=this.toTextObjectEmpty();return t[Fe.NAME]===e.NAME&&(t[Fe.NAME]=Vi.toString(this.type)),t}};$o.NAME="Attribute";var Gd=class extends $o{constructor(...t){var r;if(X.BufferSourceConverter.isBufferSource(t[0]))super(t[0]);else{let i=new rl.ChallengePassword({printableString:t[0]});super(rl.id_pkcs9_at_challengePassword,[V.AsnConvert.serialize(i)])}(r=this.password)!==null&&r!==void 0||(this.password="")}onInit(t){if(super.onInit(t),this.values[0]){let r=V.AsnConvert.parse(this.values[0],rl.ChallengePassword);this.password=r.toString()}}toTextObject(){let t=this.toTextObjectWithoutValue();return t[Fe.VALUE]=this.password,t}};Gd.NAME="Challenge Password";var sl=class extends $o{constructor(...t){var r;if(X.BufferSourceConverter.isBufferSource(t[0]))super(t[0]);else{let i=t[0],n=new M.Extensions;for(let s of i)n.push(V.AsnConvert.parse(s.rawData,M.Extension));super(rl.id_pkcs9_at_extensionRequest,[V.AsnConvert.serialize(n)])}(r=this.items)!==null&&r!==void 0||(this.items=[])}onInit(t){if(super.onInit(t),this.values[0]){let r=V.AsnConvert.parse(this.values[0],M.Extensions);this.items=r.map(i=>_r.create(V.AsnConvert.serialize(i)))}}toTextObject(){let t=this.toTextObjectWithoutValue(),r=this.items.map(i=>i.toTextObject());for(let i of r)t[i[Fe.NAME]]=i;return t}};sl.NAME="Extensions";var zo=class{static register(t,r){this.items.set(t,r)}static create(t){let r=new $o(t),i=this.items.get(r.type);return i?new i(t):r}};zo.items=new Map;var ks="crypto.signatureFormatter",ug=class{toAsnSignature(t,r){return X.BufferSourceConverter.toArrayBuffer(r)}toWebSignature(t,r){return X.BufferSourceConverter.toArrayBuffer(r)}},rg;Z.RsaAlgorithm=rg=class{static createPssParams(t,r){let i=rg.getHashAlgorithm(t);return i?new gt.RsaSaPssParams({hashAlgorithm:i,maskGenAlgorithm:new ge.AlgorithmIdentifier({algorithm:gt.id_mgf1,parameters:V.AsnConvert.serialize(i)}),saltLength:r}):null}static getHashAlgorithm(t){let r=vt.container.resolve(dn);return typeof t=="string"?r.toAsnAlgorithm({name:t}):typeof t=="object"&&t&&"name"in t?r.toAsnAlgorithm(t):null}toAsnAlgorithm(t){switch(t.name.toLowerCase()){case"rsassa-pkcs1-v1_5":if("hash"in t){let r;if(typeof t.hash=="string")r=t.hash;else if(t.hash&&typeof t.hash=="object"&&"name"in t.hash&&typeof t.hash.name=="string")r=t.hash.name.toUpperCase();else throw new Error("Cannot get hash algorithm name");switch(r.toLowerCase()){case"sha-1":return new ge.AlgorithmIdentifier({algorithm:gt.id_sha1WithRSAEncryption,parameters:null});case"sha-256":return new ge.AlgorithmIdentifier({algorithm:gt.id_sha256WithRSAEncryption,parameters:null});case"sha-384":return new ge.AlgorithmIdentifier({algorithm:gt.id_sha384WithRSAEncryption,parameters:null});case"sha-512":return new ge.AlgorithmIdentifier({algorithm:gt.id_sha512WithRSAEncryption,parameters:null})}}else return new ge.AlgorithmIdentifier({algorithm:gt.id_rsaEncryption,parameters:null});break;case"rsa-pss":if("hash"in t){if(!("saltLength"in t&&typeof t.saltLength=="number"))throw new Error("Cannot get 'saltLength' from 'alg' argument");let r=rg.createPssParams(t.hash,t.saltLength);if(!r)throw new Error("Cannot create PSS parameters");return new ge.AlgorithmIdentifier({algorithm:gt.id_RSASSA_PSS,parameters:V.AsnConvert.serialize(r)})}else return new ge.AlgorithmIdentifier({algorithm:gt.id_RSASSA_PSS,parameters:null})}return null}toWebAlgorithm(t){switch(t.algorithm){case gt.id_rsaEncryption:return{name:"RSASSA-PKCS1-v1_5"};case gt.id_sha1WithRSAEncryption:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-1"}};case gt.id_sha256WithRSAEncryption:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case gt.id_sha384WithRSAEncryption:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-384"}};case gt.id_sha512WithRSAEncryption:return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-512"}};case gt.id_RSASSA_PSS:if(t.parameters){let r=V.AsnConvert.parse(t.parameters,gt.RsaSaPssParams);return{name:"RSA-PSS",hash:vt.container.resolve(dn).toWebAlgorithm(r.hashAlgorithm),saltLength:r.saltLength}}else return{name:"RSA-PSS"}}return null}};Z.RsaAlgorithm=rg=$.__decorate([vt.injectable()],Z.RsaAlgorithm);vt.container.registerSingleton(ol,Z.RsaAlgorithm);Z.ShaAlgorithm=class{toAsnAlgorithm(t){switch(t.name.toLowerCase()){case"sha-1":return new ge.AlgorithmIdentifier({algorithm:ci.id_sha1});case"sha-256":return new ge.AlgorithmIdentifier({algorithm:ci.id_sha256});case"sha-384":return new ge.AlgorithmIdentifier({algorithm:ci.id_sha384});case"sha-512":return new ge.AlgorithmIdentifier({algorithm:ci.id_sha512})}return null}toWebAlgorithm(t){switch(t.algorithm){case ci.id_sha1:return{name:"SHA-1"};case ci.id_sha256:return{name:"SHA-256"};case ci.id_sha384:return{name:"SHA-384"};case ci.id_sha512:return{name:"SHA-512"}}return null}};Z.ShaAlgorithm=$.__decorate([vt.injectable()],Z.ShaAlgorithm);vt.container.registerSingleton(ol,Z.ShaAlgorithm);var Hn=class e{addPadding(t,r){let i=X.BufferSourceConverter.toUint8Array(r),n=new Uint8Array(t);return n.set(i,t-i.length),n.buffer}removePadding(t,r=!1){let i=X.BufferSourceConverter.toUint8Array(t);for(let n=0;n<i.length;n++)if(i[n]){i=i.slice(n);break}if(r&&i[0]>127){let n=new Uint8Array(i.length+1);return n.set(i,1),n.buffer}return i.buffer}toAsnSignature(t,r){if(t.name==="ECDSA"){let i=t.namedCurve,n=e.namedCurveSize.get(i)||e.defaultNamedCurveSize,s=new sg.ECDSASigValue,a=X.BufferSourceConverter.toUint8Array(r);return s.r=this.removePadding(a.slice(0,n),!0),s.s=this.removePadding(a.slice(n,n+n),!0),V.AsnConvert.serialize(s)}return null}toWebSignature(t,r){if(t.name==="ECDSA"){let i=V.AsnConvert.parse(r,sg.ECDSASigValue),n=t.namedCurve,s=e.namedCurveSize.get(n)||e.defaultNamedCurveSize,a=this.addPadding(s,this.removePadding(i.r)),o=this.addPadding(s,this.removePadding(i.s));return X.combine(a,o)}return null}};Hn.namedCurveSize=new Map;Hn.defaultNamedCurveSize=32;var ig="1.3.101.110",HA="1.3.101.111",ng="1.3.101.112",$A="1.3.101.113";Z.EdAlgorithm=class{toAsnAlgorithm(t){let r=null;switch(t.name.toLowerCase()){case"ed25519":r=ng;break;case"x25519":r=ig;break;case"eddsa":switch(t.namedCurve.toLowerCase()){case"ed25519":r=ng;break;case"ed448":r=$A;break}break;case"ecdh-es":switch(t.namedCurve.toLowerCase()){case"x25519":r=ig;break;case"x448":r=HA;break}}return r?new ge.AlgorithmIdentifier({algorithm:r}):null}toWebAlgorithm(t){switch(t.algorithm){case ng:return{name:"Ed25519"};case $A:return{name:"EdDSA",namedCurve:"Ed448"};case ig:return{name:"X25519"};case HA:return{name:"ECDH-ES",namedCurve:"X448"}}return null}};Z.EdAlgorithm=$.__decorate([vt.injectable()],Z.EdAlgorithm);vt.container.registerSingleton(ol,Z.EdAlgorithm);var cd,ud,ld,pd,fd,dd,hd,Qu,Wd=class extends pi{get subjectName(){return $.__classPrivateFieldGet(this,ud,"f")||$.__classPrivateFieldSet(this,ud,new mr(this.asn.certificationRequestInfo.subject),"f"),$.__classPrivateFieldGet(this,ud,"f")}get subject(){return $.__classPrivateFieldGet(this,ld,"f")||$.__classPrivateFieldSet(this,ld,this.subjectName.toString(),"f"),$.__classPrivateFieldGet(this,ld,"f")}get signatureAlgorithm(){if(!$.__classPrivateFieldGet(this,pd,"f")){let t=vt.container.resolve(dn);$.__classPrivateFieldSet(this,pd,t.toWebAlgorithm(this.asn.signatureAlgorithm),"f")}return $.__classPrivateFieldGet(this,pd,"f")}get signature(){return $.__classPrivateFieldGet(this,fd,"f")||$.__classPrivateFieldSet(this,fd,this.asn.signature,"f"),$.__classPrivateFieldGet(this,fd,"f")}get publicKey(){return $.__classPrivateFieldGet(this,dd,"f")||$.__classPrivateFieldSet(this,dd,new fn(this.asn.certificationRequestInfo.subjectPKInfo),"f"),$.__classPrivateFieldGet(this,dd,"f")}get attributes(){return $.__classPrivateFieldGet(this,hd,"f")||$.__classPrivateFieldSet(this,hd,this.asn.certificationRequestInfo.attributes.map(t=>zo.create(V.AsnConvert.serialize(t))),"f"),$.__classPrivateFieldGet(this,hd,"f")}get extensions(){if(!$.__classPrivateFieldGet(this,Qu,"f")){$.__classPrivateFieldSet(this,Qu,[],"f");let t=this.getAttribute(QA.id_pkcs9_at_extensionRequest);t instanceof sl&&$.__classPrivateFieldSet(this,Qu,t.items,"f")}return $.__classPrivateFieldGet(this,Qu,"f")}get tbs(){return $.__classPrivateFieldGet(this,cd,"f")||$.__classPrivateFieldSet(this,cd,this.asn.certificationRequestInfoRaw||V.AsnConvert.serialize(this.asn.certificationRequestInfo),"f"),$.__classPrivateFieldGet(this,cd,"f")}constructor(t){let r=pi.isAsnEncoded(t)?[t,ag.CertificationRequest]:[t];super(r[0],r[1]),cd.set(this,void 0),ud.set(this,void 0),ld.set(this,void 0),pd.set(this,void 0),fd.set(this,void 0),dd.set(this,void 0),hd.set(this,void 0),Qu.set(this,void 0),this.tag=br.CertificateRequestTag}onInit(t){}getAttribute(t){for(let r of this.attributes)if(r.type===t)return r;return null}getAttributes(t){return this.attributes.filter(r=>r.type===t)}getExtension(t){for(let r of this.extensions)if(r.type===t)return r;return null}getExtensions(t){return this.extensions.filter(r=>r.type===t)}async verify(t=kt.get()){let r={...this.publicKey.algorithm,...this.signatureAlgorithm},i=await this.publicKey.export(r,["verify"],t),n=vt.container.resolveAll(ks).reverse(),s=null;for(let o of n)if(s=o.toWebSignature(r,this.signature),s)break;if(!s)throw Error("Cannot convert WebCrypto signature value to ASN.1 format");return await t.subtle.verify(this.signatureAlgorithm,i,s,this.tbs)}toTextObject(){let t=this.toTextObjectEmpty(),r=V.AsnConvert.parse(this.rawData,ag.CertificationRequest),i=r.certificationRequestInfo,n=new Fe("",{Version:`${ge.Version[i.version]} (${i.version})`,Subject:this.subject,"Subject Public Key Info":this.publicKey});if(this.attributes.length){let s=new Fe("");for(let a of this.attributes){let o=a.toTextObject();s[o[Fe.NAME]]=o}n.Attributes=s}return t.Data=n,t.Signature=new Fe("",{Algorithm:hn.serializeAlgorithm(r.signatureAlgorithm),"":r.signature}),t}};cd=new WeakMap,ud=new WeakMap,ld=new WeakMap,pd=new WeakMap,fd=new WeakMap,dd=new WeakMap,hd=new WeakMap,Qu=new WeakMap;Wd.NAME="PKCS#10 Certificate Request";var zA=class{static async create(t,r=kt.get()){if(!t.keys.privateKey)throw new Error("Bad field 'keys' in 'params' argument. 'privateKey' is empty");if(!t.keys.publicKey)throw new Error("Bad field 'keys' in 'params' argument. 'publicKey' is empty");let i=await r.subtle.exportKey("spki",t.keys.publicKey),n=new ag.CertificationRequest({certificationRequestInfo:new ag.CertificationRequestInfo({subjectPKInfo:V.AsnConvert.parse(i,ge.SubjectPublicKeyInfo)})});if(t.name){let p=t.name instanceof mr?t.name:new mr(t.name);n.certificationRequestInfo.subject=V.AsnConvert.parse(p.toArrayBuffer(),ge.Name)}if(t.attributes)for(let p of t.attributes)n.certificationRequestInfo.attributes.push(V.AsnConvert.parse(p.rawData,ge.Attribute));if(t.extensions&&t.extensions.length){let p=new ge.Attribute({type:QA.id_pkcs9_at_extensionRequest}),d=new ge.Extensions;for(let h of t.extensions)d.push(V.AsnConvert.parse(h.rawData,ge.Extension));p.values.push(V.AsnConvert.serialize(d)),n.certificationRequestInfo.attributes.push(p)}let s={...t.signingAlgorithm,...t.keys.privateKey.algorithm},a=vt.container.resolve(dn);n.signatureAlgorithm=a.toAsnAlgorithm(s);let o=V.AsnConvert.serialize(n.certificationRequestInfo),c=await r.subtle.sign(s,t.keys.privateKey,o),u=vt.container.resolveAll(ks).reverse(),l=null;for(let p of u)if(l=p.toAsnSignature(s,c),l)break;if(!l)throw Error("Cannot convert WebCrypto signature value to ASN.1 format");return n.signature=l,new Wd(V.AsnConvert.serialize(n))}},md,yd,gd,vd,xd,bd,_d,Ad,Sd,wd,Ju,Cd,ca=class extends pi{get publicKey(){return $.__classPrivateFieldGet(this,Cd,"f")||$.__classPrivateFieldSet(this,Cd,new fn(this.asn.tbsCertificate.subjectPublicKeyInfo),"f"),$.__classPrivateFieldGet(this,Cd,"f")}get serialNumber(){if(!$.__classPrivateFieldGet(this,yd,"f")){let t=this.asn.tbsCertificate,r=new Uint8Array(t.serialNumber);r.length>1&&r[0]===0&&r[1]>127&&(r=r.slice(1)),$.__classPrivateFieldSet(this,yd,X.Convert.ToHex(r),"f")}return $.__classPrivateFieldGet(this,yd,"f")}get subjectName(){return $.__classPrivateFieldGet(this,gd,"f")||$.__classPrivateFieldSet(this,gd,new mr(this.asn.tbsCertificate.subject),"f"),$.__classPrivateFieldGet(this,gd,"f")}get subject(){return $.__classPrivateFieldGet(this,vd,"f")||$.__classPrivateFieldSet(this,vd,this.subjectName.toString(),"f"),$.__classPrivateFieldGet(this,vd,"f")}get issuerName(){return $.__classPrivateFieldGet(this,xd,"f")||$.__classPrivateFieldSet(this,xd,new mr(this.asn.tbsCertificate.issuer),"f"),$.__classPrivateFieldGet(this,xd,"f")}get issuer(){return $.__classPrivateFieldGet(this,bd,"f")||$.__classPrivateFieldSet(this,bd,this.issuerName.toString(),"f"),$.__classPrivateFieldGet(this,bd,"f")}get notBefore(){if(!$.__classPrivateFieldGet(this,_d,"f")){let t=this.asn.tbsCertificate.validity.notBefore.utcTime||this.asn.tbsCertificate.validity.notBefore.generalTime;if(!t)throw new Error("Cannot get 'notBefore' value");$.__classPrivateFieldSet(this,_d,t,"f")}return $.__classPrivateFieldGet(this,_d,"f")}get notAfter(){if(!$.__classPrivateFieldGet(this,Ad,"f")){let t=this.asn.tbsCertificate.validity.notAfter.utcTime||this.asn.tbsCertificate.validity.notAfter.generalTime;if(!t)throw new Error("Cannot get 'notAfter' value");$.__classPrivateFieldSet(this,Ad,t,"f")}return $.__classPrivateFieldGet(this,Ad,"f")}get signatureAlgorithm(){if(!$.__classPrivateFieldGet(this,Sd,"f")){let t=vt.container.resolve(dn);$.__classPrivateFieldSet(this,Sd,t.toWebAlgorithm(this.asn.signatureAlgorithm),"f")}return $.__classPrivateFieldGet(this,Sd,"f")}get signature(){return $.__classPrivateFieldGet(this,wd,"f")||$.__classPrivateFieldSet(this,wd,this.asn.signatureValue,"f"),$.__classPrivateFieldGet(this,wd,"f")}get extensions(){return $.__classPrivateFieldGet(this,Ju,"f")||($.__classPrivateFieldSet(this,Ju,[],"f"),this.asn.tbsCertificate.extensions&&$.__classPrivateFieldSet(this,Ju,this.asn.tbsCertificate.extensions.map(t=>_r.create(V.AsnConvert.serialize(t))),"f")),$.__classPrivateFieldGet(this,Ju,"f")}get tbs(){return $.__classPrivateFieldGet(this,md,"f")||$.__classPrivateFieldSet(this,md,this.asn.tbsCertificateRaw||V.AsnConvert.serialize(this.asn.tbsCertificate),"f"),$.__classPrivateFieldGet(this,md,"f")}constructor(t){let r=pi.isAsnEncoded(t)?[t,ge.Certificate]:[t];super(r[0],r[1]),md.set(this,void 0),yd.set(this,void 0),gd.set(this,void 0),vd.set(this,void 0),xd.set(this,void 0),bd.set(this,void 0),_d.set(this,void 0),Ad.set(this,void 0),Sd.set(this,void 0),wd.set(this,void 0),Ju.set(this,void 0),Cd.set(this,void 0),this.tag=br.CertificateTag}onInit(t){}getExtension(t){for(let r of this.extensions)if(typeof t=="string"){if(r.type===t)return r}else if(r instanceof t)return r;return null}getExtensions(t){return this.extensions.filter(r=>typeof t=="string"?r.type===t:r instanceof t)}async verify(t={},r=kt.get()){let i,n,s=t.publicKey;try{if(!s)i={...this.publicKey.algorithm,...this.signatureAlgorithm},n=await this.publicKey.export(i,["verify"],r);else if("publicKey"in s)i={...s.publicKey.algorithm,...this.signatureAlgorithm},n=await s.publicKey.export(i,["verify"],r);else if(s instanceof fn)i={...s.algorithm,...this.signatureAlgorithm},n=await s.export(i,["verify"],r);else if(X.BufferSourceConverter.isBufferSource(s)){let u=new fn(s);i={...u.algorithm,...this.signatureAlgorithm},n=await u.export(i,["verify"],r)}else i={...s.algorithm,...this.signatureAlgorithm},n=s}catch{return!1}let a=vt.container.resolveAll(ks).reverse(),o=null;for(let u of a)if(o=u.toWebSignature(i,this.signature),o)break;if(!o)throw Error("Cannot convert ASN.1 signature value to WebCrypto format");let c=await r.subtle.verify(this.signatureAlgorithm,n,o,this.tbs);if(t.signatureOnly)return c;{let l=(t.date||new Date).getTime();return c&&this.notBefore.getTime()<l&&l<this.notAfter.getTime()}}async getThumbprint(...t){let r,i="SHA-1";return t[0]&&(t[0].subtle?r=t[0]:(i=t[0]||i,r=t[1])),r??(r=kt.get()),await r.subtle.digest(i,this.rawData)}async isSelfSigned(t=kt.get()){return this.subject===this.issuer&&await this.verify({signatureOnly:!0},t)}toTextObject(){let t=this.toTextObjectEmpty(),r=V.AsnConvert.parse(this.rawData,ge.Certificate),i=r.tbsCertificate,n=new Fe("",{Version:`${ge.Version[i.version]} (${i.version})`,"Serial Number":i.serialNumber,"Signature Algorithm":hn.serializeAlgorithm(i.signature),Issuer:this.issuer,Validity:new Fe("",{"Not Before":i.validity.notBefore.getTime(),"Not After":i.validity.notAfter.getTime()}),Subject:this.subject,"Subject Public Key Info":this.publicKey});if(i.issuerUniqueID&&(n["Issuer Unique ID"]=i.issuerUniqueID),i.subjectUniqueID&&(n["Subject Unique ID"]=i.subjectUniqueID),this.extensions.length){let s=new Fe("");for(let a of this.extensions){let o=a.toTextObject();s[o[Fe.NAME]]=o}n.Extensions=s}return t.Data=n,t.Signature=new Fe("",{Algorithm:hn.serializeAlgorithm(r.signatureAlgorithm),"":r.signatureValue}),t}};md=new WeakMap,yd=new WeakMap,gd=new WeakMap,vd=new WeakMap,xd=new WeakMap,bd=new WeakMap,_d=new WeakMap,Ad=new WeakMap,Sd=new WeakMap,wd=new WeakMap,Ju=new WeakMap,Cd=new WeakMap;ca.NAME="Certificate";var lg=class extends Array{constructor(t){if(super(),pi.isAsnEncoded(t))this.import(t);else if(t instanceof ca)this.push(t);else if(Array.isArray(t))for(let r of t)this.push(r)}export(t){let r=new oi.SignedData;r.version=1,r.encapContentInfo.eContentType=oi.id_data,r.encapContentInfo.eContent=new oi.EncapsulatedContent({single:new V.OctetString}),r.certificates=new oi.CertificateSet(this.map(s=>new oi.CertificateChoices({certificate:V.AsnConvert.parse(s.rawData,ge.Certificate)})));let i=new oi.ContentInfo({contentType:oi.id_signedData,content:V.AsnConvert.serialize(r)}),n=V.AsnConvert.serialize(i);return t==="raw"?n:this.toString(t)}import(t){let r=pi.toArrayBuffer(t),i=V.AsnConvert.parse(r,oi.ContentInfo);if(i.contentType!==oi.id_signedData)throw new TypeError("Cannot parse CMS package. Incoming data is not a SignedData object.");let n=V.AsnConvert.parse(i.content,oi.SignedData);this.clear();for(let s of n.certificates||[])s.certificate&&this.push(new ca(s.certificate))}clear(){for(;this.pop(););}toString(t="pem"){let r=this.export("raw");switch(t){case"pem":return br.encode(r,"CMS");case"pem-chain":return this.map(i=>i.toString("pem")).join(`
|
|
13
|
+
`);case"asn":return V.AsnConvert.toString(r);case"hex":return X.Convert.ToHex(r);case"base64":return X.Convert.ToBase64(r);case"base64url":return X.Convert.ToBase64Url(r);case"text":return hn.serialize(this.toTextObject());default:throw TypeError("Argument 'format' is unsupported value")}}toTextObject(){let t=V.AsnConvert.parse(this.export("raw"),oi.ContentInfo),r=V.AsnConvert.parse(t.content,oi.SignedData);return new Fe("X509Certificates",{"Content Type":Vi.toString(t.contentType),Content:new Fe("",{Version:`${oi.CMSVersion[r.version]} (${r.version})`,Certificates:new Fe("",{Certificate:this.map(n=>n.toTextObject())})})})}},GA=class{constructor(t={}){this.certificates=[],t.certificates&&(this.certificates=t.certificates)}async build(t,r=kt.get()){let i=new lg(t),n=t;for(;n=await this.findIssuer(n,r);){let s=await n.getThumbprint(r);for(let a of i){let o=await a.getThumbprint(r);if(X.isEqual(s,o))throw new Error("Cannot build a certificate chain. Circular dependency.")}i.push(n)}return i}async findIssuer(t,r=kt.get()){if(!await t.isSelfSigned(r)){let i=t.getExtension(M.id_ce_authorityKeyIdentifier);for(let n of this.certificates)if(n.subject===t.issuer){if(i){if(i.keyId){let s=n.getExtension(M.id_ce_subjectKeyIdentifier);if(s&&s.keyId!==i.keyId)continue}else if(i.certId){let s=n.getExtension(M.id_ce_subjectAltName);if(s&&!(i.certId.serialNumber===n.serialNumber&&X.isEqual(V.AsnConvert.serialize(i.certId.name),V.AsnConvert.serialize(s))))continue}}try{let s={...n.publicKey.algorithm,...t.signatureAlgorithm},a=await n.publicKey.export(s,["verify"],r);if(!await t.verify({publicKey:a,signatureOnly:!0},r))continue}catch{continue}return n}}return null}};function JA(e,t=kt.get()){let r=X.BufferSourceConverter.toUint8Array(X.Convert.FromHex(e||"")),i=r&&r.length&&r.some(s=>s>0)?new Uint8Array(r):void 0;i||(i=t.getRandomValues(new Uint8Array(16)));let n=0;for(;n<i.length-1&&i[n]===0;)n++;if(i=i.slice(n),i[0]>127){let s=new Uint8Array(i.length+1);s[0]=0,s.set(i,1),i=s}return i.buffer}var WA=class{static async createSelfSigned(t,r=kt.get()){if(!t.keys.privateKey)throw new Error("Bad field 'keys' in 'params' argument. 'privateKey' is empty");if(!t.keys.publicKey)throw new Error("Bad field 'keys' in 'params' argument. 'publicKey' is empty");return this.create({serialNumber:t.serialNumber,subject:t.name,issuer:t.name,notBefore:t.notBefore,notAfter:t.notAfter,publicKey:t.keys.publicKey,signingKey:t.keys.privateKey,signingAlgorithm:t.signingAlgorithm,extensions:t.extensions},r)}static async create(t,r=kt.get()){var i;let n;t.publicKey instanceof fn?n=t.publicKey.rawData:"publicKey"in t.publicKey?n=t.publicKey.publicKey.rawData:X.BufferSourceConverter.isBufferSource(t.publicKey)?n=t.publicKey:n=await r.subtle.exportKey("spki",t.publicKey);let s=JA(t.serialNumber,r),a=t.notBefore||new Date,o=t.notAfter||new Date(a.getTime()+31536e6),c=new M.Certificate({tbsCertificate:new M.TBSCertificate({version:M.Version.v3,serialNumber:s,validity:new M.Validity({notBefore:a,notAfter:o}),extensions:new M.Extensions(((i=t.extensions)===null||i===void 0?void 0:i.map(y=>V.AsnConvert.parse(y.rawData,M.Extension)))||[]),subjectPublicKeyInfo:V.AsnConvert.parse(n,M.SubjectPublicKeyInfo)})});if(t.subject){let y=t.subject instanceof mr?t.subject:new mr(t.subject);c.tbsCertificate.subject=V.AsnConvert.parse(y.toArrayBuffer(),M.Name)}if(t.issuer){let y=t.issuer instanceof mr?t.issuer:new mr(t.issuer);c.tbsCertificate.issuer=V.AsnConvert.parse(y.toArrayBuffer(),M.Name)}let u={hash:"SHA-256"},l="signingKey"in t?{...u,...t.signingAlgorithm,...t.signingKey.algorithm}:{...u,...t.signingAlgorithm},p=vt.container.resolve(dn);c.tbsCertificate.signature=c.signatureAlgorithm=p.toAsnAlgorithm(l);let d=V.AsnConvert.serialize(c.tbsCertificate),h="signingKey"in t?await r.subtle.sign(l,t.signingKey,d):t.signature,f=vt.container.resolveAll(ks).reverse(),m=null;for(let y of f)if(m=y.toAsnSignature(l,h),m)break;if(!m)throw Error("Cannot convert ASN.1 signature value to WebCrypto format");return c.signatureValue=m,new ca(V.AsnConvert.serialize(c))}},Ed,Td,Xu,Zu,el;Z.X509CrlReason=void 0;(function(e){e[e.unspecified=0]="unspecified",e[e.keyCompromise=1]="keyCompromise",e[e.cACompromise=2]="cACompromise",e[e.affiliationChanged=3]="affiliationChanged",e[e.superseded=4]="superseded",e[e.cessationOfOperation=5]="cessationOfOperation",e[e.certificateHold=6]="certificateHold",e[e.removeFromCRL=8]="removeFromCRL",e[e.privilegeWithdrawn=9]="privilegeWithdrawn",e[e.aACompromise=10]="aACompromise"})(Z.X509CrlReason||(Z.X509CrlReason={}));var al=class extends Vn{get serialNumber(){return $.__classPrivateFieldGet(this,Ed,"f")||$.__classPrivateFieldSet(this,Ed,X.Convert.ToHex(this.asn.userCertificate),"f"),$.__classPrivateFieldGet(this,Ed,"f")}get revocationDate(){return $.__classPrivateFieldGet(this,Td,"f")||$.__classPrivateFieldSet(this,Td,this.asn.revocationDate.getTime(),"f"),$.__classPrivateFieldGet(this,Td,"f")}get reason(){return $.__classPrivateFieldGet(this,Xu,"f")===void 0&&this.extensions,$.__classPrivateFieldGet(this,Xu,"f")}get invalidity(){return $.__classPrivateFieldGet(this,Zu,"f")===void 0&&this.extensions,$.__classPrivateFieldGet(this,Zu,"f")}get extensions(){return $.__classPrivateFieldGet(this,el,"f")||($.__classPrivateFieldSet(this,el,[],"f"),this.asn.crlEntryExtensions&&$.__classPrivateFieldSet(this,el,this.asn.crlEntryExtensions.map(t=>{let r=_r.create(V.AsnConvert.serialize(t));switch(r.type){case ge.id_ce_cRLReasons:$.__classPrivateFieldGet(this,Xu,"f")===void 0&&$.__classPrivateFieldSet(this,Xu,V.AsnConvert.parse(r.value,ge.CRLReason).reason,"f");break;case ge.id_ce_invalidityDate:$.__classPrivateFieldGet(this,Zu,"f")===void 0&&$.__classPrivateFieldSet(this,Zu,V.AsnConvert.parse(r.value,ge.InvalidityDate).value,"f");break}return r}),"f")),$.__classPrivateFieldGet(this,el,"f")}constructor(...t){let r;if(X.BufferSourceConverter.isBufferSource(t[0])?r=X.BufferSourceConverter.toArrayBuffer(t[0]):typeof t[0]=="string"?r=V.AsnConvert.serialize(new ge.RevokedCertificate({userCertificate:JA(t[0]),revocationDate:new ge.Time(t[1]),crlEntryExtensions:t[2]})):t[0]instanceof ge.RevokedCertificate&&(r=t[0]),!r)throw new TypeError("Cannot create X509CrlEntry instance. Wrong constructor arguments.");super(r,ge.RevokedCertificate),Ed.set(this,void 0),Td.set(this,void 0),Xu.set(this,void 0),Zu.set(this,void 0),el.set(this,void 0)}onInit(t){}};Ed=new WeakMap,Td=new WeakMap,Xu=new WeakMap,Zu=new WeakMap,el=new WeakMap;var Id,Bd,kd,Pd,Nd,Rd,tl,pg=class extends pi{get version(){return this.asn.tbsCertList.version}get signatureAlgorithm(){if(!$.__classPrivateFieldGet(this,Bd,"f")){let t=vt.container.resolve(dn);$.__classPrivateFieldSet(this,Bd,t.toWebAlgorithm(this.asn.signatureAlgorithm),"f")}return $.__classPrivateFieldGet(this,Bd,"f")}get signature(){return this.asn.signature}get issuer(){return this.issuerName.toString()}get issuerName(){return $.__classPrivateFieldGet(this,kd,"f")||$.__classPrivateFieldSet(this,kd,new mr(this.asn.tbsCertList.issuer),"f"),$.__classPrivateFieldGet(this,kd,"f")}get thisUpdate(){if(!$.__classPrivateFieldGet(this,Pd,"f")){let t=this.asn.tbsCertList.thisUpdate.getTime();if(!t)throw new Error("Cannot get 'thisUpdate' value");$.__classPrivateFieldSet(this,Pd,t,"f")}return $.__classPrivateFieldGet(this,Pd,"f")}get nextUpdate(){var t;return $.__classPrivateFieldGet(this,Nd,"f")===void 0&&$.__classPrivateFieldSet(this,Nd,((t=this.asn.tbsCertList.nextUpdate)===null||t===void 0?void 0:t.getTime())||void 0,"f"),$.__classPrivateFieldGet(this,Nd,"f")}get entries(){var t;return $.__classPrivateFieldGet(this,Rd,"f")||$.__classPrivateFieldSet(this,Rd,((t=this.asn.tbsCertList.revokedCertificates)===null||t===void 0?void 0:t.map(r=>new al(r)))||[],"f"),$.__classPrivateFieldGet(this,Rd,"f")}get extensions(){return $.__classPrivateFieldGet(this,tl,"f")||($.__classPrivateFieldSet(this,tl,[],"f"),this.asn.tbsCertList.crlExtensions&&$.__classPrivateFieldSet(this,tl,this.asn.tbsCertList.crlExtensions.map(t=>_r.create(V.AsnConvert.serialize(t))),"f")),$.__classPrivateFieldGet(this,tl,"f")}get tbs(){return $.__classPrivateFieldGet(this,Id,"f")||$.__classPrivateFieldSet(this,Id,this.asn.tbsCertListRaw||V.AsnConvert.serialize(this.asn.tbsCertList),"f"),$.__classPrivateFieldGet(this,Id,"f")}get tbsCertListSignatureAlgorithm(){return this.asn.tbsCertList.signature}get certListSignatureAlgorithm(){return this.asn.signatureAlgorithm}constructor(t){super(t,pi.isAsnEncoded(t)?ge.CertificateList:void 0),this.tag=br.CrlTag,Id.set(this,void 0),Bd.set(this,void 0),kd.set(this,void 0),Pd.set(this,void 0),Nd.set(this,void 0),Rd.set(this,void 0),tl.set(this,void 0)}onInit(t){}getExtension(t){for(let r of this.extensions)if(typeof t=="string"){if(r.type===t)return r}else if(r instanceof t)return r;return null}getExtensions(t){return this.extensions.filter(r=>typeof t=="string"?r.type===t:r instanceof t)}async verify(t,r=kt.get()){if(!this.certListSignatureAlgorithm.isEqual(this.tbsCertListSignatureAlgorithm))throw new Error("algorithm identifier in the sequence tbsCertList and CertificateList mismatch");let i,n,s=t.publicKey;try{s instanceof ca?(i={...s.publicKey.algorithm,...s.signatureAlgorithm},n=await s.publicKey.export(i,["verify"])):s instanceof fn?(i={...s.algorithm,...this.signatureAlgorithm},n=await s.export(i,["verify"])):(i={...s.algorithm,...this.signatureAlgorithm},n=s)}catch{return!1}let a=vt.container.resolveAll(ks).reverse(),o=null;for(let c of a)if(o=c.toWebSignature(i,this.signature),o)break;if(!o)throw Error("Cannot convert ASN.1 signature value to WebCrypto format");return await r.subtle.verify(this.signatureAlgorithm,n,o,this.tbs)}async getThumbprint(...t){let r,i="SHA-1";return t[0]&&(t[0].subtle?r=t[0]:(i=t[0]||i,r=t[1])),r??(r=kt.get()),await r.subtle.digest(i,this.rawData)}findRevoked(t){let r=typeof t=="string"?t:t.serialNumber,i=JA(r);for(let n of this.asn.tbsCertList.revokedCertificates||[])if(X.BufferSourceConverter.isEqual(n.userCertificate,i))return new al(V.AsnConvert.serialize(n));return null}};Id=new WeakMap,Bd=new WeakMap,kd=new WeakMap,Pd=new WeakMap,Nd=new WeakMap,Rd=new WeakMap,tl=new WeakMap;var YA=class{static async create(t,r=kt.get()){var i;let n=t.issuer instanceof mr?t.issuer:new mr(t.issuer),s=new M.CertificateList({tbsCertList:new M.TBSCertList({version:M.Version.v2,issuer:V.AsnConvert.parse(n.toArrayBuffer(),M.Name),thisUpdate:new ge.Time(t.thisUpdate||new Date)})});if(t.nextUpdate&&(s.tbsCertList.nextUpdate=new ge.Time(t.nextUpdate)),t.extensions&&t.extensions.length&&(s.tbsCertList.crlExtensions=new M.Extensions(t.extensions.map(d=>V.AsnConvert.parse(d.rawData,M.Extension))||[])),t.entries&&t.entries.length){s.tbsCertList.revokedCertificates=[];for(let d of t.entries){let h=pi.toArrayBuffer(d.serialNumber);if(s.tbsCertList.revokedCertificates.findIndex(y=>X.isEqual(y.userCertificate,h))>-1)throw new Error(`Certificate serial number ${d.serialNumber} already exists in tbsCertList`);let m=new ge.RevokedCertificate({userCertificate:h,revocationDate:new ge.Time(d.revocationDate||new Date)});if("extensions"in d&&(!((i=d.extensions)===null||i===void 0)&&i.length)?m.crlEntryExtensions=d.extensions.map(y=>V.AsnConvert.parse(y.rawData,M.Extension)):m.crlEntryExtensions=[],!(d instanceof al)&&(d.reason&&m.crlEntryExtensions.push(new M.Extension({extnID:M.id_ce_cRLReasons,critical:!1,extnValue:new V.OctetString(V.AsnConvert.serialize(new M.CRLReason(d.reason)))})),d.invalidity&&m.crlEntryExtensions.push(new M.Extension({extnID:M.id_ce_invalidityDate,critical:!1,extnValue:new V.OctetString(V.AsnConvert.serialize(new M.InvalidityDate(d.invalidity)))})),d.issuer)){let y=t.issuer instanceof mr?t.issuer:new mr(t.issuer);m.crlEntryExtensions.push(new M.Extension({extnID:M.id_ce_certificateIssuer,critical:!1,extnValue:new V.OctetString(V.AsnConvert.serialize(V.AsnConvert.parse(y.toArrayBuffer(),M.Name)))}))}s.tbsCertList.revokedCertificates.push(m)}}let a={...t.signingAlgorithm,...t.signingKey.algorithm},o=vt.container.resolve(dn);s.tbsCertList.signature=s.signatureAlgorithm=o.toAsnAlgorithm(a);let c=V.AsnConvert.serialize(s.tbsCertList),u=await r.subtle.sign(a,t.signingKey,c),l=vt.container.resolveAll(ks).reverse(),p=null;for(let d of l)if(p=d.toAsnSignature(a,u),p)break;if(!p)throw Error("Cannot convert ASN.1 signature value to WebCrypto format");return s.signature=p,new pg(V.AsnConvert.serialize(s))}};_r.register(M.id_ce_basicConstraints,jd);_r.register(M.id_ce_extKeyUsage,Ud);_r.register(M.id_ce_keyUsage,Fd);_r.register(M.id_ce_subjectKeyIdentifier,Md);_r.register(M.id_ce_authorityKeyIdentifier,qd);_r.register(M.id_ce_subjectAltName,Vd);_r.register(M.id_ce_cRLDistributionPoints,Hd);_r.register(M.id_pe_authorityInfoAccess,$d);_r.register(M.id_ce_issuerAltName,zd);zo.register(rl.id_pkcs9_at_challengePassword,Gd);zo.register(rl.id_pkcs9_at_extensionRequest,sl);vt.container.registerSingleton(ks,ug);vt.container.registerSingleton(ks,Hn);Hn.namedCurveSize.set("P-256",32);Hn.namedCurveSize.set("K-256",32);Hn.namedCurveSize.set("P-384",48);Hn.namedCurveSize.set("P-521",66);Z.AlgorithmProvider=og;Z.AsnData=Vn;Z.AsnDefaultSignatureFormatter=ug;Z.AsnEcSignatureFormatter=Hn;Z.Attribute=$o;Z.AttributeFactory=zo;Z.AuthorityInfoAccessExtension=$d;Z.AuthorityKeyIdentifierExtension=qd;Z.BasicConstraintsExtension=jd;Z.CRLDistributionPointsExtension=Hd;Z.CertificatePolicyExtension=Kd;Z.ChallengePasswordAttribute=Gd;Z.CryptoProvider=il;Z.DN=Qy;Z.DNS=Yy;Z.DefaultAlgorithmSerializer=cg;Z.EMAIL=Jy;Z.ExtendedKeyUsageExtension=Ud;Z.Extension=ui;Z.ExtensionFactory=_r;Z.ExtensionsAttribute=sl;Z.GUID=eg;Z.GeneralName=pn;Z.GeneralNames=Kn;Z.IP=Xy;Z.IssuerAlternativeNameExtension=zd;Z.KeyUsagesExtension=Fd;Z.Name=mr;Z.NameIdentifier=Ld;Z.OidSerializer=Vi;Z.PemConverter=br;Z.PemData=pi;Z.Pkcs10CertificateRequest=Wd;Z.Pkcs10CertificateRequestGenerator=zA;Z.PublicKey=fn;Z.REGISTERED_ID=od;Z.SubjectAlternativeNameExtension=Vd;Z.SubjectKeyIdentifierExtension=Md;Z.TextConverter=hn;Z.TextObject=Fe;Z.UPN=tg;Z.URL=Zy;Z.X509Certificate=ca;Z.X509CertificateGenerator=WA;Z.X509Certificates=lg;Z.X509ChainBuilder=GA;Z.X509Crl=pg;Z.X509CrlEntry=al;Z.X509CrlGenerator=YA;Z.cryptoProvider=kt;Z.diAlgorithm=ol;Z.diAlgorithmProvider=dn;Z.diAsnSignatureFormatter=ks;Z.idEd25519=ng;Z.idEd448=$A;Z.idX25519=ig;Z.idX448=HA});var Go=b(Ii=>{var f9=require("net"),{promisify:mN}=require("util"),Ps=require("crypto"),yN=ds(),Ut=hN(),d9=mN(Ps.randomInt),gN=mN(Ps.generateKeyPair);Ut.cryptoProvider.set(Ps.webcrypto);var h9="2.5.29.17",vN="1.3.6.1.5.5.7.1.31";function xN(e){let t={isRSA:!1,isECDSA:!1,publicKey:Ps.createPublicKey(e)};if(t.publicKey.asymmetricKeyType==="rsa")t.isRSA=!0;else if(t.publicKey.asymmetricKeyType==="ec")t.isECDSA=!0;else throw new Error("Unable to parse key information, unknown format");return t}async function fg(e=2048){let t=await gN("rsa",{modulusLength:e,privateKeyEncoding:{type:"pkcs8",format:"pem"}});return Buffer.from(t.privateKey)}Ii.createPrivateRsaKey=fg;Ii.createPrivateKey=fg;Ii.createPrivateEcdsaKey=async(e="P-256")=>{let t=await gN("ec",{namedCurve:e,privateKeyEncoding:{type:"pkcs8",format:"pem"}});return Buffer.from(t.privateKey)};Ii.getPublicKey=e=>{let t=xN(e),r=t.publicKey.export({type:t.isECDSA?"spki":"pkcs1",format:"pem"});return Buffer.from(r)};function bN(e){let t=Ps.createPublicKey(e).export({format:"jwk"});return Object.keys(t).sort().reduce((r,i)=>(r[i]=t[i],r),{})}Ii.getJwk=bN;async function _N(e){let t=xN(e),r=bN(e),i={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};t.isECDSA&&(i.name="ECDSA",i.namedCurve=r.crv,r.crv==="P-384"&&(i.hash.name="SHA-384"),r.crv==="P-521"&&(i.hash.name="SHA-512"));let n=Ut.PemConverter.decodeFirst(e.toString()),s=await Ps.webcrypto.subtle.importKey("pkcs8",n,i,!0,["sign"]),a=await Ps.webcrypto.subtle.importKey("jwk",r,i,!0,["verify"]);return[{privateKey:s,publicKey:a},i]}function AN(e){return Buffer.isBuffer(e)&&(e=e.toString()),Ut.PemConverter.decodeWithHeaders(e).map(t=>Ut.PemConverter.encode([t]))}Ii.splitPemChain=AN;Ii.getPemBodyAsB64u=e=>{let t=AN(e);if(!t.length)throw new Error("Unable to parse PEM body from string");let r=Ut.PemConverter.decodeFirst(t[0]);return Buffer.from(r).toString("base64url")};function SN(e){let t=e.subjectName.getField("CN").pop()||null,r=e.getExtension(h9),i=[];if(r){let n=new Ut.SubjectAlternativeNameExtension(r.rawData);i=i.concat(n.names.items.map(s=>s.value))}return{commonName:t,altNames:i}}Ii.readCsrDomains=e=>{Buffer.isBuffer(e)&&(e=e.toString());let t=Ut.PemConverter.decodeFirst(e),r=new Ut.Pkcs10CertificateRequest(t);return SN(r)};Ii.readCertificateInfo=e=>{Buffer.isBuffer(e)&&(e=e.toString());let t=Ut.PemConverter.decodeFirst(e),r=new Ut.X509Certificate(t);return{issuer:{commonName:r.issuerName.getField("CN").pop()||null},domains:SN(r),notBefore:r.notBefore,notAfter:r.notAfter}};function m9(e){switch(e){case"C":return"printableString";case"E":return"ia5String";default:return"utf8String"}}function wN(e){return Object.entries(e).reduce((t,[r,i])=>{if(i){let n=m9(r);t.push({[r]:[{[n]:i}]})}return t},[])}function CN(e){return new Ut.SubjectAlternativeNameExtension(e.map(t=>({type:f9.isIP(t)?"ip":"dns",value:t})))}Ii.createCsr=async(e,t=null)=>{t?Buffer.isBuffer(t)||(t=Buffer.from(t)):t=await fg(e.keySize),typeof e.altNames>"u"&&(e.altNames=[]),e.commonName&&!e.altNames.includes(e.commonName)&&e.altNames.unshift(e.commonName);let[r,i]=await _N(t),n=[new Ut.KeyUsagesExtension(Ut.KeyUsageFlags.digitalSignature|Ut.KeyUsageFlags.keyEncipherment),CN(e.altNames)],a=(await Ut.Pkcs10CertificateRequestGenerator.create({keys:r,extensions:n,signingAlgorithm:i,name:wN({CN:e.commonName,C:e.country,ST:e.state,L:e.locality,O:e.organization,OU:e.organizationUnit,E:e.emailAddress})})).toString("pem");return[t,Buffer.from(a)]};Ii.createAlpnCertificate=async(e,t,r=null)=>{r?Buffer.isBuffer(r)||(r=Buffer.from(r)):r=await fg();let i=new Date,n=e.identifier.value,s=await d9(1,999999999),a=`${Math.floor(i.getTime()/1e3)}${s}`,[o,c]=await _N(r),u=[new Ut.KeyUsagesExtension(Ut.KeyUsageFlags.keyCertSign|Ut.KeyUsageFlags.cRLSign,!0),new Ut.BasicConstraintsExtension(!0,2,!0),await Ut.SubjectKeyIdentifierExtension.create(o.publicKey),CN([n])],l=Ps.createHash("sha256").update(t).digest("hex"),p=new yN.OctetString({valueHex:Buffer.from(l,"hex")});u.push(new Ut.Extension(vN,!0,p.toBER()));let h=(await Ut.X509CertificateGenerator.createSelfSigned({keys:o,signingAlgorithm:c,extensions:u,serialNumber:a,notBefore:i,notAfter:i,name:wN({CN:n})})).toString("pem");return[r,Buffer.from(h)]};Ii.isAlpnCertificateAuthorizationValid=(e,t)=>{let r=Ps.createHash("sha256").update(t).digest("hex"),n=new Ut.X509Certificate(e).getExtension(vN);if(!n)throw new Error("Unable to locate ALPN extension within parsed certificate");let s=yN.fromBER(n.value);return Buffer.from(s.result.valueBlock.valueHexView).toString("hex")===r}});var TN=b((Woe,EN)=>{var cl=1e3,ul=cl*60,ll=ul*60,Wo=ll*24,y9=Wo*7,g9=Wo*365.25;EN.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return v9(e);if(r==="number"&&isFinite(e))return t.long?b9(e):x9(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function v9(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),i=(t[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*g9;case"weeks":case"week":case"w":return r*y9;case"days":case"day":case"d":return r*Wo;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ll;case"minutes":case"minute":case"mins":case"min":case"m":return r*ul;case"seconds":case"second":case"secs":case"sec":case"s":return r*cl;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function x9(e){var t=Math.abs(e);return t>=Wo?Math.round(e/Wo)+"d":t>=ll?Math.round(e/ll)+"h":t>=ul?Math.round(e/ul)+"m":t>=cl?Math.round(e/cl)+"s":e+"ms"}function b9(e){var t=Math.abs(e);return t>=Wo?dg(e,t,Wo,"day"):t>=ll?dg(e,t,ll,"hour"):t>=ul?dg(e,t,ul,"minute"):t>=cl?dg(e,t,cl,"second"):e+" ms"}function dg(e,t,r,i){var n=t>=r*1.5;return Math.round(e/r)+" "+i+(n?"s":"")}});var XA=b((Yoe,IN)=>{function _9(e){r.debug=r,r.default=r,r.coerce=c,r.disable=a,r.enable=n,r.enabled=o,r.humanize=TN(),r.destroy=u,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let p=0;for(let d=0;d<l.length;d++)p=(p<<5)-p+l.charCodeAt(d),p|=0;return r.colors[Math.abs(p)%r.colors.length]}r.selectColor=t;function r(l){let p,d=null,h,f;function m(...y){if(!m.enabled)return;let _=m,A=Number(new Date),S=A-(p||A);_.diff=S,_.prev=p,_.curr=A,p=A,y[0]=r.coerce(y[0]),typeof y[0]!="string"&&y.unshift("%O");let B=0;y[0]=y[0].replace(/%([a-zA-Z%])/g,(N,Y)=>{if(N==="%%")return"%";B++;let q=r.formatters[Y];if(typeof q=="function"){let z=y[B];N=q.call(_,z),y.splice(B,1),B--}return N}),r.formatArgs.call(_,y),(_.log||r.log).apply(_,y)}return m.namespace=l,m.useColors=r.useColors(),m.color=r.selectColor(l),m.extend=i,m.destroy=r.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,f=r.enabled(l)),f),set:y=>{d=y}}),typeof r.init=="function"&&r.init(m),m}function i(l,p){let d=r(this.namespace+(typeof p>"u"?":":p)+l);return d.log=this.log,d}function n(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let p=(typeof l=="string"?l:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of p)d[0]==="-"?r.skips.push(d.slice(1)):r.names.push(d)}function s(l,p){let d=0,h=0,f=-1,m=0;for(;d<l.length;)if(h<p.length&&(p[h]===l[d]||p[h]==="*"))p[h]==="*"?(f=h,m=d,h++):(d++,h++);else if(f!==-1)h=f+1,m++,d=m;else return!1;for(;h<p.length&&p[h]==="*";)h++;return h===p.length}function a(){let l=[...r.names,...r.skips.map(p=>"-"+p)].join(",");return r.enable(""),l}function o(l){for(let p of r.skips)if(s(l,p))return!1;for(let p of r.names)if(s(l,p))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function u(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}IN.exports=_9});var BN=b((di,hg)=>{di.formatArgs=S9;di.save=w9;di.load=C9;di.useColors=A9;di.storage=E9();di.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();di.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function A9(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function S9(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+hg.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(i=r))}),e.splice(i,0,t)}di.log=console.debug||console.log||(()=>{});function w9(e){try{e?di.storage.setItem("debug",e):di.storage.removeItem("debug")}catch{}}function C9(){let e;try{e=di.storage.getItem("debug")||di.storage.getItem("DEBUG")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function E9(){try{return localStorage}catch{}}hg.exports=XA()(di);var{formatters:T9}=hg.exports;T9.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var PN=b((Ar,yg)=>{var I9=require("tty"),mg=require("util");Ar.init=L9;Ar.log=N9;Ar.formatArgs=k9;Ar.save=R9;Ar.load=O9;Ar.useColors=B9;Ar.destroy=mg.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Ar.colors=[6,2,3,4,5,1];try{let e=require("supports-color");e&&(e.stderr||e).level>=2&&(Ar.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}Ar.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let r=t.substring(6).toLowerCase().replace(/_([a-z])/g,(n,s)=>s.toUpperCase()),i=process.env[t];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),e[r]=i,e},{});function B9(){return"colors"in Ar.inspectOpts?!!Ar.inspectOpts.colors:I9.isatty(process.stderr.fd)}function k9(e){let{namespace:t,useColors:r}=this;if(r){let i=this.color,n="\x1B[3"+(i<8?i:"8;5;"+i),s=` ${n};1m${t} \x1B[0m`;e[0]=s+e[0].split(`
|
|
14
|
+
`).join(`
|
|
15
|
+
`+s),e.push(n+"m+"+yg.exports.humanize(this.diff)+"\x1B[0m")}else e[0]=P9()+t+" "+e[0]}function P9(){return Ar.inspectOpts.hideDate?"":new Date().toISOString()+" "}function N9(...e){return process.stderr.write(mg.formatWithOptions(Ar.inspectOpts,...e)+`
|
|
16
|
+
`)}function R9(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function O9(){return process.env.DEBUG}function L9(e){e.inspectOpts={};let t=Object.keys(Ar.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=Ar.inspectOpts[t[r]]}yg.exports=XA()(Ar);var{formatters:kN}=yg.exports;kN.o=function(e){return this.inspectOpts.colors=this.useColors,mg.inspect(e,this.inspectOpts).split(`
|
|
17
|
+
`).map(t=>t.trim()).join(" ")};kN.O=function(e){return this.inspectOpts.colors=this.useColors,mg.inspect(e,this.inspectOpts)}});var eS=b((Qoe,ZA)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?ZA.exports=BN():ZA.exports=PN()});var ua=b(tS=>{var D9=eS()("acme-client"),NN=()=>{};tS.setLogger=e=>{NN=e};tS.log=e=>{D9(e),NN(e)}});var LN=b((Xoe,ON)=>{var RN=require("stream").Stream,q9=require("util");ON.exports=mn;function mn(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}q9.inherits(mn,RN);mn.create=function(e,t){var r=new this;t=t||{};for(var i in t)r[i]=t[i];r.source=e;var n=e.emit;return e.emit=function(){return r._handleEmit(arguments),n.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(mn.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});mn.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};mn.prototype.resume=function(){this._released||this.release(),this.source.resume()};mn.prototype.pause=function(){this.source.pause()};mn.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};mn.prototype.pipe=function(){var e=RN.prototype.pipe.apply(this,arguments);return this.resume(),e};mn.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};mn.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var UN=b((Zoe,jN)=>{var j9=require("util"),qN=require("stream").Stream,DN=LN();jN.exports=$t;function $t(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}j9.inherits($t,qN);$t.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};$t.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};$t.prototype.append=function(e){var t=$t.isStreamLike(e);if(t){if(!(e instanceof DN)){var r=DN.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};$t.prototype.pipe=function(e,t){return qN.prototype.pipe.call(this,e,t),this.resume(),e};$t.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};$t.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var i=$t.isStreamLike(r);i&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};$t.prototype._pipeNext=function(e){this._currentStream=e;var t=$t.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};$t.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};$t.prototype.write=function(e){this.emit("data",e)};$t.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};$t.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};$t.prototype.end=function(){this._reset(),this.emit("end")};$t.prototype.destroy=function(){this._reset(),this.emit("close")};$t.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};$t.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};$t.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};$t.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var FN=b((ece,U9)=>{U9.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var VN=b((tce,MN)=>{MN.exports=FN()});var $N=b(hi=>{"use strict";var gg=VN(),F9=require("path").extname,KN=/^\s*([^;\s]*)(?:;|\s|$)/,M9=/^text\//i;hi.charset=HN;hi.charsets={lookup:HN};hi.contentType=V9;hi.extension=K9;hi.extensions=Object.create(null);hi.lookup=H9;hi.types=Object.create(null);$9(hi.extensions,hi.types);function HN(e){if(!e||typeof e!="string")return!1;var t=KN.exec(e),r=t&&gg[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&M9.test(t[1])?"UTF-8":!1}function V9(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?hi.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=hi.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}function K9(e){if(!e||typeof e!="string")return!1;var t=KN.exec(e),r=t&&hi.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}function H9(e){if(!e||typeof e!="string")return!1;var t=F9("x."+e).toLowerCase().substr(1);return t&&hi.types[t]||!1}function $9(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(gg).forEach(function(n){var s=gg[n],a=s.extensions;if(!(!a||!a.length)){e[n]=a;for(var o=0;o<a.length;o++){var c=a[o];if(t[c]){var u=r.indexOf(gg[t[c]].source),l=r.indexOf(s.source);if(t[c]!=="application/octet-stream"&&(u>l||u===l&&t[c].substr(0,12)==="application/"))continue}t[c]=n}}})}});var GN=b((ice,zN)=>{zN.exports=z9;function z9(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}});var rS=b((nce,YN)=>{var WN=GN();YN.exports=G9;function G9(e){var t=!1;return WN(function(){t=!0}),function(i,n){t?e(i,n):WN(function(){e(i,n)})}}});var iS=b((sce,QN)=>{QN.exports=W9;function W9(e){Object.keys(e.jobs).forEach(Y9.bind(e)),e.jobs={}}function Y9(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}});var nS=b((ace,XN)=>{var JN=rS(),Q9=iS();XN.exports=J9;function J9(e,t,r,i){var n=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[n]=X9(t,n,e[n],function(s,a){n in r.jobs&&(delete r.jobs[n],s?Q9(r):r.results[n]=a,i(s,r.results))})}function X9(e,t,r,i){var n;return e.length==2?n=e(r,JN(i)):n=e(r,t,JN(i)),n}});var sS=b((oce,ZN)=>{ZN.exports=Z9;function Z9(e,t){var r=!Array.isArray(e),i={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&i.keyedList.sort(r?t:function(n,s){return t(e[n],e[s])}),i}});var aS=b((cce,eR)=>{var eH=iS(),tH=rS();eR.exports=rH;function rH(e){Object.keys(this.jobs).length&&(this.index=this.size,eH(this),tH(e)(null,this.results))}});var rR=b((uce,tR)=>{var iH=nS(),nH=sS(),sH=aS();tR.exports=aH;function aH(e,t,r){for(var i=nH(e);i.index<(i.keyedList||e).length;)iH(e,t,i,function(n,s){if(n){r(n,s);return}if(Object.keys(i.jobs).length===0){r(null,i.results);return}}),i.index++;return sH.bind(i,r)}});var oS=b((lce,vg)=>{var iR=nS(),oH=sS(),cH=aS();vg.exports=uH;vg.exports.ascending=nR;vg.exports.descending=lH;function uH(e,t,r,i){var n=oH(e,r);return iR(e,t,n,function s(a,o){if(a){i(a,o);return}if(n.index++,n.index<(n.keyedList||e).length){iR(e,t,n,s);return}i(null,n.results)}),cH.bind(n,i)}function nR(e,t){return e<t?-1:e>t?1:0}function lH(e,t){return-1*nR(e,t)}});var aR=b((pce,sR)=>{var pH=oS();sR.exports=fH;function fH(e,t,r){return pH(e,t,null,r)}});var cR=b((fce,oR)=>{oR.exports={parallel:rR(),serial:aR(),serialOrdered:oS()}});var cS=b((dce,uR)=>{"use strict";uR.exports=Object});var pR=b((hce,lR)=>{"use strict";lR.exports=Error});var dR=b((mce,fR)=>{"use strict";fR.exports=EvalError});var mR=b((yce,hR)=>{"use strict";hR.exports=RangeError});var gR=b((gce,yR)=>{"use strict";yR.exports=ReferenceError});var xR=b((vce,vR)=>{"use strict";vR.exports=SyntaxError});var xg=b((xce,bR)=>{"use strict";bR.exports=TypeError});var AR=b((bce,_R)=>{"use strict";_R.exports=URIError});var wR=b((_ce,SR)=>{"use strict";SR.exports=Math.abs});var ER=b((Ace,CR)=>{"use strict";CR.exports=Math.floor});var IR=b((Sce,TR)=>{"use strict";TR.exports=Math.max});var kR=b((wce,BR)=>{"use strict";BR.exports=Math.min});var NR=b((Cce,PR)=>{"use strict";PR.exports=Math.pow});var OR=b((Ece,RR)=>{"use strict";RR.exports=Math.round});var DR=b((Tce,LR)=>{"use strict";LR.exports=Number.isNaN||function(t){return t!==t}});var jR=b((Ice,qR)=>{"use strict";var dH=DR();qR.exports=function(t){return dH(t)||t===0?t:t<0?-1:1}});var FR=b((Bce,UR)=>{"use strict";UR.exports=Object.getOwnPropertyDescriptor});var uS=b((kce,MR)=>{"use strict";var bg=FR();if(bg)try{bg([],"length")}catch{bg=null}MR.exports=bg});var KR=b((Pce,VR)=>{"use strict";var _g=Object.defineProperty||!1;if(_g)try{_g({},"a",{value:1})}catch{_g=!1}VR.exports=_g});var lS=b((Nce,HR)=>{"use strict";HR.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;t[r]=n;for(var s in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(t,r);if(o.value!==n||o.enumerable!==!0)return!1}return!0}});var GR=b((Rce,zR)=>{"use strict";var $R=typeof Symbol<"u"&&Symbol,hH=lS();zR.exports=function(){return typeof $R!="function"||typeof Symbol!="function"||typeof $R("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:hH()}});var pS=b((Oce,WR)=>{"use strict";WR.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var fS=b((Lce,YR)=>{"use strict";var mH=cS();YR.exports=mH.getPrototypeOf||null});var XR=b((Dce,JR)=>{"use strict";var yH="Function.prototype.bind called on incompatible ",gH=Object.prototype.toString,vH=Math.max,xH="[object Function]",QR=function(t,r){for(var i=[],n=0;n<t.length;n+=1)i[n]=t[n];for(var s=0;s<r.length;s+=1)i[s+t.length]=r[s];return i},bH=function(t,r){for(var i=[],n=r||0,s=0;n<t.length;n+=1,s+=1)i[s]=t[n];return i},_H=function(e,t){for(var r="",i=0;i<e.length;i+=1)r+=e[i],i+1<e.length&&(r+=t);return r};JR.exports=function(t){var r=this;if(typeof r!="function"||gH.apply(r)!==xH)throw new TypeError(yH+r);for(var i=bH(arguments,1),n,s=function(){if(this instanceof n){var l=r.apply(this,QR(i,arguments));return Object(l)===l?l:this}return r.apply(t,QR(i,arguments))},a=vH(0,r.length-i.length),o=[],c=0;c<a;c++)o[c]="$"+c;if(n=Function("binder","return function ("+_H(o,",")+"){ return binder.apply(this,arguments); }")(s),r.prototype){var u=function(){};u.prototype=r.prototype,n.prototype=new u,u.prototype=null}return n}});var Qd=b((qce,ZR)=>{"use strict";var AH=XR();ZR.exports=Function.prototype.bind||AH});var Ag=b((jce,eO)=>{"use strict";eO.exports=Function.prototype.call});var dS=b((Uce,tO)=>{"use strict";tO.exports=Function.prototype.apply});var iO=b((Fce,rO)=>{"use strict";rO.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var sO=b((Mce,nO)=>{"use strict";var SH=Qd(),wH=dS(),CH=Ag(),EH=iO();nO.exports=EH||SH.call(CH,wH)});var oO=b((Vce,aO)=>{"use strict";var TH=Qd(),IH=xg(),BH=Ag(),kH=sO();aO.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new IH("a function is required");return kH(TH,BH,t)}});var dO=b((Kce,fO)=>{"use strict";var PH=oO(),cO=uS(),lO;try{lO=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var hS=!!lO&&cO&&cO(Object.prototype,"__proto__"),pO=Object,uO=pO.getPrototypeOf;fO.exports=hS&&typeof hS.get=="function"?PH([hS.get]):typeof uO=="function"?function(t){return uO(t==null?t:pO(t))}:!1});var vO=b((Hce,gO)=>{"use strict";var hO=pS(),mO=fS(),yO=dO();gO.exports=hO?function(t){return hO(t)}:mO?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return mO(t)}:yO?function(t){return yO(t)}:null});var Sg=b(($ce,xO)=>{"use strict";var NH=Function.prototype.call,RH=Object.prototype.hasOwnProperty,OH=Qd();xO.exports=OH.call(NH,RH)});var EO=b((zce,CO)=>{"use strict";var He,LH=cS(),DH=pR(),qH=dR(),jH=mR(),UH=gR(),hl=xR(),dl=xg(),FH=AR(),MH=wR(),VH=ER(),KH=IR(),HH=kR(),$H=NR(),zH=OR(),GH=jR(),SO=Function,mS=function(e){try{return SO('"use strict"; return ('+e+").constructor;")()}catch{}},Jd=uS(),WH=KR(),yS=function(){throw new dl},YH=Jd?(function(){try{return arguments.callee,yS}catch{try{return Jd(arguments,"callee").get}catch{return yS}}})():yS,pl=GR()(),Sr=vO(),QH=fS(),JH=pS(),wO=dS(),Xd=Ag(),fl={},XH=typeof Uint8Array>"u"||!Sr?He:Sr(Uint8Array),Yo={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?He:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?He:ArrayBuffer,"%ArrayIteratorPrototype%":pl&&Sr?Sr([][Symbol.iterator]()):He,"%AsyncFromSyncIteratorPrototype%":He,"%AsyncFunction%":fl,"%AsyncGenerator%":fl,"%AsyncGeneratorFunction%":fl,"%AsyncIteratorPrototype%":fl,"%Atomics%":typeof Atomics>"u"?He:Atomics,"%BigInt%":typeof BigInt>"u"?He:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?He:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?He:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?He:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":DH,"%eval%":eval,"%EvalError%":qH,"%Float16Array%":typeof Float16Array>"u"?He:Float16Array,"%Float32Array%":typeof Float32Array>"u"?He:Float32Array,"%Float64Array%":typeof Float64Array>"u"?He:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?He:FinalizationRegistry,"%Function%":SO,"%GeneratorFunction%":fl,"%Int8Array%":typeof Int8Array>"u"?He:Int8Array,"%Int16Array%":typeof Int16Array>"u"?He:Int16Array,"%Int32Array%":typeof Int32Array>"u"?He:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":pl&&Sr?Sr(Sr([][Symbol.iterator]())):He,"%JSON%":typeof JSON=="object"?JSON:He,"%Map%":typeof Map>"u"?He:Map,"%MapIteratorPrototype%":typeof Map>"u"||!pl||!Sr?He:Sr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":LH,"%Object.getOwnPropertyDescriptor%":Jd,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?He:Promise,"%Proxy%":typeof Proxy>"u"?He:Proxy,"%RangeError%":jH,"%ReferenceError%":UH,"%Reflect%":typeof Reflect>"u"?He:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?He:Set,"%SetIteratorPrototype%":typeof Set>"u"||!pl||!Sr?He:Sr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?He:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":pl&&Sr?Sr(""[Symbol.iterator]()):He,"%Symbol%":pl?Symbol:He,"%SyntaxError%":hl,"%ThrowTypeError%":YH,"%TypedArray%":XH,"%TypeError%":dl,"%Uint8Array%":typeof Uint8Array>"u"?He:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?He:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?He:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?He:Uint32Array,"%URIError%":FH,"%WeakMap%":typeof WeakMap>"u"?He:WeakMap,"%WeakRef%":typeof WeakRef>"u"?He:WeakRef,"%WeakSet%":typeof WeakSet>"u"?He:WeakSet,"%Function.prototype.call%":Xd,"%Function.prototype.apply%":wO,"%Object.defineProperty%":WH,"%Object.getPrototypeOf%":QH,"%Math.abs%":MH,"%Math.floor%":VH,"%Math.max%":KH,"%Math.min%":HH,"%Math.pow%":$H,"%Math.round%":zH,"%Math.sign%":GH,"%Reflect.getPrototypeOf%":JH};if(Sr)try{null.error}catch(e){bO=Sr(Sr(e)),Yo["%Error.prototype%"]=bO}var bO,ZH=function e(t){var r;if(t==="%AsyncFunction%")r=mS("async function () {}");else if(t==="%GeneratorFunction%")r=mS("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=mS("async function* () {}");else if(t==="%AsyncGenerator%"){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(t==="%AsyncIteratorPrototype%"){var n=e("%AsyncGenerator%");n&&Sr&&(r=Sr(n.prototype))}return Yo[t]=r,r},_O={__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"]},Zd=Qd(),wg=Sg(),e$=Zd.call(Xd,Array.prototype.concat),t$=Zd.call(wO,Array.prototype.splice),AO=Zd.call(Xd,String.prototype.replace),Cg=Zd.call(Xd,String.prototype.slice),r$=Zd.call(Xd,RegExp.prototype.exec),i$=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,n$=/\\(\\)?/g,s$=function(t){var r=Cg(t,0,1),i=Cg(t,-1);if(r==="%"&&i!=="%")throw new hl("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new hl("invalid intrinsic syntax, expected opening `%`");var n=[];return AO(t,i$,function(s,a,o,c){n[n.length]=o?AO(c,n$,"$1"):a||s}),n},a$=function(t,r){var i=t,n;if(wg(_O,i)&&(n=_O[i],i="%"+n[0]+"%"),wg(Yo,i)){var s=Yo[i];if(s===fl&&(s=ZH(i)),typeof s>"u"&&!r)throw new dl("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:s}}throw new hl("intrinsic "+t+" does not exist!")};CO.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new dl("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new dl('"allowMissing" argument must be a boolean');if(r$(/^%?[^%]*%?$/,t)===null)throw new hl("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=s$(t),n=i.length>0?i[0]:"",s=a$("%"+n+"%",r),a=s.name,o=s.value,c=!1,u=s.alias;u&&(n=u[0],t$(i,e$([0,1],u)));for(var l=1,p=!0;l<i.length;l+=1){var d=i[l],h=Cg(d,0,1),f=Cg(d,-1);if((h==='"'||h==="'"||h==="`"||f==='"'||f==="'"||f==="`")&&h!==f)throw new hl("property names with quotes must have matching quotes");if((d==="constructor"||!p)&&(c=!0),n+="."+d,a="%"+n+"%",wg(Yo,a))o=Yo[a];else if(o!=null){if(!(d in o)){if(!r)throw new dl("base intrinsic for "+t+" exists, but the property is not available.");return}if(Jd&&l+1>=i.length){var m=Jd(o,d);p=!!m,p&&"get"in m&&!("originalValue"in m.get)?o=m.get:o=o[d]}else p=wg(o,d),o=o[d];p&&!c&&(Yo[a]=o)}}return o}});var IO=b((Gce,TO)=>{"use strict";var o$=lS();TO.exports=function(){return o$()&&!!Symbol.toStringTag}});var PO=b((Wce,kO)=>{"use strict";var c$=EO(),BO=c$("%Object.defineProperty%",!0),u$=IO()(),l$=Sg(),p$=xg(),Eg=u$?Symbol.toStringTag:null;kO.exports=function(t,r){var i=arguments.length>2&&!!arguments[2]&&arguments[2].force,n=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof i<"u"&&typeof i!="boolean"||typeof n<"u"&&typeof n!="boolean")throw new p$("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");Eg&&(i||!l$(t,Eg))&&(BO?BO(t,Eg,{configurable:!n,enumerable:!1,value:r,writable:!1}):t[Eg]=r)}});var RO=b((Yce,NO)=>{"use strict";NO.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var LO=b((Qce,OO)=>{"use strict";var bS=UN(),f$=require("util"),gS=require("path"),d$=require("http"),h$=require("https"),m$=require("url").parse,y$=require("fs"),g$=require("stream").Stream,v$=require("crypto"),vS=$N(),x$=cR(),b$=PO(),la=Sg(),xS=RO();function et(e){if(!(this instanceof et))return new et(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],bS.call(this),e=e||{};for(var t in e)this[t]=e[t]}f$.inherits(et,bS);et.LINE_BREAK=`\r
|
|
18
|
+
`;et.DEFAULT_CONTENT_TYPE="application/octet-stream";et.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var i=bS.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var n=this._multiPartHeader(e,t,r),s=this._multiPartFooter();i(n),i(t),i(s),this._trackLength(n,t,r)};et.prototype._trackLength=function(e,t,r){var i=0;r.knownLength!=null?i+=Number(r.knownLength):Buffer.isBuffer(t)?i=t.length:typeof t=="string"&&(i=Buffer.byteLength(t)),this._valueLength+=i,this._overheadLength+=Buffer.byteLength(e)+et.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&la(t,"httpVersion"))&&!(t instanceof g$))&&(r.knownLength||this._valuesToMeasure.push(t))};et.prototype._lengthRetriever=function(e,t){la(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):y$.stat(e.path,function(r,i){if(r){t(r);return}var n=i.size-(e.start?e.start:0);t(null,n)}):la(e,"httpVersion")?t(null,Number(e.headers["content-length"])):la(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};et.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var i=this._getContentDisposition(t,r),n=this._getContentType(t,r),s="",a={"Content-Disposition":["form-data",'name="'+e+'"'].concat(i||[]),"Content-Type":[].concat(n||[])};typeof r.header=="object"&&xS(a,r.header);var o;for(var c in a)if(la(a,c)){if(o=a[c],o==null)continue;Array.isArray(o)||(o=[o]),o.length&&(s+=c+": "+o.join("; ")+et.LINE_BREAK)}return"--"+this.getBoundary()+et.LINE_BREAK+s+et.LINE_BREAK};et.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=gS.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=gS.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&la(e,"httpVersion")&&(r=gS.basename(e.client._httpMessage.path||"")),r)return'filename="'+r+'"'};et.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=vS.lookup(e.name)),!r&&e&&e.path&&(r=vS.lookup(e.path)),!r&&e&&e.readable&&la(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=vS.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=et.DEFAULT_CONTENT_TYPE),r};et.prototype._multiPartFooter=function(){return function(e){var t=et.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};et.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+et.LINE_BREAK};et.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)la(e,t)&&(r[t.toLowerCase()]=e[t]);return r};et.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};et.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};et.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,i=this._streams.length;r<i;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(et.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};et.prototype._generateBoundary=function(){this._boundary="--------------------------"+v$.randomBytes(12).toString("hex")};et.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};et.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};et.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}x$.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,i){if(r){e(r);return}i.forEach(function(n){t+=n}),e(null,t)})};et.prototype.submit=function(e,t){var r,i,n={method:"post"};return typeof e=="string"?(e=m$(e),i=xS({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},n)):(i=xS(e,n),i.port||(i.port=i.protocol==="https:"?443:80)),i.headers=this.getHeaders(e.headers),i.protocol==="https:"?r=h$.request(i):r=d$.request(i),this.getLength(function(s,a){if(s&&s!=="Unknown stream"){this._error(s);return}if(a&&r.setHeader("Content-Length",a),this.pipe(r),t){var o,c=function(u,l){return r.removeListener("error",c),r.removeListener("response",o),t.call(this,u,l)};o=c.bind(this,null),r.on("error",c),r.on("response",o)}}.bind(this)),r};et.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};et.prototype.toString=function(){return"[object FormData]"};b$(et.prototype,"FormData");OO.exports=et});var qO=b(DO=>{"use strict";var _$=require("url").parse,A$={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443},S$=String.prototype.endsWith||function(e){return e.length<=this.length&&this.indexOf(e,this.length-e.length)!==-1};function w$(e){var t=typeof e=="string"?_$(e):e||{},r=t.protocol,i=t.host,n=t.port;if(typeof i!="string"||!i||typeof r!="string"||(r=r.split(":",1)[0],i=i.replace(/:\d*$/,""),n=parseInt(n)||A$[r]||0,!C$(i,n)))return"";var s=ml("npm_config_"+r+"_proxy")||ml(r+"_proxy")||ml("npm_config_proxy")||ml("all_proxy");return s&&s.indexOf("://")===-1&&(s=r+"://"+s),s}function C$(e,t){var r=(ml("npm_config_no_proxy")||ml("no_proxy")).toLowerCase();return r?r==="*"?!1:r.split(/[,\s]/).every(function(i){if(!i)return!0;var n=i.match(/^(.+):(\d+)$/),s=n?n[1]:i,a=n?parseInt(n[2]):0;return a&&a!==t?!0:/^[.*]/.test(s)?(s.charAt(0)==="*"&&(s=s.slice(1)),!S$.call(e,s)):e!==s}):!0}function ml(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}DO.getProxyForUrl=w$});var UO=b((Xce,jO)=>{var eh;jO.exports=function(){if(!eh){try{eh=eS()("follow-redirects")}catch{}typeof eh!="function"&&(eh=function(){})}eh.apply(null,arguments)}});var RS=b((Zce,NS)=>{var rh=require("url"),th=rh.URL,E$=require("http"),T$=require("https"),CS=require("stream").Writable,ES=require("assert"),FO=UO();(function(){var t=typeof process<"u",r=typeof window<"u"&&typeof document<"u",i=Jo(Error.captureStackTrace);!t&&(r||!i)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var TS=!1;try{ES(new th(""))}catch(e){TS=e.code==="ERR_INVALID_URL"}var I$=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],IS=["abort","aborted","connect","error","socket","timeout"],BS=Object.create(null);IS.forEach(function(e){BS[e]=function(t,r,i){this._redirectable.emit(e,t,r,i)}});var AS=ih("ERR_INVALID_URL","Invalid URL",TypeError),SS=ih("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),B$=ih("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",SS),k$=ih("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),P$=ih("ERR_STREAM_WRITE_AFTER_END","write after end"),N$=CS.prototype.destroy||VO;function mi(e,t){CS.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(i){try{r._processResponse(i)}catch(n){r.emit("error",n instanceof SS?n:new SS({cause:n}))}},this._performRequest()}mi.prototype=Object.create(CS.prototype);mi.prototype.abort=function(){PS(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};mi.prototype.destroy=function(e){return PS(this._currentRequest,e),N$.call(this,e),this};mi.prototype.write=function(e,t,r){if(this._ending)throw new P$;if(!Qo(e)&&!L$(e))throw new TypeError("data should be a string, Buffer or Uint8Array");if(Jo(t)&&(r=t,t=null),e.length===0){r&&r();return}this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new k$),this.abort())};mi.prototype.end=function(e,t,r){if(Jo(e)?(r=e,e=t=null):Jo(t)&&(r=t,t=null),!e)this._ended=this._ending=!0,this._currentRequest.end(null,null,r);else{var i=this,n=this._currentRequest;this.write(e,t,function(){i._ended=!0,n.end(null,null,r)}),this._ending=!0}};mi.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)};mi.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)};mi.prototype.setTimeout=function(e,t){var r=this;function i(a){a.setTimeout(e),a.removeListener("timeout",a.destroy),a.addListener("timeout",a.destroy)}function n(a){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout(function(){r.emit("timeout"),s()},e),i(a)}function s(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",s),r.removeListener("error",s),r.removeListener("response",s),r.removeListener("close",s),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",n)}return t&&this.on("timeout",t),this.socket?n(this.socket):this._currentRequest.once("socket",n),this.on("socket",i),this.on("abort",s),this.on("error",s),this.on("response",s),this.on("close",s),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(e){mi.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}});["aborted","connection","socket"].forEach(function(e){Object.defineProperty(mi.prototype,e,{get:function(){return this._currentRequest[e]}})});mi.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}};mi.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(!t)throw new TypeError("Unsupported protocol "+e);if(this._options.agents){var r=e.slice(0,-1);this._options.agent=this._options.agents[r]}var i=this._currentRequest=t.request(this._options,this._onNativeResponse);i._redirectable=this;for(var n of IS)i.on(n,BS[n]);if(this._currentUrl=/^\//.test(this._options.path)?rh.format(this._options):this._options.path,this._isRedirect){var s=0,a=this,o=this._requestBodyBuffers;(function c(u){if(i===a._currentRequest)if(u)a.emit("error",u);else if(s<o.length){var l=o[s++];i.finished||i.write(l.data,l.encoding,c)}else a._ended&&i.end()})()}};mi.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||this._options.followRedirects===!1||t<300||t>=400){e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),this._requestBodyBuffers=[];return}if(PS(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)throw new B$;var i,n=this._options.beforeRedirect;n&&(i=Object.assign({Host:e.req.getHeader("host")},this._options.headers));var s=this._options.method;((t===301||t===302)&&this._options.method==="POST"||t===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],_S(/^content-/i,this._options.headers));var a=_S(/^host$/i,this._options.headers),o=kS(this._currentUrl),c=a||o.host,u=/^\w+:/.test(r)?this._currentUrl:rh.format(Object.assign(o,{host:c})),l=R$(r,u);if(FO("redirecting to",l.href),this._isRedirect=!0,wS(l,this._options),(l.protocol!==o.protocol&&l.protocol!=="https:"||l.host!==c&&!O$(l.host,c))&&_S(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),Jo(n)){var p={headers:e.headers,statusCode:t},d={url:u,method:s,headers:i};n(this._options,p,d),this._sanitizeOptions(this._options)}this._performRequest()};function MO(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach(function(i){var n=i+":",s=r[n]=e[i],a=t[i]=Object.create(s);function o(u,l,p){return D$(u)?u=wS(u):Qo(u)?u=wS(kS(u)):(p=l,l=KO(u),u={protocol:n}),Jo(l)&&(p=l,l=null),l=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},u,l),l.nativeProtocols=r,!Qo(l.host)&&!Qo(l.hostname)&&(l.hostname="::1"),ES.equal(l.protocol,n,"protocol mismatch"),FO("options",l),new mi(l,p)}function c(u,l,p){var d=a.request(u,l,p);return d.end(),d}Object.defineProperties(a,{request:{value:o,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),t}function VO(){}function kS(e){var t;if(TS)t=new th(e);else if(t=KO(rh.parse(e)),!Qo(t.protocol))throw new AS({input:e});return t}function R$(e,t){return TS?new th(e,t):kS(rh.resolve(t,e))}function KO(e){if(/^\[/.test(e.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(e.hostname))throw new AS({input:e.href||e});if(/^\[/.test(e.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(e.host))throw new AS({input:e.href||e});return e}function wS(e,t){var r=t||{};for(var i of I$)r[i]=e[i];return r.hostname.startsWith("[")&&(r.hostname=r.hostname.slice(1,-1)),r.port!==""&&(r.port=Number(r.port)),r.path=r.search?r.pathname+r.search:r.pathname,r}function _S(e,t){var r;for(var i in t)e.test(i)&&(r=t[i],delete t[i]);return r===null||typeof r>"u"?void 0:String(r).trim()}function ih(e,t,r){function i(n){Jo(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=e,this.message=this.cause?t+": "+this.cause.message:t}return i.prototype=new(r||Error),Object.defineProperties(i.prototype,{constructor:{value:i,enumerable:!1},name:{value:"Error ["+e+"]",enumerable:!1}}),i}function PS(e,t){for(var r of IS)e.removeListener(r,BS[r]);e.on("error",VO),e.destroy(t)}function O$(e,t){ES(Qo(e)&&Qo(t));var r=e.length-t.length-1;return r>0&&e[r]==="."&&e.endsWith(t)}function Qo(e){return typeof e=="string"||e instanceof String}function Jo(e){return typeof e=="function"}function L$(e){return typeof e=="object"&&"length"in e}function D$(e){return th&&e instanceof th}NS.exports=MO({http:E$,https:T$});NS.exports.wrap=MO});var U3=b((eue,j3)=>{"use strict";var q$=LO(),j$=require("crypto"),U$=require("url"),F$=qO(),M$=require("http"),V$=require("https"),K$=require("http2"),H$=require("util"),$$=RS(),z$=require("zlib"),f3=require("stream"),G$=require("events");function yn(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var d3=yn(q$),W$=yn(j$),Y$=yn(U$),Q$=yn(F$),J$=yn(M$),X$=yn(V$),h3=yn(K$),YS=yn(H$),Z$=yn($$),pa=yn(z$),zn=yn(f3);function m3(e,t){return function(){return e.apply(t,arguments)}}var{toString:ez}=Object.prototype,{getPrototypeOf:QS}=Object,{iterator:Lg,toStringTag:y3}=Symbol,Dg=(e=>t=>{let r=ez.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),gn=e=>(e=e.toLowerCase(),t=>Dg(t)===e),qg=e=>t=>typeof t===e,{isArray:_l}=Array,gl=qg("undefined");function ah(e){return e!==null&&!gl(e)&&e.constructor!==null&&!gl(e.constructor)&&yi(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var g3=gn("ArrayBuffer");function tz(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&g3(e.buffer),t}var rz=qg("string"),yi=qg("function"),v3=qg("number"),oh=e=>e!==null&&typeof e=="object",iz=e=>e===!0||e===!1,Ig=e=>{if(Dg(e)!=="object")return!1;let t=QS(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(y3 in e)&&!(Lg in e)},nz=e=>{if(!oh(e)||ah(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},sz=gn("Date"),az=gn("File"),oz=gn("Blob"),cz=gn("FileList"),uz=e=>oh(e)&&yi(e.pipe),lz=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||yi(e.append)&&((t=Dg(e))==="formdata"||t==="object"&&yi(e.toString)&&e.toString()==="[object FormData]"))},pz=gn("URLSearchParams"),[fz,dz,hz,mz]=["ReadableStream","Request","Response","Headers"].map(gn),yz=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ch(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,n;if(typeof e!="object"&&(e=[e]),_l(e))for(i=0,n=e.length;i<n;i++)t.call(null,e[i],i,e);else{if(ah(e))return;let s=r?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length,o;for(i=0;i<a;i++)o=s[i],t.call(null,e[o],o,e)}}function x3(e,t){if(ah(e))return null;t=t.toLowerCase();let r=Object.keys(e),i=r.length,n;for(;i-- >0;)if(n=r[i],t===n.toLowerCase())return n;return null}var Xo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,b3=e=>!gl(e)&&e!==Xo;function US(){let{caseless:e,skipUndefined:t}=b3(this)&&this||{},r={},i=(n,s)=>{let a=e&&x3(r,s)||s;Ig(r[a])&&Ig(n)?r[a]=US(r[a],n):Ig(n)?r[a]=US({},n):_l(n)?r[a]=n.slice():(!t||!gl(n))&&(r[a]=n)};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&ch(arguments[n],i);return r}var gz=(e,t,r,{allOwnKeys:i}={})=>(ch(t,(n,s)=>{r&&yi(n)?e[s]=m3(n,r):e[s]=n},{allOwnKeys:i}),e),vz=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),xz=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},bz=(e,t,r,i)=>{let n,s,a,o={};if(t=t||{},e==null)return t;do{for(n=Object.getOwnPropertyNames(e),s=n.length;s-- >0;)a=n[s],(!i||i(a,e,t))&&!o[a]&&(t[a]=e[a],o[a]=!0);e=r!==!1&&QS(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},_z=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;let i=e.indexOf(t,r);return i!==-1&&i===r},Az=e=>{if(!e)return null;if(_l(e))return e;let t=e.length;if(!v3(t))return null;let r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Sz=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&QS(Uint8Array)),wz=(e,t)=>{let i=(e&&e[Lg]).call(e),n;for(;(n=i.next())&&!n.done;){let s=n.value;t.call(e,s[0],s[1])}},Cz=(e,t)=>{let r,i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},Ez=gn("HTMLFormElement"),Tz=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,n){return i.toUpperCase()+n}),HO=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Iz=gn("RegExp"),_3=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),i={};ch(r,(n,s)=>{let a;(a=t(n,s,e))!==!1&&(i[s]=a||n)}),Object.defineProperties(e,i)},Bz=e=>{_3(e,(t,r)=>{if(yi(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;let i=e[r];if(yi(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},kz=(e,t)=>{let r={},i=n=>{n.forEach(s=>{r[s]=!0})};return _l(e)?i(e):i(String(e).split(t)),r},Pz=()=>{},Nz=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Rz(e){return!!(e&&yi(e.append)&&e[y3]==="FormData"&&e[Lg])}var Oz=e=>{let t=new Array(10),r=(i,n)=>{if(oh(i)){if(t.indexOf(i)>=0)return;if(ah(i))return i;if(!("toJSON"in i)){t[n]=i;let s=_l(i)?[]:{};return ch(i,(a,o)=>{let c=r(a,n+1);!gl(c)&&(s[o]=c)}),t[n]=void 0,s}}return i};return r(e,0)},Lz=gn("AsyncFunction"),Dz=e=>e&&(oh(e)||yi(e))&&yi(e.then)&&yi(e.catch),A3=((e,t)=>e?setImmediate:t?((r,i)=>(Xo.addEventListener("message",({source:n,data:s})=>{n===Xo&&s===r&&i.length&&i.shift()()},!1),n=>{i.push(n),Xo.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",yi(Xo.postMessage)),qz=typeof queueMicrotask<"u"?queueMicrotask.bind(Xo):typeof process<"u"&&process.nextTick||A3,jz=e=>e!=null&&yi(e[Lg]),I={isArray:_l,isArrayBuffer:g3,isBuffer:ah,isFormData:lz,isArrayBufferView:tz,isString:rz,isNumber:v3,isBoolean:iz,isObject:oh,isPlainObject:Ig,isEmptyObject:nz,isReadableStream:fz,isRequest:dz,isResponse:hz,isHeaders:mz,isUndefined:gl,isDate:sz,isFile:az,isBlob:oz,isRegExp:Iz,isFunction:yi,isStream:uz,isURLSearchParams:pz,isTypedArray:Sz,isFileList:cz,forEach:ch,merge:US,extend:gz,trim:yz,stripBOM:vz,inherits:xz,toFlatObject:bz,kindOf:Dg,kindOfTest:gn,endsWith:_z,toArray:Az,forEachEntry:wz,matchAll:Cz,isHTMLForm:Ez,hasOwnProperty:HO,hasOwnProp:HO,reduceDescriptors:_3,freezeMethods:Bz,toObjectSet:kz,toCamelCase:Tz,noop:Pz,toFiniteNumber:Nz,findKey:x3,global:Xo,isContextDefined:b3,isSpecCompliantForm:Rz,toJSONObject:Oz,isAsyncFn:Lz,isThenable:Dz,setImmediate:A3,asap:qz,isIterable:jz};function le(e,t,r,i,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),i&&(this.request=i),n&&(this.response=n,this.status=n.status?n.status:null)}I.inherits(le,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:I.toJSONObject(this.config),code:this.code,status:this.status}}});var S3=le.prototype,w3={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{w3[e]={value:e}});Object.defineProperties(le,w3);Object.defineProperty(S3,"isAxiosError",{value:!0});le.from=(e,t,r,i,n,s)=>{let a=Object.create(S3);I.toFlatObject(e,a,function(l){return l!==Error.prototype},u=>u!=="isAxiosError");let o=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return le.call(a,o,c,r,i,n),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",s&&Object.assign(a,s),a};function FS(e){return I.isPlainObject(e)||I.isArray(e)}function C3(e){return I.endsWith(e,"[]")?e.slice(0,-2):e}function $O(e,t,r){return e?e.concat(t).map(function(n,s){return n=C3(n),!r&&s?"["+n+"]":n}).join(r?".":""):t}function Uz(e){return I.isArray(e)&&!e.some(FS)}var Fz=I.toFlatObject(I,{},null,function(t){return/^is[A-Z]/.test(t)});function jg(e,t,r){if(!I.isObject(e))throw new TypeError("target must be an object");t=t||new(d3.default||FormData),r=I.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!I.isUndefined(y[m])});let i=r.metaTokens,n=r.visitor||l,s=r.dots,a=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&I.isSpecCompliantForm(t);if(!I.isFunction(n))throw new TypeError("visitor must be a function");function u(f){if(f===null)return"";if(I.isDate(f))return f.toISOString();if(I.isBoolean(f))return f.toString();if(!c&&I.isBlob(f))throw new le("Blob is not supported. Use a Buffer instead.");return I.isArrayBuffer(f)||I.isTypedArray(f)?c&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function l(f,m,y){let _=f;if(f&&!y&&typeof f=="object"){if(I.endsWith(m,"{}"))m=i?m:m.slice(0,-2),f=JSON.stringify(f);else if(I.isArray(f)&&Uz(f)||(I.isFileList(f)||I.endsWith(m,"[]"))&&(_=I.toArray(f)))return m=C3(m),_.forEach(function(S,B){!(I.isUndefined(S)||S===null)&&t.append(a===!0?$O([m],B,s):a===null?m:m+"[]",u(S))}),!1}return FS(f)?!0:(t.append($O(y,m,s),u(f)),!1)}let p=[],d=Object.assign(Fz,{defaultVisitor:l,convertValue:u,isVisitable:FS});function h(f,m){if(!I.isUndefined(f)){if(p.indexOf(f)!==-1)throw Error("Circular reference detected in "+m.join("."));p.push(f),I.forEach(f,function(_,A){(!(I.isUndefined(_)||_===null)&&n.call(t,_,I.isString(A)?A.trim():A,m,d))===!0&&h(_,m?m.concat(A):[A])}),p.pop()}}if(!I.isObject(e))throw new TypeError("data must be an object");return h(e),t}function zO(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function E3(e,t){this._pairs=[],e&&jg(e,this,t)}var T3=E3.prototype;T3.append=function(t,r){this._pairs.push([t,r])};T3.toString=function(t){let r=t?function(i){return t.call(this,i,zO)}:zO;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};function Mz(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function JS(e,t,r){if(!t)return e;let i=r&&r.encode||Mz;I.isFunction(r)&&(r={serialize:r});let n=r&&r.serialize,s;if(n?s=n(t,r):s=I.isURLSearchParams(t)?t.toString():new E3(t,r).toString(i),s){let a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}var MS=class{constructor(){this.handlers=[]}use(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){I.forEach(this.handlers,function(i){i!==null&&t(i)})}},GO=MS,XS={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Vz=Y$.default.URLSearchParams,OS="abcdefghijklmnopqrstuvwxyz",WO="0123456789",I3={DIGIT:WO,ALPHA:OS,ALPHA_DIGIT:OS+OS.toUpperCase()+WO},Kz=(e=16,t=I3.ALPHA_DIGIT)=>{let r="",{length:i}=t,n=new Uint32Array(e);W$.default.randomFillSync(n);for(let s=0;s<e;s++)r+=t[n[s]%i];return r},Hz={isNode:!0,classes:{URLSearchParams:Vz,FormData:d3.default,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:I3,generateString:Kz,protocols:["http","https","file","data"]},ZS=typeof window<"u"&&typeof document<"u",VS=typeof navigator=="object"&&navigator||void 0,$z=ZS&&(!VS||["ReactNative","NativeScript","NS"].indexOf(VS.product)<0),zz=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Gz=ZS&&window.location.href||"http://localhost",Wz=Object.freeze({__proto__:null,hasBrowserEnv:ZS,hasStandardBrowserWebWorkerEnv:zz,hasStandardBrowserEnv:$z,navigator:VS,origin:Gz}),zt={...Wz,...Hz};function Yz(e,t){return jg(e,new zt.classes.URLSearchParams,{visitor:function(r,i,n,s){return zt.isNode&&I.isBuffer(r)?(this.append(i,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function Qz(e){return I.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Jz(e){let t={},r=Object.keys(e),i,n=r.length,s;for(i=0;i<n;i++)s=r[i],t[s]=e[s];return t}function B3(e){function t(r,i,n,s){let a=r[s++];if(a==="__proto__")return!0;let o=Number.isFinite(+a),c=s>=r.length;return a=!a&&I.isArray(n)?n.length:a,c?(I.hasOwnProp(n,a)?n[a]=[n[a],i]:n[a]=i,!o):((!n[a]||!I.isObject(n[a]))&&(n[a]=[]),t(r,i,n[a],s)&&I.isArray(n[a])&&(n[a]=Jz(n[a])),!o)}if(I.isFormData(e)&&I.isFunction(e.entries)){let r={};return I.forEachEntry(e,(i,n)=>{t(Qz(i),n,r,0)}),r}return null}function Xz(e,t,r){if(I.isString(e))try{return(t||JSON.parse)(e),I.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}var ew={transitional:XS,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){let i=r.getContentType()||"",n=i.indexOf("application/json")>-1,s=I.isObject(t);if(s&&I.isHTMLForm(t)&&(t=new FormData(t)),I.isFormData(t))return n?JSON.stringify(B3(t)):t;if(I.isArrayBuffer(t)||I.isBuffer(t)||I.isStream(t)||I.isFile(t)||I.isBlob(t)||I.isReadableStream(t))return t;if(I.isArrayBufferView(t))return t.buffer;if(I.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(s){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Yz(t,this.formSerializer).toString();if((o=I.isFileList(t))||i.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return jg(o?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||n?(r.setContentType("application/json",!1),Xz(t)):t}],transformResponse:[function(t){let r=this.transitional||ew.transitional,i=r&&r.forcedJSONParsing,n=this.responseType==="json";if(I.isResponse(t)||I.isReadableStream(t))return t;if(t&&I.isString(t)&&(i&&!this.responseType||n)){let a=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(t,this.parseReviver)}catch(o){if(a)throw o.name==="SyntaxError"?le.from(o,le.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:zt.classes.FormData,Blob:zt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};I.forEach(["delete","get","head","post","put","patch"],e=>{ew.headers[e]={}});var tw=ew,Zz=I.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),e7=e=>{let t={},r,i,n;return e&&e.split(`
|
|
19
|
+
`).forEach(function(a){n=a.indexOf(":"),r=a.substring(0,n).trim().toLowerCase(),i=a.substring(n+1).trim(),!(!r||t[r]&&Zz[r])&&(r==="set-cookie"?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)}),t},YO=Symbol("internals");function nh(e){return e&&String(e).trim().toLowerCase()}function Bg(e){return e===!1||e==null?e:I.isArray(e)?e.map(Bg):String(e)}function t7(e){let t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}var r7=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function LS(e,t,r,i,n){if(I.isFunction(i))return i.call(this,t,r);if(n&&(t=r),!!I.isString(t)){if(I.isString(i))return t.indexOf(i)!==-1;if(I.isRegExp(i))return i.test(t)}}function i7(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,i)=>r.toUpperCase()+i)}function n7(e,t){let r=I.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+r,{value:function(n,s,a){return this[i].call(this,t,n,s,a)},configurable:!0})})}var vl=class{constructor(t){t&&this.set(t)}set(t,r,i){let n=this;function s(o,c,u){let l=nh(c);if(!l)throw new Error("header name must be a non-empty string");let p=I.findKey(n,l);(!p||n[p]===void 0||u===!0||u===void 0&&n[p]!==!1)&&(n[p||c]=Bg(o))}let a=(o,c)=>I.forEach(o,(u,l)=>s(u,l,c));if(I.isPlainObject(t)||t instanceof this.constructor)a(t,r);else if(I.isString(t)&&(t=t.trim())&&!r7(t))a(e7(t),r);else if(I.isObject(t)&&I.isIterable(t)){let o={},c,u;for(let l of t){if(!I.isArray(l))throw TypeError("Object iterator must return a key-value pair");o[u=l[0]]=(c=o[u])?I.isArray(c)?[...c,l[1]]:[c,l[1]]:l[1]}a(o,r)}else t!=null&&s(r,t,i);return this}get(t,r){if(t=nh(t),t){let i=I.findKey(this,t);if(i){let n=this[i];if(!r)return n;if(r===!0)return t7(n);if(I.isFunction(r))return r.call(this,n,i);if(I.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=nh(t),t){let i=I.findKey(this,t);return!!(i&&this[i]!==void 0&&(!r||LS(this,this[i],i,r)))}return!1}delete(t,r){let i=this,n=!1;function s(a){if(a=nh(a),a){let o=I.findKey(i,a);o&&(!r||LS(i,i[o],o,r))&&(delete i[o],n=!0)}}return I.isArray(t)?t.forEach(s):s(t),n}clear(t){let r=Object.keys(this),i=r.length,n=!1;for(;i--;){let s=r[i];(!t||LS(this,this[s],s,t,!0))&&(delete this[s],n=!0)}return n}normalize(t){let r=this,i={};return I.forEach(this,(n,s)=>{let a=I.findKey(i,s);if(a){r[a]=Bg(n),delete r[s];return}let o=t?i7(s):String(s).trim();o!==s&&delete r[s],r[o]=Bg(n),i[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let r=Object.create(null);return I.forEach(this,(i,n)=>{i!=null&&i!==!1&&(r[n]=t&&I.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
20
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){let i=new this(t);return r.forEach(n=>i.set(n)),i}static accessor(t){let i=(this[YO]=this[YO]={accessors:{}}).accessors,n=this.prototype;function s(a){let o=nh(a);i[o]||(n7(n,a),i[o]=!0)}return I.isArray(t)?t.forEach(s):s(t),this}};vl.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);I.reduceDescriptors(vl.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[r]=i}}});I.freezeMethods(vl);var gi=vl;function DS(e,t){let r=this||tw,i=t||r,n=gi.from(i.headers),s=i.data;return I.forEach(e,function(o){s=o.call(r,s,n.normalize(),t?t.status:void 0)}),n.normalize(),s}function k3(e){return!!(e&&e.__CANCEL__)}function fa(e,t,r){le.call(this,e??"canceled",le.ERR_CANCELED,t,r),this.name="CanceledError"}I.inherits(fa,le,{__CANCEL__:!0});function yl(e,t,r){let i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new le("Request failed with status code "+r.status,[le.ERR_BAD_REQUEST,le.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function s7(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function a7(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function rw(e,t,r){let i=!s7(t);return e&&(i||r==!1)?a7(e,t):t}var Ng="1.13.2";function P3(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}var o7=/^(?:([^;]+);)?(?:[^;]+;)?(base64|),([\s\S]*)$/;function c7(e,t,r){let i=r&&r.Blob||zt.classes.Blob,n=P3(e);if(t===void 0&&i&&(t=!0),n==="data"){e=n.length?e.slice(n.length+1):e;let s=o7.exec(e);if(!s)throw new le("Invalid URL",le.ERR_INVALID_URL);let a=s[1],o=s[2],c=s[3],u=Buffer.from(decodeURIComponent(c),o?"base64":"utf8");if(t){if(!i)throw new le("Blob is not supported",le.ERR_NOT_SUPPORT);return new i([u],{type:a})}return u}throw new le("Unsupported protocol "+n,le.ERR_NOT_SUPPORT)}var qS=Symbol("internals"),KS=class extends zn.default.Transform{constructor(t){t=I.toFlatObject(t,{maxRate:0,chunkSize:64*1024,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(i,n)=>!I.isUndefined(n[i])),super({readableHighWaterMark:t.chunkSize});let r=this[qS]={timeWindow:t.timeWindow,chunkSize:t.chunkSize,maxRate:t.maxRate,minChunkSize:t.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",i=>{i==="progress"&&(r.isCaptured||(r.isCaptured=!0))})}_read(t){let r=this[qS];return r.onReadCallback&&r.onReadCallback(),super._read(t)}_transform(t,r,i){let n=this[qS],s=n.maxRate,a=this.readableHighWaterMark,o=n.timeWindow,c=1e3/o,u=s/c,l=n.minChunkSize!==!1?Math.max(n.minChunkSize,u*.01):0,p=(h,f)=>{let m=Buffer.byteLength(h);n.bytesSeen+=m,n.bytes+=m,n.isCaptured&&this.emit("progress",n.bytesSeen),this.push(h)?process.nextTick(f):n.onReadCallback=()=>{n.onReadCallback=null,process.nextTick(f)}},d=(h,f)=>{let m=Buffer.byteLength(h),y=null,_=a,A,S=0;if(s){let B=Date.now();(!n.ts||(S=B-n.ts)>=o)&&(n.ts=B,A=u-n.bytes,n.bytes=A<0?-A:0,S=0),A=u-n.bytes}if(s){if(A<=0)return setTimeout(()=>{f(null,h)},o-S);A<_&&(_=A)}_&&m>_&&m-_>l&&(y=h.subarray(_),h=h.subarray(0,_)),p(h,y?()=>{process.nextTick(f,null,y)}:f)};d(t,function h(f,m){if(f)return i(f);m?d(m,h):i(null)})}},QO=KS,{asyncIterator:JO}=Symbol,u7=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[JO]?yield*e[JO]():yield e},N3=u7,l7=zt.ALPHABET.ALPHA_DIGIT+"-_",sh=typeof TextEncoder=="function"?new TextEncoder:new YS.default.TextEncoder,Zo=`\r
|
|
21
|
+
`,p7=sh.encode(Zo),f7=2,HS=class{constructor(t,r){let{escapeName:i}=this.constructor,n=I.isString(r),s=`Content-Disposition: form-data; name="${i(t)}"${!n&&r.name?`; filename="${i(r.name)}"`:""}${Zo}`;n?r=sh.encode(String(r).replace(/\r?\n|\r\n?/g,Zo)):s+=`Content-Type: ${r.type||"application/octet-stream"}${Zo}`,this.headers=sh.encode(s+Zo),this.contentLength=n?r.byteLength:r.size,this.size=this.headers.byteLength+this.contentLength+f7,this.name=t,this.value=r}async*encode(){yield this.headers;let{value:t}=this;I.isTypedArray(t)?yield t:yield*N3(t),yield p7}static escapeName(t){return String(t).replace(/[\r\n"]/g,r=>({"\r":"%0D","\n":"%0A",'"':"%22"})[r])}},d7=(e,t,r)=>{let{tag:i="form-data-boundary",size:n=25,boundary:s=i+"-"+zt.generateString(n,l7)}=r||{};if(!I.isFormData(e))throw TypeError("FormData instance required");if(s.length<1||s.length>70)throw Error("boundary must be 10-70 characters long");let a=sh.encode("--"+s+Zo),o=sh.encode("--"+s+"--"+Zo),c=o.byteLength,u=Array.from(e.entries()).map(([p,d])=>{let h=new HS(p,d);return c+=h.size,h});c+=a.byteLength*u.length,c=I.toFiniteNumber(c);let l={"Content-Type":`multipart/form-data; boundary=${s}`};return Number.isFinite(c)&&(l["Content-Length"]=c),t&&t(l),f3.Readable.from((async function*(){for(let p of u)yield a,yield*p.encode();yield o})())},h7=d7,$S=class extends zn.default.Transform{__transform(t,r,i){this.push(t),i()}_transform(t,r,i){if(t.length!==0&&(this._transform=this.__transform,t[0]!==120)){let n=Buffer.alloc(2);n[0]=120,n[1]=156,this.push(n,r)}this.__transform(t,r,i)}},m7=$S,y7=(e,t)=>I.isAsyncFn(e)?function(...r){let i=r.pop();e.apply(this,r).then(n=>{try{t?i(null,...t(n)):i(null,n)}catch(s){i(s)}},i)}:e,g7=y7;function v7(e,t){e=e||10;let r=new Array(e),i=new Array(e),n=0,s=0,a;return t=t!==void 0?t:1e3,function(c){let u=Date.now(),l=i[s];a||(a=u),r[n]=c,i[n]=u;let p=s,d=0;for(;p!==n;)d+=r[p++],p=p%e;if(n=(n+1)%e,n===s&&(s=(s+1)%e),u-a<t)return;let h=l&&u-l;return h?Math.round(d*1e3/h):void 0}}function x7(e,t){let r=0,i=1e3/t,n,s,a=(u,l=Date.now())=>{r=l,n=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{let l=Date.now(),p=l-r;p>=i?a(u,l):(n=u,s||(s=setTimeout(()=>{s=null,a(n)},i-p)))},()=>n&&a(n)]}var xl=(e,t,r=3)=>{let i=0,n=v7(50,250);return x7(s=>{let a=s.loaded,o=s.lengthComputable?s.total:void 0,c=a-i,u=n(c),l=a<=o;i=a;let p={loaded:a,total:o,progress:o?a/o:void 0,bytes:c,rate:u||void 0,estimated:u&&o&&l?(o-a)/u:void 0,event:s,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(p)},r)},Rg=(e,t)=>{let r=e!=null;return[i=>t[0]({lengthComputable:r,total:e,loaded:i}),t[1]]},Og=e=>(...t)=>I.asap(()=>e(...t));function b7(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;let t=e.indexOf(",");if(t<0)return 0;let r=e.slice(5,t),i=e.slice(t+1);if(/;base64/i.test(r)){let s=i.length,a=i.length;for(let d=0;d<a;d++)if(i.charCodeAt(d)===37&&d+2<a){let h=i.charCodeAt(d+1),f=i.charCodeAt(d+2);(h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102)&&(f>=48&&f<=57||f>=65&&f<=70||f>=97&&f<=102)&&(s-=2,d+=2)}let o=0,c=a-1,u=d=>d>=2&&i.charCodeAt(d-2)===37&&i.charCodeAt(d-1)===51&&(i.charCodeAt(d)===68||i.charCodeAt(d)===100);c>=0&&(i.charCodeAt(c)===61?(o++,c--):u(c)&&(o++,c-=3)),o===1&&c>=0&&(i.charCodeAt(c)===61||u(c))&&o++;let p=Math.floor(s/4)*3-(o||0);return p>0?p:0}return Buffer.byteLength(i,"utf8")}var XO={flush:pa.default.constants.Z_SYNC_FLUSH,finishFlush:pa.default.constants.Z_SYNC_FLUSH},_7={flush:pa.default.constants.BROTLI_OPERATION_FLUSH,finishFlush:pa.default.constants.BROTLI_OPERATION_FLUSH},ZO=I.isFunction(pa.default.createBrotliDecompress),{http:A7,https:S7}=Z$.default,w7=/https:?/,e3=zt.protocols.map(e=>e+":"),t3=(e,[t,r])=>(e.on("end",r).on("error",r),t),zS=class{constructor(){this.sessions=Object.create(null)}getSession(t,r){r=Object.assign({sessionTimeout:1e3},r);let i=this.sessions[t];if(i){let l=i.length;for(let p=0;p<l;p++){let[d,h]=i[p];if(!d.destroyed&&!d.closed&&YS.default.isDeepStrictEqual(h,r))return d}}let n=h3.default.connect(t,r),s,a=()=>{if(s)return;s=!0;let l=i,p=l.length,d=p;for(;d--;)if(l[d][0]===n){p===1?delete this.sessions[t]:l.splice(d,1);return}},o=n.request,{sessionTimeout:c}=r;if(c!=null){let l,p=0;n.request=function(){let d=o.apply(this,arguments);return p++,l&&(clearTimeout(l),l=null),d.once("close",()=>{--p||(l=setTimeout(()=>{l=null,a()},c))}),d}}n.once("close",a);let u=[n,r];return i?i.push(u):i=this.sessions[t]=[u],n}},C7=new zS;function E7(e,t){e.beforeRedirects.proxy&&e.beforeRedirects.proxy(e),e.beforeRedirects.config&&e.beforeRedirects.config(e,t)}function R3(e,t,r){let i=t;if(!i&&i!==!1){let n=Q$.default.getProxyForUrl(r);n&&(i=new URL(n))}if(i){if(i.username&&(i.auth=(i.username||"")+":"+(i.password||"")),i.auth){(i.auth.username||i.auth.password)&&(i.auth=(i.auth.username||"")+":"+(i.auth.password||""));let s=Buffer.from(i.auth,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+s}e.headers.host=e.hostname+(e.port?":"+e.port:"");let n=i.hostname||i.host;e.hostname=n,e.host=n,e.port=i.port,e.path=r,i.protocol&&(e.protocol=i.protocol.includes(":")?i.protocol:`${i.protocol}:`)}e.beforeRedirects.proxy=function(s){R3(s,t,s.href)}}var T7=typeof process<"u"&&I.kindOf(process)==="process",I7=e=>new Promise((t,r)=>{let i,n,s=(c,u)=>{n||(n=!0,i&&i(c,u))},a=c=>{s(c),t(c)},o=c=>{s(c,!0),r(c)};e(a,o,c=>i=c).catch(o)}),B7=({address:e,family:t})=>{if(!I.isString(e))throw TypeError("address must be a string");return{address:e,family:t||(e.indexOf(".")<0?6:4)}},r3=(e,t)=>B7(I.isObject(e)?e:{address:e,family:t}),k7={request(e,t){let r=e.protocol+"//"+e.hostname+":"+(e.port||80),{http2Options:i,headers:n}=e,s=C7.getSession(r,i),{HTTP2_HEADER_SCHEME:a,HTTP2_HEADER_METHOD:o,HTTP2_HEADER_PATH:c,HTTP2_HEADER_STATUS:u}=h3.default.constants,l={[a]:e.protocol.replace(":",""),[o]:e.method,[c]:e.path};I.forEach(n,(d,h)=>{h.charAt(0)!==":"&&(l[h]=d)});let p=s.request(l);return p.once("response",d=>{let h=p;d=Object.assign({},d);let f=d[u];delete d[u],h.headers=d,h.statusCode=+f,t(h)}),p}},P7=T7&&function(t){return I7(async function(i,n,s){let{data:a,lookup:o,family:c,httpVersion:u=1,http2Options:l}=t,{responseType:p,responseEncoding:d}=t,h=t.method.toUpperCase(),f,m=!1,y;if(u=+u,Number.isNaN(u))throw TypeError(`Invalid protocol version: '${t.httpVersion}' is not a number`);if(u!==1&&u!==2)throw TypeError(`Unsupported protocol version '${u}'`);let _=u===2;if(o){let fe=g7(o,ie=>I.isArray(ie)?ie:[ie]);o=(ie,J,Me)=>{fe(ie,J,(je,Te,ht)=>{if(je)return Me(je);let it=I.isArray(Te)?Te.map(Rt=>r3(Rt)):[r3(Te,ht)];J.all?Me(je,it):Me(je,it[0].address,it[0].family)})}}let A=new G$.EventEmitter;function S(fe){try{A.emit("abort",!fe||fe.type?new fa(null,t,y):fe)}catch(ie){console.warn("emit error",ie)}}A.once("abort",n);let B=()=>{t.cancelToken&&t.cancelToken.unsubscribe(S),t.signal&&t.signal.removeEventListener("abort",S),A.removeAllListeners()};(t.cancelToken||t.signal)&&(t.cancelToken&&t.cancelToken.subscribe(S),t.signal&&(t.signal.aborted?S():t.signal.addEventListener("abort",S))),s((fe,ie)=>{if(f=!0,ie){m=!0,B();return}let{data:J}=fe;if(J instanceof zn.default.Readable||J instanceof zn.default.Duplex){let Me=zn.default.finished(J,()=>{Me(),B()})}else B()});let O=rw(t.baseURL,t.url,t.allowAbsoluteUrls),N=new URL(O,zt.hasBrowserEnv?zt.origin:void 0),Y=N.protocol||e3[0];if(Y==="data:"){if(t.maxContentLength>-1){let ie=String(t.url||O||"");if(b7(ie)>t.maxContentLength)return n(new le("maxContentLength size of "+t.maxContentLength+" exceeded",le.ERR_BAD_RESPONSE,t))}let fe;if(h!=="GET")return yl(i,n,{status:405,statusText:"method not allowed",headers:{},config:t});try{fe=c7(t.url,p==="blob",{Blob:t.env&&t.env.Blob})}catch(ie){throw le.from(ie,le.ERR_BAD_REQUEST,t)}return p==="text"?(fe=fe.toString(d),(!d||d==="utf8")&&(fe=I.stripBOM(fe))):p==="stream"&&(fe=zn.default.Readable.from(fe)),yl(i,n,{data:fe,status:200,statusText:"OK",headers:new gi,config:t})}if(e3.indexOf(Y)===-1)return n(new le("Unsupported protocol "+Y,le.ERR_BAD_REQUEST,t));let q=gi.from(t.headers).normalize();q.set("User-Agent","axios/"+Ng,!1);let{onUploadProgress:z,onDownloadProgress:oe}=t,_e=t.maxRate,be,Be;if(I.isSpecCompliantForm(a)){let fe=q.getContentType(/boundary=([-_\w\d]{10,70})/i);a=h7(a,ie=>{q.set(ie)},{tag:`axios-${Ng}-boundary`,boundary:fe&&fe[1]||void 0})}else if(I.isFormData(a)&&I.isFunction(a.getHeaders)){if(q.set(a.getHeaders()),!q.hasContentLength())try{let fe=await YS.default.promisify(a.getLength).call(a);Number.isFinite(fe)&&fe>=0&&q.setContentLength(fe)}catch{}}else if(I.isBlob(a)||I.isFile(a))a.size&&q.setContentType(a.type||"application/octet-stream"),q.setContentLength(a.size||0),a=zn.default.Readable.from(N3(a));else if(a&&!I.isStream(a)){if(!Buffer.isBuffer(a))if(I.isArrayBuffer(a))a=Buffer.from(new Uint8Array(a));else if(I.isString(a))a=Buffer.from(a,"utf-8");else return n(new le("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",le.ERR_BAD_REQUEST,t));if(q.setContentLength(a.length,!1),t.maxBodyLength>-1&&a.length>t.maxBodyLength)return n(new le("Request body larger than maxBodyLength limit",le.ERR_BAD_REQUEST,t))}let De=I.toFiniteNumber(q.getContentLength());I.isArray(_e)?(be=_e[0],Be=_e[1]):be=Be=_e,a&&(z||be)&&(I.isStream(a)||(a=zn.default.Readable.from(a,{objectMode:!1})),a=zn.default.pipeline([a,new QO({maxRate:I.toFiniteNumber(be)})],I.noop),z&&a.on("progress",t3(a,Rg(De,xl(Og(z),!1,3)))));let Ee;if(t.auth){let fe=t.auth.username||"",ie=t.auth.password||"";Ee=fe+":"+ie}if(!Ee&&N.username){let fe=N.username,ie=N.password;Ee=fe+":"+ie}Ee&&q.delete("authorization");let Pe;try{Pe=JS(N.pathname+N.search,t.params,t.paramsSerializer).replace(/^\?/,"")}catch(fe){let ie=new Error(fe.message);return ie.config=t,ie.url=t.url,ie.exists=!0,n(ie)}q.set("Accept-Encoding","gzip, compress, deflate"+(ZO?", br":""),!1);let re={path:Pe,method:h,headers:q.toJSON(),agents:{http:t.httpAgent,https:t.httpsAgent},auth:Ee,protocol:Y,family:c,beforeRedirect:E7,beforeRedirects:{},http2Options:l};!I.isUndefined(o)&&(re.lookup=o),t.socketPath?re.socketPath=t.socketPath:(re.hostname=N.hostname.startsWith("[")?N.hostname.slice(1,-1):N.hostname,re.port=N.port,R3(re,t.proxy,Y+"//"+N.hostname+(N.port?":"+N.port:"")+re.path));let dt,or=w7.test(re.protocol);if(re.agent=or?t.httpsAgent:t.httpAgent,_?dt=k7:t.transport?dt=t.transport:t.maxRedirects===0?dt=or?X$.default:J$.default:(t.maxRedirects&&(re.maxRedirects=t.maxRedirects),t.beforeRedirect&&(re.beforeRedirects.config=t.beforeRedirect),dt=or?S7:A7),t.maxBodyLength>-1?re.maxBodyLength=t.maxBodyLength:re.maxBodyLength=1/0,t.insecureHTTPParser&&(re.insecureHTTPParser=t.insecureHTTPParser),y=dt.request(re,function(ie){if(y.destroyed)return;let J=[ie],Me=I.toFiniteNumber(ie.headers["content-length"]);if(oe||Be){let it=new QO({maxRate:I.toFiniteNumber(Be)});oe&&it.on("progress",t3(it,Rg(Me,xl(Og(oe),!0,3)))),J.push(it)}let je=ie,Te=ie.req||y;if(t.decompress!==!1&&ie.headers["content-encoding"])switch((h==="HEAD"||ie.statusCode===204)&&delete ie.headers["content-encoding"],(ie.headers["content-encoding"]||"").toLowerCase()){case"gzip":case"x-gzip":case"compress":case"x-compress":J.push(pa.default.createUnzip(XO)),delete ie.headers["content-encoding"];break;case"deflate":J.push(new m7),J.push(pa.default.createUnzip(XO)),delete ie.headers["content-encoding"];break;case"br":ZO&&(J.push(pa.default.createBrotliDecompress(_7)),delete ie.headers["content-encoding"])}je=J.length>1?zn.default.pipeline(J,I.noop):J[0];let ht={status:ie.statusCode,statusText:ie.statusMessage,headers:new gi(ie.headers),config:t,request:Te};if(p==="stream")ht.data=je,yl(i,n,ht);else{let it=[],Rt=0;je.on("data",function(Oe){it.push(Oe),Rt+=Oe.length,t.maxContentLength>-1&&Rt>t.maxContentLength&&(m=!0,je.destroy(),S(new le("maxContentLength size of "+t.maxContentLength+" exceeded",le.ERR_BAD_RESPONSE,t,Te)))}),je.on("aborted",function(){if(m)return;let Oe=new le("stream has been aborted",le.ERR_BAD_RESPONSE,t,Te);je.destroy(Oe),n(Oe)}),je.on("error",function(Oe){y.destroyed||n(le.from(Oe,null,t,Te))}),je.on("end",function(){try{let Oe=it.length===1?it[0]:Buffer.concat(it);p!=="arraybuffer"&&(Oe=Oe.toString(d),(!d||d==="utf8")&&(Oe=I.stripBOM(Oe))),ht.data=Oe}catch(Oe){return n(le.from(Oe,null,t,ht.request,ht))}yl(i,n,ht)})}A.once("abort",it=>{je.destroyed||(je.emit("error",it),je.destroy())})}),A.once("abort",fe=>{y.close?y.close():y.destroy(fe)}),y.on("error",function(ie){n(le.from(ie,null,t,y))}),y.on("socket",function(ie){ie.setKeepAlive(!0,1e3*60)}),t.timeout){let fe=parseInt(t.timeout,10);if(Number.isNaN(fe)){S(new le("error trying to parse `config.timeout` to int",le.ERR_BAD_OPTION_VALUE,t,y));return}y.setTimeout(fe,function(){if(f)return;let J=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",Me=t.transitional||XS;t.timeoutErrorMessage&&(J=t.timeoutErrorMessage),S(new le(J,Me.clarifyTimeoutError?le.ETIMEDOUT:le.ECONNABORTED,t,y))})}else y.setTimeout(0);if(I.isStream(a)){let fe=!1,ie=!1;a.on("end",()=>{fe=!0}),a.once("error",J=>{ie=!0,y.destroy(J)}),a.on("close",()=>{!fe&&!ie&&S(new fa("Request stream has been aborted",t,y))}),a.pipe(y)}else a&&y.write(a),y.end()})},N7=zt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,zt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(zt.origin),zt.navigator&&/(msie|trident)/i.test(zt.navigator.userAgent)):()=>!0,R7=zt.hasStandardBrowserEnv?{write(e,t,r,i,n,s,a){if(typeof document>"u")return;let o=[`${e}=${encodeURIComponent(t)}`];I.isNumber(r)&&o.push(`expires=${new Date(r).toUTCString()}`),I.isString(i)&&o.push(`path=${i}`),I.isString(n)&&o.push(`domain=${n}`),s===!0&&o.push("secure"),I.isString(a)&&o.push(`SameSite=${a}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;let t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}},i3=e=>e instanceof gi?{...e}:e;function ec(e,t){t=t||{};let r={};function i(u,l,p,d){return I.isPlainObject(u)&&I.isPlainObject(l)?I.merge.call({caseless:d},u,l):I.isPlainObject(l)?I.merge({},l):I.isArray(l)?l.slice():l}function n(u,l,p,d){if(I.isUndefined(l)){if(!I.isUndefined(u))return i(void 0,u,p,d)}else return i(u,l,p,d)}function s(u,l){if(!I.isUndefined(l))return i(void 0,l)}function a(u,l){if(I.isUndefined(l)){if(!I.isUndefined(u))return i(void 0,u)}else return i(void 0,l)}function o(u,l,p){if(p in t)return i(u,l);if(p in e)return i(void 0,u)}let c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(u,l,p)=>n(i3(u),i3(l),p,!0)};return I.forEach(Object.keys({...e,...t}),function(l){let p=c[l]||n,d=p(e[l],t[l],l);I.isUndefined(d)&&p!==o||(r[l]=d)}),r}var O3=e=>{let t=ec({},e),{data:r,withXSRFToken:i,xsrfHeaderName:n,xsrfCookieName:s,headers:a,auth:o}=t;if(t.headers=a=gi.from(a),t.url=JS(rw(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&a.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),I.isFormData(r)){if(zt.hasStandardBrowserEnv||zt.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(I.isFunction(r.getHeaders)){let c=r.getHeaders(),u=["content-type","content-length"];Object.entries(c).forEach(([l,p])=>{u.includes(l.toLowerCase())&&a.set(l,p)})}}if(zt.hasStandardBrowserEnv&&(i&&I.isFunction(i)&&(i=i(t)),i||i!==!1&&N7(t.url))){let c=n&&s&&R7.read(s);c&&a.set(n,c)}return t},O7=typeof XMLHttpRequest<"u",L7=O7&&function(e){return new Promise(function(r,i){let n=O3(e),s=n.data,a=gi.from(n.headers).normalize(),{responseType:o,onUploadProgress:c,onDownloadProgress:u}=n,l,p,d,h,f;function m(){h&&h(),f&&f(),n.cancelToken&&n.cancelToken.unsubscribe(l),n.signal&&n.signal.removeEventListener("abort",l)}let y=new XMLHttpRequest;y.open(n.method.toUpperCase(),n.url,!0),y.timeout=n.timeout;function _(){if(!y)return;let S=gi.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),O={data:!o||o==="text"||o==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:S,config:e,request:y};yl(function(Y){r(Y),m()},function(Y){i(Y),m()},O),y=null}"onloadend"in y?y.onloadend=_:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(_)},y.onabort=function(){y&&(i(new le("Request aborted",le.ECONNABORTED,e,y)),y=null)},y.onerror=function(B){let O=B&&B.message?B.message:"Network Error",N=new le(O,le.ERR_NETWORK,e,y);N.event=B||null,i(N),y=null},y.ontimeout=function(){let B=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded",O=n.transitional||XS;n.timeoutErrorMessage&&(B=n.timeoutErrorMessage),i(new le(B,O.clarifyTimeoutError?le.ETIMEDOUT:le.ECONNABORTED,e,y)),y=null},s===void 0&&a.setContentType(null),"setRequestHeader"in y&&I.forEach(a.toJSON(),function(B,O){y.setRequestHeader(O,B)}),I.isUndefined(n.withCredentials)||(y.withCredentials=!!n.withCredentials),o&&o!=="json"&&(y.responseType=n.responseType),u&&([d,f]=xl(u,!0),y.addEventListener("progress",d)),c&&y.upload&&([p,h]=xl(c),y.upload.addEventListener("progress",p),y.upload.addEventListener("loadend",h)),(n.cancelToken||n.signal)&&(l=S=>{y&&(i(!S||S.type?new fa(null,e,y):S),y.abort(),y=null)},n.cancelToken&&n.cancelToken.subscribe(l),n.signal&&(n.signal.aborted?l():n.signal.addEventListener("abort",l)));let A=P3(n.url);if(A&&zt.protocols.indexOf(A)===-1){i(new le("Unsupported protocol "+A+":",le.ERR_BAD_REQUEST,e));return}y.send(s||null)})},D7=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let i=new AbortController,n,s=function(u){if(!n){n=!0,o();let l=u instanceof Error?u:this.reason;i.abort(l instanceof le?l:new fa(l instanceof Error?l.message:l))}},a=t&&setTimeout(()=>{a=null,s(new le(`timeout ${t} of ms exceeded`,le.ETIMEDOUT))},t),o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));let{signal:c}=i;return c.unsubscribe=()=>I.asap(o),c}},q7=D7,j7=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let i=0,n;for(;i<r;)n=i+t,yield e.slice(i,n),i=n},U7=async function*(e,t){for await(let r of F7(e))yield*j7(r,t)},F7=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:r,value:i}=await t.read();if(r)break;yield i}}finally{await t.cancel()}},n3=(e,t,r,i)=>{let n=U7(e,t),s=0,a,o=c=>{a||(a=!0,i&&i(c))};return new ReadableStream({async pull(c){try{let{done:u,value:l}=await n.next();if(u){o(),c.close();return}let p=l.byteLength;if(r){let d=s+=p;r(d)}c.enqueue(new Uint8Array(l))}catch(u){throw o(u),u}},cancel(c){return o(c),n.return()}},{highWaterMark:2})},s3=64*1024,{isFunction:Tg}=I,M7=(({Request:e,Response:t})=>({Request:e,Response:t}))(I.global),{ReadableStream:a3,TextEncoder:o3}=I.global,c3=(e,...t)=>{try{return!!e(...t)}catch{return!1}},V7=e=>{e=I.merge.call({skipUndefined:!0},M7,e);let{fetch:t,Request:r,Response:i}=e,n=t?Tg(t):typeof fetch=="function",s=Tg(r),a=Tg(i);if(!n)return!1;let o=n&&Tg(a3),c=n&&(typeof o3=="function"?(f=>m=>f.encode(m))(new o3):async f=>new Uint8Array(await new r(f).arrayBuffer())),u=s&&o&&c3(()=>{let f=!1,m=new r(zt.origin,{body:new a3,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!m}),l=a&&o&&c3(()=>I.isReadableStream(new i("").body)),p={stream:l&&(f=>f.body)};n&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!p[f]&&(p[f]=(m,y)=>{let _=m&&m[f];if(_)return _.call(m);throw new le(`Response type '${f}' is not supported`,le.ERR_NOT_SUPPORT,y)})});let d=async f=>{if(f==null)return 0;if(I.isBlob(f))return f.size;if(I.isSpecCompliantForm(f))return(await new r(zt.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(I.isArrayBufferView(f)||I.isArrayBuffer(f))return f.byteLength;if(I.isURLSearchParams(f)&&(f=f+""),I.isString(f))return(await c(f)).byteLength},h=async(f,m)=>{let y=I.toFiniteNumber(f.getContentLength());return y??d(m)};return async f=>{let{url:m,method:y,data:_,signal:A,cancelToken:S,timeout:B,onDownloadProgress:O,onUploadProgress:N,responseType:Y,headers:q,withCredentials:z="same-origin",fetchOptions:oe}=O3(f),_e=t||fetch;Y=Y?(Y+"").toLowerCase():"text";let be=q7([A,S&&S.toAbortSignal()],B),Be=null,De=be&&be.unsubscribe&&(()=>{be.unsubscribe()}),Ee;try{if(N&&u&&y!=="get"&&y!=="head"&&(Ee=await h(q,_))!==0){let ie=new r(m,{method:"POST",body:_,duplex:"half"}),J;if(I.isFormData(_)&&(J=ie.headers.get("content-type"))&&q.setContentType(J),ie.body){let[Me,je]=Rg(Ee,xl(Og(N)));_=n3(ie.body,s3,Me,je)}}I.isString(z)||(z=z?"include":"omit");let Pe=s&&"credentials"in r.prototype,re={...oe,signal:be,method:y.toUpperCase(),headers:q.normalize().toJSON(),body:_,duplex:"half",credentials:Pe?z:void 0};Be=s&&new r(m,re);let dt=await(s?_e(Be,oe):_e(m,re)),or=l&&(Y==="stream"||Y==="response");if(l&&(O||or&&De)){let ie={};["status","statusText","headers"].forEach(Te=>{ie[Te]=dt[Te]});let J=I.toFiniteNumber(dt.headers.get("content-length")),[Me,je]=O&&Rg(J,xl(Og(O),!0))||[];dt=new i(n3(dt.body,s3,Me,()=>{je&&je(),De&&De()}),ie)}Y=Y||"text";let fe=await p[I.findKey(p,Y)||"text"](dt,f);return!or&&De&&De(),await new Promise((ie,J)=>{yl(ie,J,{data:fe,headers:gi.from(dt.headers),status:dt.status,statusText:dt.statusText,config:f,request:Be})})}catch(Pe){throw De&&De(),Pe&&Pe.name==="TypeError"&&/Load failed|fetch/i.test(Pe.message)?Object.assign(new le("Network Error",le.ERR_NETWORK,f,Be),{cause:Pe.cause||Pe}):le.from(Pe,Pe&&Pe.code,f,Be)}}},K7=new Map,L3=e=>{let t=e&&e.env||{},{fetch:r,Request:i,Response:n}=t,s=[i,n,r],a=s.length,o=a,c,u,l=K7;for(;o--;)c=s[o],u=l.get(c),u===void 0&&l.set(c,u=o?new Map:V7(t)),l=u;return u};L3();var iw={http:P7,xhr:L7,fetch:{get:L3}};I.forEach(iw,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var u3=e=>`- ${e}`,H7=e=>I.isFunction(e)||e===null||e===!1;function $7(e,t){e=I.isArray(e)?e:[e];let{length:r}=e,i,n,s={};for(let a=0;a<r;a++){i=e[a];let o;if(n=i,!H7(i)&&(n=iw[(o=String(i)).toLowerCase()],n===void 0))throw new le(`Unknown adapter '${o}'`);if(n&&(I.isFunction(n)||(n=n.get(t))))break;s[o||"#"+a]=n}if(!n){let a=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build")),o=r?a.length>1?`since :
|
|
22
|
+
`+a.map(u3).join(`
|
|
23
|
+
`):" "+u3(a[0]):"as no adapter specified";throw new le("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n}var D3={getAdapter:$7,adapters:iw};function jS(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new fa(null,e)}function l3(e){return jS(e),e.headers=gi.from(e.headers),e.data=DS.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),D3.getAdapter(e.adapter||tw.adapter,e)(e).then(function(i){return jS(e),i.data=DS.call(e,e.transformResponse,i),i.headers=gi.from(i.headers),i},function(i){return k3(i)||(jS(e),i&&i.response&&(i.response.data=DS.call(e,e.transformResponse,i.response),i.response.headers=gi.from(i.response.headers))),Promise.reject(i)})}var Ug={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ug[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});var p3={};Ug.transitional=function(t,r,i){function n(s,a){return"[Axios v"+Ng+"] Transitional option '"+s+"'"+a+(i?". "+i:"")}return(s,a,o)=>{if(t===!1)throw new le(n(a," has been removed"+(r?" in "+r:"")),le.ERR_DEPRECATED);return r&&!p3[a]&&(p3[a]=!0,console.warn(n(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,a,o):!0}};Ug.spelling=function(t){return(r,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function z7(e,t,r){if(typeof e!="object")throw new le("options must be an object",le.ERR_BAD_OPTION_VALUE);let i=Object.keys(e),n=i.length;for(;n-- >0;){let s=i[n],a=t[s];if(a){let o=e[s],c=o===void 0||a(o,s,e);if(c!==!0)throw new le("option "+s+" must be "+c,le.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new le("Unknown option "+s,le.ERR_BAD_OPTION)}}var kg={assertOptions:z7,validators:Ug},$n=kg.validators,bl=class{constructor(t){this.defaults=t||{},this.interceptors={request:new GO,response:new GO}}async request(t,r){try{return await this._request(t,r)}catch(i){if(i instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;let s=n.stack?n.stack.replace(/^.+\n/,""):"";try{i.stack?s&&!String(i.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
|
24
|
+
`+s):i.stack=s}catch{}}throw i}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=ec(this.defaults,r);let{transitional:i,paramsSerializer:n,headers:s}=r;i!==void 0&&kg.assertOptions(i,{silentJSONParsing:$n.transitional($n.boolean),forcedJSONParsing:$n.transitional($n.boolean),clarifyTimeoutError:$n.transitional($n.boolean)},!1),n!=null&&(I.isFunction(n)?r.paramsSerializer={serialize:n}:kg.assertOptions(n,{encode:$n.function,serialize:$n.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),kg.assertOptions(r,{baseUrl:$n.spelling("baseURL"),withXsrfToken:$n.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=s&&I.merge(s.common,s[r.method]);s&&I.forEach(["delete","get","head","post","put","patch","common"],f=>{delete s[f]}),r.headers=gi.concat(a,s);let o=[],c=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(r)===!1||(c=c&&m.synchronous,o.unshift(m.fulfilled,m.rejected))});let u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let l,p=0,d;if(!c){let f=[l3.bind(this),void 0];for(f.unshift(...o),f.push(...u),d=f.length,l=Promise.resolve(r);p<d;)l=l.then(f[p++],f[p++]);return l}d=o.length;let h=r;for(;p<d;){let f=o[p++],m=o[p++];try{h=f(h)}catch(y){m.call(this,y);break}}try{l=l3.call(this,h)}catch(f){return Promise.reject(f)}for(p=0,d=u.length;p<d;)l=l.then(u[p++],u[p++]);return l}getUri(t){t=ec(this.defaults,t);let r=rw(t.baseURL,t.url,t.allowAbsoluteUrls);return JS(r,t.params,t.paramsSerializer)}};I.forEach(["delete","get","head","options"],function(t){bl.prototype[t]=function(r,i){return this.request(ec(i||{},{method:t,url:r,data:(i||{}).data}))}});I.forEach(["post","put","patch"],function(t){function r(i){return function(s,a,o){return this.request(ec(o||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}bl.prototype[t]=r(),bl.prototype[t+"Form"]=r(!0)});var Pg=bl,GS=class e{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});let i=this;this.promise.then(n=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](n);i._listeners=null}),this.promise.then=n=>{let s,a=new Promise(o=>{i.subscribe(o),s=o}).then(n);return a.cancel=function(){i.unsubscribe(s)},a},t(function(s,a,o){i.reason||(i.reason=new fa(s,a,o),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){let t=new AbortController,r=i=>{t.abort(i)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new e(function(n){t=n}),cancel:t}}},G7=GS;function W7(e){return function(r){return e.apply(null,r)}}function Y7(e){return I.isObject(e)&&e.isAxiosError===!0}var WS={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(WS).forEach(([e,t])=>{WS[t]=e});var Q7=WS;function q3(e){let t=new Pg(e),r=m3(Pg.prototype.request,t);return I.extend(r,Pg.prototype,t,{allOwnKeys:!0}),I.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return q3(ec(e,n))},r}var sr=q3(tw);sr.Axios=Pg;sr.CanceledError=fa;sr.CancelToken=G7;sr.isCancel=k3;sr.VERSION=Ng;sr.toFormData=jg;sr.AxiosError=le;sr.Cancel=sr.CanceledError;sr.all=function(t){return Promise.all(t)};sr.spread=W7;sr.isAxiosError=Y7;sr.mergeConfig=ec;sr.AxiosHeaders=gi;sr.formToJSON=e=>B3(I.isHTMLForm(e)?new FormData(e):e);sr.getAdapter=D3.getAdapter;sr.HttpStatusCode=Q7;sr.default=sr;j3.exports=sr});var uh=b((tue,V3)=>{var J7=require("tls"),Fg=require("dns").promises,{readCertificateInfo:X7,splitPemChain:Z7}=Go(),{log:Bi}=ua(),nw=class{constructor({min:t=100,max:r=1e4}={}){this.min=t,this.max=r,this.attempts=0}duration(){let t=this.min*2**this.attempts;return this.attempts+=1,Math.min(t,this.max)}};async function F3(e,t,r){let i=!1;try{return await e(()=>{i=!0})}catch(n){if(i||r.attempts+1>=t)throw n;let s=r.duration();return Bi(`Promise rejected attempt #${r.attempts}, retrying in ${s}ms: ${n.message}`),await new Promise(a=>{setTimeout(a,s)}),F3(e,t,r)}}function eG(e,{attempts:t=5,min:r=5e3,max:i=3e4}={}){let n=new nw({min:r,max:i});return F3(e,t,n)}function tG(e,t="alternate"){let r=new RegExp(`\\s*rel\\s*=\\s*"?${t}"?`,"i");return(e||"").split(/,\s*</).map(n=>{let[,s,a]=n.match(/<?([^>]*)>;(.*)/)||[];return s&&a&&a.match(r)?s:null}).filter(n=>n)}function rG(e){let t=parseInt(e,10),r=new Date(e);if(Number.isSafeInteger(t)&&t>0)return t;if(r instanceof Date&&!Number.isNaN(r)){let i=new Date,n=Math.ceil((r.getTime()-i.getTime())/1e3);if(n>0)return n}return 0}function iG(e,t){Bi(`Attempting to find match for issuer="${t}" in ${e.length} certificate chains`);let r=null,i=null;return e.forEach(n=>{let o=Z7(n).map(c=>X7(c)).map(c=>c.issuer.commonName);if(o.includes(t)){let c=o.length-o.indexOf(t);Bi(`Found matching chain for preferred issuer="${t}" distance=${c} issuers=${JSON.stringify(o)}`),(!i||c<i)&&(Bi(`Issuer is closer to root than previous match, using it (${c} < ${i||"undefined"})`),r=n,i=c)}else Bi(`Unable to match certificate for preferred issuer="${t}", issuers=${JSON.stringify(o)}`)}),r||(Bi(`Found no match in ${e.length} certificate chains for preferred issuer="${t}", returning default certificate chain`),e[0])}function nG(e){let t;return e.data&&(e.data.error?t=e.data.error.detail||e.data.error:t=e.data.detail||JSON.stringify(e.data)),(t||"").replace(/\n/g,"")}async function M3(e){try{return await Fg.resolveSoa(e),Bi(`Found SOA record, considering domain to be: ${e}`),e}catch{Bi(`Unable to locate SOA record for name: ${e}`);let r=e.split(".").slice(1).join(".");if(!r.includes("."))throw new Error("Unable to resolve domain by SOA record");return M3(r)}}async function sG(e){Bi(`Locating authoritative NS records for name: ${e}`);let t=new Fg.Resolver;try{let i=await M3(e);Bi(`Looking up authoritative NS records for domain: ${i}`);let n=await Fg.resolveNs(i),s=await Promise.all(n.map(async o=>Fg.resolve4(o))),a=[].concat(...s).filter(o=>o);if(!a.length)throw new Error(`Unable to locate any valid authoritative NS addresses for domain: ${i}`);Bi(`Found ${a.length} authoritative NS addresses for domain: ${i}`),t.setServers(a)}catch(i){Bi(`Authoritative NS lookup error: ${i.message}`)}let r=t.getServers();return Bi(`DNS resolver addresses: ${r.join(", ")}`),t}async function aG(e,t,r=3e4){return new Promise((i,n)=>{let s,a=J7.connect({host:e,port:t,servername:e,rejectUnauthorized:!1,ALPNProtocols:["acme-tls/1"]});a.setTimeout(r),a.setEncoding("utf-8"),a.on("secureConnect",()=>{s=a.getPeerX509Certificate(),a.end()}),a.on("error",o=>{n(o)}),a.on("timeout",()=>{a.destroy(new Error("TLS ALPN certificate lookup request timed out"))}),a.on("end",()=>s?i(s.toString()):n(new Error("TLS ALPN lookup failed to retrieve certificate")))})}V3.exports={retry:eG,parseLinkHeader:tG,parseRetryAfterHeader:rG,findCertificateChainForIssuer:iG,formatResponseError:nG,getAuthoritativeDnsResolver:sG,retrieveTlsAlpnCertificate:aG}});var K3=b((rue,oG)=>{oG.exports={name:"acme-client",description:"Simple and unopinionated ACME client",author:"nmorsman",version:"5.4.0",main:"src/index.js",types:"types/index.d.ts",license:"MIT",homepage:"https://github.com/publishlab/node-acme-client",engines:{node:">= 16"},files:["src","types"],dependencies:{"@peculiar/x509":"^1.11.0",asn1js:"^3.0.5",axios:"^1.7.2",debug:"^4.3.5","node-forge":"^1.3.1"},devDependencies:{"@types/node":"^20.14.10",chai:"^4.4.1","chai-as-promised":"^7.1.2",eslint:"^8.57.0","eslint-config-airbnb-base":"^15.0.0","eslint-plugin-import":"^2.29.1","jsdoc-to-markdown":"^8.0.1",mocha:"^10.6.0",nock:"^13.5.4",tsd:"^0.31.1"},scripts:{"build-docs":"jsdoc2md src/client.js > docs/client.md && jsdoc2md src/crypto/index.js > docs/crypto.md && jsdoc2md src/crypto/forge.js > docs/forge.md",lint:"eslint .","lint-types":"tsd",prepublishOnly:"npm run build-docs",test:'mocha -t 60000 "test/setup.js" "test/**/*.spec.js"'},repository:{type:"git",url:"https://github.com/publishlab/node-acme-client"},keywords:["acme","client","lets","encrypt","acmev2","boulder"],bugs:{url:"https://github.com/publishlab/node-acme-client/issues"}}});var Mg=b((iue,z3)=>{var $3=U3(),{parseRetryAfterHeader:cG}=uh(),{log:sw}=ua(),H3=K3(),{AxiosError:aw}=$3,da=$3.create();da.defaults.headers.common["User-Agent"]=`node-${H3.name}/${H3.version}`;da.defaults.acmeSettings={httpChallengePort:80,httpsChallengePort:443,tlsAlpnChallengePort:443,retryMaxAttempts:5,retryDefaultDelay:5};da.defaults.adapter="http";function uG(e){return e.code!=="ECONNABORTED"&&e.code!=="ERR_NOCK_NO_MATCH"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function lG(e){let t=e.config.retryValidateStatus;if(!e.status||!t||t(e.status))return e;throw new aw(`Request failed with status code ${e.status}`,Math.floor(e.status/100)===4?aw.ERR_BAD_REQUEST:aw.ERR_BAD_RESPONSE,e.config,e.request,e)}da.interceptors.request.use(e=>("retryValidateStatus"in e||(e.retryValidateStatus=e.validateStatus),e.validateStatus=()=>!1,e));da.interceptors.response.use(null,async e=>{let{config:t,response:r}=e;if(!t)return Promise.reject(e);if(uG(e)){let{retryMaxAttempts:i,retryDefaultDelay:n}=da.defaults.acmeSettings;if(t.retryAttempt="retryAttempt"in t?t.retryAttempt+1:1,t.retryAttempt<=i){let s=r?`HTTP ${r.status}`:e.code;sw(`Caught ${s}, retry attempt ${t.retryAttempt}/${i} to URL ${t.url}`);let a=r?cG(r.headers["retry-after"]):0;return a>0?sw(`Found retry-after response header with value: ${r.headers["retry-after"]}, waiting ${a} seconds`):(a=n*t.retryAttempt,sw(`Unable to locate or parse retry-after response header, waiting ${a} seconds`)),await new Promise(o=>{setTimeout(o,a*1e3)}),da(t)}}return lG(r)});z3.exports=da});var W3=b((nue,G3)=>{var{createHmac:pG,createSign:fG,constants:{RSA_PKCS1_PADDING:dG}}=require("crypto"),{getJwk:hG}=Go(),{log:lh}=ua(),mG=Mg(),ow=class{constructor(t,r,i={}){this.directoryUrl=t,this.accountKey=r,this.externalAccountBinding=i,this.maxBadNonceRetries=5,this.jwk=null,this.directoryCache=null,this.directoryMaxAge=86400,this.directoryTimestamp=0}async request(t,r,i={}){i.url=t,i.method=r,i.validateStatus=null,typeof i.headers>"u"&&(i.headers={}),i.headers["Content-Type"]="application/jose+json",lh(`HTTP request: ${r} ${t}`);let n=await mG.request(i);return lh(`RESP ${n.status} ${r} ${t}`),n}async getDirectory(){let t=Math.floor(Date.now()/1e3),r=t-this.directoryTimestamp;if(!this.directoryCache||r>this.directoryMaxAge){lh(`Refreshing ACME directory, age: ${r}`);let i=await this.request(this.directoryUrl,"get");if(i.status>=400)throw new Error(`Attempting to read ACME directory returned error ${i.status}: ${this.directoryUrl}`);if(!i.data)throw new Error("Attempting to read ACME directory returned no data");this.directoryCache=i.data,this.directoryTimestamp=t}return this.directoryCache}getJwk(){return this.jwk||(this.jwk=hG(this.accountKey)),this.jwk}async getNonce(){let t=await this.getResourceUrl("newNonce"),r=await this.request(t,"head");if(!r.headers["replay-nonce"])throw new Error("Failed to get nonce from ACME provider");return r.headers["replay-nonce"]}async getResourceUrl(t){let r=await this.getDirectory();if(!r[t])throw new Error(`Unable to locate API resource URL in ACME directory: "${t}"`);return r[t]}async getMetaField(t){let r=await this.getDirectory();return"meta"in r&&t in r.meta?r.meta[t]:null}prepareSignedBody(t,r,i=null,{nonce:n=null,kid:s=null}={}){let a={alg:t,url:r};return n&&(lh(`Using nonce: ${n}`),a.nonce=n),s?a.kid=s:a.jwk=this.getJwk(),{payload:i?Buffer.from(JSON.stringify(i)).toString("base64url"):"",protected:Buffer.from(JSON.stringify(a)).toString("base64url")}}createSignedHmacBody(t,r,i=null,{nonce:n=null,kid:s=null}={}){let a=this.prepareSignedBody("HS256",r,i,{nonce:n,kid:s}),o=pG("SHA256",Buffer.from(t,"base64")).update(`${a.protected}.${a.payload}`,"utf8");return a.signature=o.digest().toString("base64url"),a}createSignedBody(t,r=null,{nonce:i=null,kid:n=null}={}){let s=this.getJwk(),a="RS256",o="SHA256";s.crv&&s.kty==="EC"&&(a="ES256",s.crv==="P-384"?(a="ES384",o="SHA384"):s.crv==="P-521"&&(a="ES512",o="SHA512"));let c=this.prepareSignedBody(a,t,r,{nonce:i,kid:n}),u=fG(o).update(`${c.protected}.${c.payload}`,"utf8");return c.signature=u.sign({key:this.accountKey,padding:dG,dsaEncoding:"ieee-p1363"},"base64url"),c}async signedRequest(t,r,{kid:i=null,nonce:n=null,includeExternalAccountBinding:s=!1}={},a=0){if(n||(n=await this.getNonce()),s&&this.externalAccountBinding&&this.externalAccountBinding.kid&&this.externalAccountBinding.hmacKey){let u=this.getJwk(),l=this.externalAccountBinding.kid,p=this.externalAccountBinding.hmacKey;r.externalAccountBinding=this.createSignedHmacBody(p,t,u,{kid:l})}let o=this.createSignedBody(t,r,{nonce:n,kid:i}),c=await this.request(t,"post",{data:o});return c.data&&c.data.type&&c.status===400&&c.data.type==="urn:ietf:params:acme:error:badNonce"&&a<this.maxBadNonceRetries?(n=c.headers["replay-nonce"]||null,a+=1,lh(`Caught invalid nonce error, retrying (${a}/${this.maxBadNonceRetries}) signed request to: ${t}`),this.signedRequest(t,r,{kid:i,nonce:n,includeExternalAccountBinding:s},a)):c}};G3.exports=ow});var Q3=b((sue,Y3)=>{var yG=uh(),cw=class{constructor(t,r=null){this.http=t,this.accountUrl=r}getAccountUrl(){if(!this.accountUrl)throw new Error("No account URL found, register account first");return this.accountUrl}async apiRequest(t,r=null,i=[],{includeJwsKid:n=!0,includeExternalAccountBinding:s=!1}={}){let a=n?this.getAccountUrl():null,o=await this.http.signedRequest(t,r,{kid:a,includeExternalAccountBinding:s});if(i.length&&i.indexOf(o.status)===-1)throw new Error(yG.formatResponseError(o));return o}async apiResourceRequest(t,r=null,i=[],{includeJwsKid:n=!0,includeExternalAccountBinding:s=!1}={}){let a=await this.http.getResourceUrl(t);return this.apiRequest(a,r,i,{includeJwsKid:n,includeExternalAccountBinding:s})}async getTermsOfServiceUrl(){return this.http.getMetaField("termsOfService")}async createAccount(t){let r=await this.apiResourceRequest("newAccount",t,[200,201],{includeJwsKid:!1,includeExternalAccountBinding:t.onlyReturnExisting!==!0});return r.headers.location&&(this.accountUrl=r.headers.location),r}updateAccount(t){return this.apiRequest(this.getAccountUrl(),t,[200,202])}updateAccountKey(t){return this.apiResourceRequest("keyChange",t,[200])}createOrder(t){return this.apiResourceRequest("newOrder",t,[201])}getOrder(t){return this.apiRequest(t,null,[200])}finalizeOrder(t,r){return this.apiRequest(t,r,[200])}getAuthorization(t){return this.apiRequest(t,null,[200])}updateAuthorization(t,r){return this.apiRequest(t,r,[200])}completeChallenge(t,r){return this.apiRequest(t,r,[200])}revokeCert(t){return this.apiResourceRequest("revokeCert",t,[200])}};Y3.exports=cw});var Z3=b((aue,X3)=>{var gG=require("dns").promises,vG=require("https"),{log:Nr}=ua(),uw=Mg(),J3=uh(),{isAlpnCertificateAuthorizationValid:xG}=Go();async function bG(e,t,r,i=`/.well-known/acme-challenge/${t.token}`){let n=uw.defaults.acmeSettings.httpChallengePort||80,s=`http://${e.identifier.value}:${n}${i}`,a=new vG.Agent({rejectUnauthorized:!1});Nr(`Sending HTTP query to ${e.identifier.value}, suffix: ${i}, port: ${n}`);let o=await uw.get(s,{httpsAgent:a}),c=(o.data||"").replace(/\s+$/,"");if(Nr(`Query successful, HTTP status code: ${o.status}`),!c||c!==r)throw new Error(`Authorization not found in HTTP response from ${e.identifier.value}`);return Nr(`Key authorization match for ${t.type}/${e.identifier.value}, ACME challenge verified`),!0}async function lw(e,t=gG){try{Nr(`Checking name for CNAME records: ${e}`);let r=await t.resolveCname(e);if(r.length)return Nr(`CNAME record found at ${e}, new challenge record name: ${r[0]}`),lw(r[0])}catch{Nr(`No CNAME records found for name: ${e}`)}try{Nr(`Checking name for TXT records: ${e}`);let r=await t.resolveTxt(e);if(r.length)return Nr(`Found ${r.length} TXT records at ${e}`),[].concat(...r)}catch{Nr(`No TXT records found for name: ${e}`)}throw new Error(`No TXT records found for name: ${e}`)}async function _G(e,t,r,i="_acme-challenge."){let n=[],s=`${i}${e.identifier.value}`;Nr(`Resolving DNS TXT from record: ${s}`);try{Nr("Attempting to resolve TXT with default DNS resolver first"),n=await lw(s)}catch(a){Nr(`Error using default resolver, attempting to resolve TXT with authoritative NS: ${a.message}`);let o=await J3.getAuthoritativeDnsResolver(s);n=await lw(s,o)}if(Nr(`DNS query finished successfully, found ${n.length} TXT records`),!n.length||!n.includes(r))throw new Error(`Authorization not found in DNS TXT record: ${s}`);return Nr(`Key authorization match for ${t.type}/${s}, ACME challenge verified`),!0}async function AG(e,t,r){let i=uw.defaults.acmeSettings.tlsAlpnChallengePort||443,n=e.identifier.value;Nr(`Establishing TLS connection with host: ${n}:${i}`);let s=await J3.retrieveTlsAlpnCertificate(n,i);if(Nr("Certificate received from server successfully, matching key authorization in ALPN"),!xG(s,r))throw new Error(`Authorization not found in certificate from ${e.identifier.value}`);return Nr(`Key authorization match for ${t.type}/${e.identifier.value}, ACME challenge verified`),!0}X3.exports={"http-01":bG,"dns-01":_G,"tls-alpn-01":AG}});var t4=b((oue,e4)=>{var{readCsrDomains:SG}=Go(),{log:Xt}=ua(),wG={csr:null,email:null,preferredChain:null,termsOfServiceAgreed:!1,skipChallengeVerification:!1,challengePriority:["http-01","dns-01"],challengeCreateFn:async()=>{throw new Error("Missing challengeCreateFn()")},challengeRemoveFn:async()=>{throw new Error("Missing challengeRemoveFn()")}};e4.exports=async(e,t)=>{let r={...wG,...t},i={termsOfServiceAgreed:r.termsOfServiceAgreed};Buffer.isBuffer(r.csr)||(r.csr=Buffer.from(r.csr)),r.email&&(i.contact=[`mailto:${r.email}`]),Xt("[auto] Checking account");try{e.getAccountUrl(),Xt("[auto] Account URL already exists, skipping account registration")}catch{Xt("[auto] Registering account"),await e.createAccount(i)}Xt("[auto] Parsing domains from Certificate Signing Request");let{commonName:n,altNames:s}=SG(r.csr),a=Array.from(new Set([n].concat(s).filter(d=>d)));Xt(`[auto] Resolved ${a.length} unique domains from parsing the Certificate Signing Request`),Xt("[auto] Placing new certificate order with ACME provider");let o={identifiers:a.map(d=>({type:"dns",value:d}))},c=await e.createOrder(o),u=await e.getAuthorizations(c);Xt(`[auto] Placed certificate order successfully, received ${u.length} identity authorizations`),Xt("[auto] Resolving and satisfying authorization challenges");let l=u.map(async d=>{let h=d.identifier.value,f=!1;if(d.status==="valid"){Xt(`[auto] [${h}] Authorization already has valid status, no need to complete challenges`);return}try{let m=d.challenges.sort((_,A)=>{let S=r.challengePriority.indexOf(_.type),B=r.challengePriority.indexOf(A.type);return S===-1?1:B===-1?-1:S-B}).slice(0,1)[0];if(!m)throw new Error(`Unable to select challenge for ${h}, no challenge found`);Xt(`[auto] [${h}] Found ${d.challenges.length} challenges, selected type: ${m.type}`),Xt(`[auto] [${h}] Trigger challengeCreateFn()`);let y=await e.getChallengeKeyAuthorization(m);try{await r.challengeCreateFn(d,m,y),r.skipChallengeVerification===!0?Xt(`[auto] [${h}] Skipping challenge verification since skipChallengeVerification=true`):(Xt(`[auto] [${h}] Running challenge verification`),await e.verifyChallenge(d,m)),Xt(`[auto] [${h}] Completing challenge with ACME provider and waiting for valid status`),await e.completeChallenge(m),f=!0,await e.waitForValidStatus(m)}finally{Xt(`[auto] [${h}] Trigger challengeRemoveFn()`);try{await r.challengeRemoveFn(d,m,y)}catch(_){Xt(`[auto] [${h}] challengeRemoveFn threw error: ${_.message}`)}}}catch(m){if(!f){Xt(`[auto] [${h}] Unable to complete challenge: ${m.message}`);try{Xt(`[auto] [${h}] Deactivating failed authorization`),await e.deactivateAuthorization(d)}catch(y){Xt(`[auto] [${h}] Authorization deactivation threw error: ${y.message}`)}}throw m}});try{Xt("[auto] Waiting for challenge valid status"),await Promise.all(l)}catch(d){throw await Promise.allSettled(l),d}Xt("[auto] Finalizing order and downloading certificate");let p=await e.finalizeOrder(c,r.csr);return e.getCertificate(p,r.preferredChain)}});var u4=b((cue,c4)=>{var{createHash:r4}=require("crypto"),{getPemBodyAsB64u:i4}=Go(),{log:Al}=ua(),n4=W3(),s4=Q3(),a4=Z3(),ph=uh(),CG=t4(),o4=["ready","valid"],EG=["pending","processing"],TG=["invalid"],IG={directoryUrl:void 0,accountKey:void 0,accountUrl:null,externalAccountBinding:{},backoffAttempts:10,backoffMin:5e3,backoffMax:3e4},pw=class{constructor(t){Buffer.isBuffer(t.accountKey)||(t.accountKey=Buffer.from(t.accountKey)),this.opts={...IG,...t},this.backoffOpts={attempts:this.opts.backoffAttempts,min:this.opts.backoffMin,max:this.opts.backoffMax},this.http=new n4(this.opts.directoryUrl,this.opts.accountKey,this.opts.externalAccountBinding),this.api=new s4(this.http,this.opts.accountUrl)}getTermsOfServiceUrl(){return this.api.getTermsOfServiceUrl()}getAccountUrl(){return this.api.getAccountUrl()}async createAccount(t={}){try{return this.getAccountUrl(),Al("Account URL exists, returning updateAccount()"),this.updateAccount(t)}catch{let i=await this.api.createAccount(t);return i.status===200?(Al("Account already exists (HTTP 200), returning updateAccount()"),this.updateAccount(t)):i.data}}async updateAccount(t={}){try{this.api.getAccountUrl()}catch{return Al("No account URL found, returning createAccount()"),this.createAccount(t)}return"onlyReturnExisting"in t&&delete t.onlyReturnExisting,Object.keys(t).length===0&&(t=null),(await this.api.updateAccount(t)).data}async updateAccountKey(t,r={}){Buffer.isBuffer(t)||(t=Buffer.from(t));let i=this.api.getAccountUrl(),n=new n4(this.opts.directoryUrl,t,this.opts.externalAccountBinding),s=new s4(n,i);r.account=i,r.oldKey=this.http.getJwk();let a=await n.getResourceUrl("keyChange"),o=n.createSignedBody(a,r),c=await this.api.updateAccountKey(o);return this.http=n,this.api=s,c.data}async createOrder(t){let r=await this.api.createOrder(t);if(!r.headers.location)throw new Error("Creating a new order did not return an order link");return r.data.url=r.headers.location,r.data}async getOrder(t){if(!t.url)throw new Error("Unable to get order, URL not found");let r=await this.api.getOrder(t.url);return r.data.url=t.url,r.data}async finalizeOrder(t,r){if(!t.finalize)throw new Error("Unable to finalize order, URL not found");Buffer.isBuffer(r)||(r=Buffer.from(r));let i={csr:i4(r)},n=await this.api.finalizeOrder(t.finalize,i);return n.data.url=t.url,n.data}async getAuthorizations(t){return Promise.all((t.authorizations||[]).map(async r=>{let i=await this.api.getAuthorization(r);return i.data.url=r,i.data}))}async deactivateAuthorization(t){if(!t.url)throw new Error("Unable to deactivate identifier authorization, URL not found");let r={status:"deactivated"},i=await this.api.updateAuthorization(t.url,r);return i.data.url=t.url,i.data}async getChallengeKeyAuthorization(t){let r=this.http.getJwk(),n=r4("sha256").update(JSON.stringify(r)).digest("base64url"),s=`${t.token}.${n}`;if(t.type==="http-01")return s;if(t.type==="dns-01")return r4("sha256").update(s).digest("base64url");if(t.type==="tls-alpn-01")return s;throw new Error(`Unable to produce key authorization, unknown challenge type: ${t.type}`)}async verifyChallenge(t,r){if(!t.url||!r.url)throw new Error("Unable to verify ACME challenge, URL not found");if(typeof a4[r.type]>"u")throw new Error(`Unable to verify ACME challenge, unknown type: ${r.type}`);let i=await this.getChallengeKeyAuthorization(r),n=async()=>{await a4[r.type](t,r,i)};return Al("Waiting for ACME challenge verification",this.backoffOpts),ph.retry(n,this.backoffOpts)}async completeChallenge(t){return(await this.api.completeChallenge(t.url,{})).data}async waitForValidStatus(t){if(!t.url)throw new Error("Unable to verify status of item, URL not found");let r=async i=>{let n=await this.api.apiRequest(t.url,null,[200]);if(Al(`Item has status: ${n.data.status}`),TG.includes(n.data.status))throw i(),new Error(ph.formatResponseError(n));if(EG.includes(n.data.status))throw new Error("Operation is pending or processing");if(o4.includes(n.data.status))return n.data;throw new Error(`Unexpected item status: ${n.data.status}`)};return Al(`Waiting for valid status from: ${t.url}`,this.backoffOpts),ph.retry(r,this.backoffOpts)}async getCertificate(t,r=null){if(o4.includes(t.status)||(t=await this.waitForValidStatus(t)),!t.certificate)throw new Error("Unable to download certificate, URL not found");let i=await this.api.apiRequest(t.certificate,null,[200]);if(r&&i.headers.link){let n=ph.parseLinkHeader(i.headers.link),s=await Promise.all(n.map(async o=>this.api.apiRequest(o,null,[200]))),a=[i].concat(s).map(o=>o.data);return ph.findCertificateChainForIssuer(a,r)}return i.data}async revokeCertificate(t,r={}){return r.certificate=i4(t),(await this.api.revokeCert(r)).data}auto(t){return CG(this,t)}};c4.exports=pw});var Ue=b((uue,l4)=>{l4.exports={options:{usePureJavaScript:!1}}});var d4=b((lue,f4)=>{var fw={};f4.exports=fw;var p4={};fw.encode=function(e,t,r){if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');if(r!==void 0&&typeof r!="number")throw new TypeError('"maxline" must be a number.');var i="";if(!(e instanceof Uint8Array))i=BG(e,t);else{var n=0,s=t.length,a=t.charAt(0),o=[0];for(n=0;n<e.length;++n){for(var c=0,u=e[n];c<o.length;++c)u+=o[c]<<8,o[c]=u%s,u=u/s|0;for(;u>0;)o.push(u%s),u=u/s|0}for(n=0;e[n]===0&&n<e.length-1;++n)i+=a;for(n=o.length-1;n>=0;--n)i+=t[o[n]]}if(r){var l=new RegExp(".{1,"+r+"}","g");i=i.match(l).join(`\r
|
|
25
|
+
`)}return i};fw.decode=function(e,t){if(typeof e!="string")throw new TypeError('"input" must be a string.');if(typeof t!="string")throw new TypeError('"alphabet" must be a string.');var r=p4[t];if(!r){r=p4[t]=[];for(var i=0;i<t.length;++i)r[t.charCodeAt(i)]=i}e=e.replace(/\s/g,"");for(var n=t.length,s=t.charAt(0),a=[0],i=0;i<e.length;i++){var o=r[e.charCodeAt(i)];if(o===void 0)return;for(var c=0,u=o;c<a.length;++c)u+=a[c]*n,a[c]=u&255,u>>=8;for(;u>0;)a.push(u&255),u>>=8}for(var l=0;e[l]===s&&l<e.length-1;++l)a.push(0);return typeof Buffer<"u"?Buffer.from(a.reverse()):new Uint8Array(a.reverse())};function BG(e,t){var r=0,i=t.length,n=t.charAt(0),s=[0];for(r=0;r<e.length();++r){for(var a=0,o=e.at(r);a<s.length;++a)o+=s[a]<<8,s[a]=o%i,o=o/i|0;for(;o>0;)s.push(o%i),o=o/i|0}var c="";for(r=0;e.at(r)===0&&r<e.length()-1;++r)c+=n;for(r=s.length-1;r>=0;--r)c+=t[s[r]];return c}});var nt=b((pue,g4)=>{var h4=Ue(),m4=d4(),T=g4.exports=h4.util=h4.util||{};(function(){if(typeof process<"u"&&process.nextTick&&!process.browser){T.nextTick=process.nextTick,typeof setImmediate=="function"?T.setImmediate=setImmediate:T.setImmediate=T.nextTick;return}if(typeof setImmediate=="function"){T.setImmediate=function(){return setImmediate.apply(void 0,arguments)},T.nextTick=function(o){return setImmediate(o)};return}if(T.setImmediate=function(o){setTimeout(o,0)},typeof window<"u"&&typeof window.postMessage=="function"){let o=function(c){if(c.source===window&&c.data===e){c.stopPropagation();var u=t.slice();t.length=0,u.forEach(function(l){l()})}};var a=o,e="forge.setImmediate",t=[];T.setImmediate=function(c){t.push(c),t.length===1&&window.postMessage(e,"*")},window.addEventListener("message",o,!0)}if(typeof MutationObserver<"u"){var r=Date.now(),i=!0,n=document.createElement("div"),t=[];new MutationObserver(function(){var c=t.slice();t.length=0,c.forEach(function(u){u()})}).observe(n,{attributes:!0});var s=T.setImmediate;T.setImmediate=function(c){Date.now()-r>15?(r=Date.now(),s(c)):(t.push(c),t.length===1&&n.setAttribute("a",i=!i))}}T.nextTick=T.setImmediate})();T.isNodejs=typeof process<"u"&&process.versions&&process.versions.node;T.globalScope=(function(){return T.isNodejs?global:typeof self>"u"?window:self})();T.isArray=Array.isArray||function(e){return Object.prototype.toString.call(e)==="[object Array]"};T.isArrayBuffer=function(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer};T.isArrayBufferView=function(e){return e&&T.isArrayBuffer(e.buffer)&&e.byteLength!==void 0};function fh(e){if(!(e===8||e===16||e===24||e===32))throw new Error("Only 8, 16, 24, or 32 bits supported: "+e)}T.ByteBuffer=dw;function dw(e){if(this.data="",this.read=0,typeof e=="string")this.data=e;else if(T.isArrayBuffer(e)||T.isArrayBufferView(e))if(typeof Buffer<"u"&&e instanceof Buffer)this.data=e.toString("binary");else{var t=new Uint8Array(e);try{this.data=String.fromCharCode.apply(null,t)}catch{for(var r=0;r<t.length;++r)this.putByte(t[r])}}else(e instanceof dw||typeof e=="object"&&typeof e.data=="string"&&typeof e.read=="number")&&(this.data=e.data,this.read=e.read);this._constructedStringLength=0}T.ByteStringBuffer=dw;var kG=4096;T.ByteStringBuffer.prototype._optimizeConstructedString=function(e){this._constructedStringLength+=e,this._constructedStringLength>kG&&(this.data.substr(0,1),this._constructedStringLength=0)};T.ByteStringBuffer.prototype.length=function(){return this.data.length-this.read};T.ByteStringBuffer.prototype.isEmpty=function(){return this.length()<=0};T.ByteStringBuffer.prototype.putByte=function(e){return this.putBytes(String.fromCharCode(e))};T.ByteStringBuffer.prototype.fillWithByte=function(e,t){e=String.fromCharCode(e);for(var r=this.data;t>0;)t&1&&(r+=e),t>>>=1,t>0&&(e+=e);return this.data=r,this._optimizeConstructedString(t),this};T.ByteStringBuffer.prototype.putBytes=function(e){return this.data+=e,this._optimizeConstructedString(e.length),this};T.ByteStringBuffer.prototype.putString=function(e){return this.putBytes(T.encodeUtf8(e))};T.ByteStringBuffer.prototype.putInt16=function(e){return this.putBytes(String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};T.ByteStringBuffer.prototype.putInt24=function(e){return this.putBytes(String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};T.ByteStringBuffer.prototype.putInt32=function(e){return this.putBytes(String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255))};T.ByteStringBuffer.prototype.putInt16Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255))};T.ByteStringBuffer.prototype.putInt24Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255))};T.ByteStringBuffer.prototype.putInt32Le=function(e){return this.putBytes(String.fromCharCode(e&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>24&255))};T.ByteStringBuffer.prototype.putInt=function(e,t){fh(t);var r="";do t-=8,r+=String.fromCharCode(e>>t&255);while(t>0);return this.putBytes(r)};T.ByteStringBuffer.prototype.putSignedInt=function(e,t){return e<0&&(e+=2<<t-1),this.putInt(e,t)};T.ByteStringBuffer.prototype.putBuffer=function(e){return this.putBytes(e.getBytes())};T.ByteStringBuffer.prototype.getByte=function(){return this.data.charCodeAt(this.read++)};T.ByteStringBuffer.prototype.getInt16=function(){var e=this.data.charCodeAt(this.read)<<8^this.data.charCodeAt(this.read+1);return this.read+=2,e};T.ByteStringBuffer.prototype.getInt24=function(){var e=this.data.charCodeAt(this.read)<<16^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2);return this.read+=3,e};T.ByteStringBuffer.prototype.getInt32=function(){var e=this.data.charCodeAt(this.read)<<24^this.data.charCodeAt(this.read+1)<<16^this.data.charCodeAt(this.read+2)<<8^this.data.charCodeAt(this.read+3);return this.read+=4,e};T.ByteStringBuffer.prototype.getInt16Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8;return this.read+=2,e};T.ByteStringBuffer.prototype.getInt24Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16;return this.read+=3,e};T.ByteStringBuffer.prototype.getInt32Le=function(){var e=this.data.charCodeAt(this.read)^this.data.charCodeAt(this.read+1)<<8^this.data.charCodeAt(this.read+2)<<16^this.data.charCodeAt(this.read+3)<<24;return this.read+=4,e};T.ByteStringBuffer.prototype.getInt=function(e){fh(e);var t=0;do t=(t<<8)+this.data.charCodeAt(this.read++),e-=8;while(e>0);return t};T.ByteStringBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t};T.ByteStringBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};T.ByteStringBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};T.ByteStringBuffer.prototype.at=function(e){return this.data.charCodeAt(this.read+e)};T.ByteStringBuffer.prototype.setAt=function(e,t){return this.data=this.data.substr(0,this.read+e)+String.fromCharCode(t)+this.data.substr(this.read+e+1),this};T.ByteStringBuffer.prototype.last=function(){return this.data.charCodeAt(this.data.length-1)};T.ByteStringBuffer.prototype.copy=function(){var e=T.createBuffer(this.data);return e.read=this.read,e};T.ByteStringBuffer.prototype.compact=function(){return this.read>0&&(this.data=this.data.slice(this.read),this.read=0),this};T.ByteStringBuffer.prototype.clear=function(){return this.data="",this.read=0,this};T.ByteStringBuffer.prototype.truncate=function(e){var t=Math.max(0,this.length()-e);return this.data=this.data.substr(this.read,t),this.read=0,this};T.ByteStringBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.length;++t){var r=this.data.charCodeAt(t);r<16&&(e+="0"),e+=r.toString(16)}return e};T.ByteStringBuffer.prototype.toString=function(){return T.decodeUtf8(this.bytes())};function PG(e,t){t=t||{},this.read=t.readOffset||0,this.growSize=t.growSize||1024;var r=T.isArrayBuffer(e),i=T.isArrayBufferView(e);if(r||i){r?this.data=new DataView(e):this.data=new DataView(e.buffer,e.byteOffset,e.byteLength),this.write="writeOffset"in t?t.writeOffset:this.data.byteLength;return}this.data=new DataView(new ArrayBuffer(0)),this.write=0,e!=null&&this.putBytes(e),"writeOffset"in t&&(this.write=t.writeOffset)}T.DataBuffer=PG;T.DataBuffer.prototype.length=function(){return this.write-this.read};T.DataBuffer.prototype.isEmpty=function(){return this.length()<=0};T.DataBuffer.prototype.accommodate=function(e,t){if(this.length()>=e)return this;t=Math.max(t||this.growSize,e);var r=new Uint8Array(this.data.buffer,this.data.byteOffset,this.data.byteLength),i=new Uint8Array(this.length()+t);return i.set(r),this.data=new DataView(i.buffer),this};T.DataBuffer.prototype.putByte=function(e){return this.accommodate(1),this.data.setUint8(this.write++,e),this};T.DataBuffer.prototype.fillWithByte=function(e,t){this.accommodate(t);for(var r=0;r<t;++r)this.data.setUint8(e);return this};T.DataBuffer.prototype.putBytes=function(e,t){if(T.isArrayBufferView(e)){var r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength),i=r.byteLength-r.byteOffset;this.accommodate(i);var n=new Uint8Array(this.data.buffer,this.write);return n.set(r),this.write+=i,this}if(T.isArrayBuffer(e)){var r=new Uint8Array(e);this.accommodate(r.byteLength);var n=new Uint8Array(this.data.buffer);return n.set(r,this.write),this.write+=r.byteLength,this}if(e instanceof T.DataBuffer||typeof e=="object"&&typeof e.read=="number"&&typeof e.write=="number"&&T.isArrayBufferView(e.data)){var r=new Uint8Array(e.data.byteLength,e.read,e.length());this.accommodate(r.byteLength);var n=new Uint8Array(e.data.byteLength,this.write);return n.set(r),this.write+=r.byteLength,this}if(e instanceof T.ByteStringBuffer&&(e=e.data,t="binary"),t=t||"binary",typeof e=="string"){var s;if(t==="hex")return this.accommodate(Math.ceil(e.length/2)),s=new Uint8Array(this.data.buffer,this.write),this.write+=T.binary.hex.decode(e,s,this.write),this;if(t==="base64")return this.accommodate(Math.ceil(e.length/4)*3),s=new Uint8Array(this.data.buffer,this.write),this.write+=T.binary.base64.decode(e,s,this.write),this;if(t==="utf8"&&(e=T.encodeUtf8(e),t="binary"),t==="binary"||t==="raw")return this.accommodate(e.length),s=new Uint8Array(this.data.buffer,this.write),this.write+=T.binary.raw.decode(s),this;if(t==="utf16")return this.accommodate(e.length*2),s=new Uint16Array(this.data.buffer,this.write),this.write+=T.text.utf16.encode(s),this;throw new Error("Invalid encoding: "+t)}throw Error("Invalid parameter: "+e)};T.DataBuffer.prototype.putBuffer=function(e){return this.putBytes(e),e.clear(),this};T.DataBuffer.prototype.putString=function(e){return this.putBytes(e,"utf16")};T.DataBuffer.prototype.putInt16=function(e){return this.accommodate(2),this.data.setInt16(this.write,e),this.write+=2,this};T.DataBuffer.prototype.putInt24=function(e){return this.accommodate(3),this.data.setInt16(this.write,e>>8&65535),this.data.setInt8(this.write,e>>16&255),this.write+=3,this};T.DataBuffer.prototype.putInt32=function(e){return this.accommodate(4),this.data.setInt32(this.write,e),this.write+=4,this};T.DataBuffer.prototype.putInt16Le=function(e){return this.accommodate(2),this.data.setInt16(this.write,e,!0),this.write+=2,this};T.DataBuffer.prototype.putInt24Le=function(e){return this.accommodate(3),this.data.setInt8(this.write,e>>16&255),this.data.setInt16(this.write,e>>8&65535,!0),this.write+=3,this};T.DataBuffer.prototype.putInt32Le=function(e){return this.accommodate(4),this.data.setInt32(this.write,e,!0),this.write+=4,this};T.DataBuffer.prototype.putInt=function(e,t){fh(t),this.accommodate(t/8);do t-=8,this.data.setInt8(this.write++,e>>t&255);while(t>0);return this};T.DataBuffer.prototype.putSignedInt=function(e,t){return fh(t),this.accommodate(t/8),e<0&&(e+=2<<t-1),this.putInt(e,t)};T.DataBuffer.prototype.getByte=function(){return this.data.getInt8(this.read++)};T.DataBuffer.prototype.getInt16=function(){var e=this.data.getInt16(this.read);return this.read+=2,e};T.DataBuffer.prototype.getInt24=function(){var e=this.data.getInt16(this.read)<<8^this.data.getInt8(this.read+2);return this.read+=3,e};T.DataBuffer.prototype.getInt32=function(){var e=this.data.getInt32(this.read);return this.read+=4,e};T.DataBuffer.prototype.getInt16Le=function(){var e=this.data.getInt16(this.read,!0);return this.read+=2,e};T.DataBuffer.prototype.getInt24Le=function(){var e=this.data.getInt8(this.read)^this.data.getInt16(this.read+1,!0)<<8;return this.read+=3,e};T.DataBuffer.prototype.getInt32Le=function(){var e=this.data.getInt32(this.read,!0);return this.read+=4,e};T.DataBuffer.prototype.getInt=function(e){fh(e);var t=0;do t=(t<<8)+this.data.getInt8(this.read++),e-=8;while(e>0);return t};T.DataBuffer.prototype.getSignedInt=function(e){var t=this.getInt(e),r=2<<e-2;return t>=r&&(t-=r<<1),t};T.DataBuffer.prototype.getBytes=function(e){var t;return e?(e=Math.min(this.length(),e),t=this.data.slice(this.read,this.read+e),this.read+=e):e===0?t="":(t=this.read===0?this.data:this.data.slice(this.read),this.clear()),t};T.DataBuffer.prototype.bytes=function(e){return typeof e>"u"?this.data.slice(this.read):this.data.slice(this.read,this.read+e)};T.DataBuffer.prototype.at=function(e){return this.data.getUint8(this.read+e)};T.DataBuffer.prototype.setAt=function(e,t){return this.data.setUint8(e,t),this};T.DataBuffer.prototype.last=function(){return this.data.getUint8(this.write-1)};T.DataBuffer.prototype.copy=function(){return new T.DataBuffer(this)};T.DataBuffer.prototype.compact=function(){if(this.read>0){var e=new Uint8Array(this.data.buffer,this.read),t=new Uint8Array(e.byteLength);t.set(e),this.data=new DataView(t),this.write-=this.read,this.read=0}return this};T.DataBuffer.prototype.clear=function(){return this.data=new DataView(new ArrayBuffer(0)),this.read=this.write=0,this};T.DataBuffer.prototype.truncate=function(e){return this.write=Math.max(0,this.length()-e),this.read=Math.min(this.read,this.write),this};T.DataBuffer.prototype.toHex=function(){for(var e="",t=this.read;t<this.data.byteLength;++t){var r=this.data.getUint8(t);r<16&&(e+="0"),e+=r.toString(16)}return e};T.DataBuffer.prototype.toString=function(e){var t=new Uint8Array(this.data,this.read,this.length());if(e=e||"utf8",e==="binary"||e==="raw")return T.binary.raw.encode(t);if(e==="hex")return T.binary.hex.encode(t);if(e==="base64")return T.binary.base64.encode(t);if(e==="utf8")return T.text.utf8.decode(t);if(e==="utf16")return T.text.utf16.decode(t);throw new Error("Invalid encoding: "+e)};T.createBuffer=function(e,t){return t=t||"raw",e!==void 0&&t==="utf8"&&(e=T.encodeUtf8(e)),new T.ByteBuffer(e)};T.fillString=function(e,t){for(var r="";t>0;)t&1&&(r+=e),t>>>=1,t>0&&(e+=e);return r};T.xorBytes=function(e,t,r){for(var i="",n="",s="",a=0,o=0;r>0;--r,++a)n=e.charCodeAt(a)^t.charCodeAt(a),o>=10&&(i+=s,s="",o=0),s+=String.fromCharCode(n),++o;return i+=s,i};T.hexToBytes=function(e){var t="",r=0;for(e.length&!0&&(r=1,t+=String.fromCharCode(parseInt(e[0],16)));r<e.length;r+=2)t+=String.fromCharCode(parseInt(e.substr(r,2),16));return t};T.bytesToHex=function(e){return T.createBuffer(e).toHex()};T.int32ToBytes=function(e){return String.fromCharCode(e>>24&255)+String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(e&255)};var ha="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ma=[62,-1,-1,-1,63,52,53,54,55,56,57,58,59,60,61,-1,-1,-1,64,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1,-1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],y4="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";T.encode64=function(e,t){for(var r="",i="",n,s,a,o=0;o<e.length;)n=e.charCodeAt(o++),s=e.charCodeAt(o++),a=e.charCodeAt(o++),r+=ha.charAt(n>>2),r+=ha.charAt((n&3)<<4|s>>4),isNaN(s)?r+="==":(r+=ha.charAt((s&15)<<2|a>>6),r+=isNaN(a)?"=":ha.charAt(a&63)),t&&r.length>t&&(i+=r.substr(0,t)+`\r
|
|
26
|
+
`,r=r.substr(t));return i+=r,i};T.decode64=function(e){e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");for(var t="",r,i,n,s,a=0;a<e.length;)r=ma[e.charCodeAt(a++)-43],i=ma[e.charCodeAt(a++)-43],n=ma[e.charCodeAt(a++)-43],s=ma[e.charCodeAt(a++)-43],t+=String.fromCharCode(r<<2|i>>4),n!==64&&(t+=String.fromCharCode((i&15)<<4|n>>2),s!==64&&(t+=String.fromCharCode((n&3)<<6|s)));return t};T.encodeUtf8=function(e){return unescape(encodeURIComponent(e))};T.decodeUtf8=function(e){return decodeURIComponent(escape(e))};T.binary={raw:{},hex:{},base64:{},base58:{},baseN:{encode:m4.encode,decode:m4.decode}};T.binary.raw.encode=function(e){return String.fromCharCode.apply(null,e)};T.binary.raw.decode=function(e,t,r){var i=t;i||(i=new Uint8Array(e.length)),r=r||0;for(var n=r,s=0;s<e.length;++s)i[n++]=e.charCodeAt(s);return t?n-r:i};T.binary.hex.encode=T.bytesToHex;T.binary.hex.decode=function(e,t,r){var i=t;i||(i=new Uint8Array(Math.ceil(e.length/2))),r=r||0;var n=0,s=r;for(e.length&1&&(n=1,i[s++]=parseInt(e[0],16));n<e.length;n+=2)i[s++]=parseInt(e.substr(n,2),16);return t?s-r:i};T.binary.base64.encode=function(e,t){for(var r="",i="",n,s,a,o=0;o<e.byteLength;)n=e[o++],s=e[o++],a=e[o++],r+=ha.charAt(n>>2),r+=ha.charAt((n&3)<<4|s>>4),isNaN(s)?r+="==":(r+=ha.charAt((s&15)<<2|a>>6),r+=isNaN(a)?"=":ha.charAt(a&63)),t&&r.length>t&&(i+=r.substr(0,t)+`\r
|
|
27
|
+
`,r=r.substr(t));return i+=r,i};T.binary.base64.decode=function(e,t,r){var i=t;i||(i=new Uint8Array(Math.ceil(e.length/4)*3)),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,""),r=r||0;for(var n,s,a,o,c=0,u=r;c<e.length;)n=ma[e.charCodeAt(c++)-43],s=ma[e.charCodeAt(c++)-43],a=ma[e.charCodeAt(c++)-43],o=ma[e.charCodeAt(c++)-43],i[u++]=n<<2|s>>4,a!==64&&(i[u++]=(s&15)<<4|a>>2,o!==64&&(i[u++]=(a&3)<<6|o));return t?u-r:i.subarray(0,u)};T.binary.base58.encode=function(e,t){return T.binary.baseN.encode(e,y4,t)};T.binary.base58.decode=function(e,t){return T.binary.baseN.decode(e,y4,t)};T.text={utf8:{},utf16:{}};T.text.utf8.encode=function(e,t,r){e=T.encodeUtf8(e);var i=t;i||(i=new Uint8Array(e.length)),r=r||0;for(var n=r,s=0;s<e.length;++s)i[n++]=e.charCodeAt(s);return t?n-r:i};T.text.utf8.decode=function(e){return T.decodeUtf8(String.fromCharCode.apply(null,e))};T.text.utf16.encode=function(e,t,r){var i=t;i||(i=new Uint8Array(e.length*2));var n=new Uint16Array(i.buffer);r=r||0;for(var s=r,a=r,o=0;o<e.length;++o)n[a++]=e.charCodeAt(o),s+=2;return t?s-r:i};T.text.utf16.decode=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))};T.deflate=function(e,t,r){if(t=T.decode64(e.deflate(T.encode64(t)).rval),r){var i=2,n=t.charCodeAt(1);n&32&&(i=6),t=t.substring(i,t.length-4)}return t};T.inflate=function(e,t,r){var i=e.inflate(T.encode64(t)).rval;return i===null?null:T.decode64(i)};var hw=function(e,t,r){if(!e)throw new Error("WebStorage not available.");var i;if(r===null?i=e.removeItem(t):(r=T.encode64(JSON.stringify(r)),i=e.setItem(t,r)),typeof i<"u"&&i.rval!==!0){var n=new Error(i.error.message);throw n.id=i.error.id,n.name=i.error.name,n}},mw=function(e,t){if(!e)throw new Error("WebStorage not available.");var r=e.getItem(t);if(e.init)if(r.rval===null){if(r.error){var i=new Error(r.error.message);throw i.id=r.error.id,i.name=r.error.name,i}r=null}else r=r.rval;return r!==null&&(r=JSON.parse(T.decode64(r))),r},NG=function(e,t,r,i){var n=mw(e,t);n===null&&(n={}),n[r]=i,hw(e,t,n)},RG=function(e,t,r){var i=mw(e,t);return i!==null&&(i=r in i?i[r]:null),i},OG=function(e,t,r){var i=mw(e,t);if(i!==null&&r in i){delete i[r];var n=!0;for(var s in i){n=!1;break}n&&(i=null),hw(e,t,i)}},LG=function(e,t){hw(e,t,null)},Vg=function(e,t,r){var i=null;typeof r>"u"&&(r=["web","flash"]);var n,s=!1,a=null;for(var o in r){n=r[o];try{if(n==="flash"||n==="both"){if(t[0]===null)throw new Error("Flash local storage not available.");i=e.apply(this,t),s=n==="flash"}(n==="web"||n==="both")&&(t[0]=localStorage,i=e.apply(this,t),s=!0)}catch(c){a=c}if(s)break}if(!s)throw a;return i};T.setItem=function(e,t,r,i,n){Vg(NG,arguments,n)};T.getItem=function(e,t,r,i){return Vg(RG,arguments,i)};T.removeItem=function(e,t,r,i){Vg(OG,arguments,i)};T.clearItems=function(e,t,r){Vg(LG,arguments,r)};T.isEmpty=function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0};T.format=function(e){for(var t=/%./g,r,i,n=0,s=[],a=0;r=t.exec(e);){i=e.substring(a,t.lastIndex-2),i.length>0&&s.push(i),a=t.lastIndex;var o=r[0][1];switch(o){case"s":case"o":n<arguments.length?s.push(arguments[n+++1]):s.push("<?>");break;case"%":s.push("%");break;default:s.push("<%"+o+"?>")}}return s.push(e.substring(a)),s.join("")};T.formatNumber=function(e,t,r,i){var n=e,s=isNaN(t=Math.abs(t))?2:t,a=r===void 0?",":r,o=i===void 0?".":i,c=n<0?"-":"",u=parseInt(n=Math.abs(+n||0).toFixed(s),10)+"",l=u.length>3?u.length%3:0;return c+(l?u.substr(0,l)+o:"")+u.substr(l).replace(/(\d{3})(?=\d)/g,"$1"+o)+(s?a+Math.abs(n-u).toFixed(s).slice(2):"")};T.formatSize=function(e){return e>=1073741824?e=T.formatNumber(e/1073741824,2,".","")+" GiB":e>=1048576?e=T.formatNumber(e/1048576,2,".","")+" MiB":e>=1024?e=T.formatNumber(e/1024,0)+" KiB":e=T.formatNumber(e,0)+" bytes",e};T.bytesFromIP=function(e){return e.indexOf(".")!==-1?T.bytesFromIPv4(e):e.indexOf(":")!==-1?T.bytesFromIPv6(e):null};T.bytesFromIPv4=function(e){if(e=e.split("."),e.length!==4)return null;for(var t=T.createBuffer(),r=0;r<e.length;++r){var i=parseInt(e[r],10);if(isNaN(i))return null;t.putByte(i)}return t.getBytes()};T.bytesFromIPv6=function(e){var t=0;e=e.split(":").filter(function(a){return a.length===0&&++t,!0});for(var r=(8-e.length+t)*2,i=T.createBuffer(),n=0;n<8;++n){if(!e[n]||e[n].length===0){i.fillWithByte(0,r),r=0;continue}var s=T.hexToBytes(e[n]);s.length<2&&i.putByte(0),i.putBytes(s)}return i.getBytes()};T.bytesToIP=function(e){return e.length===4?T.bytesToIPv4(e):e.length===16?T.bytesToIPv6(e):null};T.bytesToIPv4=function(e){if(e.length!==4)return null;for(var t=[],r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t.join(".")};T.bytesToIPv6=function(e){if(e.length!==16)return null;for(var t=[],r=[],i=0,n=0;n<e.length;n+=2){for(var s=T.bytesToHex(e[n]+e[n+1]);s[0]==="0"&&s!=="0";)s=s.substr(1);if(s==="0"){var a=r[r.length-1],o=t.length;!a||o!==a.end+1?r.push({start:o,end:o}):(a.end=o,a.end-a.start>r[i].end-r[i].start&&(i=r.length-1))}t.push(s)}if(r.length>0){var c=r[i];c.end-c.start>0&&(t.splice(c.start,c.end-c.start+1,""),c.start===0&&t.unshift(""),c.end===7&&t.push(""))}return t.join(":")};T.estimateCores=function(e,t){if(typeof e=="function"&&(t=e,e={}),e=e||{},"cores"in T&&!e.update)return t(null,T.cores);if(typeof navigator<"u"&&"hardwareConcurrency"in navigator&&navigator.hardwareConcurrency>0)return T.cores=navigator.hardwareConcurrency,t(null,T.cores);if(typeof Worker>"u")return T.cores=1,t(null,T.cores);if(typeof Blob>"u")return T.cores=2,t(null,T.cores);var r=URL.createObjectURL(new Blob(["(",function(){self.addEventListener("message",function(a){for(var o=Date.now(),c=o+4;Date.now()<c;);self.postMessage({st:o,et:c})})}.toString(),")()"],{type:"application/javascript"}));i([],5,16);function i(a,o,c){if(o===0){var u=Math.floor(a.reduce(function(l,p){return l+p},0)/a.length);return T.cores=Math.max(1,u),URL.revokeObjectURL(r),t(null,T.cores)}n(c,function(l,p){a.push(s(c,p)),i(a,o-1,c)})}function n(a,o){for(var c=[],u=[],l=0;l<a;++l){var p=new Worker(r);p.addEventListener("message",function(d){if(u.push(d.data),u.length===a){for(var h=0;h<a;++h)c[h].terminate();o(null,u)}}),c.push(p)}for(var l=0;l<a;++l)c[l].postMessage(l)}function s(a,o){for(var c=[],u=0;u<a;++u)for(var l=o[u],p=c[u]=[],d=0;d<a;++d)if(u!==d){var h=o[d];(l.st>h.st&&l.st<h.et||h.st>l.st&&h.st<l.et)&&p.push(d)}return c.reduce(function(f,m){return Math.max(f,m.length)},0)}}});var Kg=b((fue,v4)=>{var wr=Ue();nt();v4.exports=wr.cipher=wr.cipher||{};wr.cipher.algorithms=wr.cipher.algorithms||{};wr.cipher.createCipher=function(e,t){var r=e;if(typeof r=="string"&&(r=wr.cipher.getAlgorithm(r),r&&(r=r())),!r)throw new Error("Unsupported algorithm: "+e);return new wr.cipher.BlockCipher({algorithm:r,key:t,decrypt:!1})};wr.cipher.createDecipher=function(e,t){var r=e;if(typeof r=="string"&&(r=wr.cipher.getAlgorithm(r),r&&(r=r())),!r)throw new Error("Unsupported algorithm: "+e);return new wr.cipher.BlockCipher({algorithm:r,key:t,decrypt:!0})};wr.cipher.registerAlgorithm=function(e,t){e=e.toUpperCase(),wr.cipher.algorithms[e]=t};wr.cipher.getAlgorithm=function(e){return e=e.toUpperCase(),e in wr.cipher.algorithms?wr.cipher.algorithms[e]:null};var yw=wr.cipher.BlockCipher=function(e){this.algorithm=e.algorithm,this.mode=this.algorithm.mode,this.blockSize=this.mode.blockSize,this._finish=!1,this._input=null,this.output=null,this._op=e.decrypt?this.mode.decrypt:this.mode.encrypt,this._decrypt=e.decrypt,this.algorithm.initialize(e)};yw.prototype.start=function(e){e=e||{};var t={};for(var r in e)t[r]=e[r];t.decrypt=this._decrypt,this._finish=!1,this._input=wr.util.createBuffer(),this.output=e.output||wr.util.createBuffer(),this.mode.start(t)};yw.prototype.update=function(e){for(e&&this._input.putBuffer(e);!this._op.call(this.mode,this._input,this.output,this._finish)&&!this._finish;);this._input.compact()};yw.prototype.finish=function(e){e&&(this.mode.name==="ECB"||this.mode.name==="CBC")&&(this.mode.pad=function(r){return e(this.blockSize,r,!1)},this.mode.unpad=function(r){return e(this.blockSize,r,!0)});var t={};return t.decrypt=this._decrypt,t.overflow=this._input.length()%this.blockSize,!(!this._decrypt&&this.mode.pad&&!this.mode.pad(this._input,t)||(this._finish=!0,this.update(),this._decrypt&&this.mode.unpad&&!this.mode.unpad(this.output,t))||this.mode.afterFinish&&!this.mode.afterFinish(this.output,t))}});var vw=b((due,x4)=>{var Cr=Ue();nt();Cr.cipher=Cr.cipher||{};var $e=x4.exports=Cr.cipher.modes=Cr.cipher.modes||{};$e.ecb=function(e){e=e||{},this.name="ECB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};$e.ecb.prototype.start=function(e){};$e.ecb.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i])};$e.ecb.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i])};$e.ecb.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0};$e.ecb.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),i=e.at(r-1);return i>this.blockSize<<2?!1:(e.truncate(i),!0)};$e.cbc=function(e){e=e||{},this.name="CBC",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints)};$e.cbc.prototype.start=function(e){if(e.iv===null){if(!this._prev)throw new Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in e)this._iv=Hg(e.iv,this.blockSize),this._prev=this._iv.slice(0);else throw new Error("Invalid IV parameter.")};$e.cbc.prototype.encrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var i=0;i<this._ints;++i)this._inBlock[i]=this._prev[i]^e.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var i=0;i<this._ints;++i)t.putInt32(this._outBlock[i]);this._prev=this._outBlock};$e.cbc.prototype.decrypt=function(e,t,r){if(e.length()<this.blockSize&&!(r&&e.length()>0))return!0;for(var i=0;i<this._ints;++i)this._inBlock[i]=e.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var i=0;i<this._ints;++i)t.putInt32(this._prev[i]^this._outBlock[i]);this._prev=this._inBlock.slice(0)};$e.cbc.prototype.pad=function(e,t){var r=e.length()===this.blockSize?this.blockSize:this.blockSize-e.length();return e.fillWithByte(r,r),!0};$e.cbc.prototype.unpad=function(e,t){if(t.overflow>0)return!1;var r=e.length(),i=e.at(r-1);return i>this.blockSize<<2?!1:(e.truncate(i),!0)};$e.cfb=function(e){e=e||{},this.name="CFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialBlock=new Array(this._ints),this._partialOutput=Cr.util.createBuffer(),this._partialBytes=0};$e.cfb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=Hg(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};$e.cfb.prototype.encrypt=function(e,t,r){var i=e.length();if(i===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&i>=this.blockSize){for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32()^this._outBlock[n],t.putInt32(this._inBlock[n]);return}var s=(this.blockSize-i)%this.blockSize;s>0&&(s=this.blockSize-s),this._partialOutput.clear();for(var n=0;n<this._ints;++n)this._partialBlock[n]=e.getInt32()^this._outBlock[n],this._partialOutput.putInt32(this._partialBlock[n]);if(s>0)e.read-=this.blockSize;else for(var n=0;n<this._ints;++n)this._inBlock[n]=this._partialBlock[n];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=0};$e.cfb.prototype.decrypt=function(e,t,r){var i=e.length();if(i===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&i>=this.blockSize){for(var n=0;n<this._ints;++n)this._inBlock[n]=e.getInt32(),t.putInt32(this._inBlock[n]^this._outBlock[n]);return}var s=(this.blockSize-i)%this.blockSize;s>0&&(s=this.blockSize-s),this._partialOutput.clear();for(var n=0;n<this._ints;++n)this._partialBlock[n]=e.getInt32(),this._partialOutput.putInt32(this._partialBlock[n]^this._outBlock[n]);if(s>0)e.read-=this.blockSize;else for(var n=0;n<this._ints;++n)this._inBlock[n]=this._partialBlock[n];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=0};$e.ofb=function(e){e=e||{},this.name="OFB",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Cr.util.createBuffer(),this._partialBytes=0};$e.ofb.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=Hg(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};$e.ofb.prototype.encrypt=function(e,t,r){var i=e.length();if(e.length()===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&i>=this.blockSize){for(var n=0;n<this._ints;++n)t.putInt32(e.getInt32()^this._outBlock[n]),this._inBlock[n]=this._outBlock[n];return}var s=(this.blockSize-i)%this.blockSize;s>0&&(s=this.blockSize-s),this._partialOutput.clear();for(var n=0;n<this._ints;++n)this._partialOutput.putInt32(e.getInt32()^this._outBlock[n]);if(s>0)e.read-=this.blockSize;else for(var n=0;n<this._ints;++n)this._inBlock[n]=this._outBlock[n];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=0};$e.ofb.prototype.decrypt=$e.ofb.prototype.encrypt;$e.ctr=function(e){e=e||{},this.name="CTR",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=new Array(this._ints),this._partialOutput=Cr.util.createBuffer(),this._partialBytes=0};$e.ctr.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");this._iv=Hg(e.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0};$e.ctr.prototype.encrypt=function(e,t,r){var i=e.length();if(i===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&i>=this.blockSize)for(var n=0;n<this._ints;++n)t.putInt32(e.getInt32()^this._outBlock[n]);else{var s=(this.blockSize-i)%this.blockSize;s>0&&(s=this.blockSize-s),this._partialOutput.clear();for(var n=0;n<this._ints;++n)this._partialOutput.putInt32(e.getInt32()^this._outBlock[n]);if(s>0&&(e.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=0}$g(this._inBlock)};$e.ctr.prototype.decrypt=$e.ctr.prototype.encrypt;$e.gcm=function(e){e=e||{},this.name="GCM",this.cipher=e.cipher,this.blockSize=e.blockSize||16,this._ints=this.blockSize/4,this._inBlock=new Array(this._ints),this._outBlock=new Array(this._ints),this._partialOutput=Cr.util.createBuffer(),this._partialBytes=0,this._R=3774873600};$e.gcm.prototype.start=function(e){if(!("iv"in e))throw new Error("Invalid IV parameter.");var t=Cr.util.createBuffer(e.iv);this._cipherLength=0;var r;if("additionalData"in e?r=Cr.util.createBuffer(e.additionalData):r=Cr.util.createBuffer(),"tagLength"in e?this._tagLength=e.tagLength:this._tagLength=128,this._tag=null,e.decrypt&&(this._tag=Cr.util.createBuffer(e.tag).getBytes(),this._tag.length!==this._tagLength/8))throw new Error("Authentication tag does not match tag length.");this._hashBlock=new Array(this._ints),this.tag=null,this._hashSubkey=new Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var i=t.length();if(i===12)this._j0=[t.getInt32(),t.getInt32(),t.getInt32(),1];else{for(this._j0=[0,0,0,0];t.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[t.getInt32(),t.getInt32(),t.getInt32(),t.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(gw(i*8)))}this._inBlock=this._j0.slice(0),$g(this._inBlock),this._partialBytes=0,r=Cr.util.createBuffer(r),this._aDataLength=gw(r.length()*8);var n=r.length()%this.blockSize;for(n&&r.fillWithByte(0,this.blockSize-n),this._s=[0,0,0,0];r.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[r.getInt32(),r.getInt32(),r.getInt32(),r.getInt32()])};$e.gcm.prototype.encrypt=function(e,t,r){var i=e.length();if(i===0)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),this._partialBytes===0&&i>=this.blockSize){for(var n=0;n<this._ints;++n)t.putInt32(this._outBlock[n]^=e.getInt32());this._cipherLength+=this.blockSize}else{var s=(this.blockSize-i)%this.blockSize;s>0&&(s=this.blockSize-s),this._partialOutput.clear();for(var n=0;n<this._ints;++n)this._partialOutput.putInt32(e.getInt32()^this._outBlock[n]);if(s<=0||r){if(r){var a=i%this.blockSize;this._cipherLength+=a,this._partialOutput.truncate(this.blockSize-a)}else this._cipherLength+=this.blockSize;for(var n=0;n<this._ints;++n)this._outBlock[n]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),s>0&&!r)return e.read-=this.blockSize,t.putBytes(this._partialOutput.getBytes(s-this._partialBytes)),this._partialBytes=s,!0;t.putBytes(this._partialOutput.getBytes(i-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),$g(this._inBlock)};$e.gcm.prototype.decrypt=function(e,t,r){var i=e.length();if(i<this.blockSize&&!(r&&i>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),$g(this._inBlock),this._hashBlock[0]=e.getInt32(),this._hashBlock[1]=e.getInt32(),this._hashBlock[2]=e.getInt32(),this._hashBlock[3]=e.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var n=0;n<this._ints;++n)t.putInt32(this._outBlock[n]^this._hashBlock[n]);i<this.blockSize?this._cipherLength+=i%this.blockSize:this._cipherLength+=this.blockSize};$e.gcm.prototype.afterFinish=function(e,t){var r=!0;t.decrypt&&t.overflow&&e.truncate(this.blockSize-t.overflow),this.tag=Cr.util.createBuffer();var i=this._aDataLength.concat(gw(this._cipherLength*8));this._s=this.ghash(this._hashSubkey,this._s,i);var n=[];this.cipher.encrypt(this._j0,n);for(var s=0;s<this._ints;++s)this.tag.putInt32(this._s[s]^n[s]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),t.decrypt&&this.tag.bytes()!==this._tag&&(r=!1),r};$e.gcm.prototype.multiply=function(e,t){for(var r=[0,0,0,0],i=t.slice(0),n=0;n<128;++n){var s=e[n/32|0]&1<<31-n%32;s&&(r[0]^=i[0],r[1]^=i[1],r[2]^=i[2],r[3]^=i[3]),this.pow(i,i)}return r};$e.gcm.prototype.pow=function(e,t){for(var r=e[3]&1,i=3;i>0;--i)t[i]=e[i]>>>1|(e[i-1]&1)<<31;t[0]=e[0]>>>1,r&&(t[0]^=this._R)};$e.gcm.prototype.tableMultiply=function(e){for(var t=[0,0,0,0],r=0;r<32;++r){var i=r/8|0,n=e[i]>>>(7-r%8)*4&15,s=this._m[r][n];t[0]^=s[0],t[1]^=s[1],t[2]^=s[2],t[3]^=s[3]}return t};$e.gcm.prototype.ghash=function(e,t,r){return t[0]^=r[0],t[1]^=r[1],t[2]^=r[2],t[3]^=r[3],this.tableMultiply(t)};$e.gcm.prototype.generateHashTable=function(e,t){for(var r=8/t,i=4*r,n=16*r,s=new Array(n),a=0;a<n;++a){var o=[0,0,0,0],c=a/i|0,u=(i-1-a%i)*t;o[c]=1<<t-1<<u,s[a]=this.generateSubHashTable(this.multiply(o,e),t)}return s};$e.gcm.prototype.generateSubHashTable=function(e,t){var r=1<<t,i=r>>>1,n=new Array(r);n[i]=e.slice(0);for(var s=i>>>1;s>0;)this.pow(n[2*s],n[s]=[]),s>>=1;for(s=2;s<i;){for(var a=1;a<s;++a){var o=n[s],c=n[a];n[s+a]=[o[0]^c[0],o[1]^c[1],o[2]^c[2],o[3]^c[3]]}s*=2}for(n[0]=[0,0,0,0],s=i+1;s<r;++s){var u=n[s^i];n[s]=[e[0]^u[0],e[1]^u[1],e[2]^u[2],e[3]^u[3]]}return n};function Hg(e,t){if(typeof e=="string"&&(e=Cr.util.createBuffer(e)),Cr.util.isArray(e)&&e.length>4){var r=e;e=Cr.util.createBuffer();for(var i=0;i<r.length;++i)e.putByte(r[i])}if(e.length()<t)throw new Error("Invalid IV length; got "+e.length()+" bytes and expected "+t+" bytes.");if(!Cr.util.isArray(e)){for(var n=[],s=t/4,i=0;i<s;++i)n.push(e.getInt32());e=n}return e}function $g(e){e[e.length-1]=e[e.length-1]+1&4294967295}function gw(e){return[e/4294967296|0,e&4294967295]}});var ya=b((hue,S4)=>{var At=Ue();Kg();vw();nt();S4.exports=At.aes=At.aes||{};At.aes.startEncrypting=function(e,t,r,i){var n=zg({key:e,output:r,decrypt:!1,mode:i});return n.start(t),n};At.aes.createEncryptionCipher=function(e,t){return zg({key:e,output:null,decrypt:!1,mode:t})};At.aes.startDecrypting=function(e,t,r,i){var n=zg({key:e,output:r,decrypt:!0,mode:i});return n.start(t),n};At.aes.createDecryptionCipher=function(e,t){return zg({key:e,output:null,decrypt:!0,mode:t})};At.aes.Algorithm=function(e,t){_w||_4();var r=this;r.name=e,r.mode=new t({blockSize:16,cipher:{encrypt:function(i,n){return bw(r._w,i,n,!1)},decrypt:function(i,n){return bw(r._w,i,n,!0)}}}),r._init=!1};At.aes.Algorithm.prototype.initialize=function(e){if(!this._init){var t=e.key,r;if(typeof t=="string"&&(t.length===16||t.length===24||t.length===32))t=At.util.createBuffer(t);else if(At.util.isArray(t)&&(t.length===16||t.length===24||t.length===32)){r=t,t=At.util.createBuffer();for(var i=0;i<r.length;++i)t.putByte(r[i])}if(!At.util.isArray(t)){r=t,t=[];var n=r.length();if(n===16||n===24||n===32){n=n>>>2;for(var i=0;i<n;++i)t.push(r.getInt32())}}if(!At.util.isArray(t)||!(t.length===4||t.length===6||t.length===8))throw new Error("Invalid key parameter.");var s=this.mode.name,a=["CFB","OFB","CTR","GCM"].indexOf(s)!==-1;this._w=A4(t,e.decrypt&&!a),this._init=!0}};At.aes._expandKey=function(e,t){return _w||_4(),A4(e,t)};At.aes._updateBlock=bw;wl("AES-ECB",At.cipher.modes.ecb);wl("AES-CBC",At.cipher.modes.cbc);wl("AES-CFB",At.cipher.modes.cfb);wl("AES-OFB",At.cipher.modes.ofb);wl("AES-CTR",At.cipher.modes.ctr);wl("AES-GCM",At.cipher.modes.gcm);function wl(e,t){var r=function(){return new At.aes.Algorithm(e,t)};At.cipher.registerAlgorithm(e,r)}var _w=!1,Sl=4,Wr,xw,b4,tc,vn;function _4(){_w=!0,b4=[0,1,2,4,8,16,32,64,128,27,54];for(var e=new Array(256),t=0;t<128;++t)e[t]=t<<1,e[t+128]=t+128<<1^283;Wr=new Array(256),xw=new Array(256),tc=new Array(4),vn=new Array(4);for(var t=0;t<4;++t)tc[t]=new Array(256),vn[t]=new Array(256);for(var r=0,i=0,n,s,a,o,c,u,l,t=0;t<256;++t){o=i^i<<1^i<<2^i<<3^i<<4,o=o>>8^o&255^99,Wr[r]=o,xw[o]=r,c=e[o],n=e[r],s=e[n],a=e[s],u=c<<24^o<<16^o<<8^(o^c),l=(n^s^a)<<24^(r^a)<<16^(r^s^a)<<8^(r^n^a);for(var p=0;p<4;++p)tc[p][r]=u,vn[p][o]=l,u=u<<24|u>>>8,l=l<<24|l>>>8;r===0?r=i=1:(r=n^e[e[e[n^a]]],i^=e[e[i]])}}function A4(e,t){for(var r=e.slice(0),i,n=1,s=r.length,a=s+6+1,o=Sl*a,c=s;c<o;++c)i=r[c-1],c%s===0?(i=Wr[i>>>16&255]<<24^Wr[i>>>8&255]<<16^Wr[i&255]<<8^Wr[i>>>24]^b4[n]<<24,n++):s>6&&c%s===4&&(i=Wr[i>>>24]<<24^Wr[i>>>16&255]<<16^Wr[i>>>8&255]<<8^Wr[i&255]),r[c]=r[c-s]^i;if(t){var u,l=vn[0],p=vn[1],d=vn[2],h=vn[3],f=r.slice(0);o=r.length;for(var c=0,m=o-Sl;c<o;c+=Sl,m-=Sl)if(c===0||c===o-Sl)f[c]=r[m],f[c+1]=r[m+3],f[c+2]=r[m+2],f[c+3]=r[m+1];else for(var y=0;y<Sl;++y)u=r[m+y],f[c+(3&-y)]=l[Wr[u>>>24]]^p[Wr[u>>>16&255]]^d[Wr[u>>>8&255]]^h[Wr[u&255]];r=f}return r}function bw(e,t,r,i){var n=e.length/4-1,s,a,o,c,u;i?(s=vn[0],a=vn[1],o=vn[2],c=vn[3],u=xw):(s=tc[0],a=tc[1],o=tc[2],c=tc[3],u=Wr);var l,p,d,h,f,m,y;l=t[0]^e[0],p=t[i?3:1]^e[1],d=t[2]^e[2],h=t[i?1:3]^e[3];for(var _=3,A=1;A<n;++A)f=s[l>>>24]^a[p>>>16&255]^o[d>>>8&255]^c[h&255]^e[++_],m=s[p>>>24]^a[d>>>16&255]^o[h>>>8&255]^c[l&255]^e[++_],y=s[d>>>24]^a[h>>>16&255]^o[l>>>8&255]^c[p&255]^e[++_],h=s[h>>>24]^a[l>>>16&255]^o[p>>>8&255]^c[d&255]^e[++_],l=f,p=m,d=y;r[0]=u[l>>>24]<<24^u[p>>>16&255]<<16^u[d>>>8&255]<<8^u[h&255]^e[++_],r[i?3:1]=u[p>>>24]<<24^u[d>>>16&255]<<16^u[h>>>8&255]<<8^u[l&255]^e[++_],r[2]=u[d>>>24]<<24^u[h>>>16&255]<<16^u[l>>>8&255]<<8^u[p&255]^e[++_],r[i?1:3]=u[h>>>24]<<24^u[l>>>16&255]<<16^u[p>>>8&255]<<8^u[d&255]^e[++_]}function zg(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),r="AES-"+t,i;e.decrypt?i=At.cipher.createDecipher(r,e.key):i=At.cipher.createCipher(r,e.key);var n=i.start;return i.start=function(s,a){var o=null;a instanceof At.util.ByteBuffer&&(o=a,a={}),a=a||{},a.output=o,a.iv=s,n.call(i,a)},i}});var ga=b((mue,w4)=>{var dh=Ue();dh.pki=dh.pki||{};var Aw=w4.exports=dh.pki.oids=dh.oids=dh.oids||{};function Q(e,t){Aw[e]=t,Aw[t]=e}function ut(e,t){Aw[e]=t}Q("1.2.840.113549.1.1.1","rsaEncryption");Q("1.2.840.113549.1.1.4","md5WithRSAEncryption");Q("1.2.840.113549.1.1.5","sha1WithRSAEncryption");Q("1.2.840.113549.1.1.7","RSAES-OAEP");Q("1.2.840.113549.1.1.8","mgf1");Q("1.2.840.113549.1.1.9","pSpecified");Q("1.2.840.113549.1.1.10","RSASSA-PSS");Q("1.2.840.113549.1.1.11","sha256WithRSAEncryption");Q("1.2.840.113549.1.1.12","sha384WithRSAEncryption");Q("1.2.840.113549.1.1.13","sha512WithRSAEncryption");Q("1.3.101.112","EdDSA25519");Q("1.2.840.10040.4.3","dsa-with-sha1");Q("1.3.14.3.2.7","desCBC");Q("1.3.14.3.2.26","sha1");Q("1.3.14.3.2.29","sha1WithRSASignature");Q("2.16.840.1.101.3.4.2.1","sha256");Q("2.16.840.1.101.3.4.2.2","sha384");Q("2.16.840.1.101.3.4.2.3","sha512");Q("2.16.840.1.101.3.4.2.4","sha224");Q("2.16.840.1.101.3.4.2.5","sha512-224");Q("2.16.840.1.101.3.4.2.6","sha512-256");Q("1.2.840.113549.2.2","md2");Q("1.2.840.113549.2.5","md5");Q("1.2.840.113549.1.7.1","data");Q("1.2.840.113549.1.7.2","signedData");Q("1.2.840.113549.1.7.3","envelopedData");Q("1.2.840.113549.1.7.4","signedAndEnvelopedData");Q("1.2.840.113549.1.7.5","digestedData");Q("1.2.840.113549.1.7.6","encryptedData");Q("1.2.840.113549.1.9.1","emailAddress");Q("1.2.840.113549.1.9.2","unstructuredName");Q("1.2.840.113549.1.9.3","contentType");Q("1.2.840.113549.1.9.4","messageDigest");Q("1.2.840.113549.1.9.5","signingTime");Q("1.2.840.113549.1.9.6","counterSignature");Q("1.2.840.113549.1.9.7","challengePassword");Q("1.2.840.113549.1.9.8","unstructuredAddress");Q("1.2.840.113549.1.9.14","extensionRequest");Q("1.2.840.113549.1.9.20","friendlyName");Q("1.2.840.113549.1.9.21","localKeyId");Q("1.2.840.113549.1.9.22.1","x509Certificate");Q("1.2.840.113549.1.12.10.1.1","keyBag");Q("1.2.840.113549.1.12.10.1.2","pkcs8ShroudedKeyBag");Q("1.2.840.113549.1.12.10.1.3","certBag");Q("1.2.840.113549.1.12.10.1.4","crlBag");Q("1.2.840.113549.1.12.10.1.5","secretBag");Q("1.2.840.113549.1.12.10.1.6","safeContentsBag");Q("1.2.840.113549.1.5.13","pkcs5PBES2");Q("1.2.840.113549.1.5.12","pkcs5PBKDF2");Q("1.2.840.113549.1.12.1.1","pbeWithSHAAnd128BitRC4");Q("1.2.840.113549.1.12.1.2","pbeWithSHAAnd40BitRC4");Q("1.2.840.113549.1.12.1.3","pbeWithSHAAnd3-KeyTripleDES-CBC");Q("1.2.840.113549.1.12.1.4","pbeWithSHAAnd2-KeyTripleDES-CBC");Q("1.2.840.113549.1.12.1.5","pbeWithSHAAnd128BitRC2-CBC");Q("1.2.840.113549.1.12.1.6","pbewithSHAAnd40BitRC2-CBC");Q("1.2.840.113549.2.7","hmacWithSHA1");Q("1.2.840.113549.2.8","hmacWithSHA224");Q("1.2.840.113549.2.9","hmacWithSHA256");Q("1.2.840.113549.2.10","hmacWithSHA384");Q("1.2.840.113549.2.11","hmacWithSHA512");Q("1.2.840.113549.3.7","des-EDE3-CBC");Q("2.16.840.1.101.3.4.1.2","aes128-CBC");Q("2.16.840.1.101.3.4.1.22","aes192-CBC");Q("2.16.840.1.101.3.4.1.42","aes256-CBC");Q("2.5.4.3","commonName");Q("2.5.4.4","surname");Q("2.5.4.5","serialNumber");Q("2.5.4.6","countryName");Q("2.5.4.7","localityName");Q("2.5.4.8","stateOrProvinceName");Q("2.5.4.9","streetAddress");Q("2.5.4.10","organizationName");Q("2.5.4.11","organizationalUnitName");Q("2.5.4.12","title");Q("2.5.4.13","description");Q("2.5.4.15","businessCategory");Q("2.5.4.17","postalCode");Q("2.5.4.42","givenName");Q("1.3.6.1.4.1.311.60.2.1.2","jurisdictionOfIncorporationStateOrProvinceName");Q("1.3.6.1.4.1.311.60.2.1.3","jurisdictionOfIncorporationCountryName");Q("2.16.840.1.113730.1.1","nsCertType");Q("2.16.840.1.113730.1.13","nsComment");ut("2.5.29.1","authorityKeyIdentifier");ut("2.5.29.2","keyAttributes");ut("2.5.29.3","certificatePolicies");ut("2.5.29.4","keyUsageRestriction");ut("2.5.29.5","policyMapping");ut("2.5.29.6","subtreesConstraint");ut("2.5.29.7","subjectAltName");ut("2.5.29.8","issuerAltName");ut("2.5.29.9","subjectDirectoryAttributes");ut("2.5.29.10","basicConstraints");ut("2.5.29.11","nameConstraints");ut("2.5.29.12","policyConstraints");ut("2.5.29.13","basicConstraints");Q("2.5.29.14","subjectKeyIdentifier");Q("2.5.29.15","keyUsage");ut("2.5.29.16","privateKeyUsagePeriod");Q("2.5.29.17","subjectAltName");Q("2.5.29.18","issuerAltName");Q("2.5.29.19","basicConstraints");ut("2.5.29.20","cRLNumber");ut("2.5.29.21","cRLReason");ut("2.5.29.22","expirationDate");ut("2.5.29.23","instructionCode");ut("2.5.29.24","invalidityDate");ut("2.5.29.25","cRLDistributionPoints");ut("2.5.29.26","issuingDistributionPoint");ut("2.5.29.27","deltaCRLIndicator");ut("2.5.29.28","issuingDistributionPoint");ut("2.5.29.29","certificateIssuer");ut("2.5.29.30","nameConstraints");Q("2.5.29.31","cRLDistributionPoints");Q("2.5.29.32","certificatePolicies");ut("2.5.29.33","policyMappings");ut("2.5.29.34","policyConstraints");Q("2.5.29.35","authorityKeyIdentifier");ut("2.5.29.36","policyConstraints");Q("2.5.29.37","extKeyUsage");ut("2.5.29.46","freshestCRL");ut("2.5.29.54","inhibitAnyPolicy");Q("1.3.6.1.4.1.11129.2.4.2","timestampList");Q("1.3.6.1.5.5.7.1.1","authorityInfoAccess");Q("1.3.6.1.5.5.7.3.1","serverAuth");Q("1.3.6.1.5.5.7.3.2","clientAuth");Q("1.3.6.1.5.5.7.3.3","codeSigning");Q("1.3.6.1.5.5.7.3.4","emailProtection");Q("1.3.6.1.5.5.7.3.8","timeStamping")});var xn=b((yue,E4)=>{var Pt=Ue();nt();ga();var se=E4.exports=Pt.asn1=Pt.asn1||{};se.Class={UNIVERSAL:0,APPLICATION:64,CONTEXT_SPECIFIC:128,PRIVATE:192};se.Type={NONE:0,BOOLEAN:1,INTEGER:2,BITSTRING:3,OCTETSTRING:4,NULL:5,OID:6,ODESC:7,EXTERNAL:8,REAL:9,ENUMERATED:10,EMBEDDED:11,UTF8:12,ROID:13,SEQUENCE:16,SET:17,PRINTABLESTRING:19,IA5STRING:22,UTCTIME:23,GENERALIZEDTIME:24,BMPSTRING:30};se.maxDepth=256;se.create=function(e,t,r,i,n){if(Pt.util.isArray(i)){for(var s=[],a=0;a<i.length;++a)i[a]!==void 0&&s.push(i[a]);i=s}var o={tagClass:e,type:t,constructed:r,composed:r||Pt.util.isArray(i),value:i};return n&&"bitStringContents"in n&&(o.bitStringContents=n.bitStringContents,o.original=se.copy(o)),o};se.copy=function(e,t){var r;if(Pt.util.isArray(e)){r=[];for(var i=0;i<e.length;++i)r.push(se.copy(e[i],t));return r}return typeof e=="string"?e:(r={tagClass:e.tagClass,type:e.type,constructed:e.constructed,composed:e.composed,value:se.copy(e.value,t)},t&&!t.excludeBitStringContents&&(r.bitStringContents=e.bitStringContents),r)};se.equals=function(e,t,r){if(Pt.util.isArray(e)){if(!Pt.util.isArray(t)||e.length!==t.length)return!1;for(var i=0;i<e.length;++i)if(!se.equals(e[i],t[i]))return!1;return!0}if(typeof e!=typeof t)return!1;if(typeof e=="string")return e===t;var n=e.tagClass===t.tagClass&&e.type===t.type&&e.constructed===t.constructed&&e.composed===t.composed&&se.equals(e.value,t.value);return r&&r.includeBitStringContents&&(n=n&&e.bitStringContents===t.bitStringContents),n};se.getBerValueLength=function(e){var t=e.getByte();if(t!==128){var r,i=t&128;return i?r=e.getInt((t&127)<<3):r=t,r}};function hh(e,t,r){if(r>t){var i=new Error("Too few bytes to parse DER.");throw i.available=e.length(),i.remaining=t,i.requested=r,i}}var DG=function(e,t){var r=e.getByte();if(t--,r!==128){var i,n=r&128;if(!n)i=r;else{var s=r&127;hh(e,t,s),i=e.getInt(s<<3)}if(i<0)throw new Error("Negative length: "+i);return i}};se.fromDer=function(e,t){t===void 0&&(t={strict:!0,parseAllBytes:!0,decodeBitStrings:!0}),typeof t=="boolean"&&(t={strict:t,parseAllBytes:!0,decodeBitStrings:!0}),"strict"in t||(t.strict=!0),"parseAllBytes"in t||(t.parseAllBytes=!0),"decodeBitStrings"in t||(t.decodeBitStrings=!0),"maxDepth"in t||(t.maxDepth=se.maxDepth),typeof e=="string"&&(e=Pt.util.createBuffer(e));var r=e.length(),i=Gg(e,e.length(),0,t);if(t.parseAllBytes&&e.length()!==0){var n=new Error("Unparsed DER bytes remain after ASN.1 parsing.");throw n.byteCount=r,n.remaining=e.length(),n}return i};function Gg(e,t,r,i){if(r>=i.maxDepth)throw new Error("ASN.1 parsing error: Max depth exceeded.");var n;hh(e,t,2);var s=e.getByte();t--;var a=s&192,o=s&31;n=e.length();var c=DG(e,t);if(t-=n-e.length(),c!==void 0&&c>t){if(i.strict){var u=new Error("Too few bytes to read ASN.1 value.");throw u.available=e.length(),u.remaining=t,u.requested=c,u}c=t}var l,p,d=(s&32)===32;if(d)if(l=[],c===void 0)for(;;){if(hh(e,t,2),e.bytes(2)==="\0\0"){e.getBytes(2),t-=2;break}n=e.length(),l.push(Gg(e,t,r+1,i)),t-=n-e.length()}else for(;c>0;)n=e.length(),l.push(Gg(e,c,r+1,i)),t-=n-e.length(),c-=n-e.length();if(l===void 0&&a===se.Class.UNIVERSAL&&o===se.Type.BITSTRING&&(p=e.bytes(c)),l===void 0&&i.decodeBitStrings&&a===se.Class.UNIVERSAL&&o===se.Type.BITSTRING&&c>1){var h=e.read,f=t,m=0;if(o===se.Type.BITSTRING&&(hh(e,t,1),m=e.getByte(),t--),m===0)try{n=e.length();var y={strict:!0,decodeBitStrings:!0},_=Gg(e,t,r+1,y),A=n-e.length();t-=A,o==se.Type.BITSTRING&&A++;var S=_.tagClass;A===c&&(S===se.Class.UNIVERSAL||S===se.Class.CONTEXT_SPECIFIC)&&(l=[_])}catch{}l===void 0&&(e.read=h,t=f)}if(l===void 0){if(c===void 0){if(i.strict)throw new Error("Non-constructed ASN.1 object of indefinite length.");c=t}if(o===se.Type.BMPSTRING)for(l="";c>0;c-=2)hh(e,t,2),l+=String.fromCharCode(e.getInt16()),t-=2;else l=e.getBytes(c),t-=c}var B=p===void 0?null:{bitStringContents:p};return se.create(a,o,d,l,B)}se.toDer=function(e){var t=Pt.util.createBuffer(),r=e.tagClass|e.type,i=Pt.util.createBuffer(),n=!1;if("bitStringContents"in e&&(n=!0,e.original&&(n=se.equals(e,e.original))),n)i.putBytes(e.bitStringContents);else if(e.composed){e.constructed?r|=32:i.putByte(0);for(var s=0;s<e.value.length;++s)e.value[s]!==void 0&&i.putBuffer(se.toDer(e.value[s]))}else if(e.type===se.Type.BMPSTRING)for(var s=0;s<e.value.length;++s)i.putInt16(e.value.charCodeAt(s));else e.type===se.Type.INTEGER&&e.value.length>1&&(e.value.charCodeAt(0)===0&&(e.value.charCodeAt(1)&128)===0||e.value.charCodeAt(0)===255&&(e.value.charCodeAt(1)&128)===128)?i.putBytes(e.value.substr(1)):i.putBytes(e.value);if(t.putByte(r),i.length()<=127)t.putByte(i.length()&127);else{var a=i.length(),o="";do o+=String.fromCharCode(a&255),a=a>>>8;while(a>0);t.putByte(o.length|128);for(var s=o.length-1;s>=0;--s)t.putByte(o.charCodeAt(s))}return t.putBuffer(i),t};se.oidToDer=function(e){var t=e.split("."),r=Pt.util.createBuffer();r.putByte(40*parseInt(t[0],10)+parseInt(t[1],10));for(var i,n,s,a,o=2;o<t.length;++o){if(i=!0,n=[],s=parseInt(t[o],10),s>4294967295)throw new Error("OID value too large; max is 32-bits.");do a=s&127,s=s>>>7,i||(a|=128),n.push(a),i=!1;while(s>0);for(var c=n.length-1;c>=0;--c)r.putByte(n[c])}return r};se.derToOid=function(e){var t;typeof e=="string"&&(e=Pt.util.createBuffer(e));var r=e.getByte();t=Math.floor(r/40)+"."+r%40;for(var i=0;e.length()>0;){if(i>70368744177663)throw new Error("OID value too large; max is 53-bits.");r=e.getByte(),i=i*128,r&128?i+=r&127:(t+="."+(i+r),i=0)}return t};se.utcTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,2),10);r=r>=50?1900+r:2e3+r;var i=parseInt(e.substr(2,2),10)-1,n=parseInt(e.substr(4,2),10),s=parseInt(e.substr(6,2),10),a=parseInt(e.substr(8,2),10),o=0;if(e.length>11){var c=e.charAt(10),u=10;c!=="+"&&c!=="-"&&(o=parseInt(e.substr(10,2),10),u+=2)}if(t.setUTCFullYear(r,i,n),t.setUTCHours(s,a,o,0),u&&(c=e.charAt(u),c==="+"||c==="-")){var l=parseInt(e.substr(u+1,2),10),p=parseInt(e.substr(u+4,2),10),d=l*60+p;d*=6e4,c==="+"?t.setTime(+t-d):t.setTime(+t+d)}return t};se.generalizedTimeToDate=function(e){var t=new Date,r=parseInt(e.substr(0,4),10),i=parseInt(e.substr(4,2),10)-1,n=parseInt(e.substr(6,2),10),s=parseInt(e.substr(8,2),10),a=parseInt(e.substr(10,2),10),o=parseInt(e.substr(12,2),10),c=0,u=0,l=!1;e.charAt(e.length-1)==="Z"&&(l=!0);var p=e.length-5,d=e.charAt(p);if(d==="+"||d==="-"){var h=parseInt(e.substr(p+1,2),10),f=parseInt(e.substr(p+4,2),10);u=h*60+f,u*=6e4,d==="+"&&(u*=-1),l=!0}return e.charAt(14)==="."&&(c=parseFloat(e.substr(14),10)*1e3),l?(t.setUTCFullYear(r,i,n),t.setUTCHours(s,a,o,c),t.setTime(+t+u)):(t.setFullYear(r,i,n),t.setHours(s,a,o,c)),t};se.dateToUtcTime=function(e){if(typeof e=="string")return e;var t="",r=[];r.push((""+e.getUTCFullYear()).substr(2)),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var i=0;i<r.length;++i)r[i].length<2&&(t+="0"),t+=r[i];return t+="Z",t};se.dateToGeneralizedTime=function(e){if(typeof e=="string")return e;var t="",r=[];r.push(""+e.getUTCFullYear()),r.push(""+(e.getUTCMonth()+1)),r.push(""+e.getUTCDate()),r.push(""+e.getUTCHours()),r.push(""+e.getUTCMinutes()),r.push(""+e.getUTCSeconds());for(var i=0;i<r.length;++i)r[i].length<2&&(t+="0"),t+=r[i];return t+="Z",t};se.integerToDer=function(e){var t=Pt.util.createBuffer();if(e>=-128&&e<128)return t.putSignedInt(e,8);if(e>=-32768&&e<32768)return t.putSignedInt(e,16);if(e>=-8388608&&e<8388608)return t.putSignedInt(e,24);if(e>=-2147483648&&e<2147483648)return t.putSignedInt(e,32);var r=new Error("Integer too large; max is 32-bits.");throw r.integer=e,r};se.derToInteger=function(e){typeof e=="string"&&(e=Pt.util.createBuffer(e));var t=e.length()*8;if(t>32)throw new Error("Integer too large; max is 32-bits.");return e.getSignedInt(t)};se.validate=function(e,t,r,i){var n=!1;if((e.tagClass===t.tagClass||typeof t.tagClass>"u")&&(e.type===t.type||typeof t.type>"u"))if(e.constructed===t.constructed||typeof t.constructed>"u"){if(n=!0,t.value&&Pt.util.isArray(t.value))for(var s=0,a=0;n&&a<t.value.length;++a){var o=t.value[a];n=!!o.optional;var c=e.value[s];if(!c){o.optional||(n=!1,i&&i.push("["+t.name+'] Missing required element. Expected tag class "'+o.tagClass+'", type "'+o.type+'"'));continue}var u=typeof o.tagClass<"u"&&typeof o.type<"u";if(u&&(c.tagClass!==o.tagClass||c.type!==o.type))if(o.optional){n=!0;continue}else{n=!1,i&&i.push("["+t.name+"] Tag mismatch. Expected ("+o.tagClass+","+o.type+"), got ("+c.tagClass+","+c.type+")");break}var l=se.validate(c,o,r,i);if(l)++s,n=!0;else if(o.optional)n=!0;else{n=!1;break}}if(n&&r&&(t.capture&&(r[t.capture]=e.value),t.captureAsn1&&(r[t.captureAsn1]=e),t.captureBitStringContents&&"bitStringContents"in e&&(r[t.captureBitStringContents]=e.bitStringContents),t.captureBitStringValue&&"bitStringContents"in e)){var p;if(e.bitStringContents.length<2)r[t.captureBitStringValue]="";else{var d=e.bitStringContents.charCodeAt(0);if(d!==0)throw new Error("captureBitStringValue only supported for zero unused bits");r[t.captureBitStringValue]=e.bitStringContents.slice(1)}}}else i&&i.push("["+t.name+'] Expected constructed "'+t.constructed+'", got "'+e.constructed+'"');else i&&(e.tagClass!==t.tagClass&&i.push("["+t.name+'] Expected tag class "'+t.tagClass+'", got "'+e.tagClass+'"'),e.type!==t.type&&i.push("["+t.name+'] Expected type "'+t.type+'", got "'+e.type+'"'));return n};var C4=/[^\\u0000-\\u00ff]/;se.prettyPrint=function(e,t,r){var i="";t=t||0,r=r||2,t>0&&(i+=`
|
|
28
|
+
`);for(var n="",s=0;s<t*r;++s)n+=" ";switch(i+=n+"Tag: ",e.tagClass){case se.Class.UNIVERSAL:i+="Universal:";break;case se.Class.APPLICATION:i+="Application:";break;case se.Class.CONTEXT_SPECIFIC:i+="Context-Specific:";break;case se.Class.PRIVATE:i+="Private:";break}if(e.tagClass===se.Class.UNIVERSAL)switch(i+=e.type,e.type){case se.Type.NONE:i+=" (None)";break;case se.Type.BOOLEAN:i+=" (Boolean)";break;case se.Type.INTEGER:i+=" (Integer)";break;case se.Type.BITSTRING:i+=" (Bit string)";break;case se.Type.OCTETSTRING:i+=" (Octet string)";break;case se.Type.NULL:i+=" (Null)";break;case se.Type.OID:i+=" (Object Identifier)";break;case se.Type.ODESC:i+=" (Object Descriptor)";break;case se.Type.EXTERNAL:i+=" (External or Instance of)";break;case se.Type.REAL:i+=" (Real)";break;case se.Type.ENUMERATED:i+=" (Enumerated)";break;case se.Type.EMBEDDED:i+=" (Embedded PDV)";break;case se.Type.UTF8:i+=" (UTF8)";break;case se.Type.ROID:i+=" (Relative Object Identifier)";break;case se.Type.SEQUENCE:i+=" (Sequence)";break;case se.Type.SET:i+=" (Set)";break;case se.Type.PRINTABLESTRING:i+=" (Printable String)";break;case se.Type.IA5String:i+=" (IA5String (ASCII))";break;case se.Type.UTCTIME:i+=" (UTC time)";break;case se.Type.GENERALIZEDTIME:i+=" (Generalized time)";break;case se.Type.BMPSTRING:i+=" (BMP String)";break}else i+=e.type;if(i+=`
|
|
29
|
+
`,i+=n+"Constructed: "+e.constructed+`
|
|
30
|
+
`,e.composed){for(var a=0,o="",s=0;s<e.value.length;++s)e.value[s]!==void 0&&(a+=1,o+=se.prettyPrint(e.value[s],t+1,r),s+1<e.value.length&&(o+=","));i+=n+"Sub values: "+a+o}else{if(i+=n+"Value: ",e.type===se.Type.OID){var c=se.derToOid(e.value);i+=c,Pt.pki&&Pt.pki.oids&&c in Pt.pki.oids&&(i+=" ("+Pt.pki.oids[c]+") ")}if(e.type===se.Type.INTEGER)try{i+=se.derToInteger(e.value)}catch{i+="0x"+Pt.util.bytesToHex(e.value)}else if(e.type===se.Type.BITSTRING){if(e.value.length>1?i+="0x"+Pt.util.bytesToHex(e.value.slice(1)):i+="(none)",e.value.length>0){var u=e.value.charCodeAt(0);u==1?i+=" (1 unused bit shown)":u>1&&(i+=" ("+u+" unused bits shown)")}}else if(e.type===se.Type.OCTETSTRING)C4.test(e.value)||(i+="("+e.value+") "),i+="0x"+Pt.util.bytesToHex(e.value);else if(e.type===se.Type.UTF8)try{i+=Pt.util.decodeUtf8(e.value)}catch(l){if(l.message==="URI malformed")i+="0x"+Pt.util.bytesToHex(e.value)+" (malformed UTF8)";else throw l}else e.type===se.Type.PRINTABLESTRING||e.type===se.Type.IA5String?i+=e.value:C4.test(e.value)?i+="0x"+Pt.util.bytesToHex(e.value):e.value.length===0?i+="[null]":i+=e.value}return i}});var Gn=b((gue,T4)=>{var Wg=Ue();T4.exports=Wg.md=Wg.md||{};Wg.md.algorithms=Wg.md.algorithms||{}});var Cl=b((vue,I4)=>{var Ns=Ue();Gn();nt();var qG=I4.exports=Ns.hmac=Ns.hmac||{};qG.create=function(){var e=null,t=null,r=null,i=null,n={};return n.start=function(s,a){if(s!==null)if(typeof s=="string")if(s=s.toLowerCase(),s in Ns.md.algorithms)t=Ns.md.algorithms[s].create();else throw new Error('Unknown hash algorithm "'+s+'"');else t=s;if(a===null)a=e;else{if(typeof a=="string")a=Ns.util.createBuffer(a);else if(Ns.util.isArray(a)){var o=a;a=Ns.util.createBuffer();for(var c=0;c<o.length;++c)a.putByte(o[c])}var u=a.length();u>t.blockLength&&(t.start(),t.update(a.bytes()),a=t.digest()),r=Ns.util.createBuffer(),i=Ns.util.createBuffer(),u=a.length();for(var c=0;c<u;++c){var o=a.at(c);r.putByte(54^o),i.putByte(92^o)}if(u<t.blockLength)for(var o=t.blockLength-u,c=0;c<o;++c)r.putByte(54),i.putByte(92);e=a,r=r.bytes(),i=i.bytes()}t.start(),t.update(r)},n.update=function(s){t.update(s)},n.getMac=function(){var s=t.digest().bytes();return t.start(),t.update(i),t.update(s),t.digest()},n.digest=n.getMac,n}});var Qg=b((xue,N4)=>{var Wn=Ue();Gn();nt();var k4=N4.exports=Wn.md5=Wn.md5||{};Wn.md.md5=Wn.md.algorithms.md5=k4;k4.create=function(){P4||jG();var e=null,t=Wn.util.createBuffer(),r=new Array(16),i={algorithm:"md5",blockLength:64,digestLength:16,messageLength:0,fullMessageLength:null,messageLengthSize:8};return i.start=function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var n=i.messageLengthSize/4,s=0;s<n;++s)i.fullMessageLength.push(0);return t=Wn.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878},i},i.start(),i.update=function(n,s){s==="utf8"&&(n=Wn.util.encodeUtf8(n));var a=n.length;i.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var o=i.fullMessageLength.length-1;o>=0;--o)i.fullMessageLength[o]+=a[1],a[1]=a[0]+(i.fullMessageLength[o]/4294967296>>>0),i.fullMessageLength[o]=i.fullMessageLength[o]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(n),B4(e,r,t),(t.read>2048||t.length()===0)&&t.compact(),i},i.digest=function(){var n=Wn.util.createBuffer();n.putBytes(t.bytes());var s=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize,a=s&i.blockLength-1;n.putBytes(Sw.substr(0,i.blockLength-a));for(var o,c=0,u=i.fullMessageLength.length-1;u>=0;--u)o=i.fullMessageLength[u]*8+c,c=o/4294967296>>>0,n.putInt32Le(o>>>0);var l={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3};B4(l,r,n);var p=Wn.util.createBuffer();return p.putInt32Le(l.h0),p.putInt32Le(l.h1),p.putInt32Le(l.h2),p.putInt32Le(l.h3),p},i};var Sw=null,Yg=null,mh=null,El=null,P4=!1;function jG(){Sw="\x80",Sw+=Wn.util.fillString("\0",64),Yg=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1,6,11,0,5,10,15,4,9,14,3,8,13,2,7,12,5,8,11,14,1,4,7,10,13,0,3,6,9,12,15,2,0,7,14,5,12,3,10,1,8,15,6,13,4,11,2,9],mh=[7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21],El=new Array(64);for(var e=0;e<64;++e)El[e]=Math.floor(Math.abs(Math.sin(e+1))*4294967296);P4=!0}function B4(e,t,r){for(var i,n,s,a,o,c,u,l,p=r.length();p>=64;){for(n=e.h0,s=e.h1,a=e.h2,o=e.h3,l=0;l<16;++l)t[l]=r.getInt32Le(),c=o^s&(a^o),i=n+c+El[l]+t[l],u=mh[l],n=o,o=a,a=s,s+=i<<u|i>>>32-u;for(;l<32;++l)c=a^o&(s^a),i=n+c+El[l]+t[Yg[l]],u=mh[l],n=o,o=a,a=s,s+=i<<u|i>>>32-u;for(;l<48;++l)c=s^a^o,i=n+c+El[l]+t[Yg[l]],u=mh[l],n=o,o=a,a=s,s+=i<<u|i>>>32-u;for(;l<64;++l)c=a^(s|~o),i=n+c+El[l]+t[Yg[l]],u=mh[l],n=o,o=a,a=s,s+=i<<u|i>>>32-u;e.h0=e.h0+n|0,e.h1=e.h1+s|0,e.h2=e.h2+a|0,e.h3=e.h3+o|0,p-=64}}});var rc=b((bue,O4)=>{var Xg=Ue();nt();var R4=O4.exports=Xg.pem=Xg.pem||{};R4.encode=function(e,t){t=t||{};var r="-----BEGIN "+e.type+`-----\r
|
|
31
|
+
`,i;if(e.procType&&(i={name:"Proc-Type",values:[String(e.procType.version),e.procType.type]},r+=Jg(i)),e.contentDomain&&(i={name:"Content-Domain",values:[e.contentDomain]},r+=Jg(i)),e.dekInfo&&(i={name:"DEK-Info",values:[e.dekInfo.algorithm]},e.dekInfo.parameters&&i.values.push(e.dekInfo.parameters),r+=Jg(i)),e.headers)for(var n=0;n<e.headers.length;++n)r+=Jg(e.headers[n]);return e.procType&&(r+=`\r
|
|
32
|
+
`),r+=Xg.util.encode64(e.body,t.maxline||64)+`\r
|
|
33
|
+
`,r+="-----END "+e.type+`-----\r
|
|
34
|
+
`,r};R4.decode=function(e){for(var t=[],r=/\s*-----BEGIN ([A-Z0-9- ]+)-----\r?\n?([\x21-\x7e\s]+?(?:\r?\n\r?\n))?([:A-Za-z0-9+\/=\s]+?)-----END \1-----/g,i=/([\x21-\x7e]+):\s*([\x21-\x7e\s^:]+)/,n=/\r?\n/,s;s=r.exec(e),!!s;){var a=s[1];a==="NEW CERTIFICATE REQUEST"&&(a="CERTIFICATE REQUEST");var o={type:a,procType:null,contentDomain:null,dekInfo:null,headers:[],body:Xg.util.decode64(s[3])};if(t.push(o),!!s[2]){for(var c=s[2].split(n),u=0;s&&u<c.length;){for(var l=c[u].replace(/\s+$/,""),p=u+1;p<c.length;++p){var d=c[p];if(!/\s/.test(d[0]))break;l+=d,u=p}if(s=l.match(i),s){for(var h={name:s[1],values:[]},f=s[2].split(","),m=0;m<f.length;++m)h.values.push(UG(f[m]));if(o.procType)if(!o.contentDomain&&h.name==="Content-Domain")o.contentDomain=f[0]||"";else if(!o.dekInfo&&h.name==="DEK-Info"){if(h.values.length===0)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must have at least one subfield.');o.dekInfo={algorithm:f[0],parameters:f[1]||null}}else o.headers.push(h);else{if(h.name!=="Proc-Type")throw new Error('Invalid PEM formatted message. The first encapsulated header must be "Proc-Type".');if(h.values.length!==2)throw new Error('Invalid PEM formatted message. The "Proc-Type" header must have two subfields.');o.procType={version:f[0],type:f[1]}}}++u}if(o.procType==="ENCRYPTED"&&!o.dekInfo)throw new Error('Invalid PEM formatted message. The "DEK-Info" header must be present if "Proc-Type" is "ENCRYPTED".')}}if(t.length===0)throw new Error("Invalid PEM formatted message.");return t};function Jg(e){for(var t=e.name+": ",r=[],i=function(c,u){return" "+u},n=0;n<e.values.length;++n)r.push(e.values[n].replace(/^(\S+\r\n)/,i));t+=r.join(",")+`\r
|
|
35
|
+
`;for(var s=0,a=-1,n=0;n<t.length;++n,++s)if(s>65&&a!==-1){var o=t[a];o===","?(++a,t=t.substr(0,a)+`\r
|
|
36
|
+
`+t.substr(a)):t=t.substr(0,a)+`\r
|
|
37
|
+
`+o+t.substr(a+1),s=n-a-1,a=-1,++n}else(t[n]===" "||t[n]===" "||t[n]===",")&&(a=n);return t}function UG(e){return e.replace(/^\s+/,"")}});var yh=b((_ue,D4)=>{var Lt=Ue();Kg();vw();nt();D4.exports=Lt.des=Lt.des||{};Lt.des.startEncrypting=function(e,t,r,i){var n=Zg({key:e,output:r,decrypt:!1,mode:i||(t===null?"ECB":"CBC")});return n.start(t),n};Lt.des.createEncryptionCipher=function(e,t){return Zg({key:e,output:null,decrypt:!1,mode:t})};Lt.des.startDecrypting=function(e,t,r,i){var n=Zg({key:e,output:r,decrypt:!0,mode:i||(t===null?"ECB":"CBC")});return n.start(t),n};Lt.des.createDecryptionCipher=function(e,t){return Zg({key:e,output:null,decrypt:!0,mode:t})};Lt.des.Algorithm=function(e,t){var r=this;r.name=e,r.mode=new t({blockSize:8,cipher:{encrypt:function(i,n){return L4(r._keys,i,n,!1)},decrypt:function(i,n){return L4(r._keys,i,n,!0)}}}),r._init=!1};Lt.des.Algorithm.prototype.initialize=function(e){if(!this._init){var t=Lt.util.createBuffer(e.key);if(this.name.indexOf("3DES")===0&&t.length()!==24)throw new Error("Invalid Triple-DES key size: "+t.length()*8);this._keys=WG(t),this._init=!0}};Yn("DES-ECB",Lt.cipher.modes.ecb);Yn("DES-CBC",Lt.cipher.modes.cbc);Yn("DES-CFB",Lt.cipher.modes.cfb);Yn("DES-OFB",Lt.cipher.modes.ofb);Yn("DES-CTR",Lt.cipher.modes.ctr);Yn("3DES-ECB",Lt.cipher.modes.ecb);Yn("3DES-CBC",Lt.cipher.modes.cbc);Yn("3DES-CFB",Lt.cipher.modes.cfb);Yn("3DES-OFB",Lt.cipher.modes.ofb);Yn("3DES-CTR",Lt.cipher.modes.ctr);function Yn(e,t){var r=function(){return new Lt.des.Algorithm(e,t)};Lt.cipher.registerAlgorithm(e,r)}var FG=[16843776,0,65536,16843780,16842756,66564,4,65536,1024,16843776,16843780,1024,16778244,16842756,16777216,4,1028,16778240,16778240,66560,66560,16842752,16842752,16778244,65540,16777220,16777220,65540,0,1028,66564,16777216,65536,16843780,4,16842752,16843776,16777216,16777216,1024,16842756,65536,66560,16777220,1024,4,16778244,66564,16843780,65540,16842752,16778244,16777220,1028,66564,16843776,1028,16778240,16778240,0,65540,66560,0,16842756],MG=[-2146402272,-2147450880,32768,1081376,1048576,32,-2146435040,-2147450848,-2147483616,-2146402272,-2146402304,-2147483648,-2147450880,1048576,32,-2146435040,1081344,1048608,-2147450848,0,-2147483648,32768,1081376,-2146435072,1048608,-2147483616,0,1081344,32800,-2146402304,-2146435072,32800,0,1081376,-2146435040,1048576,-2147450848,-2146435072,-2146402304,32768,-2146435072,-2147450880,32,-2146402272,1081376,32,32768,-2147483648,32800,-2146402304,1048576,-2147483616,1048608,-2147450848,-2147483616,1048608,1081344,0,-2147450880,32800,-2147483648,-2146435040,-2146402272,1081344],VG=[520,134349312,0,134348808,134218240,0,131592,134218240,131080,134217736,134217736,131072,134349320,131080,134348800,520,134217728,8,134349312,512,131584,134348800,134348808,131592,134218248,131584,131072,134218248,8,134349320,512,134217728,134349312,134217728,131080,520,131072,134349312,134218240,0,512,131080,134349320,134218240,134217736,512,0,134348808,134218248,131072,134217728,134349320,8,131592,131584,134217736,134348800,134218248,520,134348800,131592,8,134348808,131584],KG=[8396801,8321,8321,128,8396928,8388737,8388609,8193,0,8396800,8396800,8396929,129,0,8388736,8388609,1,8192,8388608,8396801,128,8388608,8193,8320,8388737,1,8320,8388736,8192,8396928,8396929,129,8388736,8388609,8396800,8396929,129,0,0,8396800,8320,8388736,8388737,1,8396801,8321,8321,128,8396929,129,1,8192,8388609,8193,8396928,8388737,8193,8320,8388608,8396801,128,8388608,8192,8396928],HG=[256,34078976,34078720,1107296512,524288,256,1073741824,34078720,1074266368,524288,33554688,1074266368,1107296512,1107820544,524544,1073741824,33554432,1074266112,1074266112,0,1073742080,1107820800,1107820800,33554688,1107820544,1073742080,0,1107296256,34078976,33554432,1107296256,524544,524288,1107296512,256,33554432,1073741824,34078720,1107296512,1074266368,33554688,1073741824,1107820544,34078976,1074266368,256,33554432,1107820544,1107820800,524544,1107296256,1107820800,34078720,0,1074266112,1107296256,524544,33554688,1073742080,524288,0,1074266112,34078976,1073742080],$G=[536870928,541065216,16384,541081616,541065216,16,541081616,4194304,536887296,4210704,4194304,536870928,4194320,536887296,536870912,16400,0,4194320,536887312,16384,4210688,536887312,16,541065232,541065232,0,4210704,541081600,16400,4210688,541081600,536870912,536887296,16,541065232,4210688,541081616,4194304,16400,536870928,4194304,536887296,536870912,16400,536870928,541081616,4210688,541065216,4210704,541081600,0,541065232,16,16384,541065216,4210704,16384,4194320,536887312,0,541081600,536870912,4194320,536887312],zG=[2097152,69206018,67110914,0,2048,67110914,2099202,69208064,69208066,2097152,0,67108866,2,67108864,69206018,2050,67110912,2099202,2097154,67110912,67108866,69206016,69208064,2097154,69206016,2048,2050,69208066,2099200,2,67108864,2099200,67108864,2099200,2097152,67110914,67110914,69206018,69206018,2,2097154,67108864,67110912,2097152,69208064,2050,2099202,69208064,2050,67108866,69208066,69206016,2099200,0,2,69208066,0,2099202,69206016,2048,67108866,67110912,2048,2097154],GG=[268439616,4096,262144,268701760,268435456,268439616,64,268435456,262208,268697600,268701760,266240,268701696,266304,4096,64,268697600,268435520,268439552,4160,266240,262208,268697664,268701696,4160,0,0,268697664,268435520,268439552,266304,262144,266304,262144,268701696,4096,64,268697664,4096,266304,268439552,64,268435520,268697600,268697664,268435456,262144,268439616,0,268701760,262208,268435520,268697600,268439552,268439616,0,268701760,266240,266240,4160,4160,262208,268435456,268701696];function WG(e){for(var t=[0,4,536870912,536870916,65536,65540,536936448,536936452,512,516,536871424,536871428,66048,66052,536936960,536936964],r=[0,1,1048576,1048577,67108864,67108865,68157440,68157441,256,257,1048832,1048833,67109120,67109121,68157696,68157697],i=[0,8,2048,2056,16777216,16777224,16779264,16779272,0,8,2048,2056,16777216,16777224,16779264,16779272],n=[0,2097152,134217728,136314880,8192,2105344,134225920,136323072,131072,2228224,134348800,136445952,139264,2236416,134356992,136454144],s=[0,262144,16,262160,0,262144,16,262160,4096,266240,4112,266256,4096,266240,4112,266256],a=[0,1024,32,1056,0,1024,32,1056,33554432,33555456,33554464,33555488,33554432,33555456,33554464,33555488],o=[0,268435456,524288,268959744,2,268435458,524290,268959746,0,268435456,524288,268959744,2,268435458,524290,268959746],c=[0,65536,2048,67584,536870912,536936448,536872960,536938496,131072,196608,133120,198656,537001984,537067520,537004032,537069568],u=[0,262144,0,262144,2,262146,2,262146,33554432,33816576,33554432,33816576,33554434,33816578,33554434,33816578],l=[0,268435456,8,268435464,0,268435456,8,268435464,1024,268436480,1032,268436488,1024,268436480,1032,268436488],p=[0,32,0,32,1048576,1048608,1048576,1048608,8192,8224,8192,8224,1056768,1056800,1056768,1056800],d=[0,16777216,512,16777728,2097152,18874368,2097664,18874880,67108864,83886080,67109376,83886592,69206016,85983232,69206528,85983744],h=[0,4096,134217728,134221824,524288,528384,134742016,134746112,16,4112,134217744,134221840,524304,528400,134742032,134746128],f=[0,4,256,260,0,4,256,260,1,5,257,261,1,5,257,261],m=e.length()>8?3:1,y=[],_=[0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0],A=0,S,B=0;B<m;B++){var O=e.getInt32(),N=e.getInt32();S=(O>>>4^N)&252645135,N^=S,O^=S<<4,S=(N>>>-16^O)&65535,O^=S,N^=S<<-16,S=(O>>>2^N)&858993459,N^=S,O^=S<<2,S=(N>>>-16^O)&65535,O^=S,N^=S<<-16,S=(O>>>1^N)&1431655765,N^=S,O^=S<<1,S=(N>>>8^O)&16711935,O^=S,N^=S<<8,S=(O>>>1^N)&1431655765,N^=S,O^=S<<1,S=O<<8|N>>>20&240,O=N<<24|N<<8&16711680|N>>>8&65280|N>>>24&240,N=S;for(var Y=0;Y<_.length;++Y){_[Y]?(O=O<<2|O>>>26,N=N<<2|N>>>26):(O=O<<1|O>>>27,N=N<<1|N>>>27),O&=-15,N&=-15;var q=t[O>>>28]|r[O>>>24&15]|i[O>>>20&15]|n[O>>>16&15]|s[O>>>12&15]|a[O>>>8&15]|o[O>>>4&15],z=c[N>>>28]|u[N>>>24&15]|l[N>>>20&15]|p[N>>>16&15]|d[N>>>12&15]|h[N>>>8&15]|f[N>>>4&15];S=(z>>>16^q)&65535,y[A++]=q^S,y[A++]=z^S<<16}}return y}function L4(e,t,r,i){var n=e.length===32?3:9,s;n===3?s=i?[30,-2,-2]:[0,32,2]:s=i?[94,62,-2,32,64,2,30,-2,-2]:[0,32,2,62,30,-2,64,96,2];var a,o=t[0],c=t[1];a=(o>>>4^c)&252645135,c^=a,o^=a<<4,a=(o>>>16^c)&65535,c^=a,o^=a<<16,a=(c>>>2^o)&858993459,o^=a,c^=a<<2,a=(c>>>8^o)&16711935,o^=a,c^=a<<8,a=(o>>>1^c)&1431655765,c^=a,o^=a<<1,o=o<<1|o>>>31,c=c<<1|c>>>31;for(var u=0;u<n;u+=3){for(var l=s[u+1],p=s[u+2],d=s[u];d!=l;d+=p){var h=c^e[d],f=(c>>>4|c<<28)^e[d+1];a=o,o=c,c=a^(MG[h>>>24&63]|KG[h>>>16&63]|$G[h>>>8&63]|GG[h&63]|FG[f>>>24&63]|VG[f>>>16&63]|HG[f>>>8&63]|zG[f&63])}a=o,o=c,c=a}o=o>>>1|o<<31,c=c>>>1|c<<31,a=(o>>>1^c)&1431655765,c^=a,o^=a<<1,a=(c>>>8^o)&16711935,o^=a,c^=a<<8,a=(c>>>2^o)&858993459,o^=a,c^=a<<2,a=(o>>>16^c)&65535,c^=a,o^=a<<16,a=(o>>>4^c)&252645135,c^=a,o^=a<<4,r[0]=o,r[1]=c}function Zg(e){e=e||{};var t=(e.mode||"CBC").toUpperCase(),r="DES-"+t,i;e.decrypt?i=Lt.cipher.createDecipher(r,e.key):i=Lt.cipher.createCipher(r,e.key);var n=i.start;return i.start=function(s,a){var o=null;a instanceof Lt.util.ByteBuffer&&(o=a,a={}),a=a||{},a.output=o,a.iv=s,n.call(i,a)},i}});var ev=b((Aue,q4)=>{var Yr=Ue();Cl();Gn();nt();var YG=Yr.pkcs5=Yr.pkcs5||{},Rs;Yr.util.isNodejs&&!Yr.options.usePureJavaScript&&(Rs=require("crypto"));q4.exports=Yr.pbkdf2=YG.pbkdf2=function(e,t,r,i,n,s){if(typeof n=="function"&&(s=n,n=null),Yr.util.isNodejs&&!Yr.options.usePureJavaScript&&Rs.pbkdf2&&(n===null||typeof n!="object")&&(Rs.pbkdf2Sync.length>4||!n||n==="sha1"))return typeof n!="string"&&(n="sha1"),e=Buffer.from(e,"binary"),t=Buffer.from(t,"binary"),s?Rs.pbkdf2Sync.length===4?Rs.pbkdf2(e,t,r,i,function(S,B){if(S)return s(S);s(null,B.toString("binary"))}):Rs.pbkdf2(e,t,r,i,n,function(S,B){if(S)return s(S);s(null,B.toString("binary"))}):Rs.pbkdf2Sync.length===4?Rs.pbkdf2Sync(e,t,r,i).toString("binary"):Rs.pbkdf2Sync(e,t,r,i,n).toString("binary");if((typeof n>"u"||n===null)&&(n="sha1"),typeof n=="string"){if(!(n in Yr.md.algorithms))throw new Error("Unknown hash algorithm: "+n);n=Yr.md[n].create()}var a=n.digestLength;if(i>4294967295*a){var o=new Error("Derived key is too long.");if(s)return s(o);throw o}var c=Math.ceil(i/a),u=i-(c-1)*a,l=Yr.hmac.create();l.start(n,e);var p="",d,h,f;if(!s){for(var m=1;m<=c;++m){l.start(null,null),l.update(t),l.update(Yr.util.int32ToBytes(m)),d=f=l.digest().getBytes();for(var y=2;y<=r;++y)l.start(null,null),l.update(f),h=l.digest().getBytes(),d=Yr.util.xorBytes(d,h,a),f=h;p+=m<c?d:d.substr(0,u)}return p}var m=1,y;function _(){if(m>c)return s(null,p);l.start(null,null),l.update(t),l.update(Yr.util.int32ToBytes(m)),d=f=l.digest().getBytes(),y=2,A()}function A(){if(y<=r)return l.start(null,null),l.update(f),h=l.digest().getBytes(),d=Yr.util.xorBytes(d,h,a),f=h,++y,Yr.util.setImmediate(A);p+=m<c?d:d.substr(0,u),++m,_()}_()}});var Cw=b((Sue,V4)=>{var Qn=Ue();Gn();nt();var U4=V4.exports=Qn.sha256=Qn.sha256||{};Qn.md.sha256=Qn.md.algorithms.sha256=U4;U4.create=function(){F4||QG();var e=null,t=Qn.util.createBuffer(),r=new Array(64),i={algorithm:"sha256",blockLength:64,digestLength:32,messageLength:0,fullMessageLength:null,messageLengthSize:8};return i.start=function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var n=i.messageLengthSize/4,s=0;s<n;++s)i.fullMessageLength.push(0);return t=Qn.util.createBuffer(),e={h0:1779033703,h1:3144134277,h2:1013904242,h3:2773480762,h4:1359893119,h5:2600822924,h6:528734635,h7:1541459225},i},i.start(),i.update=function(n,s){s==="utf8"&&(n=Qn.util.encodeUtf8(n));var a=n.length;i.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var o=i.fullMessageLength.length-1;o>=0;--o)i.fullMessageLength[o]+=a[1],a[1]=a[0]+(i.fullMessageLength[o]/4294967296>>>0),i.fullMessageLength[o]=i.fullMessageLength[o]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(n),j4(e,r,t),(t.read>2048||t.length()===0)&&t.compact(),i},i.digest=function(){var n=Qn.util.createBuffer();n.putBytes(t.bytes());var s=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize,a=s&i.blockLength-1;n.putBytes(ww.substr(0,i.blockLength-a));for(var o,c,u=i.fullMessageLength[0]*8,l=0;l<i.fullMessageLength.length-1;++l)o=i.fullMessageLength[l+1]*8,c=o/4294967296>>>0,u+=c,n.putInt32(u>>>0),u=o>>>0;n.putInt32(u);var p={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4,h5:e.h5,h6:e.h6,h7:e.h7};j4(p,r,n);var d=Qn.util.createBuffer();return d.putInt32(p.h0),d.putInt32(p.h1),d.putInt32(p.h2),d.putInt32(p.h3),d.putInt32(p.h4),d.putInt32(p.h5),d.putInt32(p.h6),d.putInt32(p.h7),d},i};var ww=null,F4=!1,M4=null;function QG(){ww="\x80",ww+=Qn.util.fillString("\0",64),M4=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],F4=!0}function j4(e,t,r){for(var i,n,s,a,o,c,u,l,p,d,h,f,m,y,_,A=r.length();A>=64;){for(u=0;u<16;++u)t[u]=r.getInt32();for(;u<64;++u)i=t[u-2],i=(i>>>17|i<<15)^(i>>>19|i<<13)^i>>>10,n=t[u-15],n=(n>>>7|n<<25)^(n>>>18|n<<14)^n>>>3,t[u]=i+t[u-7]+n+t[u-16]|0;for(l=e.h0,p=e.h1,d=e.h2,h=e.h3,f=e.h4,m=e.h5,y=e.h6,_=e.h7,u=0;u<64;++u)a=(f>>>6|f<<26)^(f>>>11|f<<21)^(f>>>25|f<<7),o=y^f&(m^y),s=(l>>>2|l<<30)^(l>>>13|l<<19)^(l>>>22|l<<10),c=l&p|d&(l^p),i=_+a+o+M4[u]+t[u],n=s+c,_=y,y=m,m=f,f=h+i>>>0,h=d,d=p,p=l,l=i+n>>>0;e.h0=e.h0+l|0,e.h1=e.h1+p|0,e.h2=e.h2+d|0,e.h3=e.h3+h|0,e.h4=e.h4+f|0,e.h5=e.h5+m|0,e.h6=e.h6+y|0,e.h7=e.h7+_|0,A-=64}}});var Ew=b((wue,K4)=>{var Jn=Ue();nt();var tv=null;Jn.util.isNodejs&&!Jn.options.usePureJavaScript&&!process.versions["node-webkit"]&&(tv=require("crypto"));var JG=K4.exports=Jn.prng=Jn.prng||{};JG.create=function(e){for(var t={plugin:e,key:null,seed:null,time:null,reseeds:0,generated:0,keyBytes:""},r=e.md,i=new Array(32),n=0;n<32;++n)i[n]=r.create();t.pools=i,t.pool=0,t.generate=function(u,l){if(!l)return t.generateSync(u);var p=t.plugin.cipher,d=t.plugin.increment,h=t.plugin.formatKey,f=t.plugin.formatSeed,m=Jn.util.createBuffer();t.key=null,y();function y(_){if(_)return l(_);if(m.length()>=u)return l(null,m.getBytes(u));if(t.generated>1048575&&(t.key=null),t.key===null)return Jn.util.nextTick(function(){s(y)});var A=p(t.key,t.seed);t.generated+=A.length,m.putBytes(A),t.key=h(p(t.key,d(t.seed))),t.seed=f(p(t.key,t.seed)),Jn.util.setImmediate(y)}},t.generateSync=function(u){var l=t.plugin.cipher,p=t.plugin.increment,d=t.plugin.formatKey,h=t.plugin.formatSeed;t.key=null;for(var f=Jn.util.createBuffer();f.length()<u;){t.generated>1048575&&(t.key=null),t.key===null&&a();var m=l(t.key,t.seed);t.generated+=m.length,f.putBytes(m),t.key=d(l(t.key,p(t.seed))),t.seed=h(l(t.key,t.seed))}return f.getBytes(u)};function s(u){if(t.pools[0].messageLength>=32)return o(),u();var l=32-t.pools[0].messageLength<<5;t.seedFile(l,function(p,d){if(p)return u(p);t.collect(d),o(),u()})}function a(){if(t.pools[0].messageLength>=32)return o();var u=32-t.pools[0].messageLength<<5;t.collect(t.seedFileSync(u)),o()}function o(){t.reseeds=t.reseeds===4294967295?0:t.reseeds+1;var u=t.plugin.md.create();u.update(t.keyBytes);for(var l=1,p=0;p<32;++p)t.reseeds%l===0&&(u.update(t.pools[p].digest().getBytes()),t.pools[p].start()),l=l<<1;t.keyBytes=u.digest().getBytes(),u.start(),u.update(t.keyBytes);var d=u.digest().getBytes();t.key=t.plugin.formatKey(t.keyBytes),t.seed=t.plugin.formatSeed(d),t.generated=0}function c(u){var l=null,p=Jn.util.globalScope,d=p.crypto||p.msCrypto;d&&d.getRandomValues&&(l=function(O){return d.getRandomValues(O)});var h=Jn.util.createBuffer();if(l)for(;h.length()<u;){var f=Math.max(1,Math.min(u-h.length(),65536)/4),m=new Uint32Array(Math.floor(f));try{l(m);for(var y=0;y<m.length;++y)h.putInt32(m[y])}catch(O){if(!(typeof QuotaExceededError<"u"&&O instanceof QuotaExceededError))throw O}}if(h.length()<u)for(var _,A,S,B=Math.floor(Math.random()*65536);h.length()<u;){A=16807*(B&65535),_=16807*(B>>16),A+=(_&32767)<<16,A+=_>>15,A=(A&2147483647)+(A>>31),B=A&4294967295;for(var y=0;y<3;++y)S=B>>>(y<<3),S^=Math.floor(Math.random()*256),h.putByte(S&255)}return h.getBytes(u)}return tv?(t.seedFile=function(u,l){tv.randomBytes(u,function(p,d){if(p)return l(p);l(null,d.toString())})},t.seedFileSync=function(u){return tv.randomBytes(u).toString()}):(t.seedFile=function(u,l){try{l(null,c(u))}catch(p){l(p)}},t.seedFileSync=c),t.collect=function(u){for(var l=u.length,p=0;p<l;++p)t.pools[t.pool].update(u.substr(p,1)),t.pool=t.pool===31?0:t.pool+1},t.collectInt=function(u,l){for(var p="",d=0;d<l;d+=8)p+=String.fromCharCode(u>>d&255);t.collect(p)},t.registerWorker=function(u){if(u===self)t.seedFile=function(p,d){function h(f){var m=f.data;m.forge&&m.forge.prng&&(self.removeEventListener("message",h),d(m.forge.prng.err,m.forge.prng.bytes))}self.addEventListener("message",h),self.postMessage({forge:{prng:{needed:p}}})};else{var l=function(p){var d=p.data;d.forge&&d.forge.prng&&t.seedFile(d.forge.prng.needed,function(h,f){u.postMessage({forge:{prng:{err:h,bytes:f}}})})};u.addEventListener("message",l)}},t}});var Ki=b((Cue,Tw)=>{var Er=Ue();ya();Cw();Ew();nt();(function(){if(Er.random&&Er.random.getBytes){Tw.exports=Er.random;return}(function(e){var t={},r=new Array(4),i=Er.util.createBuffer();t.formatKey=function(p){var d=Er.util.createBuffer(p);return p=new Array(4),p[0]=d.getInt32(),p[1]=d.getInt32(),p[2]=d.getInt32(),p[3]=d.getInt32(),Er.aes._expandKey(p,!1)},t.formatSeed=function(p){var d=Er.util.createBuffer(p);return p=new Array(4),p[0]=d.getInt32(),p[1]=d.getInt32(),p[2]=d.getInt32(),p[3]=d.getInt32(),p},t.cipher=function(p,d){return Er.aes._updateBlock(p,d,r,!1),i.putInt32(r[0]),i.putInt32(r[1]),i.putInt32(r[2]),i.putInt32(r[3]),i.getBytes()},t.increment=function(p){return++p[3],p},t.md=Er.md.sha256;function n(){var p=Er.prng.create(t);return p.getBytes=function(d,h){return p.generate(d,h)},p.getBytesSync=function(d){return p.generate(d)},p}var s=n(),a=null,o=Er.util.globalScope,c=o.crypto||o.msCrypto;if(c&&c.getRandomValues&&(a=function(p){return c.getRandomValues(p)}),Er.options.usePureJavaScript||!Er.util.isNodejs&&!a){if(typeof window>"u"||window.document,s.collectInt(+new Date,32),typeof navigator<"u"){var u="";for(var l in navigator)try{typeof navigator[l]=="string"&&(u+=navigator[l])}catch{}s.collect(u),u=null}e&&(e().mousemove(function(p){s.collectInt(p.clientX,16),s.collectInt(p.clientY,16)}),e().keypress(function(p){s.collectInt(p.charCode,8)}))}if(!Er.random)Er.random=s;else for(var l in s)Er.random[l]=s[l];Er.random.createInstance=n,Tw.exports=Er.random})(typeof jQuery<"u"?jQuery:null)})()});var Bw=b((Eue,z4)=>{var vi=Ue();nt();var Iw=[217,120,249,196,25,221,181,237,40,233,253,121,74,160,216,157,198,126,55,131,43,118,83,142,98,76,100,136,68,139,251,162,23,154,89,245,135,179,79,19,97,69,109,141,9,129,125,50,189,143,64,235,134,183,123,11,240,149,33,34,92,107,78,130,84,214,101,147,206,96,178,28,115,86,192,20,167,140,241,220,18,117,202,31,59,190,228,209,66,61,212,48,163,60,182,38,111,191,14,218,70,105,7,87,39,242,29,155,188,148,67,3,248,17,199,246,144,239,62,231,6,195,213,47,200,102,30,215,8,232,234,222,128,82,238,247,132,170,114,172,53,77,106,42,150,26,210,113,90,21,73,116,75,159,208,94,4,24,164,236,194,224,65,110,15,81,203,204,36,145,175,80,161,244,112,57,153,124,58,133,35,184,180,122,252,2,54,91,37,85,151,49,45,93,250,152,227,138,146,174,5,223,41,16,103,108,186,201,211,0,230,207,225,158,168,44,99,22,1,63,88,226,137,169,13,56,52,27,171,51,255,176,187,72,12,95,185,177,205,46,197,243,219,71,229,165,156,119,10,166,32,104,254,127,193,173],H4=[1,2,3,5],XG=function(e,t){return e<<t&65535|(e&65535)>>16-t},ZG=function(e,t){return(e&65535)>>t|e<<16-t&65535};z4.exports=vi.rc2=vi.rc2||{};vi.rc2.expandKey=function(e,t){typeof e=="string"&&(e=vi.util.createBuffer(e)),t=t||128;var r=e,i=e.length(),n=t,s=Math.ceil(n/8),a=255>>(n&7),o;for(o=i;o<128;o++)r.putByte(Iw[r.at(o-1)+r.at(o-i)&255]);for(r.setAt(128-s,Iw[r.at(128-s)&a]),o=127-s;o>=0;o--)r.setAt(o,Iw[r.at(o+1)^r.at(o+s)]);return r};var $4=function(e,t,r){var i=!1,n=null,s=null,a=null,o,c,u,l,p=[];for(e=vi.rc2.expandKey(e,t),u=0;u<64;u++)p.push(e.getInt16Le());r?(o=function(f){for(u=0;u<4;u++)f[u]+=p[l]+(f[(u+3)%4]&f[(u+2)%4])+(~f[(u+3)%4]&f[(u+1)%4]),f[u]=XG(f[u],H4[u]),l++},c=function(f){for(u=0;u<4;u++)f[u]+=p[f[(u+3)%4]&63]}):(o=function(f){for(u=3;u>=0;u--)f[u]=ZG(f[u],H4[u]),f[u]-=p[l]+(f[(u+3)%4]&f[(u+2)%4])+(~f[(u+3)%4]&f[(u+1)%4]),l--},c=function(f){for(u=3;u>=0;u--)f[u]-=p[f[(u+3)%4]&63]});var d=function(f){var m=[];for(u=0;u<4;u++){var y=n.getInt16Le();a!==null&&(r?y^=a.getInt16Le():a.putInt16Le(y)),m.push(y&65535)}l=r?0:63;for(var _=0;_<f.length;_++)for(var A=0;A<f[_][0];A++)f[_][1](m);for(u=0;u<4;u++)a!==null&&(r?a.putInt16Le(m[u]):m[u]^=a.getInt16Le()),s.putInt16Le(m[u])},h=null;return h={start:function(f,m){f&&typeof f=="string"&&(f=vi.util.createBuffer(f)),i=!1,n=vi.util.createBuffer(),s=m||new vi.util.createBuffer,a=f,h.output=s},update:function(f){for(i||n.putBuffer(f);n.length()>=8;)d([[5,o],[1,c],[6,o],[1,c],[5,o]])},finish:function(f){var m=!0;if(r)if(f)m=f(8,n,!r);else{var y=n.length()===8?8:8-n.length();n.fillWithByte(y,y)}if(m&&(i=!0,h.update()),!r&&(m=n.length()===0,m))if(f)m=f(8,s,!r);else{var _=s.length(),A=s.at(_-1);A>_?m=!1:s.truncate(A)}return m}},h};vi.rc2.startEncrypting=function(e,t,r){var i=vi.rc2.createEncryptionCipher(e,128);return i.start(t,r),i};vi.rc2.createEncryptionCipher=function(e,t){return $4(e,t,!0)};vi.rc2.startDecrypting=function(e,t,r){var i=vi.rc2.createDecryptionCipher(e,128);return i.start(t,r),i};vi.rc2.createDecryptionCipher=function(e,t){return $4(e,t,!1)}});var vh=b((Tue,eL)=>{var kw=Ue();eL.exports=kw.jsbn=kw.jsbn||{};var Os,eW=0xdeadbeefcafe,G4=(eW&16777215)==15715070;function G(e,t,r){this.data=[],e!=null&&(typeof e=="number"?this.fromNumber(e,t,r):t==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,t))}kw.jsbn.BigInteger=G;function st(){return new G(null)}function tW(e,t,r,i,n,s){for(;--s>=0;){var a=t*this.data[e++]+r.data[i]+n;n=Math.floor(a/67108864),r.data[i++]=a&67108863}return n}function rW(e,t,r,i,n,s){for(var a=t&32767,o=t>>15;--s>=0;){var c=this.data[e]&32767,u=this.data[e++]>>15,l=o*c+u*a;c=a*c+((l&32767)<<15)+r.data[i]+(n&1073741823),n=(c>>>30)+(l>>>15)+o*u+(n>>>30),r.data[i++]=c&1073741823}return n}function W4(e,t,r,i,n,s){for(var a=t&16383,o=t>>14;--s>=0;){var c=this.data[e]&16383,u=this.data[e++]>>14,l=o*c+u*a;c=a*c+((l&16383)<<14)+r.data[i]+n,n=(c>>28)+(l>>14)+o*u,r.data[i++]=c&268435455}return n}typeof navigator>"u"?(G.prototype.am=W4,Os=28):G4&&navigator.appName=="Microsoft Internet Explorer"?(G.prototype.am=rW,Os=30):G4&&navigator.appName!="Netscape"?(G.prototype.am=tW,Os=26):(G.prototype.am=W4,Os=28);G.prototype.DB=Os;G.prototype.DM=(1<<Os)-1;G.prototype.DV=1<<Os;var Pw=52;G.prototype.FV=Math.pow(2,Pw);G.prototype.F1=Pw-Os;G.prototype.F2=2*Os-Pw;var iW="0123456789abcdefghijklmnopqrstuvwxyz",rv=new Array,Tl,Hi;Tl=48;for(Hi=0;Hi<=9;++Hi)rv[Tl++]=Hi;Tl=97;for(Hi=10;Hi<36;++Hi)rv[Tl++]=Hi;Tl=65;for(Hi=10;Hi<36;++Hi)rv[Tl++]=Hi;function Y4(e){return iW.charAt(e)}function Q4(e,t){var r=rv[e.charCodeAt(t)];return r??-1}function nW(e){for(var t=this.t-1;t>=0;--t)e.data[t]=this.data[t];e.t=this.t,e.s=this.s}function sW(e){this.t=1,this.s=e<0?-1:0,e>0?this.data[0]=e:e<-1?this.data[0]=e+this.DV:this.t=0}function va(e){var t=st();return t.fromInt(e),t}function aW(e,t){var r;if(t==16)r=4;else if(t==8)r=3;else if(t==256)r=8;else if(t==2)r=1;else if(t==32)r=5;else if(t==4)r=2;else{this.fromRadix(e,t);return}this.t=0,this.s=0;for(var i=e.length,n=!1,s=0;--i>=0;){var a=r==8?e[i]&255:Q4(e,i);if(a<0){e.charAt(i)=="-"&&(n=!0);continue}n=!1,s==0?this.data[this.t++]=a:s+r>this.DB?(this.data[this.t-1]|=(a&(1<<this.DB-s)-1)<<s,this.data[this.t++]=a>>this.DB-s):this.data[this.t-1]|=a<<s,s+=r,s>=this.DB&&(s-=this.DB)}r==8&&(e[0]&128)!=0&&(this.s=-1,s>0&&(this.data[this.t-1]|=(1<<this.DB-s)-1<<s)),this.clamp(),n&&G.ZERO.subTo(this,this)}function oW(){for(var e=this.s&this.DM;this.t>0&&this.data[this.t-1]==e;)--this.t}function cW(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(e==16)t=4;else if(e==8)t=3;else if(e==2)t=1;else if(e==32)t=5;else if(e==4)t=2;else return this.toRadix(e);var r=(1<<t)-1,i,n=!1,s="",a=this.t,o=this.DB-a*this.DB%t;if(a-- >0)for(o<this.DB&&(i=this.data[a]>>o)>0&&(n=!0,s=Y4(i));a>=0;)o<t?(i=(this.data[a]&(1<<o)-1)<<t-o,i|=this.data[--a]>>(o+=this.DB-t)):(i=this.data[a]>>(o-=t)&r,o<=0&&(o+=this.DB,--a)),i>0&&(n=!0),n&&(s+=Y4(i));return n?s:"0"}function uW(){var e=st();return G.ZERO.subTo(this,e),e}function lW(){return this.s<0?this.negate():this}function pW(e){var t=this.s-e.s;if(t!=0)return t;var r=this.t;if(t=r-e.t,t!=0)return this.s<0?-t:t;for(;--r>=0;)if((t=this.data[r]-e.data[r])!=0)return t;return 0}function iv(e){var t=1,r;return(r=e>>>16)!=0&&(e=r,t+=16),(r=e>>8)!=0&&(e=r,t+=8),(r=e>>4)!=0&&(e=r,t+=4),(r=e>>2)!=0&&(e=r,t+=2),(r=e>>1)!=0&&(e=r,t+=1),t}function fW(){return this.t<=0?0:this.DB*(this.t-1)+iv(this.data[this.t-1]^this.s&this.DM)}function dW(e,t){var r;for(r=this.t-1;r>=0;--r)t.data[r+e]=this.data[r];for(r=e-1;r>=0;--r)t.data[r]=0;t.t=this.t+e,t.s=this.s}function hW(e,t){for(var r=e;r<this.t;++r)t.data[r-e]=this.data[r];t.t=Math.max(this.t-e,0),t.s=this.s}function mW(e,t){var r=e%this.DB,i=this.DB-r,n=(1<<i)-1,s=Math.floor(e/this.DB),a=this.s<<r&this.DM,o;for(o=this.t-1;o>=0;--o)t.data[o+s+1]=this.data[o]>>i|a,a=(this.data[o]&n)<<r;for(o=s-1;o>=0;--o)t.data[o]=0;t.data[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()}function yW(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t){t.t=0;return}var i=e%this.DB,n=this.DB-i,s=(1<<i)-1;t.data[0]=this.data[r]>>i;for(var a=r+1;a<this.t;++a)t.data[a-r-1]|=(this.data[a]&s)<<n,t.data[a-r]=this.data[a]>>i;i>0&&(t.data[this.t-r-1]|=(this.s&s)<<n),t.t=this.t-r,t.clamp()}function gW(e,t){for(var r=0,i=0,n=Math.min(e.t,this.t);r<n;)i+=this.data[r]-e.data[r],t.data[r++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i-=e.s;r<this.t;)i+=this.data[r],t.data[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<e.t;)i-=e.data[r],t.data[r++]=i&this.DM,i>>=this.DB;i-=e.s}t.s=i<0?-1:0,i<-1?t.data[r++]=this.DV+i:i>0&&(t.data[r++]=i),t.t=r,t.clamp()}function vW(e,t){var r=this.abs(),i=e.abs(),n=r.t;for(t.t=n+i.t;--n>=0;)t.data[n]=0;for(n=0;n<i.t;++n)t.data[n+r.t]=r.am(0,i.data[n],t,n,0,r.t);t.s=0,t.clamp(),this.s!=e.s&&G.ZERO.subTo(t,t)}function xW(e){for(var t=this.abs(),r=e.t=2*t.t;--r>=0;)e.data[r]=0;for(r=0;r<t.t-1;++r){var i=t.am(r,t.data[r],e,2*r,0,1);(e.data[r+t.t]+=t.am(r+1,2*t.data[r],e,2*r+1,i,t.t-r-1))>=t.DV&&(e.data[r+t.t]-=t.DV,e.data[r+t.t+1]=1)}e.t>0&&(e.data[e.t-1]+=t.am(r,t.data[r],e,2*r,0,1)),e.s=0,e.clamp()}function bW(e,t,r){var i=e.abs();if(!(i.t<=0)){var n=this.abs();if(n.t<i.t){t?.fromInt(0),r!=null&&this.copyTo(r);return}r==null&&(r=st());var s=st(),a=this.s,o=e.s,c=this.DB-iv(i.data[i.t-1]);c>0?(i.lShiftTo(c,s),n.lShiftTo(c,r)):(i.copyTo(s),n.copyTo(r));var u=s.t,l=s.data[u-1];if(l!=0){var p=l*(1<<this.F1)+(u>1?s.data[u-2]>>this.F2:0),d=this.FV/p,h=(1<<this.F1)/p,f=1<<this.F2,m=r.t,y=m-u,_=t??st();for(s.dlShiftTo(y,_),r.compareTo(_)>=0&&(r.data[r.t++]=1,r.subTo(_,r)),G.ONE.dlShiftTo(u,_),_.subTo(s,s);s.t<u;)s.data[s.t++]=0;for(;--y>=0;){var A=r.data[--m]==l?this.DM:Math.floor(r.data[m]*d+(r.data[m-1]+f)*h);if((r.data[m]+=s.am(0,A,r,y,0,u))<A)for(s.dlShiftTo(y,_),r.subTo(_,r);r.data[m]<--A;)r.subTo(_,r)}t!=null&&(r.drShiftTo(u,t),a!=o&&G.ZERO.subTo(t,t)),r.t=u,r.clamp(),c>0&&r.rShiftTo(c,r),a<0&&G.ZERO.subTo(r,r)}}}function _W(e){var t=st();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(G.ZERO)>0&&e.subTo(t,t),t}function ic(e){this.m=e}function AW(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function SW(e){return e}function wW(e){e.divRemTo(this.m,null,e)}function CW(e,t,r){e.multiplyTo(t,r),this.reduce(r)}function EW(e,t){e.squareTo(t),this.reduce(t)}ic.prototype.convert=AW;ic.prototype.revert=SW;ic.prototype.reduce=wW;ic.prototype.mulTo=CW;ic.prototype.sqrTo=EW;function TW(){if(this.t<1)return 0;var e=this.data[0];if((e&1)==0)return 0;var t=e&3;return t=t*(2-(e&15)*t)&15,t=t*(2-(e&255)*t)&255,t=t*(2-((e&65535)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function nc(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function IW(e){var t=st();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(G.ZERO)>0&&this.m.subTo(t,t),t}function BW(e){var t=st();return e.copyTo(t),this.reduce(t),t}function kW(e){for(;e.t<=this.mt2;)e.data[e.t++]=0;for(var t=0;t<this.m.t;++t){var r=e.data[t]&32767,i=r*this.mpl+((r*this.mph+(e.data[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e.data[r]+=this.m.am(0,i,e,t,0,this.m.t);e.data[r]>=e.DV;)e.data[r]-=e.DV,e.data[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function PW(e,t){e.squareTo(t),this.reduce(t)}function NW(e,t,r){e.multiplyTo(t,r),this.reduce(r)}nc.prototype.convert=IW;nc.prototype.revert=BW;nc.prototype.reduce=kW;nc.prototype.mulTo=NW;nc.prototype.sqrTo=PW;function RW(){return(this.t>0?this.data[0]&1:this.s)==0}function OW(e,t){if(e>4294967295||e<1)return G.ONE;var r=st(),i=st(),n=t.convert(this),s=iv(e)-1;for(n.copyTo(r);--s>=0;)if(t.sqrTo(r,i),(e&1<<s)>0)t.mulTo(i,n,r);else{var a=r;r=i,i=a}return t.revert(r)}function LW(e,t){var r;return e<256||t.isEven()?r=new ic(t):r=new nc(t),this.exp(e,r)}G.prototype.copyTo=nW;G.prototype.fromInt=sW;G.prototype.fromString=aW;G.prototype.clamp=oW;G.prototype.dlShiftTo=dW;G.prototype.drShiftTo=hW;G.prototype.lShiftTo=mW;G.prototype.rShiftTo=yW;G.prototype.subTo=gW;G.prototype.multiplyTo=vW;G.prototype.squareTo=xW;G.prototype.divRemTo=bW;G.prototype.invDigit=TW;G.prototype.isEven=RW;G.prototype.exp=OW;G.prototype.toString=cW;G.prototype.negate=uW;G.prototype.abs=lW;G.prototype.compareTo=pW;G.prototype.bitLength=fW;G.prototype.mod=_W;G.prototype.modPowInt=LW;G.ZERO=va(0);G.ONE=va(1);function DW(){var e=st();return this.copyTo(e),e}function qW(){if(this.s<0){if(this.t==1)return this.data[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this.data[0];if(this.t==0)return 0}return(this.data[1]&(1<<32-this.DB)-1)<<this.DB|this.data[0]}function jW(){return this.t==0?this.s:this.data[0]<<24>>24}function UW(){return this.t==0?this.s:this.data[0]<<16>>16}function FW(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function MW(){return this.s<0?-1:this.t<=0||this.t==1&&this.data[0]<=0?0:1}function VW(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),i=va(r),n=st(),s=st(),a="";for(this.divRemTo(i,n,s);n.signum()>0;)a=(r+s.intValue()).toString(e).substr(1)+a,n.divRemTo(i,n,s);return s.intValue().toString(e)+a}function KW(e,t){this.fromInt(0),t==null&&(t=10);for(var r=this.chunkSize(t),i=Math.pow(t,r),n=!1,s=0,a=0,o=0;o<e.length;++o){var c=Q4(e,o);if(c<0){e.charAt(o)=="-"&&this.signum()==0&&(n=!0);continue}a=t*a+c,++s>=r&&(this.dMultiply(i),this.dAddOffset(a,0),s=0,a=0)}s>0&&(this.dMultiply(Math.pow(t,s)),this.dAddOffset(a,0)),n&&G.ZERO.subTo(this,this)}function HW(e,t,r){if(typeof t=="number")if(e<2)this.fromInt(1);else for(this.fromNumber(e,r),this.testBit(e-1)||this.bitwiseTo(G.ONE.shiftLeft(e-1),Nw,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(G.ONE.shiftLeft(e-1),this);else{var i=new Array,n=e&7;i.length=(e>>3)+1,t.nextBytes(i),n>0?i[0]&=(1<<n)-1:i[0]=0,this.fromString(i,256)}}function $W(){var e=this.t,t=new Array;t[0]=this.s;var r=this.DB-e*this.DB%8,i,n=0;if(e-- >0)for(r<this.DB&&(i=this.data[e]>>r)!=(this.s&this.DM)>>r&&(t[n++]=i|this.s<<this.DB-r);e>=0;)r<8?(i=(this.data[e]&(1<<r)-1)<<8-r,i|=this.data[--e]>>(r+=this.DB-8)):(i=this.data[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),(i&128)!=0&&(i|=-256),n==0&&(this.s&128)!=(i&128)&&++n,(n>0||i!=this.s)&&(t[n++]=i);return t}function zW(e){return this.compareTo(e)==0}function GW(e){return this.compareTo(e)<0?this:e}function WW(e){return this.compareTo(e)>0?this:e}function YW(e,t,r){var i,n,s=Math.min(e.t,this.t);for(i=0;i<s;++i)r.data[i]=t(this.data[i],e.data[i]);if(e.t<this.t){for(n=e.s&this.DM,i=s;i<this.t;++i)r.data[i]=t(this.data[i],n);r.t=this.t}else{for(n=this.s&this.DM,i=s;i<e.t;++i)r.data[i]=t(n,e.data[i]);r.t=e.t}r.s=t(this.s,e.s),r.clamp()}function QW(e,t){return e&t}function JW(e){var t=st();return this.bitwiseTo(e,QW,t),t}function Nw(e,t){return e|t}function XW(e){var t=st();return this.bitwiseTo(e,Nw,t),t}function J4(e,t){return e^t}function ZW(e){var t=st();return this.bitwiseTo(e,J4,t),t}function X4(e,t){return e&~t}function eY(e){var t=st();return this.bitwiseTo(e,X4,t),t}function tY(){for(var e=st(),t=0;t<this.t;++t)e.data[t]=this.DM&~this.data[t];return e.t=this.t,e.s=~this.s,e}function rY(e){var t=st();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t}function iY(e){var t=st();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t}function nY(e){if(e==0)return-1;var t=0;return(e&65535)==0&&(e>>=16,t+=16),(e&255)==0&&(e>>=8,t+=8),(e&15)==0&&(e>>=4,t+=4),(e&3)==0&&(e>>=2,t+=2),(e&1)==0&&++t,t}function sY(){for(var e=0;e<this.t;++e)if(this.data[e]!=0)return e*this.DB+nY(this.data[e]);return this.s<0?this.t*this.DB:-1}function aY(e){for(var t=0;e!=0;)e&=e-1,++t;return t}function oY(){for(var e=0,t=this.s&this.DM,r=0;r<this.t;++r)e+=aY(this.data[r]^t);return e}function cY(e){var t=Math.floor(e/this.DB);return t>=this.t?this.s!=0:(this.data[t]&1<<e%this.DB)!=0}function uY(e,t){var r=G.ONE.shiftLeft(e);return this.bitwiseTo(r,t,r),r}function lY(e){return this.changeBit(e,Nw)}function pY(e){return this.changeBit(e,X4)}function fY(e){return this.changeBit(e,J4)}function dY(e,t){for(var r=0,i=0,n=Math.min(e.t,this.t);r<n;)i+=this.data[r]+e.data[r],t.data[r++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i+=e.s;r<this.t;)i+=this.data[r],t.data[r++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;r<e.t;)i+=e.data[r],t.data[r++]=i&this.DM,i>>=this.DB;i+=e.s}t.s=i<0?-1:0,i>0?t.data[r++]=i:i<-1&&(t.data[r++]=this.DV+i),t.t=r,t.clamp()}function hY(e){var t=st();return this.addTo(e,t),t}function mY(e){var t=st();return this.subTo(e,t),t}function yY(e){var t=st();return this.multiplyTo(e,t),t}function gY(e){var t=st();return this.divRemTo(e,t,null),t}function vY(e){var t=st();return this.divRemTo(e,null,t),t}function xY(e){var t=st(),r=st();return this.divRemTo(e,t,r),new Array(t,r)}function bY(e){this.data[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function _Y(e,t){if(e!=0){for(;this.t<=t;)this.data[this.t++]=0;for(this.data[t]+=e;this.data[t]>=this.DV;)this.data[t]-=this.DV,++t>=this.t&&(this.data[this.t++]=0),++this.data[t]}}function gh(){}function Z4(e){return e}function AY(e,t,r){e.multiplyTo(t,r)}function SY(e,t){e.squareTo(t)}gh.prototype.convert=Z4;gh.prototype.revert=Z4;gh.prototype.mulTo=AY;gh.prototype.sqrTo=SY;function wY(e){return this.exp(e,new gh)}function CY(e,t,r){var i=Math.min(this.t+e.t,t);for(r.s=0,r.t=i;i>0;)r.data[--i]=0;var n;for(n=r.t-this.t;i<n;++i)r.data[i+this.t]=this.am(0,e.data[i],r,i,0,this.t);for(n=Math.min(e.t,t);i<n;++i)this.am(0,e.data[i],r,i,0,t-i);r.clamp()}function EY(e,t,r){--t;var i=r.t=this.t+e.t-t;for(r.s=0;--i>=0;)r.data[i]=0;for(i=Math.max(t-this.t,0);i<e.t;++i)r.data[this.t+i-t]=this.am(t-i,e.data[i],r,0,0,this.t+i-t);r.clamp(),r.drShiftTo(1,r)}function Il(e){this.r2=st(),this.q3=st(),G.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}function TY(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=st();return e.copyTo(t),this.reduce(t),t}function IY(e){return e}function BY(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}function kY(e,t){e.squareTo(t),this.reduce(t)}function PY(e,t,r){e.multiplyTo(t,r),this.reduce(r)}Il.prototype.convert=TY;Il.prototype.revert=IY;Il.prototype.reduce=BY;Il.prototype.mulTo=PY;Il.prototype.sqrTo=kY;function NY(e,t){var r=e.bitLength(),i,n=va(1),s;if(r<=0)return n;r<18?i=1:r<48?i=3:r<144?i=4:r<768?i=5:i=6,r<8?s=new ic(t):t.isEven()?s=new Il(t):s=new nc(t);var a=new Array,o=3,c=i-1,u=(1<<i)-1;if(a[1]=s.convert(this),i>1){var l=st();for(s.sqrTo(a[1],l);o<=u;)a[o]=st(),s.mulTo(l,a[o-2],a[o]),o+=2}var p=e.t-1,d,h=!0,f=st(),m;for(r=iv(e.data[p])-1;p>=0;){for(r>=c?d=e.data[p]>>r-c&u:(d=(e.data[p]&(1<<r+1)-1)<<c-r,p>0&&(d|=e.data[p-1]>>this.DB+r-c)),o=i;(d&1)==0;)d>>=1,--o;if((r-=o)<0&&(r+=this.DB,--p),h)a[d].copyTo(n),h=!1;else{for(;o>1;)s.sqrTo(n,f),s.sqrTo(f,n),o-=2;o>0?s.sqrTo(n,f):(m=n,n=f,f=m),s.mulTo(f,a[d],n)}for(;p>=0&&(e.data[p]&1<<r)==0;)s.sqrTo(n,f),m=n,n=f,f=m,--r<0&&(r=this.DB-1,--p)}return s.revert(n)}function RY(e){var t=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone();if(t.compareTo(r)<0){var i=t;t=r,r=i}var n=t.getLowestSetBit(),s=r.getLowestSetBit();if(s<0)return t;for(n<s&&(s=n),s>0&&(t.rShiftTo(s,t),r.rShiftTo(s,r));t.signum()>0;)(n=t.getLowestSetBit())>0&&t.rShiftTo(n,t),(n=r.getLowestSetBit())>0&&r.rShiftTo(n,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return s>0&&r.lShiftTo(s,r),r}function OY(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(t==0)r=this.data[0]%e;else for(var i=this.t-1;i>=0;--i)r=(t*r+this.data[i])%e;return r}function LY(e){var t=e.isEven();if(this.isEven()&&t||e.signum()==0)return G.ZERO;for(var r=e.clone(),i=this.clone(),n=va(1),s=va(0),a=va(0),o=va(1);r.signum()!=0;){for(;r.isEven();)r.rShiftTo(1,r),t?((!n.isEven()||!s.isEven())&&(n.addTo(this,n),s.subTo(e,s)),n.rShiftTo(1,n)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),t?((!a.isEven()||!o.isEven())&&(a.addTo(this,a),o.subTo(e,o)),a.rShiftTo(1,a)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);r.compareTo(i)>=0?(r.subTo(i,r),t&&n.subTo(a,n),s.subTo(o,s)):(i.subTo(r,i),t&&a.subTo(n,a),o.subTo(s,o))}if(i.compareTo(G.ONE)!=0)return G.ZERO;if(o.compareTo(e)>=0)return o.subtract(e);if(o.signum()<0)o.addTo(e,o);else return o;return o.signum()<0?o.add(e):o}var bn=[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],DY=(1<<26)/bn[bn.length-1];function qY(e){var t,r=this.abs();if(r.t==1&&r.data[0]<=bn[bn.length-1]){for(t=0;t<bn.length;++t)if(r.data[0]==bn[t])return!0;return!1}if(r.isEven())return!1;for(t=1;t<bn.length;){for(var i=bn[t],n=t+1;n<bn.length&&i<DY;)i*=bn[n++];for(i=r.modInt(i);t<n;)if(i%bn[t++]==0)return!1}return r.millerRabin(e)}function jY(e){var t=this.subtract(G.ONE),r=t.getLowestSetBit();if(r<=0)return!1;for(var i=t.shiftRight(r),n=UY(),s,a=0;a<e;++a){do s=new G(this.bitLength(),n);while(s.compareTo(G.ONE)<=0||s.compareTo(t)>=0);var o=s.modPow(i,this);if(o.compareTo(G.ONE)!=0&&o.compareTo(t)!=0){for(var c=1;c++<r&&o.compareTo(t)!=0;)if(o=o.modPowInt(2,this),o.compareTo(G.ONE)==0)return!1;if(o.compareTo(t)!=0)return!1}}return!0}function UY(){return{nextBytes:function(e){for(var t=0;t<e.length;++t)e[t]=Math.floor(Math.random()*256)}}}G.prototype.chunkSize=FW;G.prototype.toRadix=VW;G.prototype.fromRadix=KW;G.prototype.fromNumber=HW;G.prototype.bitwiseTo=YW;G.prototype.changeBit=uY;G.prototype.addTo=dY;G.prototype.dMultiply=bY;G.prototype.dAddOffset=_Y;G.prototype.multiplyLowerTo=CY;G.prototype.multiplyUpperTo=EY;G.prototype.modInt=OY;G.prototype.millerRabin=jY;G.prototype.clone=DW;G.prototype.intValue=qW;G.prototype.byteValue=jW;G.prototype.shortValue=UW;G.prototype.signum=MW;G.prototype.toByteArray=$W;G.prototype.equals=zW;G.prototype.min=GW;G.prototype.max=WW;G.prototype.and=JW;G.prototype.or=XW;G.prototype.xor=ZW;G.prototype.andNot=eY;G.prototype.not=tY;G.prototype.shiftLeft=rY;G.prototype.shiftRight=iY;G.prototype.getLowestSetBit=sY;G.prototype.bitCount=oY;G.prototype.testBit=cY;G.prototype.setBit=lY;G.prototype.clearBit=pY;G.prototype.flipBit=fY;G.prototype.add=hY;G.prototype.subtract=mY;G.prototype.multiply=yY;G.prototype.divide=gY;G.prototype.remainder=vY;G.prototype.divideAndRemainder=xY;G.prototype.modPow=NY;G.prototype.modInverse=LY;G.prototype.pow=wY;G.prototype.gcd=RY;G.prototype.isProbablePrime=qY});var Bl=b((Iue,nL)=>{var Xn=Ue();Gn();nt();var rL=nL.exports=Xn.sha1=Xn.sha1||{};Xn.md.sha1=Xn.md.algorithms.sha1=rL;rL.create=function(){iL||FY();var e=null,t=Xn.util.createBuffer(),r=new Array(80),i={algorithm:"sha1",blockLength:64,digestLength:20,messageLength:0,fullMessageLength:null,messageLengthSize:8};return i.start=function(){i.messageLength=0,i.fullMessageLength=i.messageLength64=[];for(var n=i.messageLengthSize/4,s=0;s<n;++s)i.fullMessageLength.push(0);return t=Xn.util.createBuffer(),e={h0:1732584193,h1:4023233417,h2:2562383102,h3:271733878,h4:3285377520},i},i.start(),i.update=function(n,s){s==="utf8"&&(n=Xn.util.encodeUtf8(n));var a=n.length;i.messageLength+=a,a=[a/4294967296>>>0,a>>>0];for(var o=i.fullMessageLength.length-1;o>=0;--o)i.fullMessageLength[o]+=a[1],a[1]=a[0]+(i.fullMessageLength[o]/4294967296>>>0),i.fullMessageLength[o]=i.fullMessageLength[o]>>>0,a[0]=a[1]/4294967296>>>0;return t.putBytes(n),tL(e,r,t),(t.read>2048||t.length()===0)&&t.compact(),i},i.digest=function(){var n=Xn.util.createBuffer();n.putBytes(t.bytes());var s=i.fullMessageLength[i.fullMessageLength.length-1]+i.messageLengthSize,a=s&i.blockLength-1;n.putBytes(Rw.substr(0,i.blockLength-a));for(var o,c,u=i.fullMessageLength[0]*8,l=0;l<i.fullMessageLength.length-1;++l)o=i.fullMessageLength[l+1]*8,c=o/4294967296>>>0,u+=c,n.putInt32(u>>>0),u=o>>>0;n.putInt32(u);var p={h0:e.h0,h1:e.h1,h2:e.h2,h3:e.h3,h4:e.h4};tL(p,r,n);var d=Xn.util.createBuffer();return d.putInt32(p.h0),d.putInt32(p.h1),d.putInt32(p.h2),d.putInt32(p.h3),d.putInt32(p.h4),d},i};var Rw=null,iL=!1;function FY(){Rw="\x80",Rw+=Xn.util.fillString("\0",64),iL=!0}function tL(e,t,r){for(var i,n,s,a,o,c,u,l,p=r.length();p>=64;){for(n=e.h0,s=e.h1,a=e.h2,o=e.h3,c=e.h4,l=0;l<16;++l)i=r.getInt32(),t[l]=i,u=o^s&(a^o),i=(n<<5|n>>>27)+u+c+1518500249+i,c=o,o=a,a=(s<<30|s>>>2)>>>0,s=n,n=i;for(;l<20;++l)i=t[l-3]^t[l-8]^t[l-14]^t[l-16],i=i<<1|i>>>31,t[l]=i,u=o^s&(a^o),i=(n<<5|n>>>27)+u+c+1518500249+i,c=o,o=a,a=(s<<30|s>>>2)>>>0,s=n,n=i;for(;l<32;++l)i=t[l-3]^t[l-8]^t[l-14]^t[l-16],i=i<<1|i>>>31,t[l]=i,u=s^a^o,i=(n<<5|n>>>27)+u+c+1859775393+i,c=o,o=a,a=(s<<30|s>>>2)>>>0,s=n,n=i;for(;l<40;++l)i=t[l-6]^t[l-16]^t[l-28]^t[l-32],i=i<<2|i>>>30,t[l]=i,u=s^a^o,i=(n<<5|n>>>27)+u+c+1859775393+i,c=o,o=a,a=(s<<30|s>>>2)>>>0,s=n,n=i;for(;l<60;++l)i=t[l-6]^t[l-16]^t[l-28]^t[l-32],i=i<<2|i>>>30,t[l]=i,u=s&a|o&(s^a),i=(n<<5|n>>>27)+u+c+2400959708+i,c=o,o=a,a=(s<<30|s>>>2)>>>0,s=n,n=i;for(;l<80;++l)i=t[l-6]^t[l-16]^t[l-28]^t[l-32],i=i<<2|i>>>30,t[l]=i,u=s^a^o,i=(n<<5|n>>>27)+u+c+3395469782+i,c=o,o=a,a=(s<<30|s>>>2)>>>0,s=n,n=i;e.h0=e.h0+n|0,e.h1=e.h1+s|0,e.h2=e.h2+a|0,e.h3=e.h3+o|0,e.h4=e.h4+c|0,p-=64}}});var Ow=b((Bue,aL)=>{var Zn=Ue();nt();Ki();Bl();var sL=aL.exports=Zn.pkcs1=Zn.pkcs1||{};sL.encode_rsa_oaep=function(e,t,r){var i,n,s,a;typeof r=="string"?(i=r,n=arguments[3]||void 0,s=arguments[4]||void 0):r&&(i=r.label||void 0,n=r.seed||void 0,s=r.md||void 0,r.mgf1&&r.mgf1.md&&(a=r.mgf1.md)),s?s.start():s=Zn.md.sha1.create(),a||(a=s);var o=Math.ceil(e.n.bitLength()/8),c=o-2*s.digestLength-2;if(t.length>c){var u=new Error("RSAES-OAEP input message length is too long.");throw u.length=t.length,u.maxLength=c,u}i||(i=""),s.update(i,"raw");for(var l=s.digest(),p="",d=c-t.length,h=0;h<d;h++)p+="\0";var f=l.getBytes()+p+""+t;if(!n)n=Zn.random.getBytes(s.digestLength);else if(n.length!==s.digestLength){var u=new Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw u.seedLength=n.length,u.digestLength=s.digestLength,u}var m=nv(n,o-s.digestLength-1,a),y=Zn.util.xorBytes(f,m,f.length),_=nv(y,s.digestLength,a),A=Zn.util.xorBytes(n,_,n.length);return"\0"+A+y};sL.decode_rsa_oaep=function(e,t,r){var i,n,s;typeof r=="string"?(i=r,n=arguments[3]||void 0):r&&(i=r.label||void 0,n=r.md||void 0,r.mgf1&&r.mgf1.md&&(s=r.mgf1.md));var a=Math.ceil(e.n.bitLength()/8);if(t.length!==a){var y=new Error("RSAES-OAEP encoded message length is invalid.");throw y.length=t.length,y.expectedLength=a,y}if(n===void 0?n=Zn.md.sha1.create():n.start(),s||(s=n),a<2*n.digestLength+2)throw new Error("RSAES-OAEP key is too short for the hash function.");i||(i=""),n.update(i,"raw");for(var o=n.digest().getBytes(),c=t.charAt(0),u=t.substring(1,n.digestLength+1),l=t.substring(1+n.digestLength),p=nv(l,n.digestLength,s),d=Zn.util.xorBytes(u,p,u.length),h=nv(d,a-n.digestLength-1,s),f=Zn.util.xorBytes(l,h,l.length),m=f.substring(0,n.digestLength),y=c!=="\0",_=0;_<n.digestLength;++_)y|=o.charAt(_)!==m.charAt(_);for(var A=1,S=n.digestLength,B=n.digestLength;B<f.length;B++){var O=f.charCodeAt(B),N=O&1^1,Y=A?65534:0;y|=O&Y,A=A&N,S+=A}if(y||f.charCodeAt(S)!==1)throw new Error("Invalid RSAES-OAEP padding.");return f.substring(S+1)};function nv(e,t,r){r||(r=Zn.md.sha1.create());for(var i="",n=Math.ceil(t/r.digestLength),s=0;s<n;++s){var a=String.fromCharCode(s>>24&255,s>>16&255,s>>8&255,s&255);r.start(),r.update(e+a),i+=r.digest().getBytes()}return i.substring(0,t)}});var Dw=b((kue,Lw)=>{var xa=Ue();nt();vh();Ki();(function(){if(xa.prime){Lw.exports=xa.prime;return}var e=Lw.exports=xa.prime=xa.prime||{},t=xa.jsbn.BigInteger,r=[6,4,2,4,2,4,6,2],i=new t(null);i.fromInt(30);var n=function(p,d){return p|d};e.generateProbablePrime=function(p,d,h){typeof d=="function"&&(h=d,d={}),d=d||{};var f=d.algorithm||"PRIMEINC";typeof f=="string"&&(f={name:f}),f.options=f.options||{};var m=d.prng||xa.random,y={nextBytes:function(_){for(var A=m.getBytesSync(_.length),S=0;S<_.length;++S)_[S]=A.charCodeAt(S)}};if(f.name==="PRIMEINC")return s(p,y,f.options,h);throw new Error("Invalid prime generation algorithm: "+f.name)};function s(p,d,h,f){return"workers"in h?c(p,d,h,f):a(p,d,h,f)}function a(p,d,h,f){var m=u(p,d),y=0,_=l(m.bitLength());"millerRabinTests"in h&&(_=h.millerRabinTests);var A=10;"maxBlockTime"in h&&(A=h.maxBlockTime),o(m,p,d,y,_,A,f)}function o(p,d,h,f,m,y,_){var A=+new Date;do{if(p.bitLength()>d&&(p=u(d,h)),p.isProbablePrime(m))return _(null,p);p.dAddOffset(r[f++%8],0)}while(y<0||+new Date-A<y);xa.util.setImmediate(function(){o(p,d,h,f,m,y,_)})}function c(p,d,h,f){if(typeof Worker>"u")return a(p,d,h,f);var m=u(p,d),y=h.workers,_=h.workLoad||100,A=_*30/8,S=h.workerScript||"forge/prime.worker.js";if(y===-1)return xa.util.estimateCores(function(O,N){O&&(N=2),y=N-1,B()});B();function B(){y=Math.max(1,y);for(var O=[],N=0;N<y;++N)O[N]=new Worker(S);for(var Y=y,N=0;N<y;++N)O[N].addEventListener("message",z);var q=!1;function z(oe){if(!q){--Y;var _e=oe.data;if(_e.found){for(var be=0;be<O.length;++be)O[be].terminate();return q=!0,f(null,new t(_e.prime,16))}m.bitLength()>p&&(m=u(p,d));var Be=m.toString(16);oe.target.postMessage({hex:Be,workLoad:_}),m.dAddOffset(A,0)}}}}function u(p,d){var h=new t(p,d),f=p-1;return h.testBit(f)||h.bitwiseTo(t.ONE.shiftLeft(f),n,h),h.dAddOffset(31-h.mod(i).byteValue(),0),h}function l(p){return p<=100?27:p<=150?18:p<=200?15:p<=250?12:p<=300?9:p<=350?8:p<=400?7:p<=500?6:p<=600?5:p<=800?4:p<=1250?3:2}})()});var xh=b((Pue,dL)=>{var we=Ue();xn();vh();ga();Ow();Dw();Ki();nt();typeof tt>"u"&&(tt=we.jsbn.BigInteger);var tt,qw=we.util.isNodejs?require("crypto"):null,P=we.asn1,$i=we.util;we.pki=we.pki||{};dL.exports=we.pki.rsa=we.rsa=we.rsa||{};var Le=we.pki,MY=[6,4,2,4,2,4,6,2],VY={name:"PrivateKeyInfo",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:P.Class.UNIVERSAL,type:P.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:P.Class.UNIVERSAL,type:P.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:P.Class.UNIVERSAL,type:P.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},KY={name:"RSAPrivateKey",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPrivateKey.version",tagClass:P.Class.UNIVERSAL,type:P.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"RSAPrivateKey.modulus",tagClass:P.Class.UNIVERSAL,type:P.Type.INTEGER,constructed:!1,capture:"privateKeyModulus"},{name:"RSAPrivateKey.publicExponent",tagClass:P.Class.UNIVERSAL,type:P.Type.INTEGER,constructed:!1,capture:"privateKeyPublicExponent"},{name:"RSAPrivateKey.privateExponent",tagClass:P.Class.UNIVERSAL,type:P.Type.INTEGER,constructed:!1,capture:"privateKeyPrivateExponent"},{name:"RSAPrivateKey.prime1",tagClass:P.Class.UNIVERSAL,type:P.Type.INTEGER,constructed:!1,capture:"privateKeyPrime1"},{name:"RSAPrivateKey.prime2",tagClass:P.Class.UNIVERSAL,type:P.Type.INTEGER,constructed:!1,capture:"privateKeyPrime2"},{name:"RSAPrivateKey.exponent1",tagClass:P.Class.UNIVERSAL,type:P.Type.INTEGER,constructed:!1,capture:"privateKeyExponent1"},{name:"RSAPrivateKey.exponent2",tagClass:P.Class.UNIVERSAL,type:P.Type.INTEGER,constructed:!1,capture:"privateKeyExponent2"},{name:"RSAPrivateKey.coefficient",tagClass:P.Class.UNIVERSAL,type:P.Type.INTEGER,constructed:!1,capture:"privateKeyCoefficient"}]},HY={name:"RSAPublicKey",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,value:[{name:"RSAPublicKey.modulus",tagClass:P.Class.UNIVERSAL,type:P.Type.INTEGER,constructed:!1,capture:"publicKeyModulus"},{name:"RSAPublicKey.exponent",tagClass:P.Class.UNIVERSAL,type:P.Type.INTEGER,constructed:!1,capture:"publicKeyExponent"}]},$Y=we.pki.rsa.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:P.Class.UNIVERSAL,type:P.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{name:"SubjectPublicKeyInfo.subjectPublicKey",tagClass:P.Class.UNIVERSAL,type:P.Type.BITSTRING,constructed:!1,value:[{name:"SubjectPublicKeyInfo.subjectPublicKey.RSAPublicKey",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"rsaPublicKey"}]}]},zY={name:"DigestInfo",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm",tagClass:P.Class.UNIVERSAL,type:P.Type.SEQUENCE,constructed:!0,value:[{name:"DigestInfo.DigestAlgorithm.algorithmIdentifier",tagClass:P.Class.UNIVERSAL,type:P.Type.OID,constructed:!1,capture:"algorithmIdentifier"},{name:"DigestInfo.DigestAlgorithm.parameters",tagClass:P.Class.UNIVERSAL,type:P.Type.NULL,capture:"parameters",optional:!0,constructed:!1}]},{name:"DigestInfo.digest",tagClass:P.Class.UNIVERSAL,type:P.Type.OCTETSTRING,constructed:!1,capture:"digest"}]},GY=function(e){var t;if(e.algorithm in Le.oids)t=Le.oids[e.algorithm];else{var r=new Error("Unknown message digest algorithm.");throw r.algorithm=e.algorithm,r}var i=P.oidToDer(t).getBytes(),n=P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[]),s=P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[]);s.value.push(P.create(P.Class.UNIVERSAL,P.Type.OID,!1,i)),s.value.push(P.create(P.Class.UNIVERSAL,P.Type.NULL,!1,""));var a=P.create(P.Class.UNIVERSAL,P.Type.OCTETSTRING,!1,e.digest().getBytes());return n.value.push(s),n.value.push(a),P.toDer(n).getBytes()},pL=function(e,t,r){if(r)return e.modPow(t.e,t.n);if(!t.p||!t.q)return e.modPow(t.d,t.n);t.dP||(t.dP=t.d.mod(t.p.subtract(tt.ONE))),t.dQ||(t.dQ=t.d.mod(t.q.subtract(tt.ONE))),t.qInv||(t.qInv=t.q.modInverse(t.p));var i;do i=new tt(we.util.bytesToHex(we.random.getBytes(t.n.bitLength()/8)),16);while(i.compareTo(t.n)>=0||!i.gcd(t.n).equals(tt.ONE));e=e.multiply(i.modPow(t.e,t.n)).mod(t.n);for(var n=e.mod(t.p).modPow(t.dP,t.p),s=e.mod(t.q).modPow(t.dQ,t.q);n.compareTo(s)<0;)n=n.add(t.p);var a=n.subtract(s).multiply(t.qInv).mod(t.p).multiply(t.q).add(s);return a=a.multiply(i.modInverse(t.n)).mod(t.n),a};Le.rsa.encrypt=function(e,t,r){var i=r,n,s=Math.ceil(t.n.bitLength()/8);r!==!1&&r!==!0?(i=r===2,n=fL(e,t,r)):(n=we.util.createBuffer(),n.putBytes(e));for(var a=new tt(n.toHex(),16),o=pL(a,t,i),c=o.toString(16),u=we.util.createBuffer(),l=s-Math.ceil(c.length/2);l>0;)u.putByte(0),--l;return u.putBytes(we.util.hexToBytes(c)),u.getBytes()};Le.rsa.decrypt=function(e,t,r,i){var n=Math.ceil(t.n.bitLength()/8);if(e.length!==n){var s=new Error("Encrypted message length is invalid.");throw s.length=e.length,s.expected=n,s}var a=new tt(we.util.createBuffer(e).toHex(),16);if(a.compareTo(t.n)>=0)throw new Error("Encrypted message is invalid.");for(var o=pL(a,t,r),c=o.toString(16),u=we.util.createBuffer(),l=n-Math.ceil(c.length/2);l>0;)u.putByte(0),--l;return u.putBytes(we.util.hexToBytes(c)),i!==!1?sv(u.getBytes(),t,r):u.getBytes()};Le.rsa.createKeyPairGenerationState=function(e,t,r){typeof e=="string"&&(e=parseInt(e,10)),e=e||2048,r=r||{};var i=r.prng||we.random,n={nextBytes:function(o){for(var c=i.getBytesSync(o.length),u=0;u<o.length;++u)o[u]=c.charCodeAt(u)}},s=r.algorithm||"PRIMEINC",a;if(s==="PRIMEINC")a={algorithm:s,state:0,bits:e,rng:n,eInt:t||65537,e:new tt(null),p:null,q:null,qBits:e>>1,pBits:e-(e>>1),pqState:0,num:null,keys:null},a.e.fromInt(a.eInt);else throw new Error("Invalid key generation algorithm: "+s);return a};Le.rsa.stepKeyPairGenerationState=function(e,t){"algorithm"in e||(e.algorithm="PRIMEINC");var r=new tt(null);r.fromInt(30);for(var i=0,n=function(p,d){return p|d},s=+new Date,a,o=0;e.keys===null&&(t<=0||o<t);){if(e.state===0){var c=e.p===null?e.pBits:e.qBits,u=c-1;e.pqState===0?(e.num=new tt(c,e.rng),e.num.testBit(u)||e.num.bitwiseTo(tt.ONE.shiftLeft(u),n,e.num),e.num.dAddOffset(31-e.num.mod(r).byteValue(),0),i=0,++e.pqState):e.pqState===1?e.num.bitLength()>c?e.pqState=0:e.num.isProbablePrime(YY(e.num.bitLength()))?++e.pqState:e.num.dAddOffset(MY[i++%8],0):e.pqState===2?e.pqState=e.num.subtract(tt.ONE).gcd(e.e).compareTo(tt.ONE)===0?3:0:e.pqState===3&&(e.pqState=0,e.p===null?e.p=e.num:e.q=e.num,e.p!==null&&e.q!==null&&++e.state,e.num=null)}else if(e.state===1)e.p.compareTo(e.q)<0&&(e.num=e.p,e.p=e.q,e.q=e.num),++e.state;else if(e.state===2)e.p1=e.p.subtract(tt.ONE),e.q1=e.q.subtract(tt.ONE),e.phi=e.p1.multiply(e.q1),++e.state;else if(e.state===3)e.phi.gcd(e.e).compareTo(tt.ONE)===0?++e.state:(e.p=null,e.q=null,e.state=0);else if(e.state===4)e.n=e.p.multiply(e.q),e.n.bitLength()===e.bits?++e.state:(e.q=null,e.state=0);else if(e.state===5){var l=e.e.modInverse(e.phi);e.keys={privateKey:Le.rsa.setPrivateKey(e.n,e.e,l,e.p,e.q,l.mod(e.p1),l.mod(e.q1),e.q.modInverse(e.p)),publicKey:Le.rsa.setPublicKey(e.n,e.e)}}a=+new Date,o+=a-s,s=a}return e.keys!==null};Le.rsa.generateKeyPair=function(e,t,r,i){if(arguments.length===1?typeof e=="object"?(r=e,e=void 0):typeof e=="function"&&(i=e,e=void 0):arguments.length===2?typeof e=="number"?typeof t=="function"?(i=t,t=void 0):typeof t!="number"&&(r=t,t=void 0):(r=e,i=t,e=void 0,t=void 0):arguments.length===3&&(typeof t=="number"?typeof r=="function"&&(i=r,r=void 0):(i=r,r=t,t=void 0)),r=r||{},e===void 0&&(e=r.bits||2048),t===void 0&&(t=r.e||65537),!we.options.usePureJavaScript&&!r.prng&&e>=256&&e<=16384&&(t===65537||t===3)){if(i){if(oL("generateKeyPair"))return qw.generateKeyPair("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}},function(o,c,u){if(o)return i(o);i(null,{privateKey:Le.privateKeyFromPem(u),publicKey:Le.publicKeyFromPem(c)})});if(cL("generateKey")&&cL("exportKey"))return $i.globalScope.crypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:lL(t),hash:{name:"SHA-256"}},!0,["sign","verify"]).then(function(o){return $i.globalScope.crypto.subtle.exportKey("pkcs8",o.privateKey)}).then(void 0,function(o){i(o)}).then(function(o){if(o){var c=Le.privateKeyFromAsn1(P.fromDer(we.util.createBuffer(o)));i(null,{privateKey:c,publicKey:Le.setRsaPublicKey(c.n,c.e)})}});if(uL("generateKey")&&uL("exportKey")){var n=$i.globalScope.msCrypto.subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:e,publicExponent:lL(t),hash:{name:"SHA-256"}},!0,["sign","verify"]);n.oncomplete=function(o){var c=o.target.result,u=$i.globalScope.msCrypto.subtle.exportKey("pkcs8",c.privateKey);u.oncomplete=function(l){var p=l.target.result,d=Le.privateKeyFromAsn1(P.fromDer(we.util.createBuffer(p)));i(null,{privateKey:d,publicKey:Le.setRsaPublicKey(d.n,d.e)})},u.onerror=function(l){i(l)}},n.onerror=function(o){i(o)};return}}else if(oL("generateKeyPairSync")){var s=qw.generateKeyPairSync("rsa",{modulusLength:e,publicExponent:t,publicKeyEncoding:{type:"spki",format:"pem"},privateKeyEncoding:{type:"pkcs8",format:"pem"}});return{privateKey:Le.privateKeyFromPem(s.privateKey),publicKey:Le.publicKeyFromPem(s.publicKey)}}}var a=Le.rsa.createKeyPairGenerationState(e,t,r);if(!i)return Le.rsa.stepKeyPairGenerationState(a,0),a.keys;WY(a,r,i)};Le.setRsaPublicKey=Le.rsa.setPublicKey=function(e,t){var r={n:e,e:t};return r.encrypt=function(i,n,s){if(typeof n=="string"?n=n.toUpperCase():n===void 0&&(n="RSAES-PKCS1-V1_5"),n==="RSAES-PKCS1-V1_5")n={encode:function(o,c,u){return fL(o,c,2).getBytes()}};else if(n==="RSA-OAEP"||n==="RSAES-OAEP")n={encode:function(o,c){return we.pkcs1.encode_rsa_oaep(c,o,s)}};else if(["RAW","NONE","NULL",null].indexOf(n)!==-1)n={encode:function(o){return o}};else if(typeof n=="string")throw new Error('Unsupported encryption scheme: "'+n+'".');var a=n.encode(i,r,!0);return Le.rsa.encrypt(a,r,!0)},r.verify=function(i,n,s,a){typeof s=="string"?s=s.toUpperCase():s===void 0&&(s="RSASSA-PKCS1-V1_5"),a===void 0&&(a={_parseAllDigestBytes:!0}),"_parseAllDigestBytes"in a||(a._parseAllDigestBytes=!0),s==="RSASSA-PKCS1-V1_5"?s={verify:function(c,u){u=sv(u,r,!0);var l=P.fromDer(u,{parseAllBytes:a._parseAllDigestBytes}),p={},d=[];if(!P.validate(l,zY,p,d)){var h=new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value.");throw h.errors=d,h}var f=P.derToOid(p.algorithmIdentifier);if(!(f===we.oids.md2||f===we.oids.md5||f===we.oids.sha1||f===we.oids.sha224||f===we.oids.sha256||f===we.oids.sha384||f===we.oids.sha512||f===we.oids["sha512-224"]||f===we.oids["sha512-256"])){var h=new Error("Unknown RSASSA-PKCS1-v1_5 DigestAlgorithm identifier.");throw h.oid=f,h}if((f===we.oids.md2||f===we.oids.md5)&&!("parameters"in p))throw new Error("ASN.1 object does not contain a valid RSASSA-PKCS1-v1_5 DigestInfo value. Missing algorithm identifier NULL parameters.");return c===p.digest}}:(s==="NONE"||s==="NULL"||s===null)&&(s={verify:function(c,u){return u=sv(u,r,!0),c===u}});var o=Le.rsa.decrypt(n,r,!0,!1);return s.verify(i,o,r.n.bitLength())},r};Le.setRsaPrivateKey=Le.rsa.setPrivateKey=function(e,t,r,i,n,s,a,o){var c={n:e,e:t,d:r,p:i,q:n,dP:s,dQ:a,qInv:o};return c.decrypt=function(u,l,p){typeof l=="string"?l=l.toUpperCase():l===void 0&&(l="RSAES-PKCS1-V1_5");var d=Le.rsa.decrypt(u,c,!1,!1);if(l==="RSAES-PKCS1-V1_5")l={decode:sv};else if(l==="RSA-OAEP"||l==="RSAES-OAEP")l={decode:function(h,f){return we.pkcs1.decode_rsa_oaep(f,h,p)}};else if(["RAW","NONE","NULL",null].indexOf(l)!==-1)l={decode:function(h){return h}};else throw new Error('Unsupported encryption scheme: "'+l+'".');return l.decode(d,c,!1)},c.sign=function(u,l){var p=!1;typeof l=="string"&&(l=l.toUpperCase()),l===void 0||l==="RSASSA-PKCS1-V1_5"?(l={encode:GY},p=1):(l==="NONE"||l==="NULL"||l===null)&&(l={encode:function(){return u}},p=1);var d=l.encode(u,c.n.bitLength());return Le.rsa.encrypt(d,c,p)},c};Le.wrapRsaPrivateKey=function(e){return P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[P.create(P.Class.UNIVERSAL,P.Type.INTEGER,!1,P.integerToDer(0).getBytes()),P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[P.create(P.Class.UNIVERSAL,P.Type.OID,!1,P.oidToDer(Le.oids.rsaEncryption).getBytes()),P.create(P.Class.UNIVERSAL,P.Type.NULL,!1,"")]),P.create(P.Class.UNIVERSAL,P.Type.OCTETSTRING,!1,P.toDer(e).getBytes())])};Le.privateKeyFromAsn1=function(e){var t={},r=[];if(P.validate(e,VY,t,r)&&(e=P.fromDer(we.util.createBuffer(t.privateKey))),t={},r=[],!P.validate(e,KY,t,r)){var i=new Error("Cannot read private key. ASN.1 object does not contain an RSAPrivateKey.");throw i.errors=r,i}var n,s,a,o,c,u,l,p;return n=we.util.createBuffer(t.privateKeyModulus).toHex(),s=we.util.createBuffer(t.privateKeyPublicExponent).toHex(),a=we.util.createBuffer(t.privateKeyPrivateExponent).toHex(),o=we.util.createBuffer(t.privateKeyPrime1).toHex(),c=we.util.createBuffer(t.privateKeyPrime2).toHex(),u=we.util.createBuffer(t.privateKeyExponent1).toHex(),l=we.util.createBuffer(t.privateKeyExponent2).toHex(),p=we.util.createBuffer(t.privateKeyCoefficient).toHex(),Le.setRsaPrivateKey(new tt(n,16),new tt(s,16),new tt(a,16),new tt(o,16),new tt(c,16),new tt(u,16),new tt(l,16),new tt(p,16))};Le.privateKeyToAsn1=Le.privateKeyToRSAPrivateKey=function(e){return P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[P.create(P.Class.UNIVERSAL,P.Type.INTEGER,!1,P.integerToDer(0).getBytes()),P.create(P.Class.UNIVERSAL,P.Type.INTEGER,!1,es(e.n)),P.create(P.Class.UNIVERSAL,P.Type.INTEGER,!1,es(e.e)),P.create(P.Class.UNIVERSAL,P.Type.INTEGER,!1,es(e.d)),P.create(P.Class.UNIVERSAL,P.Type.INTEGER,!1,es(e.p)),P.create(P.Class.UNIVERSAL,P.Type.INTEGER,!1,es(e.q)),P.create(P.Class.UNIVERSAL,P.Type.INTEGER,!1,es(e.dP)),P.create(P.Class.UNIVERSAL,P.Type.INTEGER,!1,es(e.dQ)),P.create(P.Class.UNIVERSAL,P.Type.INTEGER,!1,es(e.qInv))])};Le.publicKeyFromAsn1=function(e){var t={},r=[];if(P.validate(e,$Y,t,r)){var i=P.derToOid(t.publicKeyOid);if(i!==Le.oids.rsaEncryption){var n=new Error("Cannot read public key. Unknown OID.");throw n.oid=i,n}e=t.rsaPublicKey}if(r=[],!P.validate(e,HY,t,r)){var n=new Error("Cannot read public key. ASN.1 object does not contain an RSAPublicKey.");throw n.errors=r,n}var s=we.util.createBuffer(t.publicKeyModulus).toHex(),a=we.util.createBuffer(t.publicKeyExponent).toHex();return Le.setRsaPublicKey(new tt(s,16),new tt(a,16))};Le.publicKeyToAsn1=Le.publicKeyToSubjectPublicKeyInfo=function(e){return P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[P.create(P.Class.UNIVERSAL,P.Type.OID,!1,P.oidToDer(Le.oids.rsaEncryption).getBytes()),P.create(P.Class.UNIVERSAL,P.Type.NULL,!1,"")]),P.create(P.Class.UNIVERSAL,P.Type.BITSTRING,!1,[Le.publicKeyToRSAPublicKey(e)])])};Le.publicKeyToRSAPublicKey=function(e){return P.create(P.Class.UNIVERSAL,P.Type.SEQUENCE,!0,[P.create(P.Class.UNIVERSAL,P.Type.INTEGER,!1,es(e.n)),P.create(P.Class.UNIVERSAL,P.Type.INTEGER,!1,es(e.e))])};function fL(e,t,r){var i=we.util.createBuffer(),n=Math.ceil(t.n.bitLength()/8);if(e.length>n-11){var s=new Error("Message is too long for PKCS#1 v1.5 padding.");throw s.length=e.length,s.max=n-11,s}i.putByte(0),i.putByte(r);var a=n-3-e.length,o;if(r===0||r===1){o=r===0?0:255;for(var c=0;c<a;++c)i.putByte(o)}else for(;a>0;){for(var u=0,l=we.random.getBytes(a),c=0;c<a;++c)o=l.charCodeAt(c),o===0?++u:i.putByte(o);a=u}return i.putByte(0),i.putBytes(e),i}function sv(e,t,r,i){var n=Math.ceil(t.n.bitLength()/8),s=we.util.createBuffer(e),a=s.getByte(),o=s.getByte();if(a!==0||r&&o!==0&&o!==1||!r&&o!=2||r&&o===0&&typeof i>"u")throw new Error("Encryption block is invalid.");var c=0;if(o===0){c=n-3-i;for(var u=0;u<c;++u)if(s.getByte()!==0)throw new Error("Encryption block is invalid.")}else if(o===1)for(c=0;s.length()>1;){if(s.getByte()!==255){--s.read;break}++c}else if(o===2)for(c=0;s.length()>1;){if(s.getByte()===0){--s.read;break}++c}var l=s.getByte();if(l!==0||c!==n-3-s.length())throw new Error("Encryption block is invalid.");return s.getBytes()}function WY(e,t,r){typeof t=="function"&&(r=t,t={}),t=t||{};var i={algorithm:{name:t.algorithm||"PRIMEINC",options:{workers:t.workers||2,workLoad:t.workLoad||100,workerScript:t.workerScript}}};"prng"in t&&(i.prng=t.prng),n();function n(){s(e.pBits,function(o,c){if(o)return r(o);if(e.p=c,e.q!==null)return a(o,e.q);s(e.qBits,a)})}function s(o,c){we.prime.generateProbablePrime(o,i,c)}function a(o,c){if(o)return r(o);if(e.q=c,e.p.compareTo(e.q)<0){var u=e.p;e.p=e.q,e.q=u}if(e.p.subtract(tt.ONE).gcd(e.e).compareTo(tt.ONE)!==0){e.p=null,n();return}if(e.q.subtract(tt.ONE).gcd(e.e).compareTo(tt.ONE)!==0){e.q=null,s(e.qBits,a);return}if(e.p1=e.p.subtract(tt.ONE),e.q1=e.q.subtract(tt.ONE),e.phi=e.p1.multiply(e.q1),e.phi.gcd(e.e).compareTo(tt.ONE)!==0){e.p=e.q=null,n();return}if(e.n=e.p.multiply(e.q),e.n.bitLength()!==e.bits){e.q=null,s(e.qBits,a);return}var l=e.e.modInverse(e.phi);e.keys={privateKey:Le.rsa.setPrivateKey(e.n,e.e,l,e.p,e.q,l.mod(e.p1),l.mod(e.q1),e.q.modInverse(e.p)),publicKey:Le.rsa.setPublicKey(e.n,e.e)},r(null,e.keys)}}function es(e){var t=e.toString(16);t[0]>="8"&&(t="00"+t);var r=we.util.hexToBytes(t);return r.length>1&&(r.charCodeAt(0)===0&&(r.charCodeAt(1)&128)===0||r.charCodeAt(0)===255&&(r.charCodeAt(1)&128)===128)?r.substr(1):r}function YY(e){return e<=100?27:e<=150?18:e<=200?15:e<=250?12:e<=300?9:e<=350?8:e<=400?7:e<=500?6:e<=600?5:e<=800?4:e<=1250?3:2}function oL(e){return we.util.isNodejs&&typeof qw[e]=="function"}function cL(e){return typeof $i.globalScope<"u"&&typeof $i.globalScope.crypto=="object"&&typeof $i.globalScope.crypto.subtle=="object"&&typeof $i.globalScope.crypto.subtle[e]=="function"}function uL(e){return typeof $i.globalScope<"u"&&typeof $i.globalScope.msCrypto=="object"&&typeof $i.globalScope.msCrypto.subtle=="object"&&typeof $i.globalScope.msCrypto.subtle[e]=="function"}function lL(e){for(var t=we.util.hexToBytes(e.toString(16)),r=new Uint8Array(t.length),i=0;i<t.length;++i)r[i]=t.charCodeAt(i);return r}});var jw=b((Nue,vL)=>{var pe=Ue();ya();xn();yh();Gn();ga();ev();rc();Ki();Bw();xh();nt();typeof hL>"u"&&(hL=pe.jsbn.BigInteger);var hL,L=pe.asn1,qe=pe.pki=pe.pki||{};vL.exports=qe.pbe=pe.pbe=pe.pbe||{};var sc=qe.oids,QY={name:"EncryptedPrivateKeyInfo",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:L.Class.UNIVERSAL,type:L.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},JY={name:"PBES2Algorithms",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:L.Class.UNIVERSAL,type:L.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:L.Class.UNIVERSAL,type:L.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:L.Class.UNIVERSAL,type:L.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:L.Class.UNIVERSAL,type:L.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:L.Class.UNIVERSAL,type:L.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:L.Class.UNIVERSAL,type:L.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:L.Class.UNIVERSAL,type:L.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},XY={name:"pkcs-12PbeParams",tagClass:L.Class.UNIVERSAL,type:L.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:L.Class.UNIVERSAL,type:L.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:L.Class.UNIVERSAL,type:L.Type.INTEGER,constructed:!1,capture:"iterations"}]};qe.encryptPrivateKeyInfo=function(e,t,r){r=r||{},r.saltSize=r.saltSize||8,r.count=r.count||2048,r.algorithm=r.algorithm||"aes128",r.prfAlgorithm=r.prfAlgorithm||"sha1";var i=pe.random.getBytesSync(r.saltSize),n=r.count,s=L.integerToDer(n),a,o,c;if(r.algorithm.indexOf("aes")===0||r.algorithm==="des"){var u,l,p;switch(r.algorithm){case"aes128":a=16,u=16,l=sc["aes128-CBC"],p=pe.aes.createEncryptionCipher;break;case"aes192":a=24,u=16,l=sc["aes192-CBC"],p=pe.aes.createEncryptionCipher;break;case"aes256":a=32,u=16,l=sc["aes256-CBC"],p=pe.aes.createEncryptionCipher;break;case"des":a=8,u=8,l=sc.desCBC,p=pe.des.createEncryptionCipher;break;default:var d=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw d.algorithm=r.algorithm,d}var h="hmacWith"+r.prfAlgorithm.toUpperCase(),f=gL(h),m=pe.pkcs5.pbkdf2(t,i,n,a,f),y=pe.random.getBytesSync(u),_=p(m);_.start(y),_.update(L.toDer(e)),_.finish(),c=_.output.getBytes();var A=ZY(i,s,a,h);o=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(sc.pkcs5PBES2).getBytes()),L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(sc.pkcs5PBKDF2).getBytes()),A]),L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(l).getBytes()),L.create(L.Class.UNIVERSAL,L.Type.OCTETSTRING,!1,y)])])])}else if(r.algorithm==="3des"){a=24;var S=new pe.util.ByteBuffer(i),m=qe.pbe.generatePkcs12Key(t,S,1,n,a),y=qe.pbe.generatePkcs12Key(t,S,2,n,a),_=pe.des.createEncryptionCipher(m);_.start(y),_.update(L.toDer(e)),_.finish(),c=_.output.getBytes(),o=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(sc["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OCTETSTRING,!1,i),L.create(L.Class.UNIVERSAL,L.Type.INTEGER,!1,s.getBytes())])])}else{var d=new Error("Cannot encrypt private key. Unknown encryption algorithm.");throw d.algorithm=r.algorithm,d}var B=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[o,L.create(L.Class.UNIVERSAL,L.Type.OCTETSTRING,!1,c)]);return B};qe.decryptPrivateKeyInfo=function(e,t){var r=null,i={},n=[];if(!L.validate(e,QY,i,n)){var s=new Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw s.errors=n,s}var a=L.derToOid(i.encryptionOid),o=qe.pbe.getCipher(a,i.encryptionParams,t),c=pe.util.createBuffer(i.encryptedData);return o.update(c),o.finish()&&(r=L.fromDer(o.output)),r};qe.encryptedPrivateKeyToPem=function(e,t){var r={type:"ENCRYPTED PRIVATE KEY",body:L.toDer(e).getBytes()};return pe.pem.encode(r,{maxline:t})};qe.encryptedPrivateKeyFromPem=function(e){var t=pe.pem.decode(e)[0];if(t.type!=="ENCRYPTED PRIVATE KEY"){var r=new Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return L.fromDer(t.body)};qe.encryptRsaPrivateKey=function(e,t,r){if(r=r||{},!r.legacy){var i=qe.wrapRsaPrivateKey(qe.privateKeyToAsn1(e));return i=qe.encryptPrivateKeyInfo(i,t,r),qe.encryptedPrivateKeyToPem(i)}var n,s,a,o;switch(r.algorithm){case"aes128":n="AES-128-CBC",a=16,s=pe.random.getBytesSync(16),o=pe.aes.createEncryptionCipher;break;case"aes192":n="AES-192-CBC",a=24,s=pe.random.getBytesSync(16),o=pe.aes.createEncryptionCipher;break;case"aes256":n="AES-256-CBC",a=32,s=pe.random.getBytesSync(16),o=pe.aes.createEncryptionCipher;break;case"3des":n="DES-EDE3-CBC",a=24,s=pe.random.getBytesSync(8),o=pe.des.createEncryptionCipher;break;case"des":n="DES-CBC",a=8,s=pe.random.getBytesSync(8),o=pe.des.createEncryptionCipher;break;default:var c=new Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+r.algorithm+'".');throw c.algorithm=r.algorithm,c}var u=pe.pbe.opensslDeriveBytes(t,s.substr(0,8),a),l=o(u);l.start(s),l.update(L.toDer(qe.privateKeyToAsn1(e))),l.finish();var p={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:n,parameters:pe.util.bytesToHex(s).toUpperCase()},body:l.output.getBytes()};return pe.pem.encode(p)};qe.decryptRsaPrivateKey=function(e,t){var r=null,i=pe.pem.decode(e)[0];if(i.type!=="ENCRYPTED PRIVATE KEY"&&i.type!=="PRIVATE KEY"&&i.type!=="RSA PRIVATE KEY"){var n=new Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw n.headerType=n,n}if(i.procType&&i.procType.type==="ENCRYPTED"){var s,a;switch(i.dekInfo.algorithm){case"DES-CBC":s=8,a=pe.des.createDecryptionCipher;break;case"DES-EDE3-CBC":s=24,a=pe.des.createDecryptionCipher;break;case"AES-128-CBC":s=16,a=pe.aes.createDecryptionCipher;break;case"AES-192-CBC":s=24,a=pe.aes.createDecryptionCipher;break;case"AES-256-CBC":s=32,a=pe.aes.createDecryptionCipher;break;case"RC2-40-CBC":s=5,a=function(p){return pe.rc2.createDecryptionCipher(p,40)};break;case"RC2-64-CBC":s=8,a=function(p){return pe.rc2.createDecryptionCipher(p,64)};break;case"RC2-128-CBC":s=16,a=function(p){return pe.rc2.createDecryptionCipher(p,128)};break;default:var n=new Error('Could not decrypt private key; unsupported encryption algorithm "'+i.dekInfo.algorithm+'".');throw n.algorithm=i.dekInfo.algorithm,n}var o=pe.util.hexToBytes(i.dekInfo.parameters),c=pe.pbe.opensslDeriveBytes(t,o.substr(0,8),s),u=a(c);if(u.start(o),u.update(pe.util.createBuffer(i.body)),u.finish())r=u.output.getBytes();else return r}else r=i.body;return i.type==="ENCRYPTED PRIVATE KEY"?r=qe.decryptPrivateKeyInfo(L.fromDer(r),t):r=L.fromDer(r),r!==null&&(r=qe.privateKeyFromAsn1(r)),r};qe.pbe.generatePkcs12Key=function(e,t,r,i,n,s){var a,o;if(typeof s>"u"||s===null){if(!("sha1"in pe.md))throw new Error('"sha1" hash algorithm unavailable.');s=pe.md.sha1.create()}var c=s.digestLength,u=s.blockLength,l=new pe.util.ByteBuffer,p=new pe.util.ByteBuffer;if(e!=null){for(o=0;o<e.length;o++)p.putInt16(e.charCodeAt(o));p.putInt16(0)}var d=p.length(),h=t.length(),f=new pe.util.ByteBuffer;f.fillWithByte(r,u);var m=u*Math.ceil(h/u),y=new pe.util.ByteBuffer;for(o=0;o<m;o++)y.putByte(t.at(o%h));var _=u*Math.ceil(d/u),A=new pe.util.ByteBuffer;for(o=0;o<_;o++)A.putByte(p.at(o%d));var S=y;S.putBuffer(A);for(var B=Math.ceil(n/c),O=1;O<=B;O++){var N=new pe.util.ByteBuffer;N.putBytes(f.bytes()),N.putBytes(S.bytes());for(var Y=0;Y<i;Y++)s.start(),s.update(N.getBytes()),N=s.digest();var q=new pe.util.ByteBuffer;for(o=0;o<u;o++)q.putByte(N.at(o%c));var z=Math.ceil(h/u)+Math.ceil(d/u),oe=new pe.util.ByteBuffer;for(a=0;a<z;a++){var _e=new pe.util.ByteBuffer(S.getBytes(u)),be=511;for(o=q.length()-1;o>=0;o--)be=be>>8,be+=q.at(o)+_e.at(o),_e.setAt(o,be&255);oe.putBuffer(_e)}S=oe,l.putBuffer(N)}return l.truncate(l.length()-n),l};qe.pbe.getCipher=function(e,t,r){switch(e){case qe.oids.pkcs5PBES2:return qe.pbe.getCipherForPBES2(e,t,r);case qe.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case qe.oids["pbewithSHAAnd40BitRC2-CBC"]:return qe.pbe.getCipherForPKCS12PBE(e,t,r);default:var i=new Error("Cannot read encrypted PBE data block. Unsupported OID.");throw i.oid=e,i.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],i}};qe.pbe.getCipherForPBES2=function(e,t,r){var i={},n=[];if(!L.validate(t,JY,i,n)){var s=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw s.errors=n,s}if(e=L.derToOid(i.kdfOid),e!==qe.oids.pkcs5PBKDF2){var s=new Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw s.oid=e,s.supportedOids=["pkcs5PBKDF2"],s}if(e=L.derToOid(i.encOid),e!==qe.oids["aes128-CBC"]&&e!==qe.oids["aes192-CBC"]&&e!==qe.oids["aes256-CBC"]&&e!==qe.oids["des-EDE3-CBC"]&&e!==qe.oids.desCBC){var s=new Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw s.oid=e,s.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],s}var a=i.kdfSalt,o=pe.util.createBuffer(i.kdfIterationCount);o=o.getInt(o.length()<<3);var c,u;switch(qe.oids[e]){case"aes128-CBC":c=16,u=pe.aes.createDecryptionCipher;break;case"aes192-CBC":c=24,u=pe.aes.createDecryptionCipher;break;case"aes256-CBC":c=32,u=pe.aes.createDecryptionCipher;break;case"des-EDE3-CBC":c=24,u=pe.des.createDecryptionCipher;break;case"desCBC":c=8,u=pe.des.createDecryptionCipher;break}var l=yL(i.prfOid),p=pe.pkcs5.pbkdf2(r,a,o,c,l),d=i.encIv,h=u(p);return h.start(d),h};qe.pbe.getCipherForPKCS12PBE=function(e,t,r){var i={},n=[];if(!L.validate(t,XY,i,n)){var s=new Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw s.errors=n,s}var a=pe.util.createBuffer(i.salt),o=pe.util.createBuffer(i.iterations);o=o.getInt(o.length()<<3);var c,u,l;switch(e){case qe.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:c=24,u=8,l=pe.des.startDecrypting;break;case qe.oids["pbewithSHAAnd40BitRC2-CBC"]:c=5,u=8,l=function(m,y){var _=pe.rc2.createDecryptionCipher(m,40);return _.start(y,null),_};break;default:var s=new Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw s.oid=e,s}var p=yL(i.prfOid),d=qe.pbe.generatePkcs12Key(r,a,1,o,c,p);p.start();var h=qe.pbe.generatePkcs12Key(r,a,2,o,u,p);return l(d,h)};qe.pbe.opensslDeriveBytes=function(e,t,r,i){if(typeof i>"u"||i===null){if(!("md5"in pe.md))throw new Error('"md5" hash algorithm unavailable.');i=pe.md.md5.create()}t===null&&(t="");for(var n=[mL(i,e+t)],s=16,a=1;s<r;++a,s+=16)n.push(mL(i,n[a-1]+e+t));return n.join("").substr(0,r)};function mL(e,t){return e.start().update(t).digest().getBytes()}function yL(e){var t;if(!e)t="hmacWithSHA1";else if(t=qe.oids[L.derToOid(e)],!t){var r=new Error("Unsupported PRF OID.");throw r.oid=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}return gL(t)}function gL(e){var t=pe.md;switch(e){case"hmacWithSHA224":t=pe.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":e=e.substr(8).toLowerCase();break;default:var r=new Error("Unsupported PRF algorithm.");throw r.algorithm=e,r.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],r}if(!t||!(e in t))throw new Error("Unknown hash algorithm: "+e);return t[e].create()}function ZY(e,t,r,i){var n=L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OCTETSTRING,!1,e),L.create(L.Class.UNIVERSAL,L.Type.INTEGER,!1,t.getBytes())]);return i!=="hmacWithSHA1"&&n.value.push(L.create(L.Class.UNIVERSAL,L.Type.INTEGER,!1,pe.util.hexToBytes(r.toString(16))),L.create(L.Class.UNIVERSAL,L.Type.SEQUENCE,!0,[L.create(L.Class.UNIVERSAL,L.Type.OID,!1,L.oidToDer(qe.oids[i]).getBytes()),L.create(L.Class.UNIVERSAL,L.Type.NULL,!1,"")])),n}});var Uw=b((Rue,_L)=>{var kl=Ue();xn();nt();var ce=kl.asn1,Pl=_L.exports=kl.pkcs7asn1=kl.pkcs7asn1||{};kl.pkcs7=kl.pkcs7||{};kl.pkcs7.asn1=Pl;var xL={name:"ContentInfo",tagClass:ce.Class.UNIVERSAL,type:ce.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.ContentType",tagClass:ce.Class.UNIVERSAL,type:ce.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:ce.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,captureAsn1:"content"}]};Pl.contentInfoValidator=xL;var bL={name:"EncryptedContentInfo",tagClass:ce.Class.UNIVERSAL,type:ce.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentType",tagClass:ce.Class.UNIVERSAL,type:ce.Type.OID,constructed:!1,capture:"contentType"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm",tagClass:ce.Class.UNIVERSAL,type:ce.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedContentInfo.contentEncryptionAlgorithm.algorithm",tagClass:ce.Class.UNIVERSAL,type:ce.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"EncryptedContentInfo.contentEncryptionAlgorithm.parameter",tagClass:ce.Class.UNIVERSAL,captureAsn1:"encParameter"}]},{name:"EncryptedContentInfo.encryptedContent",tagClass:ce.Class.CONTEXT_SPECIFIC,type:0,capture:"encryptedContent",captureAsn1:"encryptedContentAsn1"}]};Pl.envelopedDataValidator={name:"EnvelopedData",tagClass:ce.Class.UNIVERSAL,type:ce.Type.SEQUENCE,constructed:!0,value:[{name:"EnvelopedData.Version",tagClass:ce.Class.UNIVERSAL,type:ce.Type.INTEGER,constructed:!1,capture:"version"},{name:"EnvelopedData.RecipientInfos",tagClass:ce.Class.UNIVERSAL,type:ce.Type.SET,constructed:!0,captureAsn1:"recipientInfos"}].concat(bL)};Pl.encryptedDataValidator={name:"EncryptedData",tagClass:ce.Class.UNIVERSAL,type:ce.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedData.Version",tagClass:ce.Class.UNIVERSAL,type:ce.Type.INTEGER,constructed:!1,capture:"version"}].concat(bL)};var eQ={name:"SignerInfo",tagClass:ce.Class.UNIVERSAL,type:ce.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.version",tagClass:ce.Class.UNIVERSAL,type:ce.Type.INTEGER,constructed:!1},{name:"SignerInfo.issuerAndSerialNumber",tagClass:ce.Class.UNIVERSAL,type:ce.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.issuerAndSerialNumber.issuer",tagClass:ce.Class.UNIVERSAL,type:ce.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"SignerInfo.issuerAndSerialNumber.serialNumber",tagClass:ce.Class.UNIVERSAL,type:ce.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"SignerInfo.digestAlgorithm",tagClass:ce.Class.UNIVERSAL,type:ce.Type.SEQUENCE,constructed:!0,value:[{name:"SignerInfo.digestAlgorithm.algorithm",tagClass:ce.Class.UNIVERSAL,type:ce.Type.OID,constructed:!1,capture:"digestAlgorithm"},{name:"SignerInfo.digestAlgorithm.parameter",tagClass:ce.Class.UNIVERSAL,constructed:!1,captureAsn1:"digestParameter",optional:!0}]},{name:"SignerInfo.authenticatedAttributes",tagClass:ce.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"authenticatedAttributes"},{name:"SignerInfo.digestEncryptionAlgorithm",tagClass:ce.Class.UNIVERSAL,type:ce.Type.SEQUENCE,constructed:!0,capture:"signatureAlgorithm"},{name:"SignerInfo.encryptedDigest",tagClass:ce.Class.UNIVERSAL,type:ce.Type.OCTETSTRING,constructed:!1,capture:"signature"},{name:"SignerInfo.unauthenticatedAttributes",tagClass:ce.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,capture:"unauthenticatedAttributes"}]};Pl.signedDataValidator={name:"SignedData",tagClass:ce.Class.UNIVERSAL,type:ce.Type.SEQUENCE,constructed:!0,value:[{name:"SignedData.Version",tagClass:ce.Class.UNIVERSAL,type:ce.Type.INTEGER,constructed:!1,capture:"version"},{name:"SignedData.DigestAlgorithms",tagClass:ce.Class.UNIVERSAL,type:ce.Type.SET,constructed:!0,captureAsn1:"digestAlgorithms"},xL,{name:"SignedData.Certificates",tagClass:ce.Class.CONTEXT_SPECIFIC,type:0,optional:!0,captureAsn1:"certificates"},{name:"SignedData.CertificateRevocationLists",tagClass:ce.Class.CONTEXT_SPECIFIC,type:1,optional:!0,captureAsn1:"crls"},{name:"SignedData.SignerInfos",tagClass:ce.Class.UNIVERSAL,type:ce.Type.SET,capture:"signerInfos",optional:!0,value:[eQ]}]};Pl.recipientInfoValidator={name:"RecipientInfo",tagClass:ce.Class.UNIVERSAL,type:ce.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.version",tagClass:ce.Class.UNIVERSAL,type:ce.Type.INTEGER,constructed:!1,capture:"version"},{name:"RecipientInfo.issuerAndSerial",tagClass:ce.Class.UNIVERSAL,type:ce.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.issuerAndSerial.issuer",tagClass:ce.Class.UNIVERSAL,type:ce.Type.SEQUENCE,constructed:!0,captureAsn1:"issuer"},{name:"RecipientInfo.issuerAndSerial.serialNumber",tagClass:ce.Class.UNIVERSAL,type:ce.Type.INTEGER,constructed:!1,capture:"serial"}]},{name:"RecipientInfo.keyEncryptionAlgorithm",tagClass:ce.Class.UNIVERSAL,type:ce.Type.SEQUENCE,constructed:!0,value:[{name:"RecipientInfo.keyEncryptionAlgorithm.algorithm",tagClass:ce.Class.UNIVERSAL,type:ce.Type.OID,constructed:!1,capture:"encAlgorithm"},{name:"RecipientInfo.keyEncryptionAlgorithm.parameter",tagClass:ce.Class.UNIVERSAL,constructed:!1,captureAsn1:"encParameter",optional:!0}]},{name:"RecipientInfo.encryptedKey",tagClass:ce.Class.UNIVERSAL,type:ce.Type.OCTETSTRING,constructed:!1,capture:"encKey"}]}});var Fw=b((Oue,AL)=>{var ac=Ue();nt();ac.mgf=ac.mgf||{};var tQ=AL.exports=ac.mgf.mgf1=ac.mgf1=ac.mgf1||{};tQ.create=function(e){var t={generate:function(r,i){for(var n=new ac.util.ByteBuffer,s=Math.ceil(i/e.digestLength),a=0;a<s;a++){var o=new ac.util.ByteBuffer;o.putInt32(a),e.start(),e.update(r+o.getBytes()),n.putBuffer(e.digest())}return n.truncate(n.length()-i),n.getBytes()}};return t}});var wL=b((Lue,SL)=>{var av=Ue();Fw();SL.exports=av.mgf=av.mgf||{};av.mgf.mgf1=av.mgf1});var ov=b((Due,CL)=>{var oc=Ue();Ki();nt();var rQ=CL.exports=oc.pss=oc.pss||{};rQ.create=function(e){arguments.length===3&&(e={md:arguments[0],mgf:arguments[1],saltLength:arguments[2]});var t=e.md,r=e.mgf,i=t.digestLength,n=e.salt||null;typeof n=="string"&&(n=oc.util.createBuffer(n));var s;if("saltLength"in e)s=e.saltLength;else if(n!==null)s=n.length();else throw new Error("Salt length not specified or specific salt not given.");if(n!==null&&n.length()!==s)throw new Error("Given salt length does not match length of given salt.");var a=e.prng||oc.random,o={};return o.encode=function(c,u){var l,p=u-1,d=Math.ceil(p/8),h=c.digest().getBytes();if(d<i+s+2)throw new Error("Message is too long to encrypt.");var f;n===null?f=a.getBytesSync(s):f=n.bytes();var m=new oc.util.ByteBuffer;m.fillWithByte(0,8),m.putBytes(h),m.putBytes(f),t.start(),t.update(m.getBytes());var y=t.digest().getBytes(),_=new oc.util.ByteBuffer;_.fillWithByte(0,d-s-i-2),_.putByte(1),_.putBytes(f);var A=_.getBytes(),S=d-i-1,B=r.generate(y,S),O="";for(l=0;l<S;l++)O+=String.fromCharCode(A.charCodeAt(l)^B.charCodeAt(l));var N=65280>>8*d-p&255;return O=String.fromCharCode(O.charCodeAt(0)&~N)+O.substr(1),O+y+"\xBC"},o.verify=function(c,u,l){var p,d=l-1,h=Math.ceil(d/8);if(u=u.substr(-h),h<i+s+2)throw new Error("Inconsistent parameters to PSS signature verification.");if(u.charCodeAt(h-1)!==188)throw new Error("Encoded message does not end in 0xBC.");var f=h-i-1,m=u.substr(0,f),y=u.substr(f,i),_=65280>>8*h-d&255;if((m.charCodeAt(0)&_)!==0)throw new Error("Bits beyond keysize not zero as expected.");var A=r.generate(y,f),S="";for(p=0;p<f;p++)S+=String.fromCharCode(m.charCodeAt(p)^A.charCodeAt(p));S=String.fromCharCode(S.charCodeAt(0)&~_)+S.substr(1);var B=h-i-s-2;for(p=0;p<B;p++)if(S.charCodeAt(p)!==0)throw new Error("Leftmost octets not zero as expected");if(S.charCodeAt(B)!==1)throw new Error("Inconsistent PSS signature, 0x01 marker not found");var O=S.substr(-s),N=new oc.util.ByteBuffer;N.fillWithByte(0,8),N.putBytes(c),N.putBytes(O),t.start(),t.update(N.getBytes());var Y=t.digest().getBytes();return y===Y},o}});var lv=b((que,kL)=>{var Ce=Ue();ya();xn();yh();Gn();wL();ga();rc();ov();xh();nt();var g=Ce.asn1,ee=kL.exports=Ce.pki=Ce.pki||{},rt=ee.oids,Gt={};Gt.CN=rt.commonName;Gt.commonName="CN";Gt.C=rt.countryName;Gt.countryName="C";Gt.L=rt.localityName;Gt.localityName="L";Gt.ST=rt.stateOrProvinceName;Gt.stateOrProvinceName="ST";Gt.O=rt.organizationName;Gt.organizationName="O";Gt.OU=rt.organizationalUnitName;Gt.organizationalUnitName="OU";Gt.E=rt.emailAddress;Gt.emailAddress="E";var TL=Ce.pki.rsa.publicKeyValidator,iQ={name:"Certificate",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"tbsCertificate",value:[{name:"Certificate.TBSCertificate.version",tagClass:g.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.version.integer",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"certVersion"}]},{name:"Certificate.TBSCertificate.serialNumber",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"certSerialNumber"},{name:"Certificate.TBSCertificate.signature",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.signature.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"certinfoSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:g.Class.UNIVERSAL,optional:!0,captureAsn1:"certinfoSignatureParams"}]},{name:"Certificate.TBSCertificate.issuer",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"certIssuer"},{name:"Certificate.TBSCertificate.validity",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.TBSCertificate.validity.notBefore (utc)",tagClass:g.Class.UNIVERSAL,type:g.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity1UTCTime"},{name:"Certificate.TBSCertificate.validity.notBefore (generalized)",tagClass:g.Class.UNIVERSAL,type:g.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity2GeneralizedTime"},{name:"Certificate.TBSCertificate.validity.notAfter (utc)",tagClass:g.Class.UNIVERSAL,type:g.Type.UTCTIME,constructed:!1,optional:!0,capture:"certValidity3UTCTime"},{name:"Certificate.TBSCertificate.validity.notAfter (generalized)",tagClass:g.Class.UNIVERSAL,type:g.Type.GENERALIZEDTIME,constructed:!1,optional:!0,capture:"certValidity4GeneralizedTime"}]},{name:"Certificate.TBSCertificate.subject",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"certSubject"},TL,{name:"Certificate.TBSCertificate.issuerUniqueID",tagClass:g.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.issuerUniqueID.id",tagClass:g.Class.UNIVERSAL,type:g.Type.BITSTRING,constructed:!1,captureBitStringValue:"certIssuerUniqueId"}]},{name:"Certificate.TBSCertificate.subjectUniqueID",tagClass:g.Class.CONTEXT_SPECIFIC,type:2,constructed:!0,optional:!0,value:[{name:"Certificate.TBSCertificate.subjectUniqueID.id",tagClass:g.Class.UNIVERSAL,type:g.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSubjectUniqueId"}]},{name:"Certificate.TBSCertificate.extensions",tagClass:g.Class.CONTEXT_SPECIFIC,type:3,constructed:!0,captureAsn1:"certExtensions",optional:!0}]},{name:"Certificate.signatureAlgorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"Certificate.signatureAlgorithm.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"certSignatureOid"},{name:"Certificate.TBSCertificate.signature.parameters",tagClass:g.Class.UNIVERSAL,optional:!0,captureAsn1:"certSignatureParams"}]},{name:"Certificate.signatureValue",tagClass:g.Class.UNIVERSAL,type:g.Type.BITSTRING,constructed:!1,captureBitStringValue:"certSignature"}]},nQ={name:"rsapss",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.hashAlgorithm",tagClass:g.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier",tagClass:g.Class.UNIVERSAL,type:g.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.hashAlgorithm.AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"hashOid"}]}]},{name:"rsapss.maskGenAlgorithm",tagClass:g.Class.CONTEXT_SPECIFIC,type:1,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier",tagClass:g.Class.UNIVERSAL,type:g.Class.SEQUENCE,constructed:!0,optional:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"maskGenOid"},{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"rsapss.maskGenAlgorithm.AlgorithmIdentifier.params.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"maskGenHashOid"}]}]}]},{name:"rsapss.saltLength",tagClass:g.Class.CONTEXT_SPECIFIC,type:2,optional:!0,value:[{name:"rsapss.saltLength.saltLength",tagClass:g.Class.UNIVERSAL,type:g.Class.INTEGER,constructed:!1,capture:"saltLength"}]},{name:"rsapss.trailerField",tagClass:g.Class.CONTEXT_SPECIFIC,type:3,optional:!0,value:[{name:"rsapss.trailer.trailer",tagClass:g.Class.UNIVERSAL,type:g.Class.INTEGER,constructed:!1,capture:"trailer"}]}]},sQ={name:"CertificationRequestInfo",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfo",value:[{name:"CertificationRequestInfo.integer",tagClass:g.Class.UNIVERSAL,type:g.Type.INTEGER,constructed:!1,capture:"certificationRequestInfoVersion"},{name:"CertificationRequestInfo.subject",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"certificationRequestInfoSubject"},TL,{name:"CertificationRequestInfo.attributes",tagClass:g.Class.CONTEXT_SPECIFIC,type:0,constructed:!0,optional:!0,capture:"certificationRequestInfoAttributes",value:[{name:"CertificationRequestInfo.attributes",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequestInfo.attributes.type",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1},{name:"CertificationRequestInfo.attributes.value",tagClass:g.Class.UNIVERSAL,type:g.Type.SET,constructed:!0}]}]}]},aQ={name:"CertificationRequest",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,captureAsn1:"csr",value:[sQ,{name:"CertificationRequest.signatureAlgorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.SEQUENCE,constructed:!0,value:[{name:"CertificationRequest.signatureAlgorithm.algorithm",tagClass:g.Class.UNIVERSAL,type:g.Type.OID,constructed:!1,capture:"csrSignatureOid"},{name:"CertificationRequest.signatureAlgorithm.parameters",tagClass:g.Class.UNIVERSAL,optional:!0,captureAsn1:"csrSignatureParams"}]},{name:"CertificationRequest.signature",tagClass:g.Class.UNIVERSAL,type:g.Type.BITSTRING,constructed:!1,captureBitStringValue:"csrSignature"}]};ee.RDNAttributesAsArray=function(e,t){for(var r=[],i,n,s,a=0;a<e.value.length;++a){i=e.value[a];for(var o=0;o<i.value.length;++o)s={},n=i.value[o],s.type=g.derToOid(n.value[0].value),s.value=n.value[1].value,s.valueTagClass=n.value[1].type,s.type in rt&&(s.name=rt[s.type],s.name in Gt&&(s.shortName=Gt[s.name])),t&&(t.update(s.type),t.update(s.value)),r.push(s)}return r};ee.CRIAttributesAsArray=function(e){for(var t=[],r=0;r<e.length;++r)for(var i=e[r],n=g.derToOid(i.value[0].value),s=i.value[1].value,a=0;a<s.length;++a){var o={};if(o.type=n,o.value=s[a].value,o.valueTagClass=s[a].type,o.type in rt&&(o.name=rt[o.type],o.name in Gt&&(o.shortName=Gt[o.name])),o.type===rt.extensionRequest){o.extensions=[];for(var c=0;c<o.value.length;++c)o.extensions.push(ee.certificateExtensionFromAsn1(o.value[c]))}t.push(o)}return t};function ba(e,t){typeof t=="string"&&(t={shortName:t});for(var r=null,i,n=0;r===null&&n<e.attributes.length;++n)i=e.attributes[n],(t.type&&t.type===i.type||t.name&&t.name===i.name||t.shortName&&t.shortName===i.shortName)&&(r=i);return r}var cv=function(e,t,r){var i={};if(e!==rt["RSASSA-PSS"])return i;r&&(i={hash:{algorithmOid:rt.sha1},mgf:{algorithmOid:rt.mgf1,hash:{algorithmOid:rt.sha1}},saltLength:20});var n={},s=[];if(!g.validate(t,nQ,n,s)){var a=new Error("Cannot read RSASSA-PSS parameter block.");throw a.errors=s,a}return n.hashOid!==void 0&&(i.hash=i.hash||{},i.hash.algorithmOid=g.derToOid(n.hashOid)),n.maskGenOid!==void 0&&(i.mgf=i.mgf||{},i.mgf.algorithmOid=g.derToOid(n.maskGenOid),i.mgf.hash=i.mgf.hash||{},i.mgf.hash.algorithmOid=g.derToOid(n.maskGenHashOid)),n.saltLength!==void 0&&(i.saltLength=n.saltLength.charCodeAt(0)),i},uv=function(e){switch(rt[e.signatureOid]){case"sha1WithRSAEncryption":case"sha1WithRSASignature":return Ce.md.sha1.create();case"md5WithRSAEncryption":return Ce.md.md5.create();case"sha256WithRSAEncryption":return Ce.md.sha256.create();case"sha384WithRSAEncryption":return Ce.md.sha384.create();case"sha512WithRSAEncryption":return Ce.md.sha512.create();case"RSASSA-PSS":return Ce.md.sha256.create();default:var t=new Error("Could not compute "+e.type+" digest. Unknown signature OID.");throw t.signatureOid=e.signatureOid,t}},IL=function(e){var t=e.certificate,r;switch(t.signatureOid){case rt.sha1WithRSAEncryption:case rt.sha1WithRSASignature:break;case rt["RSASSA-PSS"]:var i,n;if(i=rt[t.signatureParameters.mgf.hash.algorithmOid],i===void 0||Ce.md[i]===void 0){var s=new Error("Unsupported MGF hash function.");throw s.oid=t.signatureParameters.mgf.hash.algorithmOid,s.name=i,s}if(n=rt[t.signatureParameters.mgf.algorithmOid],n===void 0||Ce.mgf[n]===void 0){var s=new Error("Unsupported MGF function.");throw s.oid=t.signatureParameters.mgf.algorithmOid,s.name=n,s}if(n=Ce.mgf[n].create(Ce.md[i].create()),i=rt[t.signatureParameters.hash.algorithmOid],i===void 0||Ce.md[i]===void 0){var s=new Error("Unsupported RSASSA-PSS hash function.");throw s.oid=t.signatureParameters.hash.algorithmOid,s.name=i,s}r=Ce.pss.create(Ce.md[i].create(),n,t.signatureParameters.saltLength);break}return t.publicKey.verify(e.md.digest().getBytes(),e.signature,r)};ee.certificateFromPem=function(e,t,r){var i=Ce.pem.decode(e)[0];if(i.type!=="CERTIFICATE"&&i.type!=="X509 CERTIFICATE"&&i.type!=="TRUSTED CERTIFICATE"){var n=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw n.headerType=i.type,n}if(i.procType&&i.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var s=g.fromDer(i.body,r);return ee.certificateFromAsn1(s,t)};ee.certificateToPem=function(e,t){var r={type:"CERTIFICATE",body:g.toDer(ee.certificateToAsn1(e)).getBytes()};return Ce.pem.encode(r,{maxline:t})};ee.publicKeyFromPem=function(e){var t=Ce.pem.decode(e)[0];if(t.type!=="PUBLIC KEY"&&t.type!=="RSA PUBLIC KEY"){var r=new Error('Could not convert public key from PEM; PEM header type is not "PUBLIC KEY" or "RSA PUBLIC KEY".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert public key from PEM; PEM is encrypted.");var i=g.fromDer(t.body);return ee.publicKeyFromAsn1(i)};ee.publicKeyToPem=function(e,t){var r={type:"PUBLIC KEY",body:g.toDer(ee.publicKeyToAsn1(e)).getBytes()};return Ce.pem.encode(r,{maxline:t})};ee.publicKeyToRSAPublicKeyPem=function(e,t){var r={type:"RSA PUBLIC KEY",body:g.toDer(ee.publicKeyToRSAPublicKey(e)).getBytes()};return Ce.pem.encode(r,{maxline:t})};ee.getPublicKeyFingerprint=function(e,t){t=t||{};var r=t.md||Ce.md.sha1.create(),i=t.type||"RSAPublicKey",n;switch(i){case"RSAPublicKey":n=g.toDer(ee.publicKeyToRSAPublicKey(e)).getBytes();break;case"SubjectPublicKeyInfo":n=g.toDer(ee.publicKeyToAsn1(e)).getBytes();break;default:throw new Error('Unknown fingerprint type "'+t.type+'".')}r.start(),r.update(n);var s=r.digest();if(t.encoding==="hex"){var a=s.toHex();return t.delimiter?a.match(/.{2}/g).join(t.delimiter):a}else{if(t.encoding==="binary")return s.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return s};ee.certificationRequestFromPem=function(e,t,r){var i=Ce.pem.decode(e)[0];if(i.type!=="CERTIFICATE REQUEST"){var n=new Error('Could not convert certification request from PEM; PEM header type is not "CERTIFICATE REQUEST".');throw n.headerType=i.type,n}if(i.procType&&i.procType.type==="ENCRYPTED")throw new Error("Could not convert certification request from PEM; PEM is encrypted.");var s=g.fromDer(i.body,r);return ee.certificationRequestFromAsn1(s,t)};ee.certificationRequestToPem=function(e,t){var r={type:"CERTIFICATE REQUEST",body:g.toDer(ee.certificationRequestToAsn1(e)).getBytes()};return Ce.pem.encode(r,{maxline:t})};ee.createCertificate=function(){var e={};return e.version=2,e.serialNumber="00",e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.validity={},e.validity.notBefore=new Date,e.validity.notAfter=new Date,e.issuer={},e.issuer.getField=function(t){return ba(e.issuer,t)},e.issuer.addField=function(t){zi([t]),e.issuer.attributes.push(t)},e.issuer.attributes=[],e.issuer.hash=null,e.subject={},e.subject.getField=function(t){return ba(e.subject,t)},e.subject.addField=function(t){zi([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.extensions=[],e.publicKey=null,e.md=null,e.setSubject=function(t,r){zi(t),e.subject.attributes=t,delete e.subject.uniqueId,r&&(e.subject.uniqueId=r),e.subject.hash=null},e.setIssuer=function(t,r){zi(t),e.issuer.attributes=t,delete e.issuer.uniqueId,r&&(e.issuer.uniqueId=r),e.issuer.hash=null},e.setExtensions=function(t){for(var r=0;r<t.length;++r)BL(t[r],{cert:e});e.extensions=t},e.getExtension=function(t){typeof t=="string"&&(t={name:t});for(var r=null,i,n=0;r===null&&n<e.extensions.length;++n)i=e.extensions[n],(t.id&&i.id===t.id||t.name&&i.name===t.name)&&(r=i);return r},e.sign=function(t,r){e.md=r||Ce.md.sha1.create();var i=rt[e.md.algorithm+"WithRSAEncryption"];if(!i){var n=new Error("Could not compute certificate digest. Unknown message digest algorithm OID.");throw n.algorithm=e.md.algorithm,n}e.signatureOid=e.siginfo.algorithmOid=i,e.tbsCertificate=ee.getTBSCertificate(e);var s=g.toDer(e.tbsCertificate);e.md.update(s.getBytes()),e.signature=t.sign(e.md)},e.verify=function(t){var r=!1;if(!e.issued(t)){var i=t.issuer,n=e.subject,s=new Error("The parent certificate did not issue the given child certificate; the child certificate's issuer does not match the parent's subject.");throw s.expectedIssuer=n.attributes,s.actualIssuer=i.attributes,s}var a=t.md;if(a===null){a=uv({signatureOid:t.signatureOid,type:"certificate"});var o=t.tbsCertificate||ee.getTBSCertificate(t),c=g.toDer(o);a.update(c.getBytes())}return a!==null&&(r=IL({certificate:e,md:a,signature:t.signature})),r},e.isIssuer=function(t){var r=!1,i=e.issuer,n=t.subject;if(i.hash&&n.hash)r=i.hash===n.hash;else if(i.attributes.length===n.attributes.length){r=!0;for(var s,a,o=0;r&&o<i.attributes.length;++o)s=i.attributes[o],a=n.attributes[o],(s.type!==a.type||s.value!==a.value)&&(r=!1)}return r},e.issued=function(t){return t.isIssuer(e)},e.generateSubjectKeyIdentifier=function(){return ee.getPublicKeyFingerprint(e.publicKey,{type:"RSAPublicKey"})},e.verifySubjectKeyIdentifier=function(){for(var t=rt.subjectKeyIdentifier,r=0;r<e.extensions.length;++r){var i=e.extensions[r];if(i.id===t){var n=e.generateSubjectKeyIdentifier().getBytes();return Ce.util.hexToBytes(i.subjectKeyIdentifier)===n}}return!1},e};ee.certificateFromAsn1=function(e,t){var r={},i=[];if(!g.validate(e,iQ,r,i)){var n=new Error("Cannot read X.509 certificate. ASN.1 object is not an X509v3 Certificate.");throw n.errors=i,n}var s=g.derToOid(r.publicKeyOid);if(s!==ee.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var a=ee.createCertificate();a.version=r.certVersion?r.certVersion.charCodeAt(0):0;var o=Ce.util.createBuffer(r.certSerialNumber);a.serialNumber=o.toHex(),a.signatureOid=Ce.asn1.derToOid(r.certSignatureOid),a.signatureParameters=cv(a.signatureOid,r.certSignatureParams,!0),a.siginfo.algorithmOid=Ce.asn1.derToOid(r.certinfoSignatureOid),a.siginfo.parameters=cv(a.siginfo.algorithmOid,r.certinfoSignatureParams,!1),a.signature=r.certSignature;var c=[];if(r.certValidity1UTCTime!==void 0&&c.push(g.utcTimeToDate(r.certValidity1UTCTime)),r.certValidity2GeneralizedTime!==void 0&&c.push(g.generalizedTimeToDate(r.certValidity2GeneralizedTime)),r.certValidity3UTCTime!==void 0&&c.push(g.utcTimeToDate(r.certValidity3UTCTime)),r.certValidity4GeneralizedTime!==void 0&&c.push(g.generalizedTimeToDate(r.certValidity4GeneralizedTime)),c.length>2)throw new Error("Cannot read notBefore/notAfter validity times; more than two times were provided in the certificate.");if(c.length<2)throw new Error("Cannot read notBefore/notAfter validity times; they were not provided as either UTCTime or GeneralizedTime.");if(a.validity.notBefore=c[0],a.validity.notAfter=c[1],a.tbsCertificate=r.tbsCertificate,t){a.md=uv({signatureOid:a.signatureOid,type:"certificate"});var u=g.toDer(a.tbsCertificate);a.md.update(u.getBytes())}var l=Ce.md.sha1.create(),p=g.toDer(r.certIssuer);l.update(p.getBytes()),a.issuer.getField=function(f){return ba(a.issuer,f)},a.issuer.addField=function(f){zi([f]),a.issuer.attributes.push(f)},a.issuer.attributes=ee.RDNAttributesAsArray(r.certIssuer),r.certIssuerUniqueId&&(a.issuer.uniqueId=r.certIssuerUniqueId),a.issuer.hash=l.digest().toHex();var d=Ce.md.sha1.create(),h=g.toDer(r.certSubject);return d.update(h.getBytes()),a.subject.getField=function(f){return ba(a.subject,f)},a.subject.addField=function(f){zi([f]),a.subject.attributes.push(f)},a.subject.attributes=ee.RDNAttributesAsArray(r.certSubject),r.certSubjectUniqueId&&(a.subject.uniqueId=r.certSubjectUniqueId),a.subject.hash=d.digest().toHex(),r.certExtensions?a.extensions=ee.certificateExtensionsFromAsn1(r.certExtensions):a.extensions=[],a.publicKey=ee.publicKeyFromAsn1(r.subjectPublicKeyInfo),a};ee.certificateExtensionsFromAsn1=function(e){for(var t=[],r=0;r<e.value.length;++r)for(var i=e.value[r],n=0;n<i.value.length;++n)t.push(ee.certificateExtensionFromAsn1(i.value[n]));return t};ee.certificateExtensionFromAsn1=function(e){var t={};if(t.id=g.derToOid(e.value[0].value),t.critical=!1,e.value[1].type===g.Type.BOOLEAN?(t.critical=e.value[1].value.charCodeAt(0)!==0,t.value=e.value[2].value):t.value=e.value[1].value,t.id in rt){if(t.name=rt[t.id],t.name==="keyUsage"){var r=g.fromDer(t.value),i=0,n=0;r.value.length>1&&(i=r.value.charCodeAt(1),n=r.value.length>2?r.value.charCodeAt(2):0),t.digitalSignature=(i&128)===128,t.nonRepudiation=(i&64)===64,t.keyEncipherment=(i&32)===32,t.dataEncipherment=(i&16)===16,t.keyAgreement=(i&8)===8,t.keyCertSign=(i&4)===4,t.cRLSign=(i&2)===2,t.encipherOnly=(i&1)===1,t.decipherOnly=(n&128)===128}else if(t.name==="basicConstraints"){var r=g.fromDer(t.value);r.value.length>0&&r.value[0].type===g.Type.BOOLEAN?t.cA=r.value[0].value.charCodeAt(0)!==0:t.cA=!1;var s=null;r.value.length>0&&r.value[0].type===g.Type.INTEGER?s=r.value[0].value:r.value.length>1&&(s=r.value[1].value),s!==null&&(t.pathLenConstraint=g.derToInteger(s))}else if(t.name==="extKeyUsage")for(var r=g.fromDer(t.value),a=0;a<r.value.length;++a){var o=g.derToOid(r.value[a].value);o in rt?t[rt[o]]=!0:t[o]=!0}else if(t.name==="nsCertType"){var r=g.fromDer(t.value),i=0;r.value.length>1&&(i=r.value.charCodeAt(1)),t.client=(i&128)===128,t.server=(i&64)===64,t.email=(i&32)===32,t.objsign=(i&16)===16,t.reserved=(i&8)===8,t.sslCA=(i&4)===4,t.emailCA=(i&2)===2,t.objCA=(i&1)===1}else if(t.name==="subjectAltName"||t.name==="issuerAltName"){t.altNames=[];for(var c,r=g.fromDer(t.value),u=0;u<r.value.length;++u){c=r.value[u];var l={type:c.type,value:c.value};switch(t.altNames.push(l),c.type){case 1:case 2:case 6:break;case 7:l.ip=Ce.util.bytesToIP(c.value);break;case 8:l.oid=g.derToOid(c.value);break;default:}}}else if(t.name==="subjectKeyIdentifier"){var r=g.fromDer(t.value);t.subjectKeyIdentifier=Ce.util.bytesToHex(r.value)}}return t};ee.certificationRequestFromAsn1=function(e,t){var r={},i=[];if(!g.validate(e,aQ,r,i)){var n=new Error("Cannot read PKCS#10 certificate request. ASN.1 object is not a PKCS#10 CertificationRequest.");throw n.errors=i,n}var s=g.derToOid(r.publicKeyOid);if(s!==ee.oids.rsaEncryption)throw new Error("Cannot read public key. OID is not RSA.");var a=ee.createCertificationRequest();if(a.version=r.csrVersion?r.csrVersion.charCodeAt(0):0,a.signatureOid=Ce.asn1.derToOid(r.csrSignatureOid),a.signatureParameters=cv(a.signatureOid,r.csrSignatureParams,!0),a.siginfo.algorithmOid=Ce.asn1.derToOid(r.csrSignatureOid),a.siginfo.parameters=cv(a.siginfo.algorithmOid,r.csrSignatureParams,!1),a.signature=r.csrSignature,a.certificationRequestInfo=r.certificationRequestInfo,t){a.md=uv({signatureOid:a.signatureOid,type:"certification request"});var o=g.toDer(a.certificationRequestInfo);a.md.update(o.getBytes())}var c=Ce.md.sha1.create();return a.subject.getField=function(u){return ba(a.subject,u)},a.subject.addField=function(u){zi([u]),a.subject.attributes.push(u)},a.subject.attributes=ee.RDNAttributesAsArray(r.certificationRequestInfoSubject,c),a.subject.hash=c.digest().toHex(),a.publicKey=ee.publicKeyFromAsn1(r.subjectPublicKeyInfo),a.getAttribute=function(u){return ba(a,u)},a.addAttribute=function(u){zi([u]),a.attributes.push(u)},a.attributes=ee.CRIAttributesAsArray(r.certificationRequestInfoAttributes||[]),a};ee.createCertificationRequest=function(){var e={};return e.version=0,e.signatureOid=null,e.signature=null,e.siginfo={},e.siginfo.algorithmOid=null,e.subject={},e.subject.getField=function(t){return ba(e.subject,t)},e.subject.addField=function(t){zi([t]),e.subject.attributes.push(t)},e.subject.attributes=[],e.subject.hash=null,e.publicKey=null,e.attributes=[],e.getAttribute=function(t){return ba(e,t)},e.addAttribute=function(t){zi([t]),e.attributes.push(t)},e.md=null,e.setSubject=function(t){zi(t),e.subject.attributes=t,e.subject.hash=null},e.setAttributes=function(t){zi(t),e.attributes=t},e.sign=function(t,r){e.md=r||Ce.md.sha1.create();var i=rt[e.md.algorithm+"WithRSAEncryption"];if(!i){var n=new Error("Could not compute certification request digest. Unknown message digest algorithm OID.");throw n.algorithm=e.md.algorithm,n}e.signatureOid=e.siginfo.algorithmOid=i,e.certificationRequestInfo=ee.getCertificationRequestInfo(e);var s=g.toDer(e.certificationRequestInfo);e.md.update(s.getBytes()),e.signature=t.sign(e.md)},e.verify=function(){var t=!1,r=e.md;if(r===null){r=uv({signatureOid:e.signatureOid,type:"certification request"});var i=e.certificationRequestInfo||ee.getCertificationRequestInfo(e),n=g.toDer(i);r.update(n.getBytes())}return r!==null&&(t=IL({certificate:e,md:r,signature:e.signature})),t},e};function Nl(e){for(var t=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]),r,i,n=e.attributes,s=0;s<n.length;++s){r=n[s];var a=r.value,o=g.Type.PRINTABLESTRING;"valueTagClass"in r&&(o=r.valueTagClass,o===g.Type.UTF8&&(a=Ce.util.encodeUtf8(a))),i=g.create(g.Class.UNIVERSAL,g.Type.SET,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(r.type).getBytes()),g.create(g.Class.UNIVERSAL,o,!1,a)])]),t.value.push(i)}return t}function zi(e){for(var t,r=0;r<e.length;++r){if(t=e[r],typeof t.name>"u"&&(t.type&&t.type in ee.oids?t.name=ee.oids[t.type]:t.shortName&&t.shortName in Gt&&(t.name=ee.oids[Gt[t.shortName]])),typeof t.type>"u")if(t.name&&t.name in ee.oids)t.type=ee.oids[t.name];else{var i=new Error("Attribute type not specified.");throw i.attribute=t,i}if(typeof t.shortName>"u"&&t.name&&t.name in Gt&&(t.shortName=Gt[t.name]),t.type===rt.extensionRequest&&(t.valueConstructed=!0,t.valueTagClass=g.Type.SEQUENCE,!t.value&&t.extensions)){t.value=[];for(var n=0;n<t.extensions.length;++n)t.value.push(ee.certificateExtensionToAsn1(BL(t.extensions[n])))}if(typeof t.value>"u"){var i=new Error("Attribute value not specified.");throw i.attribute=t,i}}}function BL(e,t){if(t=t||{},typeof e.name>"u"&&e.id&&e.id in ee.oids&&(e.name=ee.oids[e.id]),typeof e.id>"u")if(e.name&&e.name in ee.oids)e.id=ee.oids[e.name];else{var r=new Error("Extension ID not specified.");throw r.extension=e,r}if(typeof e.value<"u")return e;if(e.name==="keyUsage"){var i=0,n=0,s=0;e.digitalSignature&&(n|=128,i=7),e.nonRepudiation&&(n|=64,i=6),e.keyEncipherment&&(n|=32,i=5),e.dataEncipherment&&(n|=16,i=4),e.keyAgreement&&(n|=8,i=3),e.keyCertSign&&(n|=4,i=2),e.cRLSign&&(n|=2,i=1),e.encipherOnly&&(n|=1,i=0),e.decipherOnly&&(s|=128,i=7);var a=String.fromCharCode(i);s!==0?a+=String.fromCharCode(n)+String.fromCharCode(s):n!==0&&(a+=String.fromCharCode(n)),e.value=g.create(g.Class.UNIVERSAL,g.Type.BITSTRING,!1,a)}else if(e.name==="basicConstraints")e.value=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]),e.cA&&e.value.value.push(g.create(g.Class.UNIVERSAL,g.Type.BOOLEAN,!1,"\xFF")),"pathLenConstraint"in e&&e.value.value.push(g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,g.integerToDer(e.pathLenConstraint).getBytes()));else if(e.name==="extKeyUsage"){e.value=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]);var o=e.value.value;for(var c in e)e[c]===!0&&(c in rt?o.push(g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(rt[c]).getBytes())):c.indexOf(".")!==-1&&o.push(g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(c).getBytes())))}else if(e.name==="nsCertType"){var i=0,n=0;e.client&&(n|=128,i=7),e.server&&(n|=64,i=6),e.email&&(n|=32,i=5),e.objsign&&(n|=16,i=4),e.reserved&&(n|=8,i=3),e.sslCA&&(n|=4,i=2),e.emailCA&&(n|=2,i=1),e.objCA&&(n|=1,i=0);var a=String.fromCharCode(i);n!==0&&(a+=String.fromCharCode(n)),e.value=g.create(g.Class.UNIVERSAL,g.Type.BITSTRING,!1,a)}else if(e.name==="subjectAltName"||e.name==="issuerAltName"){e.value=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]);for(var u,l=0;l<e.altNames.length;++l){u=e.altNames[l];var a=u.value;if(u.type===7&&u.ip){if(a=Ce.util.bytesFromIP(u.ip),a===null){var r=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw r.extension=e,r}}else u.type===8&&(u.oid?a=g.oidToDer(g.oidToDer(u.oid)):a=g.oidToDer(a));e.value.value.push(g.create(g.Class.CONTEXT_SPECIFIC,u.type,!1,a))}}else if(e.name==="nsComment"&&t.cert){if(!/^[\x00-\x7F]*$/.test(e.comment)||e.comment.length<1||e.comment.length>128)throw new Error('Invalid "nsComment" content.');e.value=g.create(g.Class.UNIVERSAL,g.Type.IA5STRING,!1,e.comment)}else if(e.name==="subjectKeyIdentifier"&&t.cert){var p=t.cert.generateSubjectKeyIdentifier();e.subjectKeyIdentifier=p.toHex(),e.value=g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,p.getBytes())}else if(e.name==="authorityKeyIdentifier"&&t.cert){e.value=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]);var o=e.value.value;if(e.keyIdentifier){var d=e.keyIdentifier===!0?t.cert.generateSubjectKeyIdentifier().getBytes():e.keyIdentifier;o.push(g.create(g.Class.CONTEXT_SPECIFIC,0,!1,d))}if(e.authorityCertIssuer){var h=[g.create(g.Class.CONTEXT_SPECIFIC,4,!0,[Nl(e.authorityCertIssuer===!0?t.cert.issuer:e.authorityCertIssuer)])];o.push(g.create(g.Class.CONTEXT_SPECIFIC,1,!0,h))}if(e.serialNumber){var f=Ce.util.hexToBytes(e.serialNumber===!0?t.cert.serialNumber:e.serialNumber);o.push(g.create(g.Class.CONTEXT_SPECIFIC,2,!1,f))}}else if(e.name==="cRLDistributionPoints"){e.value=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]);for(var o=e.value.value,m=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]),y=g.create(g.Class.CONTEXT_SPECIFIC,0,!0,[]),u,l=0;l<e.altNames.length;++l){u=e.altNames[l];var a=u.value;if(u.type===7&&u.ip){if(a=Ce.util.bytesFromIP(u.ip),a===null){var r=new Error('Extension "ip" value is not a valid IPv4 or IPv6 address.');throw r.extension=e,r}}else u.type===8&&(u.oid?a=g.oidToDer(g.oidToDer(u.oid)):a=g.oidToDer(a));y.value.push(g.create(g.Class.CONTEXT_SPECIFIC,u.type,!1,a))}m.value.push(g.create(g.Class.CONTEXT_SPECIFIC,0,!0,[y])),o.push(m)}if(typeof e.value>"u"){var r=new Error("Extension value not specified.");throw r.extension=e,r}return e}function Mw(e,t){if(e===rt["RSASSA-PSS"]){var r=[];return t.hash.algorithmOid!==void 0&&r.push(g.create(g.Class.CONTEXT_SPECIFIC,0,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(t.hash.algorithmOid).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.NULL,!1,"")])])),t.mgf.algorithmOid!==void 0&&r.push(g.create(g.Class.CONTEXT_SPECIFIC,1,!0,[g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(t.mgf.algorithmOid).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(t.mgf.hash.algorithmOid).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.NULL,!1,"")])])])),t.saltLength!==void 0&&r.push(g.create(g.Class.CONTEXT_SPECIFIC,2,!0,[g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,g.integerToDer(t.saltLength).getBytes())])),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,r)}else return g.create(g.Class.UNIVERSAL,g.Type.NULL,!1,"")}function oQ(e){var t=g.create(g.Class.CONTEXT_SPECIFIC,0,!0,[]);if(e.attributes.length===0)return t;for(var r=e.attributes,i=0;i<r.length;++i){var n=r[i],s=n.value,a=g.Type.UTF8;"valueTagClass"in n&&(a=n.valueTagClass),a===g.Type.UTF8&&(s=Ce.util.encodeUtf8(s));var o=!1;"valueConstructed"in n&&(o=n.valueConstructed);var c=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(n.type).getBytes()),g.create(g.Class.UNIVERSAL,g.Type.SET,!0,[g.create(g.Class.UNIVERSAL,a,o,s)])]);t.value.push(c)}return t}var cQ=new Date("1950-01-01T00:00:00Z"),uQ=new Date("2050-01-01T00:00:00Z");function EL(e){return e>=cQ&&e<uQ?g.create(g.Class.UNIVERSAL,g.Type.UTCTIME,!1,g.dateToUtcTime(e)):g.create(g.Class.UNIVERSAL,g.Type.GENERALIZEDTIME,!1,g.dateToGeneralizedTime(e))}ee.getTBSCertificate=function(e){var t=EL(e.validity.notBefore),r=EL(e.validity.notAfter),i=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.CONTEXT_SPECIFIC,0,!0,[g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,g.integerToDer(e.version).getBytes())]),g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,Ce.util.hexToBytes(e.serialNumber)),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(e.siginfo.algorithmOid).getBytes()),Mw(e.siginfo.algorithmOid,e.siginfo.parameters)]),Nl(e.issuer),g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[t,r]),Nl(e.subject),ee.publicKeyToAsn1(e.publicKey)]);return e.issuer.uniqueId&&i.value.push(g.create(g.Class.CONTEXT_SPECIFIC,1,!0,[g.create(g.Class.UNIVERSAL,g.Type.BITSTRING,!1,"\0"+e.issuer.uniqueId)])),e.subject.uniqueId&&i.value.push(g.create(g.Class.CONTEXT_SPECIFIC,2,!0,[g.create(g.Class.UNIVERSAL,g.Type.BITSTRING,!1,"\0"+e.subject.uniqueId)])),e.extensions.length>0&&i.value.push(ee.certificateExtensionsToAsn1(e.extensions)),i};ee.getCertificationRequestInfo=function(e){var t=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.INTEGER,!1,g.integerToDer(e.version).getBytes()),Nl(e.subject),ee.publicKeyToAsn1(e.publicKey),oQ(e)]);return t};ee.distinguishedNameToAsn1=function(e){return Nl(e)};ee.certificateToAsn1=function(e){var t=e.tbsCertificate||ee.getTBSCertificate(e);return g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[t,g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(e.signatureOid).getBytes()),Mw(e.signatureOid,e.signatureParameters)]),g.create(g.Class.UNIVERSAL,g.Type.BITSTRING,!1,"\0"+e.signature)])};ee.certificateExtensionsToAsn1=function(e){var t=g.create(g.Class.CONTEXT_SPECIFIC,3,!0,[]),r=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]);t.value.push(r);for(var i=0;i<e.length;++i)r.value.push(ee.certificateExtensionToAsn1(e[i]));return t};ee.certificateExtensionToAsn1=function(e){var t=g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[]);t.value.push(g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(e.id).getBytes())),e.critical&&t.value.push(g.create(g.Class.UNIVERSAL,g.Type.BOOLEAN,!1,"\xFF"));var r=e.value;return typeof e.value!="string"&&(r=g.toDer(r).getBytes()),t.value.push(g.create(g.Class.UNIVERSAL,g.Type.OCTETSTRING,!1,r)),t};ee.certificationRequestToAsn1=function(e){var t=e.certificationRequestInfo||ee.getCertificationRequestInfo(e);return g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[t,g.create(g.Class.UNIVERSAL,g.Type.SEQUENCE,!0,[g.create(g.Class.UNIVERSAL,g.Type.OID,!1,g.oidToDer(e.signatureOid).getBytes()),Mw(e.signatureOid,e.signatureParameters)]),g.create(g.Class.UNIVERSAL,g.Type.BITSTRING,!1,"\0"+e.signature)])};ee.createCaStore=function(e){var t={certs:{}};t.getIssuer=function(a){var o=r(a.issuer);return o},t.addCertificate=function(a){if(typeof a=="string"&&(a=Ce.pki.certificateFromPem(a)),i(a.subject),!t.hasCertificate(a))if(a.subject.hash in t.certs){var o=t.certs[a.subject.hash];Ce.util.isArray(o)||(o=[o]),o.push(a),t.certs[a.subject.hash]=o}else t.certs[a.subject.hash]=a},t.hasCertificate=function(a){typeof a=="string"&&(a=Ce.pki.certificateFromPem(a));var o=r(a.subject);if(!o)return!1;Ce.util.isArray(o)||(o=[o]);for(var c=g.toDer(ee.certificateToAsn1(a)).getBytes(),u=0;u<o.length;++u){var l=g.toDer(ee.certificateToAsn1(o[u])).getBytes();if(c===l)return!0}return!1},t.listAllCertificates=function(){var a=[];for(var o in t.certs)if(t.certs.hasOwnProperty(o)){var c=t.certs[o];if(!Ce.util.isArray(c))a.push(c);else for(var u=0;u<c.length;++u)a.push(c[u])}return a},t.removeCertificate=function(a){var o;if(typeof a=="string"&&(a=Ce.pki.certificateFromPem(a)),i(a.subject),!t.hasCertificate(a))return null;var c=r(a.subject);if(!Ce.util.isArray(c))return o=t.certs[a.subject.hash],delete t.certs[a.subject.hash],o;for(var u=g.toDer(ee.certificateToAsn1(a)).getBytes(),l=0;l<c.length;++l){var p=g.toDer(ee.certificateToAsn1(c[l])).getBytes();u===p&&(o=c[l],c.splice(l,1))}return c.length===0&&delete t.certs[a.subject.hash],o};function r(a){return i(a),t.certs[a.hash]||null}function i(a){if(!a.hash){var o=Ce.md.sha1.create();a.attributes=ee.RDNAttributesAsArray(Nl(a),o),a.hash=o.digest().toHex()}}if(e)for(var n=0;n<e.length;++n){var s=e[n];t.addCertificate(s)}return t};ee.certificateError={bad_certificate:"forge.pki.BadCertificate",unsupported_certificate:"forge.pki.UnsupportedCertificate",certificate_revoked:"forge.pki.CertificateRevoked",certificate_expired:"forge.pki.CertificateExpired",certificate_unknown:"forge.pki.CertificateUnknown",unknown_ca:"forge.pki.UnknownCertificateAuthority"};ee.verifyCertificateChain=function(e,t,r){typeof r=="function"&&(r={verify:r}),r=r||{},t=t.slice(0);var i=t.slice(0),n=r.validityCheckDate;typeof n>"u"&&(n=new Date);var s=!0,a=null,o=0;do{var c=t.shift(),u=null,l=!1;if(n&&(n<c.validity.notBefore||n>c.validity.notAfter)&&(a={message:"Certificate is not valid yet or has expired.",error:ee.certificateError.certificate_expired,notBefore:c.validity.notBefore,notAfter:c.validity.notAfter,now:n}),a===null){if(u=t[0]||e.getIssuer(c),u===null&&c.isIssuer(c)&&(l=!0,u=c),u){var p=u;Ce.util.isArray(p)||(p=[p]);for(var d=!1;!d&&p.length>0;){u=p.shift();try{d=u.verify(c)}catch{}}d||(a={message:"Certificate signature is invalid.",error:ee.certificateError.bad_certificate})}a===null&&(!u||l)&&!e.hasCertificate(c)&&(a={message:"Certificate is not trusted.",error:ee.certificateError.unknown_ca})}if(a===null&&u&&!c.isIssuer(u)&&(a={message:"Certificate issuer is invalid.",error:ee.certificateError.bad_certificate}),a===null)for(var h={keyUsage:!0,basicConstraints:!0},f=0;a===null&&f<c.extensions.length;++f){var m=c.extensions[f];m.critical&&!(m.name in h)&&(a={message:"Certificate has an unsupported critical extension.",error:ee.certificateError.unsupported_certificate})}if(a===null&&(!s||t.length===0&&(!u||l))){var y=c.getExtension("basicConstraints"),_=c.getExtension("keyUsage");if(_!==null&&(!_.keyCertSign||y===null)&&(a={message:"Certificate keyUsage or basicConstraints conflict or indicate that the certificate is not a CA. If the certificate is the only one in the chain or isn't the first then the certificate must be a valid CA.",error:ee.certificateError.bad_certificate}),a===null&&y!==null&&!y.cA&&(a={message:"Certificate basicConstraints indicates the certificate is not a CA.",error:ee.certificateError.bad_certificate}),a===null&&_!==null&&"pathLenConstraint"in y){var A=o-1;A>y.pathLenConstraint&&(a={message:"Certificate basicConstraints pathLenConstraint violated.",error:ee.certificateError.bad_certificate})}}var S=a===null?!0:a.error,B=r.verify?r.verify(S,o,i):S;if(B===!0)a=null;else throw S===!0&&(a={message:"The application rejected the certificate.",error:ee.certificateError.bad_certificate}),(B||B===0)&&(typeof B=="object"&&!Ce.util.isArray(B)?(B.message&&(a.message=B.message),B.error&&(a.error=B.error)):typeof B=="string"&&(a.error=B)),a;s=!1,++o}while(t.length>0);return!0}});var Kw=b((jue,NL)=>{var St=Ue();xn();Cl();ga();Uw();jw();Ki();xh();Bl();nt();lv();var w=St.asn1,ze=St.pki,_h=NL.exports=St.pkcs12=St.pkcs12||{},PL={name:"ContentInfo",tagClass:w.Class.UNIVERSAL,type:w.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:w.Class.UNIVERSAL,type:w.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:w.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},lQ={name:"PFX",tagClass:w.Class.UNIVERSAL,type:w.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:w.Class.UNIVERSAL,type:w.Type.INTEGER,constructed:!1,capture:"version"},PL,{name:"PFX.macData",tagClass:w.Class.UNIVERSAL,type:w.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:w.Class.UNIVERSAL,type:w.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:w.Class.UNIVERSAL,type:w.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:w.Class.UNIVERSAL,type:w.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",optional:!0,tagClass:w.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:w.Class.UNIVERSAL,type:w.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:w.Class.UNIVERSAL,type:w.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:w.Class.UNIVERSAL,type:w.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},pQ={name:"SafeBag",tagClass:w.Class.UNIVERSAL,type:w.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:w.Class.UNIVERSAL,type:w.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:w.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:w.Class.UNIVERSAL,type:w.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},fQ={name:"Attribute",tagClass:w.Class.UNIVERSAL,type:w.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:w.Class.UNIVERSAL,type:w.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:w.Class.UNIVERSAL,type:w.Type.SET,constructed:!0,capture:"values"}]},dQ={name:"CertBag",tagClass:w.Class.UNIVERSAL,type:w.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:w.Class.UNIVERSAL,type:w.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:w.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:w.Class.UNIVERSAL,type:w.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function bh(e,t,r,i){for(var n=[],s=0;s<e.length;s++)for(var a=0;a<e[s].safeBags.length;a++){var o=e[s].safeBags[a];if(!(i!==void 0&&o.type!==i)){if(t===null){n.push(o);continue}o.attributes[t]!==void 0&&o.attributes[t].indexOf(r)>=0&&n.push(o)}}return n}_h.pkcs12FromAsn1=function(e,t,r){typeof t=="string"?(r=t,t=!0):t===void 0&&(t=!0);var i={},n=[];if(!w.validate(e,lQ,i,n)){var s=new Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw s.errors=s,s}var a={version:i.version.charCodeAt(0),safeContents:[],getBags:function(y){var _={},A;return"localKeyId"in y?A=y.localKeyId:"localKeyIdHex"in y&&(A=St.util.hexToBytes(y.localKeyIdHex)),A===void 0&&!("friendlyName"in y)&&"bagType"in y&&(_[y.bagType]=bh(a.safeContents,null,null,y.bagType)),A!==void 0&&(_.localKeyId=bh(a.safeContents,"localKeyId",A,y.bagType)),"friendlyName"in y&&(_.friendlyName=bh(a.safeContents,"friendlyName",y.friendlyName,y.bagType)),_},getBagsByFriendlyName:function(y,_){return bh(a.safeContents,"friendlyName",y,_)},getBagsByLocalKeyId:function(y,_){return bh(a.safeContents,"localKeyId",y,_)}};if(i.version.charCodeAt(0)!==3){var s=new Error("PKCS#12 PFX of version other than 3 not supported.");throw s.version=i.version.charCodeAt(0),s}if(w.derToOid(i.contentType)!==ze.oids.data){var s=new Error("Only PKCS#12 PFX in password integrity mode supported.");throw s.oid=w.derToOid(i.contentType),s}var o=i.content.value[0];if(o.tagClass!==w.Class.UNIVERSAL||o.type!==w.Type.OCTETSTRING)throw new Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(o=Vw(o),i.mac){var c=null,u=0,l=w.derToOid(i.macAlgorithm);switch(l){case ze.oids.sha1:c=St.md.sha1.create(),u=20;break;case ze.oids.sha256:c=St.md.sha256.create(),u=32;break;case ze.oids.sha384:c=St.md.sha384.create(),u=48;break;case ze.oids.sha512:c=St.md.sha512.create(),u=64;break;case ze.oids.md5:c=St.md.md5.create(),u=16;break}if(c===null)throw new Error("PKCS#12 uses unsupported MAC algorithm: "+l);var p=new St.util.ByteBuffer(i.macSalt),d="macIterations"in i?parseInt(St.util.bytesToHex(i.macIterations),16):1,h=_h.generateKey(r,p,3,d,u,c),f=St.hmac.create();f.start(c,h),f.update(o.value);var m=f.getMac();if(m.getBytes()!==i.macDigest)throw new Error("PKCS#12 MAC could not be verified. Invalid password?")}else if(Array.isArray(e.value)&&e.value.length>2)throw new Error("Invalid PKCS#12. macData field present but MAC was not validated.");return hQ(a,o.value,t,r),a};function Vw(e){if(e.composed||e.constructed){for(var t=St.util.createBuffer(),r=0;r<e.value.length;++r)t.putBytes(e.value[r].value);e.composed=e.constructed=!1,e.value=t.getBytes()}return e}function hQ(e,t,r,i){if(t=w.fromDer(t,r),t.tagClass!==w.Class.UNIVERSAL||t.type!==w.Type.SEQUENCE||t.constructed!==!0)throw new Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var n=0;n<t.value.length;n++){var s=t.value[n],a={},o=[];if(!w.validate(s,PL,a,o)){var c=new Error("Cannot read ContentInfo.");throw c.errors=o,c}var u={encrypted:!1},l=null,p=a.content.value[0];switch(w.derToOid(a.contentType)){case ze.oids.data:if(p.tagClass!==w.Class.UNIVERSAL||p.type!==w.Type.OCTETSTRING)throw new Error("PKCS#12 SafeContents Data is not an OCTET STRING.");l=Vw(p).value;break;case ze.oids.encryptedData:l=mQ(p,i),u.encrypted=!0;break;default:var c=new Error("Unsupported PKCS#12 contentType.");throw c.contentType=w.derToOid(a.contentType),c}u.safeBags=yQ(l,r,i),e.safeContents.push(u)}}function mQ(e,t){var r={},i=[];if(!w.validate(e,St.pkcs7.asn1.encryptedDataValidator,r,i)){var n=new Error("Cannot read EncryptedContentInfo.");throw n.errors=i,n}var s=w.derToOid(r.contentType);if(s!==ze.oids.data){var n=new Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw n.oid=s,n}s=w.derToOid(r.encAlgorithm);var a=ze.pbe.getCipher(s,r.encParameter,t),o=Vw(r.encryptedContentAsn1),c=St.util.createBuffer(o.value);if(a.update(c),!a.finish())throw new Error("Failed to decrypt PKCS#12 SafeContents.");return a.output.getBytes()}function yQ(e,t,r){if(!t&&e.length===0)return[];if(e=w.fromDer(e,t),e.tagClass!==w.Class.UNIVERSAL||e.type!==w.Type.SEQUENCE||e.constructed!==!0)throw new Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var i=[],n=0;n<e.value.length;n++){var s=e.value[n],a={},o=[];if(!w.validate(s,pQ,a,o)){var c=new Error("Cannot read SafeBag.");throw c.errors=o,c}var u={type:w.derToOid(a.bagId),attributes:gQ(a.bagAttributes)};i.push(u);var l,p,d=a.bagValue.value[0];switch(u.type){case ze.oids.pkcs8ShroudedKeyBag:if(d=ze.decryptPrivateKeyInfo(d,r),d===null)throw new Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case ze.oids.keyBag:try{u.key=ze.privateKeyFromAsn1(d)}catch{u.key=null,u.asn1=d}continue;case ze.oids.certBag:l=dQ,p=function(){if(w.derToOid(a.certId)!==ze.oids.x509Certificate){var f=new Error("Unsupported certificate type, only X.509 supported.");throw f.oid=w.derToOid(a.certId),f}var m=w.fromDer(a.cert,t);try{u.cert=ze.certificateFromAsn1(m,!0)}catch{u.cert=null,u.asn1=m}};break;default:var c=new Error("Unsupported PKCS#12 SafeBag type.");throw c.oid=u.type,c}if(l!==void 0&&!w.validate(d,l,a,o)){var c=new Error("Cannot read PKCS#12 "+l.name);throw c.errors=o,c}p()}return i}function gQ(e){var t={};if(e!==void 0)for(var r=0;r<e.length;++r){var i={},n=[];if(!w.validate(e[r],fQ,i,n)){var s=new Error("Cannot read PKCS#12 BagAttribute.");throw s.errors=n,s}var a=w.derToOid(i.oid);if(ze.oids[a]!==void 0){t[ze.oids[a]]=[];for(var o=0;o<i.values.length;++o)t[ze.oids[a]].push(i.values[o].value)}}return t}_h.toPkcs12Asn1=function(e,t,r,i){i=i||{},i.saltSize=i.saltSize||8,i.count=i.count||2048,i.algorithm=i.algorithm||i.encAlgorithm||"aes128","useMac"in i||(i.useMac=!0),"localKeyId"in i||(i.localKeyId=null),"generateLocalKeyId"in i||(i.generateLocalKeyId=!0);var n=i.localKeyId,s;if(n!==null)n=St.util.hexToBytes(n);else if(i.generateLocalKeyId)if(t){var a=St.util.isArray(t)?t[0]:t;typeof a=="string"&&(a=ze.certificateFromPem(a));var o=St.md.sha1.create();o.update(w.toDer(ze.certificateToAsn1(a)).getBytes()),n=o.digest().getBytes()}else n=St.random.getBytes(20);var c=[];n!==null&&c.push(w.create(w.Class.UNIVERSAL,w.Type.SEQUENCE,!0,[w.create(w.Class.UNIVERSAL,w.Type.OID,!1,w.oidToDer(ze.oids.localKeyId).getBytes()),w.create(w.Class.UNIVERSAL,w.Type.SET,!0,[w.create(w.Class.UNIVERSAL,w.Type.OCTETSTRING,!1,n)])])),"friendlyName"in i&&c.push(w.create(w.Class.UNIVERSAL,w.Type.SEQUENCE,!0,[w.create(w.Class.UNIVERSAL,w.Type.OID,!1,w.oidToDer(ze.oids.friendlyName).getBytes()),w.create(w.Class.UNIVERSAL,w.Type.SET,!0,[w.create(w.Class.UNIVERSAL,w.Type.BMPSTRING,!1,i.friendlyName)])])),c.length>0&&(s=w.create(w.Class.UNIVERSAL,w.Type.SET,!0,c));var u=[],l=[];t!==null&&(St.util.isArray(t)?l=t:l=[t]);for(var p=[],d=0;d<l.length;++d){t=l[d],typeof t=="string"&&(t=ze.certificateFromPem(t));var h=d===0?s:void 0,f=ze.certificateToAsn1(t),m=w.create(w.Class.UNIVERSAL,w.Type.SEQUENCE,!0,[w.create(w.Class.UNIVERSAL,w.Type.OID,!1,w.oidToDer(ze.oids.certBag).getBytes()),w.create(w.Class.CONTEXT_SPECIFIC,0,!0,[w.create(w.Class.UNIVERSAL,w.Type.SEQUENCE,!0,[w.create(w.Class.UNIVERSAL,w.Type.OID,!1,w.oidToDer(ze.oids.x509Certificate).getBytes()),w.create(w.Class.CONTEXT_SPECIFIC,0,!0,[w.create(w.Class.UNIVERSAL,w.Type.OCTETSTRING,!1,w.toDer(f).getBytes())])])]),h]);p.push(m)}if(p.length>0){var y=w.create(w.Class.UNIVERSAL,w.Type.SEQUENCE,!0,p),_=w.create(w.Class.UNIVERSAL,w.Type.SEQUENCE,!0,[w.create(w.Class.UNIVERSAL,w.Type.OID,!1,w.oidToDer(ze.oids.data).getBytes()),w.create(w.Class.CONTEXT_SPECIFIC,0,!0,[w.create(w.Class.UNIVERSAL,w.Type.OCTETSTRING,!1,w.toDer(y).getBytes())])]);u.push(_)}var A=null;if(e!==null){var S=ze.wrapRsaPrivateKey(ze.privateKeyToAsn1(e));r===null?A=w.create(w.Class.UNIVERSAL,w.Type.SEQUENCE,!0,[w.create(w.Class.UNIVERSAL,w.Type.OID,!1,w.oidToDer(ze.oids.keyBag).getBytes()),w.create(w.Class.CONTEXT_SPECIFIC,0,!0,[S]),s]):A=w.create(w.Class.UNIVERSAL,w.Type.SEQUENCE,!0,[w.create(w.Class.UNIVERSAL,w.Type.OID,!1,w.oidToDer(ze.oids.pkcs8ShroudedKeyBag).getBytes()),w.create(w.Class.CONTEXT_SPECIFIC,0,!0,[ze.encryptPrivateKeyInfo(S,r,i)]),s]);var B=w.create(w.Class.UNIVERSAL,w.Type.SEQUENCE,!0,[A]),O=w.create(w.Class.UNIVERSAL,w.Type.SEQUENCE,!0,[w.create(w.Class.UNIVERSAL,w.Type.OID,!1,w.oidToDer(ze.oids.data).getBytes()),w.create(w.Class.CONTEXT_SPECIFIC,0,!0,[w.create(w.Class.UNIVERSAL,w.Type.OCTETSTRING,!1,w.toDer(B).getBytes())])]);u.push(O)}var N=w.create(w.Class.UNIVERSAL,w.Type.SEQUENCE,!0,u),Y;if(i.useMac){var o=St.md.sha1.create(),q=new St.util.ByteBuffer(St.random.getBytes(i.saltSize)),z=i.count,e=_h.generateKey(r,q,3,z,20),oe=St.hmac.create();oe.start(o,e),oe.update(w.toDer(N).getBytes());var _e=oe.getMac();Y=w.create(w.Class.UNIVERSAL,w.Type.SEQUENCE,!0,[w.create(w.Class.UNIVERSAL,w.Type.SEQUENCE,!0,[w.create(w.Class.UNIVERSAL,w.Type.SEQUENCE,!0,[w.create(w.Class.UNIVERSAL,w.Type.OID,!1,w.oidToDer(ze.oids.sha1).getBytes()),w.create(w.Class.UNIVERSAL,w.Type.NULL,!1,"")]),w.create(w.Class.UNIVERSAL,w.Type.OCTETSTRING,!1,_e.getBytes())]),w.create(w.Class.UNIVERSAL,w.Type.OCTETSTRING,!1,q.getBytes()),w.create(w.Class.UNIVERSAL,w.Type.INTEGER,!1,w.integerToDer(z).getBytes())])}return w.create(w.Class.UNIVERSAL,w.Type.SEQUENCE,!0,[w.create(w.Class.UNIVERSAL,w.Type.INTEGER,!1,w.integerToDer(3).getBytes()),w.create(w.Class.UNIVERSAL,w.Type.SEQUENCE,!0,[w.create(w.Class.UNIVERSAL,w.Type.OID,!1,w.oidToDer(ze.oids.data).getBytes()),w.create(w.Class.CONTEXT_SPECIFIC,0,!0,[w.create(w.Class.UNIVERSAL,w.Type.OCTETSTRING,!1,w.toDer(N).getBytes())])]),Y])};_h.generateKey=St.pbe.generatePkcs12Key});var $w=b((Uue,RL)=>{var _a=Ue();xn();ga();jw();rc();ev();Kw();ov();xh();nt();lv();var Hw=_a.asn1,Rl=RL.exports=_a.pki=_a.pki||{};Rl.pemToDer=function(e){var t=_a.pem.decode(e)[0];if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PEM to DER; PEM is encrypted.");return _a.util.createBuffer(t.body)};Rl.privateKeyFromPem=function(e){var t=_a.pem.decode(e)[0];if(t.type!=="PRIVATE KEY"&&t.type!=="RSA PRIVATE KEY"){var r=new Error('Could not convert private key from PEM; PEM header type is not "PRIVATE KEY" or "RSA PRIVATE KEY".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert private key from PEM; PEM is encrypted.");var i=Hw.fromDer(t.body);return Rl.privateKeyFromAsn1(i)};Rl.privateKeyToPem=function(e,t){var r={type:"RSA PRIVATE KEY",body:Hw.toDer(Rl.privateKeyToAsn1(e)).getBytes()};return _a.pem.encode(r,{maxline:t})};Rl.privateKeyInfoToPem=function(e,t){var r={type:"PRIVATE KEY",body:Hw.toDer(e).getBytes()};return _a.pem.encode(r,{maxline:t})}});var Jw=b((Fue,ML)=>{var W=Ue();xn();Cl();Qg();rc();$w();Ki();Bl();nt();var hv=function(e,t,r,i){var n=W.util.createBuffer(),s=e.length>>1,a=s+(e.length&1),o=e.substr(0,a),c=e.substr(s,a),u=W.util.createBuffer(),l=W.hmac.create();r=t+r;var p=Math.ceil(i/16),d=Math.ceil(i/20);l.start("MD5",o);var h=W.util.createBuffer();u.putBytes(r);for(var f=0;f<p;++f)l.start(null,null),l.update(u.getBytes()),u.putBuffer(l.digest()),l.start(null,null),l.update(u.bytes()+r),h.putBuffer(l.digest());l.start("SHA1",c);var m=W.util.createBuffer();u.clear(),u.putBytes(r);for(var f=0;f<d;++f)l.start(null,null),l.update(u.getBytes()),u.putBuffer(l.digest()),l.start(null,null),l.update(u.bytes()+r),m.putBuffer(l.digest());return n.putBytes(W.util.xorBytes(h.getBytes(),m.getBytes(),i)),n},vQ=function(e,t,r){var i=W.hmac.create();i.start("SHA1",e);var n=W.util.createBuffer();return n.putInt32(t[0]),n.putInt32(t[1]),n.putByte(r.type),n.putByte(r.version.major),n.putByte(r.version.minor),n.putInt16(r.length),n.putBytes(r.fragment.bytes()),i.update(n.getBytes()),i.digest().getBytes()},xQ=function(e,t,r){var i=!1;try{var n=e.deflate(t.fragment.getBytes());t.fragment=W.util.createBuffer(n),t.length=n.length,i=!0}catch{}return i},bQ=function(e,t,r){var i=!1;try{var n=e.inflate(t.fragment.getBytes());t.fragment=W.util.createBuffer(n),t.length=n.length,i=!0}catch{}return i},ki=function(e,t){var r=0;switch(t){case 1:r=e.getByte();break;case 2:r=e.getInt16();break;case 3:r=e.getInt24();break;case 4:r=e.getInt32();break}return W.util.createBuffer(e.getBytes(r))},Gi=function(e,t,r){e.putInt(r.length(),t<<3),e.putBuffer(r)},x={};x.Versions={TLS_1_0:{major:3,minor:1},TLS_1_1:{major:3,minor:2},TLS_1_2:{major:3,minor:3}};x.SupportedVersions=[x.Versions.TLS_1_1,x.Versions.TLS_1_0];x.Version=x.SupportedVersions[0];x.MaxFragment=15360;x.ConnectionEnd={server:0,client:1};x.PRFAlgorithm={tls_prf_sha256:0};x.BulkCipherAlgorithm={none:null,rc4:0,des3:1,aes:2};x.CipherType={stream:0,block:1,aead:2};x.MACAlgorithm={none:null,hmac_md5:0,hmac_sha1:1,hmac_sha256:2,hmac_sha384:3,hmac_sha512:4};x.CompressionMethod={none:0,deflate:1};x.ContentType={change_cipher_spec:20,alert:21,handshake:22,application_data:23,heartbeat:24};x.HandshakeType={hello_request:0,client_hello:1,server_hello:2,certificate:11,server_key_exchange:12,certificate_request:13,server_hello_done:14,certificate_verify:15,client_key_exchange:16,finished:20};x.Alert={};x.Alert.Level={warning:1,fatal:2};x.Alert.Description={close_notify:0,unexpected_message:10,bad_record_mac:20,decryption_failed:21,record_overflow:22,decompression_failure:30,handshake_failure:40,bad_certificate:42,unsupported_certificate:43,certificate_revoked:44,certificate_expired:45,certificate_unknown:46,illegal_parameter:47,unknown_ca:48,access_denied:49,decode_error:50,decrypt_error:51,export_restriction:60,protocol_version:70,insufficient_security:71,internal_error:80,user_canceled:90,no_renegotiation:100};x.HeartbeatMessageType={heartbeat_request:1,heartbeat_response:2};x.CipherSuites={};x.getCipherSuite=function(e){var t=null;for(var r in x.CipherSuites){var i=x.CipherSuites[r];if(i.id[0]===e.charCodeAt(0)&&i.id[1]===e.charCodeAt(1)){t=i;break}}return t};x.handleUnexpected=function(e,t){var r=!e.open&&e.entity===x.ConnectionEnd.client;r||e.error(e,{message:"Unexpected message. Received TLS record out of order.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.unexpected_message}})};x.handleHelloRequest=function(e,t,r){!e.handshaking&&e.handshakes>0&&(x.queue(e,x.createAlert(e,{level:x.Alert.Level.warning,description:x.Alert.Description.no_renegotiation})),x.flush(e)),e.process()};x.parseHelloMessage=function(e,t,r){var i=null,n=e.entity===x.ConnectionEnd.client;if(r<38)e.error(e,{message:n?"Invalid ServerHello message. Message too short.":"Invalid ClientHello message. Message too short.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.illegal_parameter}});else{var s=t.fragment,a=s.length();if(i={version:{major:s.getByte(),minor:s.getByte()},random:W.util.createBuffer(s.getBytes(32)),session_id:ki(s,1),extensions:[]},n?(i.cipher_suite=s.getBytes(2),i.compression_method=s.getByte()):(i.cipher_suites=ki(s,2),i.compression_methods=ki(s,1)),a=r-(a-s.length()),a>0){for(var o=ki(s,2);o.length()>0;)i.extensions.push({type:[o.getByte(),o.getByte()],data:ki(o,2)});if(!n)for(var c=0;c<i.extensions.length;++c){var u=i.extensions[c];if(u.type[0]===0&&u.type[1]===0)for(var l=ki(u.data,2);l.length()>0;){var p=l.getByte();if(p!==0)break;e.session.extensions.server_name.serverNameList.push(ki(l,2).getBytes())}}}if(e.session.version&&(i.version.major!==e.session.version.major||i.version.minor!==e.session.version.minor))return e.error(e,{message:"TLS version change is disallowed during renegotiation.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.protocol_version}});if(n)e.session.cipherSuite=x.getCipherSuite(i.cipher_suite);else for(var d=W.util.createBuffer(i.cipher_suites.bytes());d.length()>0&&(e.session.cipherSuite=x.getCipherSuite(d.getBytes(2)),e.session.cipherSuite===null););if(e.session.cipherSuite===null)return e.error(e,{message:"No cipher suites in common.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.handshake_failure},cipherSuite:W.util.bytesToHex(i.cipher_suite)});n?e.session.compressionMethod=i.compression_method:e.session.compressionMethod=x.CompressionMethod.none}return i};x.createSecurityParameters=function(e,t){var r=e.entity===x.ConnectionEnd.client,i=t.random.bytes(),n=r?e.session.sp.client_random:i,s=r?i:x.createRandom().getBytes();e.session.sp={entity:e.entity,prf_algorithm:x.PRFAlgorithm.tls_prf_sha256,bulk_cipher_algorithm:null,cipher_type:null,enc_key_length:null,block_length:null,fixed_iv_length:null,record_iv_length:null,mac_algorithm:null,mac_length:null,mac_key_length:null,compression_algorithm:e.session.compressionMethod,pre_master_secret:null,master_secret:null,client_random:n,server_random:s}};x.handleServerHello=function(e,t,r){var i=x.parseHelloMessage(e,t,r);if(!e.fail){if(i.version.minor<=e.version.minor)e.version.minor=i.version.minor;else return e.error(e,{message:"Incompatible TLS version.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.protocol_version}});e.session.version=e.version;var n=i.session_id.bytes();n.length>0&&n===e.session.id?(e.expect=DL,e.session.resuming=!0,e.session.sp.server_random=i.random.bytes()):(e.expect=AQ,e.session.resuming=!1,x.createSecurityParameters(e,i)),e.session.id=n,e.process()}};x.handleClientHello=function(e,t,r){var i=x.parseHelloMessage(e,t,r);if(!e.fail){var n=i.session_id.bytes(),s=null;if(e.sessionCache&&(s=e.sessionCache.getSession(n),s===null?n="":(s.version.major!==i.version.major||s.version.minor>i.version.minor)&&(s=null,n="")),n.length===0&&(n=W.random.getBytes(32)),e.session.id=n,e.session.clientHelloVersion=i.version,e.session.sp={},s)e.version=e.session.version=s.version,e.session.sp=s.sp;else{for(var a,o=1;o<x.SupportedVersions.length&&(a=x.SupportedVersions[o],!(a.minor<=i.version.minor));++o);e.version={major:a.major,minor:a.minor},e.session.version=e.version}s!==null?(e.expect=Yw,e.session.resuming=!0,e.session.sp.client_random=i.random.bytes()):(e.expect=e.verifyClient!==!1?BQ:Ww,e.session.resuming=!1,x.createSecurityParameters(e,i)),e.open=!0,x.queue(e,x.createRecord(e,{type:x.ContentType.handshake,data:x.createServerHello(e)})),e.session.resuming?(x.queue(e,x.createRecord(e,{type:x.ContentType.change_cipher_spec,data:x.createChangeCipherSpec()})),e.state.pending=x.createConnectionState(e),e.state.current.write=e.state.pending.write,x.queue(e,x.createRecord(e,{type:x.ContentType.handshake,data:x.createFinished(e)}))):(x.queue(e,x.createRecord(e,{type:x.ContentType.handshake,data:x.createCertificate(e)})),e.fail||(x.queue(e,x.createRecord(e,{type:x.ContentType.handshake,data:x.createServerKeyExchange(e)})),e.verifyClient!==!1&&x.queue(e,x.createRecord(e,{type:x.ContentType.handshake,data:x.createCertificateRequest(e)})),x.queue(e,x.createRecord(e,{type:x.ContentType.handshake,data:x.createServerHelloDone(e)})))),x.flush(e),e.process()}};x.handleCertificate=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid Certificate message. Message too short.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.illegal_parameter}});var i=t.fragment,n={certificate_list:ki(i,3)},s,a,o=[];try{for(;n.certificate_list.length()>0;)s=ki(n.certificate_list,3),a=W.asn1.fromDer(s),s=W.pki.certificateFromAsn1(a,!0),o.push(s)}catch(u){return e.error(e,{message:"Could not parse certificate list.",cause:u,send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.bad_certificate}})}var c=e.entity===x.ConnectionEnd.client;(c||e.verifyClient===!0)&&o.length===0?e.error(e,{message:c?"No server certificate provided.":"No client certificate provided.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.illegal_parameter}}):o.length===0?e.expect=c?OL:Ww:(c?e.session.serverCertificate=o[0]:e.session.clientCertificate=o[0],x.verifyCertificateChain(e,o)&&(e.expect=c?OL:Ww)),e.process()};x.handleServerKeyExchange=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.unsupported_certificate}});e.expect=SQ,e.process()};x.handleClientKeyExchange=function(e,t,r){if(r<48)return e.error(e,{message:"Invalid key parameters. Only RSA is supported.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.unsupported_certificate}});var i=t.fragment,n={enc_pre_master_secret:ki(i,2).getBytes()},s=null;if(e.getPrivateKey)try{s=e.getPrivateKey(e,e.session.serverCertificate),s=W.pki.privateKeyFromPem(s)}catch(c){e.error(e,{message:"Could not get private key.",cause:c,send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.internal_error}})}if(s===null)return e.error(e,{message:"No private key set.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.internal_error}});try{var a=e.session.sp;a.pre_master_secret=s.decrypt(n.enc_pre_master_secret);var o=e.session.clientHelloVersion;if(o.major!==a.pre_master_secret.charCodeAt(0)||o.minor!==a.pre_master_secret.charCodeAt(1))throw new Error("TLS version rollback attack detected.")}catch{a.pre_master_secret=W.random.getBytes(48)}e.expect=Yw,e.session.clientCertificate!==null&&(e.expect=kQ),e.process()};x.handleCertificateRequest=function(e,t,r){if(r<3)return e.error(e,{message:"Invalid CertificateRequest. Message too short.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.illegal_parameter}});var i=t.fragment,n={certificate_types:ki(i,1),certificate_authorities:ki(i,2)};e.session.certificateRequest=n,e.expect=wQ,e.process()};x.handleCertificateVerify=function(e,t,r){if(r<2)return e.error(e,{message:"Invalid CertificateVerify. Message too short.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.illegal_parameter}});var i=t.fragment;i.read-=4;var n=i.bytes();i.read+=4;var s={signature:ki(i,2).getBytes()},a=W.util.createBuffer();a.putBuffer(e.session.md5.digest()),a.putBuffer(e.session.sha1.digest()),a=a.getBytes();try{var o=e.session.clientCertificate;if(!o.publicKey.verify(a,s.signature,"NONE"))throw new Error("CertificateVerify signature does not match.");e.session.md5.update(n),e.session.sha1.update(n)}catch{return e.error(e,{message:"Bad signature in CertificateVerify.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.handshake_failure}})}e.expect=Yw,e.process()};x.handleServerHelloDone=function(e,t,r){if(r>0)return e.error(e,{message:"Invalid ServerHelloDone message. Invalid length.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.record_overflow}});if(e.serverCertificate===null){var i={message:"No server certificate provided. Not enough security.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.insufficient_security}},n=0,s=e.verify(e,i.alert.description,n,[]);if(s!==!0)return(s||s===0)&&(typeof s=="object"&&!W.util.isArray(s)?(s.message&&(i.message=s.message),s.alert&&(i.alert.description=s.alert)):typeof s=="number"&&(i.alert.description=s)),e.error(e,i)}e.session.certificateRequest!==null&&(t=x.createRecord(e,{type:x.ContentType.handshake,data:x.createCertificate(e)}),x.queue(e,t)),t=x.createRecord(e,{type:x.ContentType.handshake,data:x.createClientKeyExchange(e)}),x.queue(e,t),e.expect=TQ;var a=function(o,c){o.session.certificateRequest!==null&&o.session.clientCertificate!==null&&x.queue(o,x.createRecord(o,{type:x.ContentType.handshake,data:x.createCertificateVerify(o,c)})),x.queue(o,x.createRecord(o,{type:x.ContentType.change_cipher_spec,data:x.createChangeCipherSpec()})),o.state.pending=x.createConnectionState(o),o.state.current.write=o.state.pending.write,x.queue(o,x.createRecord(o,{type:x.ContentType.handshake,data:x.createFinished(o)})),o.expect=DL,x.flush(o),o.process()};if(e.session.certificateRequest===null||e.session.clientCertificate===null)return a(e,null);x.getClientSignature(e,a)};x.handleChangeCipherSpec=function(e,t){if(t.fragment.getByte()!==1)return e.error(e,{message:"Invalid ChangeCipherSpec message received.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.illegal_parameter}});var r=e.entity===x.ConnectionEnd.client;(e.session.resuming&&r||!e.session.resuming&&!r)&&(e.state.pending=x.createConnectionState(e)),e.state.current.read=e.state.pending.read,(!e.session.resuming&&r||e.session.resuming&&!r)&&(e.state.pending=null),e.expect=r?CQ:PQ,e.process()};x.handleFinished=function(e,t,r){var i=t.fragment;i.read-=4;var n=i.bytes();i.read+=4;var s=t.fragment.getBytes();i=W.util.createBuffer(),i.putBuffer(e.session.md5.digest()),i.putBuffer(e.session.sha1.digest());var a=e.entity===x.ConnectionEnd.client,o=a?"server finished":"client finished",c=e.session.sp,u=12,l=hv;if(i=l(c.master_secret,o,i.getBytes(),u),i.getBytes()!==s)return e.error(e,{message:"Invalid verify_data in Finished message.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.decrypt_error}});e.session.md5.update(n),e.session.sha1.update(n),(e.session.resuming&&a||!e.session.resuming&&!a)&&(x.queue(e,x.createRecord(e,{type:x.ContentType.change_cipher_spec,data:x.createChangeCipherSpec()})),e.state.current.write=e.state.pending.write,e.state.pending=null,x.queue(e,x.createRecord(e,{type:x.ContentType.handshake,data:x.createFinished(e)}))),e.expect=a?EQ:NQ,e.handshaking=!1,++e.handshakes,e.peerCertificate=a?e.session.serverCertificate:e.session.clientCertificate,x.flush(e),e.isConnected=!0,e.connected(e),e.process()};x.handleAlert=function(e,t){var r=t.fragment,i={level:r.getByte(),description:r.getByte()},n;switch(i.description){case x.Alert.Description.close_notify:n="Connection closed.";break;case x.Alert.Description.unexpected_message:n="Unexpected message.";break;case x.Alert.Description.bad_record_mac:n="Bad record MAC.";break;case x.Alert.Description.decryption_failed:n="Decryption failed.";break;case x.Alert.Description.record_overflow:n="Record overflow.";break;case x.Alert.Description.decompression_failure:n="Decompression failed.";break;case x.Alert.Description.handshake_failure:n="Handshake failure.";break;case x.Alert.Description.bad_certificate:n="Bad certificate.";break;case x.Alert.Description.unsupported_certificate:n="Unsupported certificate.";break;case x.Alert.Description.certificate_revoked:n="Certificate revoked.";break;case x.Alert.Description.certificate_expired:n="Certificate expired.";break;case x.Alert.Description.certificate_unknown:n="Certificate unknown.";break;case x.Alert.Description.illegal_parameter:n="Illegal parameter.";break;case x.Alert.Description.unknown_ca:n="Unknown certificate authority.";break;case x.Alert.Description.access_denied:n="Access denied.";break;case x.Alert.Description.decode_error:n="Decode error.";break;case x.Alert.Description.decrypt_error:n="Decrypt error.";break;case x.Alert.Description.export_restriction:n="Export restriction.";break;case x.Alert.Description.protocol_version:n="Unsupported protocol version.";break;case x.Alert.Description.insufficient_security:n="Insufficient security.";break;case x.Alert.Description.internal_error:n="Internal error.";break;case x.Alert.Description.user_canceled:n="User canceled.";break;case x.Alert.Description.no_renegotiation:n="Renegotiation not supported.";break;default:n="Unknown error.";break}if(i.description===x.Alert.Description.close_notify)return e.close();e.error(e,{message:n,send:!1,origin:e.entity===x.ConnectionEnd.client?"server":"client",alert:i}),e.process()};x.handleHandshake=function(e,t){var r=t.fragment,i=r.getByte(),n=r.getInt24();if(n>r.length())return e.fragmented=t,t.fragment=W.util.createBuffer(),r.read-=4,e.process();e.fragmented=null,r.read-=4;var s=r.bytes(n+4);r.read+=4,i in dv[e.entity][e.expect]?(e.entity===x.ConnectionEnd.server&&!e.open&&!e.fail&&(e.handshaking=!0,e.session={version:null,extensions:{server_name:{serverNameList:[]}},cipherSuite:null,compressionMethod:null,serverCertificate:null,clientCertificate:null,md5:W.md.md5.create(),sha1:W.md.sha1.create()}),i!==x.HandshakeType.hello_request&&i!==x.HandshakeType.certificate_verify&&i!==x.HandshakeType.finished&&(e.session.md5.update(s),e.session.sha1.update(s)),dv[e.entity][e.expect][i](e,t,n)):x.handleUnexpected(e,t)};x.handleApplicationData=function(e,t){e.data.putBuffer(t.fragment),e.dataReady(e),e.process()};x.handleHeartbeat=function(e,t){var r=t.fragment,i=r.getByte(),n=r.getInt16(),s=r.getBytes(n);if(i===x.HeartbeatMessageType.heartbeat_request){if(e.handshaking||n>s.length)return e.process();x.queue(e,x.createRecord(e,{type:x.ContentType.heartbeat,data:x.createHeartbeat(x.HeartbeatMessageType.heartbeat_response,s)})),x.flush(e)}else if(i===x.HeartbeatMessageType.heartbeat_response){if(s!==e.expectedHeartbeatPayload)return e.process();e.heartbeatReceived&&e.heartbeatReceived(e,W.util.createBuffer(s))}e.process()};var _Q=0,AQ=1,OL=2,SQ=3,wQ=4,DL=5,CQ=6,EQ=7,TQ=8,IQ=0,BQ=1,Ww=2,kQ=3,Yw=4,PQ=5,NQ=6,v=x.handleUnexpected,qL=x.handleChangeCipherSpec,Rr=x.handleAlert,Qr=x.handleHandshake,jL=x.handleApplicationData,Or=x.handleHeartbeat,Qw=[];Qw[x.ConnectionEnd.client]=[[v,Rr,Qr,v,Or],[v,Rr,Qr,v,Or],[v,Rr,Qr,v,Or],[v,Rr,Qr,v,Or],[v,Rr,Qr,v,Or],[qL,Rr,v,v,Or],[v,Rr,Qr,v,Or],[v,Rr,Qr,jL,Or],[v,Rr,Qr,v,Or]];Qw[x.ConnectionEnd.server]=[[v,Rr,Qr,v,Or],[v,Rr,Qr,v,Or],[v,Rr,Qr,v,Or],[v,Rr,Qr,v,Or],[qL,Rr,v,v,Or],[v,Rr,Qr,v,Or],[v,Rr,Qr,jL,Or],[v,Rr,Qr,v,Or]];var Aa=x.handleHelloRequest,RQ=x.handleServerHello,UL=x.handleCertificate,LL=x.handleServerKeyExchange,zw=x.handleCertificateRequest,pv=x.handleServerHelloDone,FL=x.handleFinished,dv=[];dv[x.ConnectionEnd.client]=[[v,v,RQ,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v],[Aa,v,v,v,v,v,v,v,v,v,v,UL,LL,zw,pv,v,v,v,v,v,v],[Aa,v,v,v,v,v,v,v,v,v,v,v,LL,zw,pv,v,v,v,v,v,v],[Aa,v,v,v,v,v,v,v,v,v,v,v,v,zw,pv,v,v,v,v,v,v],[Aa,v,v,v,v,v,v,v,v,v,v,v,v,v,pv,v,v,v,v,v,v],[Aa,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v],[Aa,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,FL],[Aa,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v],[Aa,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v]];var OQ=x.handleClientHello,LQ=x.handleClientKeyExchange,DQ=x.handleCertificateVerify;dv[x.ConnectionEnd.server]=[[v,OQ,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v],[v,v,v,v,v,v,v,v,v,v,v,UL,v,v,v,v,v,v,v,v,v],[v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,LQ,v,v,v,v],[v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,DQ,v,v,v,v,v],[v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v],[v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,FL],[v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v],[v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v,v]];x.generateKeys=function(e,t){var r=hv,i=t.client_random+t.server_random;e.session.resuming||(t.master_secret=r(t.pre_master_secret,"master secret",i,48).bytes(),t.pre_master_secret=null),i=t.server_random+t.client_random;var n=2*t.mac_key_length+2*t.enc_key_length,s=e.version.major===x.Versions.TLS_1_0.major&&e.version.minor===x.Versions.TLS_1_0.minor;s&&(n+=2*t.fixed_iv_length);var a=r(t.master_secret,"key expansion",i,n),o={client_write_MAC_key:a.getBytes(t.mac_key_length),server_write_MAC_key:a.getBytes(t.mac_key_length),client_write_key:a.getBytes(t.enc_key_length),server_write_key:a.getBytes(t.enc_key_length)};return s&&(o.client_write_IV=a.getBytes(t.fixed_iv_length),o.server_write_IV=a.getBytes(t.fixed_iv_length)),o};x.createConnectionState=function(e){var t=e.entity===x.ConnectionEnd.client,r=function(){var s={sequenceNumber:[0,0],macKey:null,macLength:0,macFunction:null,cipherState:null,cipherFunction:function(a){return!0},compressionState:null,compressFunction:function(a){return!0},updateSequenceNumber:function(){s.sequenceNumber[1]===4294967295?(s.sequenceNumber[1]=0,++s.sequenceNumber[0]):++s.sequenceNumber[1]}};return s},i={read:r(),write:r()};if(i.read.update=function(s,a){return i.read.cipherFunction(a,i.read)?i.read.compressFunction(s,a,i.read)||s.error(s,{message:"Could not decompress record.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.decompression_failure}}):s.error(s,{message:"Could not decrypt record or bad MAC.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.bad_record_mac}}),!s.fail},i.write.update=function(s,a){return i.write.compressFunction(s,a,i.write)?i.write.cipherFunction(a,i.write)||s.error(s,{message:"Could not encrypt record.",send:!1,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.internal_error}}):s.error(s,{message:"Could not compress record.",send:!1,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.internal_error}}),!s.fail},e.session){var n=e.session.sp;switch(e.session.cipherSuite.initSecurityParameters(n),n.keys=x.generateKeys(e,n),i.read.macKey=t?n.keys.server_write_MAC_key:n.keys.client_write_MAC_key,i.write.macKey=t?n.keys.client_write_MAC_key:n.keys.server_write_MAC_key,e.session.cipherSuite.initConnectionState(i,e,n),n.compression_algorithm){case x.CompressionMethod.none:break;case x.CompressionMethod.deflate:i.read.compressFunction=bQ,i.write.compressFunction=xQ;break;default:throw new Error("Unsupported compression algorithm.")}}return i};x.createRandom=function(){var e=new Date,t=+e+e.getTimezoneOffset()*6e4,r=W.util.createBuffer();return r.putInt32(t),r.putBytes(W.random.getBytes(28)),r};x.createRecord=function(e,t){if(!t.data)return null;var r={type:t.type,version:{major:e.version.major,minor:e.version.minor},length:t.data.length(),fragment:t.data};return r};x.createAlert=function(e,t){var r=W.util.createBuffer();return r.putByte(t.level),r.putByte(t.description),x.createRecord(e,{type:x.ContentType.alert,data:r})};x.createClientHello=function(e){e.session.clientHelloVersion={major:e.version.major,minor:e.version.minor};for(var t=W.util.createBuffer(),r=0;r<e.cipherSuites.length;++r){var i=e.cipherSuites[r];t.putByte(i.id[0]),t.putByte(i.id[1])}var n=t.length(),s=W.util.createBuffer();s.putByte(x.CompressionMethod.none);var a=s.length(),o=W.util.createBuffer();if(e.virtualHost){var c=W.util.createBuffer();c.putByte(0),c.putByte(0);var u=W.util.createBuffer();u.putByte(0),Gi(u,2,W.util.createBuffer(e.virtualHost));var l=W.util.createBuffer();Gi(l,2,u),Gi(c,2,l),o.putBuffer(c)}var p=o.length();p>0&&(p+=2);var d=e.session.id,h=d.length+1+2+4+28+2+n+1+a+p,f=W.util.createBuffer();return f.putByte(x.HandshakeType.client_hello),f.putInt24(h),f.putByte(e.version.major),f.putByte(e.version.minor),f.putBytes(e.session.sp.client_random),Gi(f,1,W.util.createBuffer(d)),Gi(f,2,t),Gi(f,1,s),p>0&&Gi(f,2,o),f};x.createServerHello=function(e){var t=e.session.id,r=t.length+1+2+4+28+2+1,i=W.util.createBuffer();return i.putByte(x.HandshakeType.server_hello),i.putInt24(r),i.putByte(e.version.major),i.putByte(e.version.minor),i.putBytes(e.session.sp.server_random),Gi(i,1,W.util.createBuffer(t)),i.putByte(e.session.cipherSuite.id[0]),i.putByte(e.session.cipherSuite.id[1]),i.putByte(e.session.compressionMethod),i};x.createCertificate=function(e){var t=e.entity===x.ConnectionEnd.client,r=null;if(e.getCertificate){var i;t?i=e.session.certificateRequest:i=e.session.extensions.server_name.serverNameList,r=e.getCertificate(e,i)}var n=W.util.createBuffer();if(r!==null)try{W.util.isArray(r)||(r=[r]);for(var s=null,a=0;a<r.length;++a){var o=W.pem.decode(r[a])[0];if(o.type!=="CERTIFICATE"&&o.type!=="X509 CERTIFICATE"&&o.type!=="TRUSTED CERTIFICATE"){var c=new Error('Could not convert certificate from PEM; PEM header type is not "CERTIFICATE", "X509 CERTIFICATE", or "TRUSTED CERTIFICATE".');throw c.headerType=o.type,c}if(o.procType&&o.procType.type==="ENCRYPTED")throw new Error("Could not convert certificate from PEM; PEM is encrypted.");var u=W.util.createBuffer(o.body);s===null&&(s=W.asn1.fromDer(u.bytes(),!1));var l=W.util.createBuffer();Gi(l,3,u),n.putBuffer(l)}r=W.pki.certificateFromAsn1(s),t?e.session.clientCertificate=r:e.session.serverCertificate=r}catch(h){return e.error(e,{message:"Could not send certificate list.",cause:h,send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.bad_certificate}})}var p=3+n.length(),d=W.util.createBuffer();return d.putByte(x.HandshakeType.certificate),d.putInt24(p),Gi(d,3,n),d};x.createClientKeyExchange=function(e){var t=W.util.createBuffer();t.putByte(e.session.clientHelloVersion.major),t.putByte(e.session.clientHelloVersion.minor),t.putBytes(W.random.getBytes(46));var r=e.session.sp;r.pre_master_secret=t.getBytes();var i=e.session.serverCertificate.publicKey;t=i.encrypt(r.pre_master_secret);var n=t.length+2,s=W.util.createBuffer();return s.putByte(x.HandshakeType.client_key_exchange),s.putInt24(n),s.putInt16(t.length),s.putBytes(t),s};x.createServerKeyExchange=function(e){var t=0,r=W.util.createBuffer();return t>0&&(r.putByte(x.HandshakeType.server_key_exchange),r.putInt24(t)),r};x.getClientSignature=function(e,t){var r=W.util.createBuffer();r.putBuffer(e.session.md5.digest()),r.putBuffer(e.session.sha1.digest()),r=r.getBytes(),e.getSignature=e.getSignature||function(i,n,s){var a=null;if(i.getPrivateKey)try{a=i.getPrivateKey(i,i.session.clientCertificate),a=W.pki.privateKeyFromPem(a)}catch(o){i.error(i,{message:"Could not get private key.",cause:o,send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.internal_error}})}a===null?i.error(i,{message:"No private key set.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.internal_error}}):n=a.sign(n,null),s(i,n)},e.getSignature(e,r,t)};x.createCertificateVerify=function(e,t){var r=t.length+2,i=W.util.createBuffer();return i.putByte(x.HandshakeType.certificate_verify),i.putInt24(r),i.putInt16(t.length),i.putBytes(t),i};x.createCertificateRequest=function(e){var t=W.util.createBuffer();t.putByte(1);var r=W.util.createBuffer();for(var i in e.caStore.certs){var n=e.caStore.certs[i],s=W.pki.distinguishedNameToAsn1(n.subject),a=W.asn1.toDer(s);r.putInt16(a.length()),r.putBuffer(a)}var o=1+t.length()+2+r.length(),c=W.util.createBuffer();return c.putByte(x.HandshakeType.certificate_request),c.putInt24(o),Gi(c,1,t),Gi(c,2,r),c};x.createServerHelloDone=function(e){var t=W.util.createBuffer();return t.putByte(x.HandshakeType.server_hello_done),t.putInt24(0),t};x.createChangeCipherSpec=function(){var e=W.util.createBuffer();return e.putByte(1),e};x.createFinished=function(e){var t=W.util.createBuffer();t.putBuffer(e.session.md5.digest()),t.putBuffer(e.session.sha1.digest());var r=e.entity===x.ConnectionEnd.client,i=e.session.sp,n=12,s=hv,a=r?"client finished":"server finished";t=s(i.master_secret,a,t.getBytes(),n);var o=W.util.createBuffer();return o.putByte(x.HandshakeType.finished),o.putInt24(t.length()),o.putBuffer(t),o};x.createHeartbeat=function(e,t,r){typeof r>"u"&&(r=t.length);var i=W.util.createBuffer();i.putByte(e),i.putInt16(r),i.putBytes(t);var n=i.length(),s=Math.max(16,n-r-3);return i.putBytes(W.random.getBytes(s)),i};x.queue=function(e,t){if(t&&!(t.fragment.length()===0&&(t.type===x.ContentType.handshake||t.type===x.ContentType.alert||t.type===x.ContentType.change_cipher_spec))){if(t.type===x.ContentType.handshake){var r=t.fragment.bytes();e.session.md5.update(r),e.session.sha1.update(r),r=null}var i;if(t.fragment.length()<=x.MaxFragment)i=[t];else{i=[];for(var n=t.fragment.bytes();n.length>x.MaxFragment;)i.push(x.createRecord(e,{type:t.type,data:W.util.createBuffer(n.slice(0,x.MaxFragment))})),n=n.slice(x.MaxFragment);n.length>0&&i.push(x.createRecord(e,{type:t.type,data:W.util.createBuffer(n)}))}for(var s=0;s<i.length&&!e.fail;++s){var a=i[s],o=e.state.current.write;o.update(e,a)&&e.records.push(a)}}};x.flush=function(e){for(var t=0;t<e.records.length;++t){var r=e.records[t];e.tlsData.putByte(r.type),e.tlsData.putByte(r.version.major),e.tlsData.putByte(r.version.minor),e.tlsData.putInt16(r.fragment.length()),e.tlsData.putBuffer(e.records[t].fragment)}return e.records=[],e.tlsDataReady(e)};var Gw=function(e){switch(e){case!0:return!0;case W.pki.certificateError.bad_certificate:return x.Alert.Description.bad_certificate;case W.pki.certificateError.unsupported_certificate:return x.Alert.Description.unsupported_certificate;case W.pki.certificateError.certificate_revoked:return x.Alert.Description.certificate_revoked;case W.pki.certificateError.certificate_expired:return x.Alert.Description.certificate_expired;case W.pki.certificateError.certificate_unknown:return x.Alert.Description.certificate_unknown;case W.pki.certificateError.unknown_ca:return x.Alert.Description.unknown_ca;default:return x.Alert.Description.bad_certificate}},qQ=function(e){switch(e){case!0:return!0;case x.Alert.Description.bad_certificate:return W.pki.certificateError.bad_certificate;case x.Alert.Description.unsupported_certificate:return W.pki.certificateError.unsupported_certificate;case x.Alert.Description.certificate_revoked:return W.pki.certificateError.certificate_revoked;case x.Alert.Description.certificate_expired:return W.pki.certificateError.certificate_expired;case x.Alert.Description.certificate_unknown:return W.pki.certificateError.certificate_unknown;case x.Alert.Description.unknown_ca:return W.pki.certificateError.unknown_ca;default:return W.pki.certificateError.bad_certificate}};x.verifyCertificateChain=function(e,t){try{var r={};for(var i in e.verifyOptions)r[i]=e.verifyOptions[i];r.verify=function(s,a,o){var c=Gw(s),u=e.verify(e,s,a,o);if(u!==!0){if(typeof u=="object"&&!W.util.isArray(u)){var l=new Error("The application rejected the certificate.");throw l.send=!0,l.alert={level:x.Alert.Level.fatal,description:x.Alert.Description.bad_certificate},u.message&&(l.message=u.message),u.alert&&(l.alert.description=u.alert),l}u!==s&&(u=qQ(u))}return u},W.pki.verifyCertificateChain(e.caStore,t,r)}catch(s){var n=s;(typeof n!="object"||W.util.isArray(n))&&(n={send:!0,alert:{level:x.Alert.Level.fatal,description:Gw(s)}}),"send"in n||(n.send=!0),"alert"in n||(n.alert={level:x.Alert.Level.fatal,description:Gw(n.error)}),e.error(e,n)}return!e.fail};x.createSessionCache=function(e,t){var r=null;if(e&&e.getSession&&e.setSession&&e.order)r=e;else{r={},r.cache=e||{},r.capacity=Math.max(t||100,1),r.order=[];for(var i in e)r.order.length<=t?r.order.push(i):delete e[i];r.getSession=function(n){var s=null,a=null;if(n?a=W.util.bytesToHex(n):r.order.length>0&&(a=r.order[0]),a!==null&&a in r.cache){s=r.cache[a],delete r.cache[a];for(var o in r.order)if(r.order[o]===a){r.order.splice(o,1);break}}return s},r.setSession=function(n,s){if(r.order.length===r.capacity){var a=r.order.shift();delete r.cache[a]}var a=W.util.bytesToHex(n);r.order.push(a),r.cache[a]=s}}return r};x.createConnection=function(e){var t=null;e.caStore?W.util.isArray(e.caStore)?t=W.pki.createCaStore(e.caStore):t=e.caStore:t=W.pki.createCaStore();var r=e.cipherSuites||null;if(r===null){r=[];for(var i in x.CipherSuites)r.push(x.CipherSuites[i])}var n=e.server?x.ConnectionEnd.server:x.ConnectionEnd.client,s=e.sessionCache?x.createSessionCache(e.sessionCache):null,a={version:{major:x.Version.major,minor:x.Version.minor},entity:n,sessionId:e.sessionId,caStore:t,sessionCache:s,cipherSuites:r,connected:e.connected,virtualHost:e.virtualHost||null,verifyClient:e.verifyClient||!1,verify:e.verify||function(l,p,d,h){return p},verifyOptions:e.verifyOptions||{},getCertificate:e.getCertificate||null,getPrivateKey:e.getPrivateKey||null,getSignature:e.getSignature||null,input:W.util.createBuffer(),tlsData:W.util.createBuffer(),data:W.util.createBuffer(),tlsDataReady:e.tlsDataReady,dataReady:e.dataReady,heartbeatReceived:e.heartbeatReceived,closed:e.closed,error:function(l,p){p.origin=p.origin||(l.entity===x.ConnectionEnd.client?"client":"server"),p.send&&(x.queue(l,x.createAlert(l,p.alert)),x.flush(l));var d=p.fatal!==!1;d&&(l.fail=!0),e.error(l,p),d&&l.close(!1)},deflate:e.deflate||null,inflate:e.inflate||null};a.reset=function(l){a.version={major:x.Version.major,minor:x.Version.minor},a.record=null,a.session=null,a.peerCertificate=null,a.state={pending:null,current:null},a.expect=a.entity===x.ConnectionEnd.client?_Q:IQ,a.fragmented=null,a.records=[],a.open=!1,a.handshakes=0,a.handshaking=!1,a.isConnected=!1,a.fail=!(l||typeof l>"u"),a.input.clear(),a.tlsData.clear(),a.data.clear(),a.state.current=x.createConnectionState(a)},a.reset();var o=function(l,p){var d=p.type-x.ContentType.change_cipher_spec,h=Qw[l.entity][l.expect];d in h?h[d](l,p):x.handleUnexpected(l,p)},c=function(l){var p=0,d=l.input,h=d.length();if(h<5)p=5-h;else{l.record={type:d.getByte(),version:{major:d.getByte(),minor:d.getByte()},length:d.getInt16(),fragment:W.util.createBuffer(),ready:!1};var f=l.record.version.major===l.version.major;f&&l.session&&l.session.version&&(f=l.record.version.minor===l.version.minor),f||l.error(l,{message:"Incompatible TLS version.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.protocol_version}})}return p},u=function(l){var p=0,d=l.input,h=d.length();if(h<l.record.length)p=l.record.length-h;else{l.record.fragment.putBytes(d.getBytes(l.record.length)),d.compact();var f=l.state.current.read;f.update(l,l.record)&&(l.fragmented!==null&&(l.fragmented.type===l.record.type?(l.fragmented.fragment.putBuffer(l.record.fragment),l.record=l.fragmented):l.error(l,{message:"Invalid fragmented record.",send:!0,alert:{level:x.Alert.Level.fatal,description:x.Alert.Description.unexpected_message}})),l.record.ready=!0)}return p};return a.handshake=function(l){if(a.entity!==x.ConnectionEnd.client)a.error(a,{message:"Cannot initiate handshake as a server.",fatal:!1});else if(a.handshaking)a.error(a,{message:"Handshake already in progress.",fatal:!1});else{a.fail&&!a.open&&a.handshakes===0&&(a.fail=!1),a.handshaking=!0,l=l||"";var p=null;l.length>0&&(a.sessionCache&&(p=a.sessionCache.getSession(l)),p===null&&(l="")),l.length===0&&a.sessionCache&&(p=a.sessionCache.getSession(),p!==null&&(l=p.id)),a.session={id:l,version:null,cipherSuite:null,compressionMethod:null,serverCertificate:null,certificateRequest:null,clientCertificate:null,sp:{},md5:W.md.md5.create(),sha1:W.md.sha1.create()},p&&(a.version=p.version,a.session.sp=p.sp),a.session.sp.client_random=x.createRandom().getBytes(),a.open=!0,x.queue(a,x.createRecord(a,{type:x.ContentType.handshake,data:x.createClientHello(a)})),x.flush(a)}},a.process=function(l){var p=0;return l&&a.input.putBytes(l),a.fail||(a.record!==null&&a.record.ready&&a.record.fragment.isEmpty()&&(a.record=null),a.record===null&&(p=c(a)),!a.fail&&a.record!==null&&!a.record.ready&&(p=u(a)),!a.fail&&a.record!==null&&a.record.ready&&o(a,a.record)),p},a.prepare=function(l){return x.queue(a,x.createRecord(a,{type:x.ContentType.application_data,data:W.util.createBuffer(l)})),x.flush(a)},a.prepareHeartbeatRequest=function(l,p){return l instanceof W.util.ByteBuffer&&(l=l.bytes()),typeof p>"u"&&(p=l.length),a.expectedHeartbeatPayload=l,x.queue(a,x.createRecord(a,{type:x.ContentType.heartbeat,data:x.createHeartbeat(x.HeartbeatMessageType.heartbeat_request,l,p)})),x.flush(a)},a.close=function(l){if(!a.fail&&a.sessionCache&&a.session){var p={id:a.session.id,version:a.session.version,sp:a.session.sp};p.sp.keys=null,a.sessionCache.setSession(p.id,p)}a.open&&(a.open=!1,a.input.clear(),(a.isConnected||a.handshaking)&&(a.isConnected=a.handshaking=!1,x.queue(a,x.createAlert(a,{level:x.Alert.Level.warning,description:x.Alert.Description.close_notify})),x.flush(a)),a.closed(a)),a.reset(l)},a};ML.exports=W.tls=W.tls||{};for(fv in x)typeof x[fv]!="function"&&(W.tls[fv]=x[fv]);var fv;W.tls.prf_tls1=hv;W.tls.hmac_sha1=vQ;W.tls.createSessionCache=x.createSessionCache;W.tls.createConnection=x.createConnection});var HL=b((Mue,KL)=>{var Sa=Ue();ya();Jw();var Wi=KL.exports=Sa.tls;Wi.CipherSuites.TLS_RSA_WITH_AES_128_CBC_SHA={id:[0,47],name:"TLS_RSA_WITH_AES_128_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=Wi.BulkCipherAlgorithm.aes,e.cipher_type=Wi.CipherType.block,e.enc_key_length=16,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=Wi.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:VL};Wi.CipherSuites.TLS_RSA_WITH_AES_256_CBC_SHA={id:[0,53],name:"TLS_RSA_WITH_AES_256_CBC_SHA",initSecurityParameters:function(e){e.bulk_cipher_algorithm=Wi.BulkCipherAlgorithm.aes,e.cipher_type=Wi.CipherType.block,e.enc_key_length=32,e.block_length=16,e.fixed_iv_length=16,e.record_iv_length=16,e.mac_algorithm=Wi.MACAlgorithm.hmac_sha1,e.mac_length=20,e.mac_key_length=20},initConnectionState:VL};function VL(e,t,r){var i=t.entity===Sa.tls.ConnectionEnd.client;e.read.cipherState={init:!1,cipher:Sa.cipher.createDecipher("AES-CBC",i?r.keys.server_write_key:r.keys.client_write_key),iv:i?r.keys.server_write_IV:r.keys.client_write_IV},e.write.cipherState={init:!1,cipher:Sa.cipher.createCipher("AES-CBC",i?r.keys.client_write_key:r.keys.server_write_key),iv:i?r.keys.client_write_IV:r.keys.server_write_IV},e.read.cipherFunction=MQ,e.write.cipherFunction=jQ,e.read.macLength=e.write.macLength=r.mac_length,e.read.macFunction=e.write.macFunction=Wi.hmac_sha1}function jQ(e,t){var r=!1,i=t.macFunction(t.macKey,t.sequenceNumber,e);e.fragment.putBytes(i),t.updateSequenceNumber();var n;e.version.minor===Wi.Versions.TLS_1_0.minor?n=t.cipherState.init?null:t.cipherState.iv:n=Sa.random.getBytesSync(16),t.cipherState.init=!0;var s=t.cipherState.cipher;return s.start({iv:n}),e.version.minor>=Wi.Versions.TLS_1_1.minor&&s.output.putBytes(n),s.update(e.fragment),s.finish(UQ)&&(e.fragment=s.output,e.length=e.fragment.length(),r=!0),r}function UQ(e,t,r){if(!r){var i=e-t.length()%e;t.fillWithByte(i-1,i)}return!0}function FQ(e,t,r){var i=!0;if(r){for(var n=t.length(),s=t.last(),a=n-1-s;a<n-1;++a)i=i&&t.at(a)==s;i&&t.truncate(s+1)}return i}function MQ(e,t){var r=!1,i;e.version.minor===Wi.Versions.TLS_1_0.minor?i=t.cipherState.init?null:t.cipherState.iv:i=e.fragment.getBytes(16),t.cipherState.init=!0;var n=t.cipherState.cipher;n.start({iv:i}),n.update(e.fragment),r=n.finish(FQ);var s=t.macLength,a=Sa.random.getBytesSync(s),o=n.output.length();o>=s?(e.fragment=n.output.getBytes(o-s),a=n.output.getBytes(s)):e.fragment=n.output.getBytes(),e.fragment=Sa.util.createBuffer(e.fragment),e.length=e.fragment.length();var c=t.macFunction(t.macKey,t.sequenceNumber,e);return t.updateSequenceNumber(),r=VQ(t.macKey,a,c)&&r,r}function VQ(e,t,r){var i=Sa.hmac.create();return i.start("SHA1",e),i.update(t),t=i.digest().getBytes(),i.start(null,null),i.update(r),r=i.digest().getBytes(),t===r}});var eC=b((Vue,WL)=>{var Nt=Ue();Gn();nt();var Ah=WL.exports=Nt.sha512=Nt.sha512||{};Nt.md.sha512=Nt.md.algorithms.sha512=Ah;var zL=Nt.sha384=Nt.sha512.sha384=Nt.sha512.sha384||{};zL.create=function(){return Ah.create("SHA-384")};Nt.md.sha384=Nt.md.algorithms.sha384=zL;Nt.sha512.sha256=Nt.sha512.sha256||{create:function(){return Ah.create("SHA-512/256")}};Nt.md["sha512/256"]=Nt.md.algorithms["sha512/256"]=Nt.sha512.sha256;Nt.sha512.sha224=Nt.sha512.sha224||{create:function(){return Ah.create("SHA-512/224")}};Nt.md["sha512/224"]=Nt.md.algorithms["sha512/224"]=Nt.sha512.sha224;Ah.create=function(e){if(GL||KQ(),typeof e>"u"&&(e="SHA-512"),!(e in cc))throw new Error("Invalid SHA-512 algorithm: "+e);for(var t=cc[e],r=null,i=Nt.util.createBuffer(),n=new Array(80),s=0;s<80;++s)n[s]=new Array(2);var a=64;switch(e){case"SHA-384":a=48;break;case"SHA-512/256":a=32;break;case"SHA-512/224":a=28;break}var o={algorithm:e.replace("-","").toLowerCase(),blockLength:128,digestLength:a,messageLength:0,fullMessageLength:null,messageLengthSize:16};return o.start=function(){o.messageLength=0,o.fullMessageLength=o.messageLength128=[];for(var c=o.messageLengthSize/4,u=0;u<c;++u)o.fullMessageLength.push(0);i=Nt.util.createBuffer(),r=new Array(t.length);for(var u=0;u<t.length;++u)r[u]=t[u].slice(0);return o},o.start(),o.update=function(c,u){u==="utf8"&&(c=Nt.util.encodeUtf8(c));var l=c.length;o.messageLength+=l,l=[l/4294967296>>>0,l>>>0];for(var p=o.fullMessageLength.length-1;p>=0;--p)o.fullMessageLength[p]+=l[1],l[1]=l[0]+(o.fullMessageLength[p]/4294967296>>>0),o.fullMessageLength[p]=o.fullMessageLength[p]>>>0,l[0]=l[1]/4294967296>>>0;return i.putBytes(c),$L(r,n,i),(i.read>2048||i.length()===0)&&i.compact(),o},o.digest=function(){var c=Nt.util.createBuffer();c.putBytes(i.bytes());var u=o.fullMessageLength[o.fullMessageLength.length-1]+o.messageLengthSize,l=u&o.blockLength-1;c.putBytes(Xw.substr(0,o.blockLength-l));for(var p,d,h=o.fullMessageLength[0]*8,f=0;f<o.fullMessageLength.length-1;++f)p=o.fullMessageLength[f+1]*8,d=p/4294967296>>>0,h+=d,c.putInt32(h>>>0),h=p>>>0;c.putInt32(h);for(var m=new Array(r.length),f=0;f<r.length;++f)m[f]=r[f].slice(0);$L(m,n,c);var y=Nt.util.createBuffer(),_;e==="SHA-512"?_=m.length:e==="SHA-384"?_=m.length-2:_=m.length-4;for(var f=0;f<_;++f)y.putInt32(m[f][0]),(f!==_-1||e!=="SHA-512/224")&&y.putInt32(m[f][1]);return y},o};var Xw=null,GL=!1,Zw=null,cc=null;function KQ(){Xw="\x80",Xw+=Nt.util.fillString("\0",128),Zw=[[1116352408,3609767458],[1899447441,602891725],[3049323471,3964484399],[3921009573,2173295548],[961987163,4081628472],[1508970993,3053834265],[2453635748,2937671579],[2870763221,3664609560],[3624381080,2734883394],[310598401,1164996542],[607225278,1323610764],[1426881987,3590304994],[1925078388,4068182383],[2162078206,991336113],[2614888103,633803317],[3248222580,3479774868],[3835390401,2666613458],[4022224774,944711139],[264347078,2341262773],[604807628,2007800933],[770255983,1495990901],[1249150122,1856431235],[1555081692,3175218132],[1996064986,2198950837],[2554220882,3999719339],[2821834349,766784016],[2952996808,2566594879],[3210313671,3203337956],[3336571891,1034457026],[3584528711,2466948901],[113926993,3758326383],[338241895,168717936],[666307205,1188179964],[773529912,1546045734],[1294757372,1522805485],[1396182291,2643833823],[1695183700,2343527390],[1986661051,1014477480],[2177026350,1206759142],[2456956037,344077627],[2730485921,1290863460],[2820302411,3158454273],[3259730800,3505952657],[3345764771,106217008],[3516065817,3606008344],[3600352804,1432725776],[4094571909,1467031594],[275423344,851169720],[430227734,3100823752],[506948616,1363258195],[659060556,3750685593],[883997877,3785050280],[958139571,3318307427],[1322822218,3812723403],[1537002063,2003034995],[1747873779,3602036899],[1955562222,1575990012],[2024104815,1125592928],[2227730452,2716904306],[2361852424,442776044],[2428436474,593698344],[2756734187,3733110249],[3204031479,2999351573],[3329325298,3815920427],[3391569614,3928383900],[3515267271,566280711],[3940187606,3454069534],[4118630271,4000239992],[116418474,1914138554],[174292421,2731055270],[289380356,3203993006],[460393269,320620315],[685471733,587496836],[852142971,1086792851],[1017036298,365543100],[1126000580,2618297676],[1288033470,3409855158],[1501505948,4234509866],[1607167915,987167468],[1816402316,1246189591]],cc={},cc["SHA-512"]=[[1779033703,4089235720],[3144134277,2227873595],[1013904242,4271175723],[2773480762,1595750129],[1359893119,2917565137],[2600822924,725511199],[528734635,4215389547],[1541459225,327033209]],cc["SHA-384"]=[[3418070365,3238371032],[1654270250,914150663],[2438529370,812702999],[355462360,4144912697],[1731405415,4290775857],[2394180231,1750603025],[3675008525,1694076839],[1203062813,3204075428]],cc["SHA-512/256"]=[[573645204,4230739756],[2673172387,3360449730],[596883563,1867755857],[2520282905,1497426621],[2519219938,2827943907],[3193839141,1401305490],[721525244,746961066],[246885852,2177182882]],cc["SHA-512/224"]=[[2352822216,424955298],[1944164710,2312950998],[502970286,855612546],[1738396948,1479516111],[258812777,2077511080],[2011393907,79989058],[1067287976,1780299464],[286451373,2446758561]],GL=!0}function $L(e,t,r){for(var i,n,s,a,o,c,u,l,p,d,h,f,m,y,_,A,S,B,O,N,Y,q,z,oe,_e,be,Be,De,Ee,Pe,re,dt,or,fe,ie,J=r.length();J>=128;){for(Ee=0;Ee<16;++Ee)t[Ee][0]=r.getInt32()>>>0,t[Ee][1]=r.getInt32()>>>0;for(;Ee<80;++Ee)dt=t[Ee-2],Pe=dt[0],re=dt[1],i=((Pe>>>19|re<<13)^(re>>>29|Pe<<3)^Pe>>>6)>>>0,n=((Pe<<13|re>>>19)^(re<<3|Pe>>>29)^(Pe<<26|re>>>6))>>>0,fe=t[Ee-15],Pe=fe[0],re=fe[1],s=((Pe>>>1|re<<31)^(Pe>>>8|re<<24)^Pe>>>7)>>>0,a=((Pe<<31|re>>>1)^(Pe<<24|re>>>8)^(Pe<<25|re>>>7))>>>0,or=t[Ee-7],ie=t[Ee-16],re=n+or[1]+a+ie[1],t[Ee][0]=i+or[0]+s+ie[0]+(re/4294967296>>>0)>>>0,t[Ee][1]=re>>>0;for(m=e[0][0],y=e[0][1],_=e[1][0],A=e[1][1],S=e[2][0],B=e[2][1],O=e[3][0],N=e[3][1],Y=e[4][0],q=e[4][1],z=e[5][0],oe=e[5][1],_e=e[6][0],be=e[6][1],Be=e[7][0],De=e[7][1],Ee=0;Ee<80;++Ee)u=((Y>>>14|q<<18)^(Y>>>18|q<<14)^(q>>>9|Y<<23))>>>0,l=((Y<<18|q>>>14)^(Y<<14|q>>>18)^(q<<23|Y>>>9))>>>0,p=(_e^Y&(z^_e))>>>0,d=(be^q&(oe^be))>>>0,o=((m>>>28|y<<4)^(y>>>2|m<<30)^(y>>>7|m<<25))>>>0,c=((m<<4|y>>>28)^(y<<30|m>>>2)^(y<<25|m>>>7))>>>0,h=(m&_|S&(m^_))>>>0,f=(y&A|B&(y^A))>>>0,re=De+l+d+Zw[Ee][1]+t[Ee][1],i=Be+u+p+Zw[Ee][0]+t[Ee][0]+(re/4294967296>>>0)>>>0,n=re>>>0,re=c+f,s=o+h+(re/4294967296>>>0)>>>0,a=re>>>0,Be=_e,De=be,_e=z,be=oe,z=Y,oe=q,re=N+n,Y=O+i+(re/4294967296>>>0)>>>0,q=re>>>0,O=S,N=B,S=_,B=A,_=m,A=y,re=n+a,m=i+s+(re/4294967296>>>0)>>>0,y=re>>>0;re=e[0][1]+y,e[0][0]=e[0][0]+m+(re/4294967296>>>0)>>>0,e[0][1]=re>>>0,re=e[1][1]+A,e[1][0]=e[1][0]+_+(re/4294967296>>>0)>>>0,e[1][1]=re>>>0,re=e[2][1]+B,e[2][0]=e[2][0]+S+(re/4294967296>>>0)>>>0,e[2][1]=re>>>0,re=e[3][1]+N,e[3][0]=e[3][0]+O+(re/4294967296>>>0)>>>0,e[3][1]=re>>>0,re=e[4][1]+q,e[4][0]=e[4][0]+Y+(re/4294967296>>>0)>>>0,e[4][1]=re>>>0,re=e[5][1]+oe,e[5][0]=e[5][0]+z+(re/4294967296>>>0)>>>0,e[5][1]=re>>>0,re=e[6][1]+be,e[6][0]=e[6][0]+_e+(re/4294967296>>>0)>>>0,e[6][1]=re>>>0,re=e[7][1]+De,e[7][0]=e[7][0]+Be+(re/4294967296>>>0)>>>0,e[7][1]=re>>>0,J-=128}}});var YL=b(tC=>{var HQ=Ue();xn();var Tr=HQ.asn1;tC.privateKeyValidator={name:"PrivateKeyInfo",tagClass:Tr.Class.UNIVERSAL,type:Tr.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:Tr.Class.UNIVERSAL,type:Tr.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:Tr.Class.UNIVERSAL,type:Tr.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Tr.Class.UNIVERSAL,type:Tr.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:Tr.Class.UNIVERSAL,type:Tr.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]};tC.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:Tr.Class.UNIVERSAL,type:Tr.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:Tr.Class.UNIVERSAL,type:Tr.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:Tr.Class.UNIVERSAL,type:Tr.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:Tr.Class.UNIVERSAL,type:Tr.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}});var cD=b((Hue,oD)=>{var Lr=Ue();vh();Ki();eC();nt();var tD=YL(),$Q=tD.publicKeyValidator,zQ=tD.privateKeyValidator;typeof QL>"u"&&(QL=Lr.jsbn.BigInteger);var QL,nC=Lr.util.ByteBuffer,xi=typeof Buffer>"u"?Uint8Array:Buffer;Lr.pki=Lr.pki||{};oD.exports=Lr.pki.ed25519=Lr.ed25519=Lr.ed25519||{};var Ge=Lr.ed25519;Ge.constants={};Ge.constants.PUBLIC_KEY_BYTE_LENGTH=32;Ge.constants.PRIVATE_KEY_BYTE_LENGTH=64;Ge.constants.SEED_BYTE_LENGTH=32;Ge.constants.SIGN_BYTE_LENGTH=64;Ge.constants.HASH_BYTE_LENGTH=64;Ge.generateKeyPair=function(e){e=e||{};var t=e.seed;if(t===void 0)t=Lr.random.getBytesSync(Ge.constants.SEED_BYTE_LENGTH);else if(typeof t=="string"){if(t.length!==Ge.constants.SEED_BYTE_LENGTH)throw new TypeError('"seed" must be '+Ge.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(t instanceof Uint8Array))throw new TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');t=Ls({message:t,encoding:"binary"});for(var r=new xi(Ge.constants.PUBLIC_KEY_BYTE_LENGTH),i=new xi(Ge.constants.PRIVATE_KEY_BYTE_LENGTH),n=0;n<32;++n)i[n]=t[n];return QQ(r,i),{publicKey:r,privateKey:i}};Ge.privateKeyFromAsn1=function(e){var t={},r=[],i=Lr.asn1.validate(e,zQ,t,r);if(!i){var n=new Error("Invalid Key.");throw n.errors=r,n}var s=Lr.asn1.derToOid(t.privateKeyOid),a=Lr.oids.EdDSA25519;if(s!==a)throw new Error('Invalid OID "'+s+'"; OID must be "'+a+'".');var o=t.privateKey,c=Ls({message:Lr.asn1.fromDer(o).value,encoding:"binary"});return{privateKeyBytes:c}};Ge.publicKeyFromAsn1=function(e){var t={},r=[],i=Lr.asn1.validate(e,$Q,t,r);if(!i){var n=new Error("Invalid Key.");throw n.errors=r,n}var s=Lr.asn1.derToOid(t.publicKeyOid),a=Lr.oids.EdDSA25519;if(s!==a)throw new Error('Invalid OID "'+s+'"; OID must be "'+a+'".');var o=t.ed25519PublicKey;if(o.length!==Ge.constants.PUBLIC_KEY_BYTE_LENGTH)throw new Error("Key length is invalid.");return Ls({message:o,encoding:"binary"})};Ge.publicKeyFromPrivateKey=function(e){e=e||{};var t=Ls({message:e.privateKey,encoding:"binary"});if(t.length!==Ge.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+Ge.constants.PRIVATE_KEY_BYTE_LENGTH);for(var r=new xi(Ge.constants.PUBLIC_KEY_BYTE_LENGTH),i=0;i<r.length;++i)r[i]=t[32+i];return r};Ge.sign=function(e){e=e||{};var t=Ls(e),r=Ls({message:e.privateKey,encoding:"binary"});if(r.length===Ge.constants.SEED_BYTE_LENGTH){var i=Ge.generateKeyPair({seed:r});r=i.privateKey}else if(r.length!==Ge.constants.PRIVATE_KEY_BYTE_LENGTH)throw new TypeError('"options.privateKey" must have a byte length of '+Ge.constants.SEED_BYTE_LENGTH+" or "+Ge.constants.PRIVATE_KEY_BYTE_LENGTH);var n=new xi(Ge.constants.SIGN_BYTE_LENGTH+t.length);JQ(n,t,t.length,r);for(var s=new xi(Ge.constants.SIGN_BYTE_LENGTH),a=0;a<s.length;++a)s[a]=n[a];return s};Ge.verify=function(e){e=e||{};var t=Ls(e);if(e.signature===void 0)throw new TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var r=Ls({message:e.signature,encoding:"binary"});if(r.length!==Ge.constants.SIGN_BYTE_LENGTH)throw new TypeError('"options.signature" must have a byte length of '+Ge.constants.SIGN_BYTE_LENGTH);var i=Ls({message:e.publicKey,encoding:"binary"});if(i.length!==Ge.constants.PUBLIC_KEY_BYTE_LENGTH)throw new TypeError('"options.publicKey" must have a byte length of '+Ge.constants.PUBLIC_KEY_BYTE_LENGTH);var n=new xi(Ge.constants.SIGN_BYTE_LENGTH+t.length),s=new xi(Ge.constants.SIGN_BYTE_LENGTH+t.length),a;for(a=0;a<Ge.constants.SIGN_BYTE_LENGTH;++a)n[a]=r[a];for(a=0;a<t.length;++a)n[a+Ge.constants.SIGN_BYTE_LENGTH]=t[a];return XQ(s,n,n.length,i)>=0};function Ls(e){var t=e.message;if(t instanceof Uint8Array||t instanceof xi)return t;var r=e.encoding;if(t===void 0)if(e.md)t=e.md.digest().getBytes(),r="binary";else throw new TypeError('"options.message" or "options.md" not specified.');if(typeof t=="string"&&!r)throw new TypeError('"options.encoding" must be "binary" or "utf8".');if(typeof t=="string"){if(typeof Buffer<"u")return Buffer.from(t,r);t=new nC(t,r)}else if(!(t instanceof nC))throw new TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var i=new xi(t.length()),n=0;n<i.length;++n)i[n]=t.at(n);return i}var sC=Ie(),mv=Ie([1]),GQ=Ie([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),WQ=Ie([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),JL=Ie([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),XL=Ie([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),rC=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),YQ=Ie([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function Sh(e,t){var r=Lr.md.sha512.create(),i=new nC(e);r.update(i.getBytes(t),"binary");var n=r.digest().getBytes();if(typeof Buffer<"u")return Buffer.from(n,"binary");for(var s=new xi(Ge.constants.HASH_BYTE_LENGTH),a=0;a<64;++a)s[a]=n.charCodeAt(a);return s}function QQ(e,t){var r=[Ie(),Ie(),Ie(),Ie()],i,n=Sh(t,32);for(n[0]&=248,n[31]&=127,n[31]|=64,uC(r,n),cC(e,r),i=0;i<32;++i)t[i+32]=e[i];return 0}function JQ(e,t,r,i){var n,s,a=new Float64Array(64),o=[Ie(),Ie(),Ie(),Ie()],c=Sh(i,32);c[0]&=248,c[31]&=127,c[31]|=64;var u=r+64;for(n=0;n<r;++n)e[64+n]=t[n];for(n=0;n<32;++n)e[32+n]=c[32+n];var l=Sh(e.subarray(32),r+32);for(aC(l),uC(o,l),cC(e,o),n=32;n<64;++n)e[n]=i[n];var p=Sh(e,r+64);for(aC(p),n=32;n<64;++n)a[n]=0;for(n=0;n<32;++n)a[n]=l[n];for(n=0;n<32;++n)for(s=0;s<32;s++)a[n+s]+=p[n]*c[s];return rD(e.subarray(32),a),u}function XQ(e,t,r,i){var n,s,a=new xi(32),o=[Ie(),Ie(),Ie(),Ie()],c=[Ie(),Ie(),Ie(),Ie()];if(s=-1,r<64||ZQ(c,i))return-1;for(n=0;n<r;++n)e[n]=t[n];for(n=0;n<32;++n)e[n+32]=i[n];var u=Sh(e,r);if(aC(u),sD(o,c,u),uC(c,t.subarray(32)),oC(o,c),cC(a,o),r-=64,iD(t,0,a,0)){for(n=0;n<r;++n)e[n]=0;return-1}for(n=0;n<r;++n)e[n]=t[n+64];return s=r,s}function rD(e,t){var r,i,n,s;for(i=63;i>=32;--i){for(r=0,n=i-32,s=i-12;n<s;++n)t[n]+=r-16*t[i]*rC[n-(i-32)],r=t[n]+128>>8,t[n]-=r*256;t[n]+=r,t[i]=0}for(r=0,n=0;n<32;++n)t[n]+=r-(t[31]>>4)*rC[n],r=t[n]>>8,t[n]&=255;for(n=0;n<32;++n)t[n]-=r*rC[n];for(i=0;i<32;++i)t[i+1]+=t[i]>>8,e[i]=t[i]&255}function aC(e){for(var t=new Float64Array(64),r=0;r<64;++r)t[r]=e[r],e[r]=0;rD(e,t)}function oC(e,t){var r=Ie(),i=Ie(),n=Ie(),s=Ie(),a=Ie(),o=Ie(),c=Ie(),u=Ie(),l=Ie();Ll(r,e[1],e[0]),Ll(l,t[1],t[0]),xt(r,r,l),Ol(i,e[0],e[1]),Ol(l,t[0],t[1]),xt(i,i,l),xt(n,e[3],t[3]),xt(n,n,WQ),xt(s,e[2],t[2]),Ol(s,s,s),Ll(a,i,r),Ll(o,s,n),Ol(c,s,n),Ol(u,i,r),xt(e[0],a,o),xt(e[1],u,c),xt(e[2],c,o),xt(e[3],a,u)}function ZL(e,t,r){for(var i=0;i<4;++i)aD(e[i],t[i],r)}function cC(e,t){var r=Ie(),i=Ie(),n=Ie();iJ(n,t[2]),xt(r,t[0],n),xt(i,t[1],n),yv(e,i),e[31]^=nD(r)<<7}function yv(e,t){var r,i,n,s=Ie(),a=Ie();for(r=0;r<16;++r)a[r]=t[r];for(iC(a),iC(a),iC(a),i=0;i<2;++i){for(s[0]=a[0]-65517,r=1;r<15;++r)s[r]=a[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),n=s[15]>>16&1,s[14]&=65535,aD(a,s,1-n)}for(r=0;r<16;r++)e[2*r]=a[r]&255,e[2*r+1]=a[r]>>8}function ZQ(e,t){var r=Ie(),i=Ie(),n=Ie(),s=Ie(),a=Ie(),o=Ie(),c=Ie();return wa(e[2],mv),eJ(e[1],t),uc(n,e[1]),xt(s,n,GQ),Ll(n,n,e[2]),Ol(s,e[2],s),uc(a,s),uc(o,a),xt(c,o,a),xt(r,c,n),xt(r,r,s),tJ(r,r),xt(r,r,n),xt(r,r,s),xt(r,r,s),xt(e[0],r,s),uc(i,e[0]),xt(i,i,s),eD(i,n)&&xt(e[0],e[0],YQ),uc(i,e[0]),xt(i,i,s),eD(i,n)?-1:(nD(e[0])===t[31]>>7&&Ll(e[0],sC,e[0]),xt(e[3],e[0],e[1]),0)}function eJ(e,t){var r;for(r=0;r<16;++r)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function tJ(e,t){var r=Ie(),i;for(i=0;i<16;++i)r[i]=t[i];for(i=250;i>=0;--i)uc(r,r),i!==1&&xt(r,r,t);for(i=0;i<16;++i)e[i]=r[i]}function eD(e,t){var r=new xi(32),i=new xi(32);return yv(r,e),yv(i,t),iD(r,0,i,0)}function iD(e,t,r,i){return rJ(e,t,r,i,32)}function rJ(e,t,r,i,n){var s,a=0;for(s=0;s<n;++s)a|=e[t+s]^r[i+s];return(1&a-1>>>8)-1}function nD(e){var t=new xi(32);return yv(t,e),t[0]&1}function sD(e,t,r){var i,n;for(wa(e[0],sC),wa(e[1],mv),wa(e[2],mv),wa(e[3],sC),n=255;n>=0;--n)i=r[n/8|0]>>(n&7)&1,ZL(e,t,i),oC(t,e),oC(e,e),ZL(e,t,i)}function uC(e,t){var r=[Ie(),Ie(),Ie(),Ie()];wa(r[0],JL),wa(r[1],XL),wa(r[2],mv),xt(r[3],JL,XL),sD(e,r,t)}function wa(e,t){var r;for(r=0;r<16;r++)e[r]=t[r]|0}function iJ(e,t){var r=Ie(),i;for(i=0;i<16;++i)r[i]=t[i];for(i=253;i>=0;--i)uc(r,r),i!==2&&i!==4&&xt(r,r,t);for(i=0;i<16;++i)e[i]=r[i]}function iC(e){var t,r,i=1;for(t=0;t<16;++t)r=e[t]+i+65535,i=Math.floor(r/65536),e[t]=r-i*65536;e[0]+=i-1+37*(i-1)}function aD(e,t,r){for(var i,n=~(r-1),s=0;s<16;++s)i=n&(e[s]^t[s]),e[s]^=i,t[s]^=i}function Ie(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;++t)r[t]=e[t];return r}function Ol(e,t,r){for(var i=0;i<16;++i)e[i]=t[i]+r[i]}function Ll(e,t,r){for(var i=0;i<16;++i)e[i]=t[i]-r[i]}function uc(e,t){xt(e,t,t)}function xt(e,t,r){var i,n,s=0,a=0,o=0,c=0,u=0,l=0,p=0,d=0,h=0,f=0,m=0,y=0,_=0,A=0,S=0,B=0,O=0,N=0,Y=0,q=0,z=0,oe=0,_e=0,be=0,Be=0,De=0,Ee=0,Pe=0,re=0,dt=0,or=0,fe=r[0],ie=r[1],J=r[2],Me=r[3],je=r[4],Te=r[5],ht=r[6],it=r[7],Rt=r[8],Ft=r[9],Oe=r[10],cr=r[11],Dt=r[12],ur=r[13],yr=r[14],er=r[15];i=t[0],s+=i*fe,a+=i*ie,o+=i*J,c+=i*Me,u+=i*je,l+=i*Te,p+=i*ht,d+=i*it,h+=i*Rt,f+=i*Ft,m+=i*Oe,y+=i*cr,_+=i*Dt,A+=i*ur,S+=i*yr,B+=i*er,i=t[1],a+=i*fe,o+=i*ie,c+=i*J,u+=i*Me,l+=i*je,p+=i*Te,d+=i*ht,h+=i*it,f+=i*Rt,m+=i*Ft,y+=i*Oe,_+=i*cr,A+=i*Dt,S+=i*ur,B+=i*yr,O+=i*er,i=t[2],o+=i*fe,c+=i*ie,u+=i*J,l+=i*Me,p+=i*je,d+=i*Te,h+=i*ht,f+=i*it,m+=i*Rt,y+=i*Ft,_+=i*Oe,A+=i*cr,S+=i*Dt,B+=i*ur,O+=i*yr,N+=i*er,i=t[3],c+=i*fe,u+=i*ie,l+=i*J,p+=i*Me,d+=i*je,h+=i*Te,f+=i*ht,m+=i*it,y+=i*Rt,_+=i*Ft,A+=i*Oe,S+=i*cr,B+=i*Dt,O+=i*ur,N+=i*yr,Y+=i*er,i=t[4],u+=i*fe,l+=i*ie,p+=i*J,d+=i*Me,h+=i*je,f+=i*Te,m+=i*ht,y+=i*it,_+=i*Rt,A+=i*Ft,S+=i*Oe,B+=i*cr,O+=i*Dt,N+=i*ur,Y+=i*yr,q+=i*er,i=t[5],l+=i*fe,p+=i*ie,d+=i*J,h+=i*Me,f+=i*je,m+=i*Te,y+=i*ht,_+=i*it,A+=i*Rt,S+=i*Ft,B+=i*Oe,O+=i*cr,N+=i*Dt,Y+=i*ur,q+=i*yr,z+=i*er,i=t[6],p+=i*fe,d+=i*ie,h+=i*J,f+=i*Me,m+=i*je,y+=i*Te,_+=i*ht,A+=i*it,S+=i*Rt,B+=i*Ft,O+=i*Oe,N+=i*cr,Y+=i*Dt,q+=i*ur,z+=i*yr,oe+=i*er,i=t[7],d+=i*fe,h+=i*ie,f+=i*J,m+=i*Me,y+=i*je,_+=i*Te,A+=i*ht,S+=i*it,B+=i*Rt,O+=i*Ft,N+=i*Oe,Y+=i*cr,q+=i*Dt,z+=i*ur,oe+=i*yr,_e+=i*er,i=t[8],h+=i*fe,f+=i*ie,m+=i*J,y+=i*Me,_+=i*je,A+=i*Te,S+=i*ht,B+=i*it,O+=i*Rt,N+=i*Ft,Y+=i*Oe,q+=i*cr,z+=i*Dt,oe+=i*ur,_e+=i*yr,be+=i*er,i=t[9],f+=i*fe,m+=i*ie,y+=i*J,_+=i*Me,A+=i*je,S+=i*Te,B+=i*ht,O+=i*it,N+=i*Rt,Y+=i*Ft,q+=i*Oe,z+=i*cr,oe+=i*Dt,_e+=i*ur,be+=i*yr,Be+=i*er,i=t[10],m+=i*fe,y+=i*ie,_+=i*J,A+=i*Me,S+=i*je,B+=i*Te,O+=i*ht,N+=i*it,Y+=i*Rt,q+=i*Ft,z+=i*Oe,oe+=i*cr,_e+=i*Dt,be+=i*ur,Be+=i*yr,De+=i*er,i=t[11],y+=i*fe,_+=i*ie,A+=i*J,S+=i*Me,B+=i*je,O+=i*Te,N+=i*ht,Y+=i*it,q+=i*Rt,z+=i*Ft,oe+=i*Oe,_e+=i*cr,be+=i*Dt,Be+=i*ur,De+=i*yr,Ee+=i*er,i=t[12],_+=i*fe,A+=i*ie,S+=i*J,B+=i*Me,O+=i*je,N+=i*Te,Y+=i*ht,q+=i*it,z+=i*Rt,oe+=i*Ft,_e+=i*Oe,be+=i*cr,Be+=i*Dt,De+=i*ur,Ee+=i*yr,Pe+=i*er,i=t[13],A+=i*fe,S+=i*ie,B+=i*J,O+=i*Me,N+=i*je,Y+=i*Te,q+=i*ht,z+=i*it,oe+=i*Rt,_e+=i*Ft,be+=i*Oe,Be+=i*cr,De+=i*Dt,Ee+=i*ur,Pe+=i*yr,re+=i*er,i=t[14],S+=i*fe,B+=i*ie,O+=i*J,N+=i*Me,Y+=i*je,q+=i*Te,z+=i*ht,oe+=i*it,_e+=i*Rt,be+=i*Ft,Be+=i*Oe,De+=i*cr,Ee+=i*Dt,Pe+=i*ur,re+=i*yr,dt+=i*er,i=t[15],B+=i*fe,O+=i*ie,N+=i*J,Y+=i*Me,q+=i*je,z+=i*Te,oe+=i*ht,_e+=i*it,be+=i*Rt,Be+=i*Ft,De+=i*Oe,Ee+=i*cr,Pe+=i*Dt,re+=i*ur,dt+=i*yr,or+=i*er,s+=38*O,a+=38*N,o+=38*Y,c+=38*q,u+=38*z,l+=38*oe,p+=38*_e,d+=38*be,h+=38*Be,f+=38*De,m+=38*Ee,y+=38*Pe,_+=38*re,A+=38*dt,S+=38*or,n=1,i=s+n+65535,n=Math.floor(i/65536),s=i-n*65536,i=a+n+65535,n=Math.floor(i/65536),a=i-n*65536,i=o+n+65535,n=Math.floor(i/65536),o=i-n*65536,i=c+n+65535,n=Math.floor(i/65536),c=i-n*65536,i=u+n+65535,n=Math.floor(i/65536),u=i-n*65536,i=l+n+65535,n=Math.floor(i/65536),l=i-n*65536,i=p+n+65535,n=Math.floor(i/65536),p=i-n*65536,i=d+n+65535,n=Math.floor(i/65536),d=i-n*65536,i=h+n+65535,n=Math.floor(i/65536),h=i-n*65536,i=f+n+65535,n=Math.floor(i/65536),f=i-n*65536,i=m+n+65535,n=Math.floor(i/65536),m=i-n*65536,i=y+n+65535,n=Math.floor(i/65536),y=i-n*65536,i=_+n+65535,n=Math.floor(i/65536),_=i-n*65536,i=A+n+65535,n=Math.floor(i/65536),A=i-n*65536,i=S+n+65535,n=Math.floor(i/65536),S=i-n*65536,i=B+n+65535,n=Math.floor(i/65536),B=i-n*65536,s+=n-1+37*(n-1),n=1,i=s+n+65535,n=Math.floor(i/65536),s=i-n*65536,i=a+n+65535,n=Math.floor(i/65536),a=i-n*65536,i=o+n+65535,n=Math.floor(i/65536),o=i-n*65536,i=c+n+65535,n=Math.floor(i/65536),c=i-n*65536,i=u+n+65535,n=Math.floor(i/65536),u=i-n*65536,i=l+n+65535,n=Math.floor(i/65536),l=i-n*65536,i=p+n+65535,n=Math.floor(i/65536),p=i-n*65536,i=d+n+65535,n=Math.floor(i/65536),d=i-n*65536,i=h+n+65535,n=Math.floor(i/65536),h=i-n*65536,i=f+n+65535,n=Math.floor(i/65536),f=i-n*65536,i=m+n+65535,n=Math.floor(i/65536),m=i-n*65536,i=y+n+65535,n=Math.floor(i/65536),y=i-n*65536,i=_+n+65535,n=Math.floor(i/65536),_=i-n*65536,i=A+n+65535,n=Math.floor(i/65536),A=i-n*65536,i=S+n+65535,n=Math.floor(i/65536),S=i-n*65536,i=B+n+65535,n=Math.floor(i/65536),B=i-n*65536,s+=n-1+37*(n-1),e[0]=s,e[1]=a,e[2]=o,e[3]=c,e[4]=u,e[5]=l,e[6]=p,e[7]=d,e[8]=h,e[9]=f,e[10]=m,e[11]=y,e[12]=_,e[13]=A,e[14]=S,e[15]=B}});var fD=b(($ue,pD)=>{var Pi=Ue();nt();Ki();vh();pD.exports=Pi.kem=Pi.kem||{};var uD=Pi.jsbn.BigInteger;Pi.kem.rsa={};Pi.kem.rsa.create=function(e,t){t=t||{};var r=t.prng||Pi.random,i={};return i.encrypt=function(n,s){var a=Math.ceil(n.n.bitLength()/8),o;do o=new uD(Pi.util.bytesToHex(r.getBytesSync(a)),16).mod(n.n);while(o.compareTo(uD.ONE)<=0);o=Pi.util.hexToBytes(o.toString(16));var c=a-o.length;c>0&&(o=Pi.util.fillString("\0",c)+o);var u=n.encrypt(o,"NONE"),l=e.generate(o,s);return{encapsulation:u,key:l}},i.decrypt=function(n,s,a){var o=n.decrypt(s,"NONE");return e.generate(o,a)},i};Pi.kem.kdf1=function(e,t){lD(this,e,0,t||e.digestLength)};Pi.kem.kdf2=function(e,t){lD(this,e,1,t||e.digestLength)};function lD(e,t,r,i){e.generate=function(n,s){for(var a=new Pi.util.ByteBuffer,o=Math.ceil(s/i)+r,c=new Pi.util.ByteBuffer,u=r;u<o;++u){c.putInt32(u),t.start(),t.update(n+c.getBytes());var l=t.digest();a.putBytes(l.getBytes(i))}return a.truncate(a.length()-s),a.getBytes()}}});var yD=b((zue,mD)=>{var Qe=Ue();nt();mD.exports=Qe.log=Qe.log||{};Qe.log.levels=["none","error","warning","info","debug","verbose","max"];var gv={},fC=[],Ch=null;Qe.log.LEVEL_LOCKED=2;Qe.log.NO_LEVEL_CHECK=4;Qe.log.INTERPOLATE=8;for(ts=0;ts<Qe.log.levels.length;++ts)lC=Qe.log.levels[ts],gv[lC]={index:ts,name:lC.toUpperCase()};var lC,ts;Qe.log.logMessage=function(e){for(var t=gv[e.level].index,r=0;r<fC.length;++r){var i=fC[r];if(i.flags&Qe.log.NO_LEVEL_CHECK)i.f(e);else{var n=gv[i.level].index;t<=n&&i.f(i,e)}}};Qe.log.prepareStandard=function(e){"standard"in e||(e.standard=gv[e.level].name+" ["+e.category+"] "+e.message)};Qe.log.prepareFull=function(e){if(!("full"in e)){var t=[e.message];t=t.concat([]),e.full=Qe.util.format.apply(this,t)}};Qe.log.prepareStandardFull=function(e){"standardFull"in e||(Qe.log.prepareStandard(e),e.standardFull=e.standard)};for(pC=["error","warning","info","debug","verbose"],ts=0;ts<pC.length;++ts)(function(t){Qe.log[t]=function(r,i){var n=Array.prototype.slice.call(arguments).slice(2),s={timestamp:new Date,level:t,category:r,message:i,arguments:n};Qe.log.logMessage(s)}})(pC[ts]);var pC,ts;Qe.log.makeLogger=function(e){var t={flags:0,f:e};return Qe.log.setLevel(t,"none"),t};Qe.log.setLevel=function(e,t){var r=!1;if(e&&!(e.flags&Qe.log.LEVEL_LOCKED))for(var i=0;i<Qe.log.levels.length;++i){var n=Qe.log.levels[i];if(t==n){e.level=t,r=!0;break}}return r};Qe.log.lock=function(e,t){typeof t>"u"||t?e.flags|=Qe.log.LEVEL_LOCKED:e.flags&=~Qe.log.LEVEL_LOCKED};Qe.log.addLogger=function(e){fC.push(e)};typeof console<"u"&&"log"in console?(console.error&&console.warn&&console.info&&console.debug?(dD={error:console.error,warning:console.warn,info:console.info,debug:console.debug,verbose:console.debug},Eh=function(e,t){Qe.log.prepareStandard(t);var r=dD[t.level],i=[t.standard];i=i.concat(t.arguments.slice()),r.apply(console,i)},Dl=Qe.log.makeLogger(Eh)):(Eh=function(t,r){Qe.log.prepareStandardFull(r),console.log(r.standardFull)},Dl=Qe.log.makeLogger(Eh)),Qe.log.setLevel(Dl,"debug"),Qe.log.addLogger(Dl),Ch=Dl):console={log:function(){}};var Dl,dD,Eh;Ch!==null&&typeof window<"u"&&window.location&&(wh=new URL(window.location.href).searchParams,wh.has("console.level")&&Qe.log.setLevel(Ch,wh.get("console.level").slice(-1)[0]),wh.has("console.lock")&&(hD=wh.get("console.lock").slice(-1)[0],hD=="true"&&Qe.log.lock(Ch)));var wh,hD;Qe.log.consoleLogger=Ch});var vD=b((Gue,gD)=>{gD.exports=Gn();Qg();Bl();Cw();eC()});var _D=b((Wue,bD)=>{var ne=Ue();ya();xn();yh();ga();rc();Uw();Ki();nt();lv();var C=ne.asn1,Jr=bD.exports=ne.pkcs7=ne.pkcs7||{};Jr.messageFromPem=function(e){var t=ne.pem.decode(e)[0];if(t.type!=="PKCS7"){var r=new Error('Could not convert PKCS#7 message from PEM; PEM header type is not "PKCS#7".');throw r.headerType=t.type,r}if(t.procType&&t.procType.type==="ENCRYPTED")throw new Error("Could not convert PKCS#7 message from PEM; PEM is encrypted.");var i=C.fromDer(t.body);return Jr.messageFromAsn1(i)};Jr.messageToPem=function(e,t){var r={type:"PKCS7",body:C.toDer(e.toAsn1()).getBytes()};return ne.pem.encode(r,{maxline:t})};Jr.messageFromAsn1=function(e){var t={},r=[];if(!C.validate(e,Jr.asn1.contentInfoValidator,t,r)){var i=new Error("Cannot read PKCS#7 message. ASN.1 object is not an PKCS#7 ContentInfo.");throw i.errors=r,i}var n=C.derToOid(t.contentType),s;switch(n){case ne.pki.oids.envelopedData:s=Jr.createEnvelopedData();break;case ne.pki.oids.encryptedData:s=Jr.createEncryptedData();break;case ne.pki.oids.signedData:s=Jr.createSignedData();break;default:throw new Error("Cannot read PKCS#7 message. ContentType with OID "+n+" is not (yet) supported.")}return s.fromAsn1(t.content.value[0]),s};Jr.createSignedData=function(){var e=null;return e={type:ne.pki.oids.signedData,version:1,certificates:[],crls:[],signers:[],digestAlgorithmIdentifiers:[],contentInfo:null,signerInfos:[],fromAsn1:function(i){if(hC(e,i,Jr.asn1.signedDataValidator),e.certificates=[],e.crls=[],e.digestAlgorithmIdentifiers=[],e.contentInfo=null,e.signerInfos=[],e.rawCapture.certificates)for(var n=e.rawCapture.certificates.value,s=0;s<n.length;++s)e.certificates.push(ne.pki.certificateFromAsn1(n[s]))},toAsn1:function(){e.contentInfo||e.sign();for(var i=[],n=0;n<e.certificates.length;++n)i.push(ne.pki.certificateToAsn1(e.certificates[n]));var s=[],a=C.create(C.Class.CONTEXT_SPECIFIC,0,!0,[C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,C.integerToDer(e.version).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.SET,!0,e.digestAlgorithmIdentifiers),e.contentInfo])]);return i.length>0&&a.value[0].value.push(C.create(C.Class.CONTEXT_SPECIFIC,0,!0,i)),s.length>0&&a.value[0].value.push(C.create(C.Class.CONTEXT_SPECIFIC,1,!0,s)),a.value[0].value.push(C.create(C.Class.UNIVERSAL,C.Type.SET,!0,e.signerInfos)),C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(e.type).getBytes()),a])},addSigner:function(i){var n=i.issuer,s=i.serialNumber;if(i.certificate){var a=i.certificate;typeof a=="string"&&(a=ne.pki.certificateFromPem(a)),n=a.issuer.attributes,s=a.serialNumber}var o=i.key;if(!o)throw new Error("Could not add PKCS#7 signer; no private key specified.");typeof o=="string"&&(o=ne.pki.privateKeyFromPem(o));var c=i.digestAlgorithm||ne.pki.oids.sha1;switch(c){case ne.pki.oids.sha1:case ne.pki.oids.sha256:case ne.pki.oids.sha384:case ne.pki.oids.sha512:case ne.pki.oids.md5:break;default:throw new Error("Could not add PKCS#7 signer; unknown message digest algorithm: "+c)}var u=i.authenticatedAttributes||[];if(u.length>0){for(var l=!1,p=!1,d=0;d<u.length;++d){var h=u[d];if(!l&&h.type===ne.pki.oids.contentType){if(l=!0,p)break;continue}if(!p&&h.type===ne.pki.oids.messageDigest){if(p=!0,l)break;continue}}if(!l||!p)throw new Error("Invalid signer.authenticatedAttributes. If signer.authenticatedAttributes is specified, then it must contain at least two attributes, PKCS #9 content-type and PKCS #9 message-digest.")}e.signers.push({key:o,version:1,issuer:n,serialNumber:s,digestAlgorithm:c,signatureAlgorithm:ne.pki.oids.rsaEncryption,signature:null,authenticatedAttributes:u,unauthenticatedAttributes:[]})},sign:function(i){if(i=i||{},(typeof e.content!="object"||e.contentInfo===null)&&(e.contentInfo=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(ne.pki.oids.data).getBytes())]),"content"in e)){var n;e.content instanceof ne.util.ByteBuffer?n=e.content.bytes():typeof e.content=="string"&&(n=ne.util.encodeUtf8(e.content)),i.detached?e.detachedContent=C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,n):e.contentInfo.value.push(C.create(C.Class.CONTEXT_SPECIFIC,0,!0,[C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,n)]))}if(e.signers.length!==0){var s=t();r(s)}},verify:function(){throw new Error("PKCS#7 signature verification not yet implemented.")},addCertificate:function(i){typeof i=="string"&&(i=ne.pki.certificateFromPem(i)),e.certificates.push(i)},addCertificateRevokationList:function(i){throw new Error("PKCS#7 CRL support not yet implemented.")}},e;function t(){for(var i={},n=0;n<e.signers.length;++n){var s=e.signers[n],a=s.digestAlgorithm;a in i||(i[a]=ne.md[ne.pki.oids[a]].create()),s.authenticatedAttributes.length===0?s.md=i[a]:s.md=ne.md[ne.pki.oids[a]].create()}e.digestAlgorithmIdentifiers=[];for(var a in i)e.digestAlgorithmIdentifiers.push(C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(a).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.NULL,!1,"")]));return i}function r(i){var n;if(e.detachedContent?n=e.detachedContent:(n=e.contentInfo.value[1],n=n.value[0]),!n)throw new Error("Could not sign PKCS#7 message; there is no content to sign.");var s=C.derToOid(e.contentInfo.value[0].value),a=C.toDer(n);a.getByte(),C.getBerValueLength(a),a=a.getBytes();for(var o in i)i[o].start().update(a);for(var c=new Date,u=0;u<e.signers.length;++u){var l=e.signers[u];if(l.authenticatedAttributes.length===0){if(s!==ne.pki.oids.data)throw new Error("Invalid signer; authenticatedAttributes must be present when the ContentInfo content type is not PKCS#7 Data.")}else{l.authenticatedAttributesAsn1=C.create(C.Class.CONTEXT_SPECIFIC,0,!0,[]);for(var p=C.create(C.Class.UNIVERSAL,C.Type.SET,!0,[]),d=0;d<l.authenticatedAttributes.length;++d){var h=l.authenticatedAttributes[d];h.type===ne.pki.oids.messageDigest?h.value=i[l.digestAlgorithm].digest():h.type===ne.pki.oids.signingTime&&(h.value||(h.value=c)),p.value.push(dC(h)),l.authenticatedAttributesAsn1.value.push(dC(h))}a=C.toDer(p).getBytes(),l.md.start().update(a)}l.signature=l.key.sign(l.md,"RSASSA-PKCS1-V1_5")}e.signerInfos=uJ(e.signers)}};Jr.createEncryptedData=function(){var e=null;return e={type:ne.pki.oids.encryptedData,version:0,encryptedContent:{algorithm:ne.pki.oids["aes256-CBC"]},fromAsn1:function(t){hC(e,t,Jr.asn1.encryptedDataValidator)},decrypt:function(t){t!==void 0&&(e.encryptedContent.key=t),xD(e)}},e};Jr.createEnvelopedData=function(){var e=null;return e={type:ne.pki.oids.envelopedData,version:0,recipients:[],encryptedContent:{algorithm:ne.pki.oids["aes256-CBC"]},fromAsn1:function(t){var r=hC(e,t,Jr.asn1.envelopedDataValidator);e.recipients=aJ(r.recipientInfos.value)},toAsn1:function(){return C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(e.type).getBytes()),C.create(C.Class.CONTEXT_SPECIFIC,0,!0,[C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,C.integerToDer(e.version).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.SET,!0,oJ(e.recipients)),C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,lJ(e.encryptedContent))])])])},findRecipient:function(t){for(var r=t.issuer.attributes,i=0;i<e.recipients.length;++i){var n=e.recipients[i],s=n.issuer;if(n.serialNumber===t.serialNumber&&s.length===r.length){for(var a=!0,o=0;o<r.length;++o)if(s[o].type!==r[o].type||s[o].value!==r[o].value){a=!1;break}if(a)return n}}return null},decrypt:function(t,r){if(e.encryptedContent.key===void 0&&t!==void 0&&r!==void 0)switch(t.encryptedContent.algorithm){case ne.pki.oids.rsaEncryption:case ne.pki.oids.desCBC:var i=r.decrypt(t.encryptedContent.content);e.encryptedContent.key=ne.util.createBuffer(i);break;default:throw new Error("Unsupported asymmetric cipher, OID "+t.encryptedContent.algorithm)}xD(e)},addRecipient:function(t){e.recipients.push({version:0,issuer:t.issuer.attributes,serialNumber:t.serialNumber,encryptedContent:{algorithm:ne.pki.oids.rsaEncryption,key:t.publicKey}})},encrypt:function(t,r){if(e.encryptedContent.content===void 0){r=r||e.encryptedContent.algorithm,t=t||e.encryptedContent.key;var i,n,s;switch(r){case ne.pki.oids["aes128-CBC"]:i=16,n=16,s=ne.aes.createEncryptionCipher;break;case ne.pki.oids["aes192-CBC"]:i=24,n=16,s=ne.aes.createEncryptionCipher;break;case ne.pki.oids["aes256-CBC"]:i=32,n=16,s=ne.aes.createEncryptionCipher;break;case ne.pki.oids["des-EDE3-CBC"]:i=24,n=8,s=ne.des.createEncryptionCipher;break;default:throw new Error("Unsupported symmetric cipher, OID "+r)}if(t===void 0)t=ne.util.createBuffer(ne.random.getBytes(i));else if(t.length()!=i)throw new Error("Symmetric key has wrong length; got "+t.length()+" bytes, expected "+i+".");e.encryptedContent.algorithm=r,e.encryptedContent.key=t,e.encryptedContent.parameter=ne.util.createBuffer(ne.random.getBytes(n));var a=s(t);if(a.start(e.encryptedContent.parameter.copy()),a.update(e.content),!a.finish())throw new Error("Symmetric encryption failed.");e.encryptedContent.content=a.output}for(var o=0;o<e.recipients.length;++o){var c=e.recipients[o];if(c.encryptedContent.content===void 0)if(c.encryptedContent.algorithm===ne.pki.oids.rsaEncryption)c.encryptedContent.content=c.encryptedContent.key.encrypt(e.encryptedContent.key.data);else throw new Error("Unsupported asymmetric cipher, OID "+c.encryptedContent.algorithm)}}},e};function nJ(e){var t={},r=[];if(!C.validate(e,Jr.asn1.recipientInfoValidator,t,r)){var i=new Error("Cannot read PKCS#7 RecipientInfo. ASN.1 object is not an PKCS#7 RecipientInfo.");throw i.errors=r,i}return{version:t.version.charCodeAt(0),issuer:ne.pki.RDNAttributesAsArray(t.issuer),serialNumber:ne.util.createBuffer(t.serial).toHex(),encryptedContent:{algorithm:C.derToOid(t.encAlgorithm),parameter:t.encParameter?t.encParameter.value:void 0,content:t.encKey}}}function sJ(e){return C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,C.integerToDer(e.version).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[ne.pki.distinguishedNameToAsn1({attributes:e.issuer}),C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,ne.util.hexToBytes(e.serialNumber))]),C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(e.encryptedContent.algorithm).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.NULL,!1,"")]),C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,e.encryptedContent.content)])}function aJ(e){for(var t=[],r=0;r<e.length;++r)t.push(nJ(e[r]));return t}function oJ(e){for(var t=[],r=0;r<e.length;++r)t.push(sJ(e[r]));return t}function cJ(e){var t=C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,C.integerToDer(e.version).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[ne.pki.distinguishedNameToAsn1({attributes:e.issuer}),C.create(C.Class.UNIVERSAL,C.Type.INTEGER,!1,ne.util.hexToBytes(e.serialNumber))]),C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(e.digestAlgorithm).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.NULL,!1,"")])]);if(e.authenticatedAttributesAsn1&&t.value.push(e.authenticatedAttributesAsn1),t.value.push(C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(e.signatureAlgorithm).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.NULL,!1,"")])),t.value.push(C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,e.signature)),e.unauthenticatedAttributes.length>0){for(var r=C.create(C.Class.CONTEXT_SPECIFIC,1,!0,[]),i=0;i<e.unauthenticatedAttributes.length;++i){var n=e.unauthenticatedAttributes[i];r.values.push(dC(n))}t.value.push(r)}return t}function uJ(e){for(var t=[],r=0;r<e.length;++r)t.push(cJ(e[r]));return t}function dC(e){var t;if(e.type===ne.pki.oids.contentType)t=C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(e.value).getBytes());else if(e.type===ne.pki.oids.messageDigest)t=C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,e.value.bytes());else if(e.type===ne.pki.oids.signingTime){var r=new Date("1950-01-01T00:00:00Z"),i=new Date("2050-01-01T00:00:00Z"),n=e.value;if(typeof n=="string"){var s=Date.parse(n);isNaN(s)?n.length===13?n=C.utcTimeToDate(n):n=C.generalizedTimeToDate(n):n=new Date(s)}n>=r&&n<i?t=C.create(C.Class.UNIVERSAL,C.Type.UTCTIME,!1,C.dateToUtcTime(n)):t=C.create(C.Class.UNIVERSAL,C.Type.GENERALIZEDTIME,!1,C.dateToGeneralizedTime(n))}return C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(e.type).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.SET,!0,[t])])}function lJ(e){return[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(ne.pki.oids.data).getBytes()),C.create(C.Class.UNIVERSAL,C.Type.SEQUENCE,!0,[C.create(C.Class.UNIVERSAL,C.Type.OID,!1,C.oidToDer(e.algorithm).getBytes()),e.parameter?C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,e.parameter.getBytes()):void 0]),C.create(C.Class.CONTEXT_SPECIFIC,0,!0,[C.create(C.Class.UNIVERSAL,C.Type.OCTETSTRING,!1,e.content.getBytes())])]}function hC(e,t,r){var i={},n=[];if(!C.validate(t,r,i,n)){var s=new Error("Cannot read PKCS#7 message. ASN.1 object is not a supported PKCS#7 message.");throw s.errors=s,s}var a=C.derToOid(i.contentType);if(a!==ne.pki.oids.data)throw new Error("Unsupported PKCS#7 message. Only wrapped ContentType Data supported.");if(i.encryptedContent){var o="";if(ne.util.isArray(i.encryptedContent))for(var c=0;c<i.encryptedContent.length;++c){if(i.encryptedContent[c].type!==C.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting encrypted content constructed of only OCTET STRING objects.");o+=i.encryptedContent[c].value}else o=i.encryptedContent;e.encryptedContent={algorithm:C.derToOid(i.encAlgorithm),parameter:ne.util.createBuffer(i.encParameter.value),content:ne.util.createBuffer(o)}}if(i.content){var o="";if(ne.util.isArray(i.content))for(var c=0;c<i.content.length;++c){if(i.content[c].type!==C.Type.OCTETSTRING)throw new Error("Malformed PKCS#7 message, expecting content constructed of only OCTET STRING objects.");o+=i.content[c].value}else o=i.content;e.content=ne.util.createBuffer(o)}return e.version=i.version.charCodeAt(0),e.rawCapture=i,i}function xD(e){if(e.encryptedContent.key===void 0)throw new Error("Symmetric key not available.");if(e.content===void 0){var t;switch(e.encryptedContent.algorithm){case ne.pki.oids["aes128-CBC"]:case ne.pki.oids["aes192-CBC"]:case ne.pki.oids["aes256-CBC"]:t=ne.aes.createDecryptionCipher(e.encryptedContent.key);break;case ne.pki.oids.desCBC:case ne.pki.oids["des-EDE3-CBC"]:t=ne.des.createDecryptionCipher(e.encryptedContent.key);break;default:throw new Error("Unsupported symmetric cipher, OID "+e.encryptedContent.algorithm)}if(t.start(e.encryptedContent.parameter),t.update(e.encryptedContent.content),!t.finish())throw new Error("Symmetric decryption failed.");e.content=t.output}}});var SD=b((Yue,AD)=>{var ar=Ue();ya();Cl();Qg();Bl();nt();var xv=AD.exports=ar.ssh=ar.ssh||{};xv.privateKeyToPutty=function(e,t,r){r=r||"",t=t||"";var i="ssh-rsa",n=t===""?"none":"aes256-cbc",s="PuTTY-User-Key-File-2: "+i+`\r
|
|
38
|
+
`;s+="Encryption: "+n+`\r
|
|
39
|
+
`,s+="Comment: "+r+`\r
|
|
40
|
+
`;var a=ar.util.createBuffer();ql(a,i),rs(a,e.e),rs(a,e.n);var o=ar.util.encode64(a.bytes(),64),c=Math.floor(o.length/66)+1;s+="Public-Lines: "+c+`\r
|
|
41
|
+
`,s+=o;var u=ar.util.createBuffer();rs(u,e.d),rs(u,e.p),rs(u,e.q),rs(u,e.qInv);var l;if(!t)l=ar.util.encode64(u.bytes(),64);else{var p=u.length()+16-1;p-=p%16;var d=vv(u.bytes());d.truncate(d.length()-p+u.length()),u.putBuffer(d);var h=ar.util.createBuffer();h.putBuffer(vv("\0\0\0\0",t)),h.putBuffer(vv("\0\0\0",t));var f=ar.aes.createEncryptionCipher(h.truncate(8),"CBC");f.start(ar.util.createBuffer().fillWithByte(0,16)),f.update(u.copy()),f.finish();var m=f.output;m.truncate(16),l=ar.util.encode64(m.bytes(),64)}c=Math.floor(l.length/66)+1,s+=`\r
|
|
42
|
+
Private-Lines: `+c+`\r
|
|
43
|
+
`,s+=l;var y=vv("putty-private-key-file-mac-key",t),_=ar.util.createBuffer();ql(_,i),ql(_,n),ql(_,r),_.putInt32(a.length()),_.putBuffer(a),_.putInt32(u.length()),_.putBuffer(u);var A=ar.hmac.create();return A.start("sha1",y),A.update(_.bytes()),s+=`\r
|
|
44
|
+
Private-MAC: `+A.digest().toHex()+`\r
|
|
45
|
+
`,s};xv.publicKeyToOpenSSH=function(e,t){var r="ssh-rsa";t=t||"";var i=ar.util.createBuffer();return ql(i,r),rs(i,e.e),rs(i,e.n),r+" "+ar.util.encode64(i.bytes())+" "+t};xv.privateKeyToOpenSSH=function(e,t){return t?ar.pki.encryptRsaPrivateKey(e,t,{legacy:!0,algorithm:"aes128"}):ar.pki.privateKeyToPem(e)};xv.getPublicKeyFingerprint=function(e,t){t=t||{};var r=t.md||ar.md.md5.create(),i="ssh-rsa",n=ar.util.createBuffer();ql(n,i),rs(n,e.e),rs(n,e.n),r.start(),r.update(n.getBytes());var s=r.digest();if(t.encoding==="hex"){var a=s.toHex();return t.delimiter?a.match(/.{2}/g).join(t.delimiter):a}else{if(t.encoding==="binary")return s.getBytes();if(t.encoding)throw new Error('Unknown encoding "'+t.encoding+'".')}return s};function rs(e,t){var r=t.toString(16);r[0]>="8"&&(r="00"+r);var i=ar.util.hexToBytes(r);e.putInt32(i.length),e.putBytes(i)}function ql(e,t){e.putInt32(t.length),e.putString(t)}function vv(){for(var e=ar.md.sha1.create(),t=arguments.length,r=0;r<t;++r)e.update(arguments[r]);return e.digest()}});var CD=b((Que,wD)=>{wD.exports=Ue();ya();HL();xn();Kg();yh();cD();Cl();fD();yD();vD();Fw();ev();rc();Ow();Kw();_D();$w();Dw();Ew();ov();Ki();Bw();SD();Jw();nt()});var BD=b(is=>{var pJ=require("net"),{promisify:fJ}=require("util"),wt=CD(),dJ=fJ(wt.pki.rsa.generateKeyPair);function ED(e){let t=wt.pem.decode(e)[0],r;switch(t.type){case"PRIVATE KEY":case"RSA PRIVATE KEY":r=wt.pki.privateKeyFromPem(e);break;case"PUBLIC KEY":case"RSA PUBLIC KEY":r=wt.pki.publicKeyFromPem(e);break;case"CERTIFICATE":case"X509 CERTIFICATE":case"TRUSTED CERTIFICATE":r=wt.pki.certificateFromPem(e).publicKey;break;case"CERTIFICATE REQUEST":r=wt.pki.certificationRequestFromPem(e).publicKey;break;default:throw new Error("Unable to detect forge message type")}return r}function TD(e){let t=null,r=[],i=[],n=(e.subject.attributes||[]).find(o=>o.name==="commonName"),s=(e.extensions||[]).find(o=>"altNames"in o),a=(e.attributes||[]).find(o=>"extensions"in o);if(s&&s.altNames&&s.altNames.length)i=s.altNames;else if(a&&a.extensions&&a.extensions.length){let o=a.extensions.find(c=>"altNames"in c);o&&o.altNames&&o.altNames.length&&(i=o.altNames)}return n&&(t=n.value),i&&(r=i.map(o=>o.value)),{commonName:t,altNames:r}}async function ID(e=2048){let t=await dJ({bits:e}),r=wt.pki.privateKeyToPem(t.privateKey);return Buffer.from(r)}is.createPrivateKey=ID;is.createPublicKey=async e=>{let t=wt.pki.privateKeyFromPem(e),r=wt.pki.rsa.setPublicKey(t.n,t.e),i=wt.pki.publicKeyToPem(r);return Buffer.from(i)};is.getPemBody=e=>{let t=wt.pem.decode(e)[0];return wt.util.encode64(t.body)};is.splitPemChain=e=>wt.pem.decode(e).map(wt.pem.encode);is.getModulus=async e=>{Buffer.isBuffer(e)||(e=Buffer.from(e));let t=ED(e);return Buffer.from(wt.util.hexToBytes(t.n.toString(16)),"binary")};is.getPublicExponent=async e=>{Buffer.isBuffer(e)||(e=Buffer.from(e));let t=ED(e);return Buffer.from(wt.util.hexToBytes(t.e.toString(16)),"binary")};is.readCsrDomains=async e=>{Buffer.isBuffer(e)||(e=Buffer.from(e));let t=wt.pki.certificationRequestFromPem(e);return TD(t)};is.readCertificateInfo=async e=>{Buffer.isBuffer(e)||(e=Buffer.from(e));let t=wt.pki.certificateFromPem(e),r=(t.issuer.attributes||[]).find(i=>i.name==="commonName");return{issuer:{commonName:r?r.value:null},domains:TD(t),notAfter:t.validity.notAfter,notBefore:t.validity.notBefore}};function hJ(e){switch(e){case"C":return wt.asn1.Type.PRINTABLESTRING;case"E":return wt.asn1.Type.IA5STRING;default:return wt.asn1.Type.UTF8}}function mJ(e){return Object.entries(e).reduce((t,[r,i])=>{if(i){let n=hJ(r);t.push({shortName:r,value:i,valueTagClass:n})}return t},[])}function yJ(e){return e.map(t=>({type:pJ.isIP(t)?7:2,value:t}))}is.createCsr=async(e,t=null)=>{t?Buffer.isBuffer(t)||(t=Buffer.from(t)):t=await ID(e.keySize),typeof e.altNames>"u"&&(e.altNames=[]);let r=wt.pki.createCertificationRequest(),i=wt.pki.privateKeyFromPem(t),n=wt.pki.rsa.setPublicKey(i.n,i.e);r.publicKey=n,e.commonName&&!e.altNames.includes(e.commonName)&&e.altNames.unshift(e.commonName);let s=mJ({CN:e.commonName,C:e.country,ST:e.state,L:e.locality,O:e.organization,OU:e.organizationUnit,E:e.emailAddress});r.setSubject(s),e.altNames.length&&r.setAttributes([{name:"extensionRequest",extensions:[{name:"subjectAltName",altNames:yJ(e.altNames)}]}]),r.sign(i,wt.md.sha256.create());let a=wt.pki.certificationRequestToPem(r);return[t,Buffer.from(a)]}});var kD=b(lc=>{lc.Client=u4();lc.directory={buypass:{staging:"https://api.test4.buypass.no/acme/directory",production:"https://api.buypass.com/acme/directory"},google:{staging:"https://dv.acme-v02.test-api.pki.goog/directory",production:"https://dv.acme-v02.api.pki.goog/directory"},letsencrypt:{staging:"https://acme-staging-v02.api.letsencrypt.org/directory",production:"https://acme-v02.api.letsencrypt.org/directory"},zerossl:{production:"https://acme.zerossl.com/v2/DV90"}};lc.crypto=Go();lc.forge=BD();lc.axios=Mg();lc.setLogger=ua().setLogger});var LD=b((sle,vC)=>{"use strict";var vJ=Object.prototype.hasOwnProperty,Xr="~";function Th(){}Object.create&&(Th.prototype=Object.create(null),new Th().__proto__||(Xr=!1));function xJ(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function OD(e,t,r,i,n){if(typeof r!="function")throw new TypeError("The listener must be a function");var s=new xJ(r,i||e,n),a=Xr?Xr+t:t;return e._events[a]?e._events[a].fn?e._events[a]=[e._events[a],s]:e._events[a].push(s):(e._events[a]=s,e._eventsCount++),e}function Ev(e,t){--e._eventsCount===0?e._events=new Th:delete e._events[t]}function Vr(){this._events=new Th,this._eventsCount=0}Vr.prototype.eventNames=function(){var t=[],r,i;if(this._eventsCount===0)return t;for(i in r=this._events)vJ.call(r,i)&&t.push(Xr?i.slice(1):i);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};Vr.prototype.listeners=function(t){var r=Xr?Xr+t:t,i=this._events[r];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,s=i.length,a=new Array(s);n<s;n++)a[n]=i[n].fn;return a};Vr.prototype.listenerCount=function(t){var r=Xr?Xr+t:t,i=this._events[r];return i?i.fn?1:i.length:0};Vr.prototype.emit=function(t,r,i,n,s,a){var o=Xr?Xr+t:t;if(!this._events[o])return!1;var c=this._events[o],u=arguments.length,l,p;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),u){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,r),!0;case 3:return c.fn.call(c.context,r,i),!0;case 4:return c.fn.call(c.context,r,i,n),!0;case 5:return c.fn.call(c.context,r,i,n,s),!0;case 6:return c.fn.call(c.context,r,i,n,s,a),!0}for(p=1,l=new Array(u-1);p<u;p++)l[p-1]=arguments[p];c.fn.apply(c.context,l)}else{var d=c.length,h;for(p=0;p<d;p++)switch(c[p].once&&this.removeListener(t,c[p].fn,void 0,!0),u){case 1:c[p].fn.call(c[p].context);break;case 2:c[p].fn.call(c[p].context,r);break;case 3:c[p].fn.call(c[p].context,r,i);break;case 4:c[p].fn.call(c[p].context,r,i,n);break;default:if(!l)for(h=1,l=new Array(u-1);h<u;h++)l[h-1]=arguments[h];c[p].fn.apply(c[p].context,l)}}return!0};Vr.prototype.on=function(t,r,i){return OD(this,t,r,i,!1)};Vr.prototype.once=function(t,r,i){return OD(this,t,r,i,!0)};Vr.prototype.removeListener=function(t,r,i,n){var s=Xr?Xr+t:t;if(!this._events[s])return this;if(!r)return Ev(this,s),this;var a=this._events[s];if(a.fn)a.fn===r&&(!n||a.once)&&(!i||a.context===i)&&Ev(this,s);else{for(var o=0,c=[],u=a.length;o<u;o++)(a[o].fn!==r||n&&!a[o].once||i&&a[o].context!==i)&&c.push(a[o]);c.length?this._events[s]=c.length===1?c[0]:c:Ev(this,s)}return this};Vr.prototype.removeAllListeners=function(t){var r;return t?(r=Xr?Xr+t:t,this._events[r]&&Ev(this,r)):(this._events=new Th,this._eventsCount=0),this};Vr.prototype.off=Vr.prototype.removeListener;Vr.prototype.addListener=Vr.prototype.on;Vr.prefixed=Xr;Vr.EventEmitter=Vr;typeof vC<"u"&&(vC.exports=Vr)});var qD=b((ale,DD)=>{"use strict";DD.exports=function(t,r){if(r=r.split(":")[0],t=+t,!t)return!1;switch(r){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0}});var Tv=b(UD=>{var Ds=UD,bJ=require("url"),jD=require("util")._extend,_J=qD(),AJ=/(^|,)\s*upgrade\s*($|,)/i,xC=/^https|wss/;Ds.isSSL=xC;Ds.setupOutgoing=function(e,t,r,i){e.port=t[i||"target"].port||(xC.test(t[i||"target"].protocol)?443:80),["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"].forEach(function(o){e[o]=t[i||"target"][o]}),e.method=t.method||r.method,e.headers=jD({},r.headers),t.headers&&jD(e.headers,t.headers),t.auth&&(e.auth=t.auth),t.ca&&(e.ca=t.ca),xC.test(t[i||"target"].protocol)&&(e.rejectUnauthorized=typeof t.secure>"u"?!0:t.secure),e.agent=t.agent||!1,e.localAddress=t.localAddress,e.agent||(e.headers=e.headers||{},(typeof e.headers.connection!="string"||!AJ.test(e.headers.connection))&&(e.headers.connection="close"));var n=t[i||"target"],s=n&&t.prependPath!==!1&&n.path||"",a=t.toProxy?r.url:bJ.parse(r.url).path||"";return a=t.ignorePath?"":a,e.path=Ds.urlJoin(s,a),t.changeOrigin&&(e.headers.host=_J(e.port,t[i||"target"].protocol)&&!SJ(e.host)?e.host+":"+e.port:e.host),e};Ds.setupSocket=function(e){return e.setTimeout(0),e.setNoDelay(!0),e.setKeepAlive(!0,0),e};Ds.getPort=function(e){var t=e.headers.host?e.headers.host.match(/:(\d+)/):"";return t?t[1]:Ds.hasEncryptedConnection(e)?"443":"80"};Ds.hasEncryptedConnection=function(e){return!!(e.connection.encrypted||e.connection.pair)};Ds.urlJoin=function(){var e=Array.prototype.slice.call(arguments),t=e.length-1,r=e[t],i=r.split("?"),n;return e[t]=i.shift(),n=[e.filter(Boolean).join("/").replace(/\/+/g,"/").replace("http:/","http://").replace("https:/","https://")],n.push.apply(n,i),n.join("?")};Ds.rewriteCookieProperty=function e(t,r,i){return Array.isArray(t)?t.map(function(n){return e(n,r,i)}):t.replace(new RegExp("(;\\s*"+i+"=)([^;]+)","i"),function(n,s,a){var o;if(a in r)o=r[a];else if("*"in r)o=r["*"];else return n;return o?s+o:""})};function SJ(e){return!!~e.indexOf(":")}});var KD=b((cle,VD)=>{var FD=require("url"),MD=Tv(),wJ=/^201|30(1|2|7|8)$/;VD.exports={removeChunked:function(t,r,i){t.httpVersion==="1.0"&&delete i.headers["transfer-encoding"]},setConnection:function(t,r,i){t.httpVersion==="1.0"?i.headers.connection=t.headers.connection||"close":t.httpVersion!=="2.0"&&!i.headers.connection&&(i.headers.connection=t.headers.connection||"keep-alive")},setRedirectHostRewrite:function(t,r,i,n){if((n.hostRewrite||n.autoRewrite||n.protocolRewrite)&&i.headers.location&&wJ.test(i.statusCode)){var s=FD.parse(n.target),a=FD.parse(i.headers.location);if(s.host!=a.host)return;n.hostRewrite?a.host=n.hostRewrite:n.autoRewrite&&(a.host=t.headers.host),n.protocolRewrite&&(a.protocol=n.protocolRewrite),i.headers.location=a.format()}},writeHeaders:function(t,r,i,n){var s=n.cookieDomainRewrite,a=n.cookiePathRewrite,o=n.preserveHeaderKeyCase,c,u=function(d,h){h!=null&&(s&&d.toLowerCase()==="set-cookie"&&(h=MD.rewriteCookieProperty(h,s,"domain")),a&&d.toLowerCase()==="set-cookie"&&(h=MD.rewriteCookieProperty(h,a,"path")),r.setHeader(String(d).trim(),h))};if(typeof s=="string"&&(s={"*":s}),typeof a=="string"&&(a={"*":a}),o&&i.rawHeaders!=null){c={};for(var l=0;l<i.rawHeaders.length;l+=2){var p=i.rawHeaders[l];c[p.toLowerCase()]=p}}Object.keys(i.headers).forEach(function(d){var h=i.headers[d];o&&c&&(d=c[d]||d),u(d,h)})},writeStatusCode:function(t,r,i){i.statusMessage?(r.statusCode=i.statusCode,r.statusMessage=i.statusMessage):r.statusCode=i.statusCode}}});var $D=b((ule,HD)=>{var CJ=require("http"),EJ=require("https"),Ih=KD(),Iv=Tv(),TJ=RS();Ih=Object.keys(Ih).map(function(e){return Ih[e]});var IJ={http:CJ,https:EJ};HD.exports={deleteLength:function(t,r,i){(t.method==="DELETE"||t.method==="OPTIONS")&&!t.headers["content-length"]&&(t.headers["content-length"]="0",delete t.headers["transfer-encoding"])},timeout:function(t,r,i){i.timeout&&t.socket.setTimeout(i.timeout)},XHeaders:function(t,r,i){if(i.xfwd){var n=t.isSpdy||Iv.hasEncryptedConnection(t),s={for:t.connection.remoteAddress||t.socket.remoteAddress,port:Iv.getPort(t),proto:n?"https":"http"};["for","port","proto"].forEach(function(a){t.headers["x-forwarded-"+a]=(t.headers["x-forwarded-"+a]||"")+(t.headers["x-forwarded-"+a]?",":"")+s[a]}),t.headers["x-forwarded-host"]=t.headers["x-forwarded-host"]||t.headers.host||""}},stream:function(t,r,i,n,s,a){s.emit("start",t,r,i.target||i.forward);var o=i.followRedirects?TJ:IJ,c=o.http,u=o.https;if(i.forward){var l=(i.forward.protocol==="https:"?u:c).request(Iv.setupOutgoing(i.ssl||{},i,t,"forward")),p=f(l,i.forward);if(t.on("error",p),l.on("error",p),(i.buffer||t).pipe(l),!i.target)return r.end()}var d=(i.target.protocol==="https:"?u:c).request(Iv.setupOutgoing(i.ssl||{},i,t));d.on("socket",function(m){s&&!d.getHeader("expect")&&s.emit("proxyReq",d,t,r,i)}),i.proxyTimeout&&d.setTimeout(i.proxyTimeout,function(){d.abort()}),t.on("aborted",function(){d.abort()});var h=f(d,i.target);t.on("error",h),d.on("error",h);function f(m,y){return function(A){if(t.socket.destroyed&&A.code==="ECONNRESET")return s.emit("econnreset",A,t,r,y),m.abort();a?a(A,t,r,y):s.emit("error",A,t,r,y)}}(i.buffer||t).pipe(d),d.on("response",function(m){if(s&&s.emit("proxyRes",m,t,r),!r.headersSent&&!i.selfHandleResponse)for(var y=0;y<Ih.length&&!Ih[y](t,r,m,i);y++);r.finished?s&&s.emit("end",t,r,m):(m.on("end",function(){s&&s.emit("end",t,r,m)}),i.selfHandleResponse||m.pipe(r))})}}});var GD=b((lle,zD)=>{var BJ=require("http"),kJ=require("https"),Ul=Tv();zD.exports={checkMethodAndHeader:function(t,r){if(t.method!=="GET"||!t.headers.upgrade||t.headers.upgrade.toLowerCase()!=="websocket")return r.destroy(),!0},XHeaders:function(t,r,i){if(i.xfwd){var n={for:t.connection.remoteAddress||t.socket.remoteAddress,port:Ul.getPort(t),proto:Ul.hasEncryptedConnection(t)?"wss":"ws"};["for","port","proto"].forEach(function(s){t.headers["x-forwarded-"+s]=(t.headers["x-forwarded-"+s]||"")+(t.headers["x-forwarded-"+s]?",":"")+n[s]})}},stream:function(t,r,i,n,s,a){var o=function(l,p){return Object.keys(p).reduce(function(d,h){var f=p[h];if(!Array.isArray(f))return d.push(h+": "+f),d;for(var m=0;m<f.length;m++)d.push(h+": "+f[m]);return d},[l]).join(`\r
|
|
46
|
+
`)+`\r
|
|
47
|
+
\r
|
|
48
|
+
`};Ul.setupSocket(r),n&&n.length&&r.unshift(n);var c=(Ul.isSSL.test(i.target.protocol)?kJ:BJ).request(Ul.setupOutgoing(i.ssl||{},i,t));return s&&s.emit("proxyReqWs",c,t,r,i,n),c.on("error",u),c.on("response",function(l){l.upgrade||(r.write(o("HTTP/"+l.httpVersion+" "+l.statusCode+" "+l.statusMessage,l.headers)),l.pipe(r))}),c.on("upgrade",function(l,p,d){p.on("error",u),p.on("end",function(){s.emit("close",l,p,d)}),r.on("error",function(){p.end()}),Ul.setupSocket(p),d&&d.length&&p.unshift(d),r.write(o("HTTP/1.1 101 Switching Protocols",l.headers)),p.pipe(r).pipe(p),s.emit("open",p),s.emit("proxySocket",p)}),c.end();function u(l){a?a(l,t,r):s.emit("error",l,t,r),r.end()}}}});var eq=b((ple,ZD)=>{var JD=ZD.exports,WD=require("util")._extend,PJ=require("url").parse,XD=LD(),NJ=require("http"),RJ=require("https"),YD=$D(),QD=GD();JD.Server=pc;function bC(e){return function(t){return function(r,i){var n=e==="ws"?this.wsPasses:this.webPasses,s=[].slice.call(arguments),a=s.length-1,o,c;typeof s[a]=="function"&&(c=s[a],a--);var u=t;if(!(s[a]instanceof Buffer)&&s[a]!==i&&(u=WD({},t),WD(u,s[a]),a--),s[a]instanceof Buffer&&(o=s[a]),["target","forward"].forEach(function(p){typeof u[p]=="string"&&(u[p]=PJ(u[p]))}),!u.target&&!u.forward)return this.emit("error",new Error("Must provide a proper URL as target"));for(var l=0;l<n.length&&!n[l](r,i,u,o,this,c);l++);}}}JD.createRightProxy=bC;function pc(e){XD.call(this),e=e||{},e.prependPath=e.prependPath!==!1,this.web=this.proxyRequest=bC("web")(e),this.ws=this.proxyWebsocketRequest=bC("ws")(e),this.options=e,this.webPasses=Object.keys(YD).map(function(t){return YD[t]}),this.wsPasses=Object.keys(QD).map(function(t){return QD[t]}),this.on("error",this.onError,this)}require("util").inherits(pc,XD);pc.prototype.onError=function(e){if(this.listeners("error").length===1)throw e};pc.prototype.listen=function(e,t){var r=this,i=function(n,s){r.web(n,s)};return this._server=this.options.ssl?RJ.createServer(this.options.ssl,i):NJ.createServer(i),this.options.ws&&this._server.on("upgrade",function(n,s,a){r.ws(n,s,a)}),this._server.listen(e,t),this};pc.prototype.close=function(e){var t=this;this._server&&this._server.close(r);function r(){t._server=null,e&&e.apply(null,arguments)}};pc.prototype.before=function(e,t,r){if(e!=="ws"&&e!=="web")throw new Error("type must be `web` or `ws`");var i=e==="ws"?this.wsPasses:this.webPasses,n=!1;if(i.forEach(function(s,a){s.name===t&&(n=a)}),n===!1)throw new Error("No such pass");i.splice(n,0,r)};pc.prototype.after=function(e,t,r){if(e!=="ws"&&e!=="web")throw new Error("type must be `web` or `ws`");var i=e==="ws"?this.wsPasses:this.webPasses,n=!1;if(i.forEach(function(s,a){s.name===t&&(n=a)}),n===!1)throw new Error("No such pass");i.splice(n++,0,r)}});var rq=b((fle,tq)=>{var Bh=eq().Server;function _C(e){return new Bh(e)}Bh.createProxyServer=_C;Bh.createServer=_C;Bh.createProxy=_C;tq.exports=Bh});var nq=b((dle,iq)=>{iq.exports=rq()});var SC=b((yle,lq)=>{"use strict";var kh=e=>e&&typeof e.message=="string",AC=e=>{if(!e)return;let t=e.cause;if(typeof t=="function"){let r=e.cause();return kh(r)?r:void 0}else return kh(t)?t:void 0},cq=(e,t)=>{if(!kh(e))return"";let r=e.stack||"";if(t.has(e))return r+`
|
|
49
|
+
causes have become circular...`;let i=AC(e);return i?(t.add(e),r+`
|
|
50
|
+
caused by: `+cq(i,t)):r},OJ=e=>cq(e,new Set),uq=(e,t,r)=>{if(!kh(e))return"";let i=r?"":e.message||"";if(t.has(e))return i+": ...";let n=AC(e);if(n){t.add(e);let s=typeof e.cause=="function";return i+(s?"":": ")+uq(n,t,s)}else return i},LJ=e=>uq(e,new Set);lq.exports={isErrorLike:kh,getErrorCause:AC,stackWithCauses:OJ,messageWithCauses:LJ}});var wC=b((gle,fq)=>{"use strict";var DJ=Symbol("circular-ref-tag"),Pv=Symbol("pino-raw-err-ref"),pq=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[Pv]},set:function(e){this[Pv]=e}}});Object.defineProperty(pq,Pv,{writable:!0,value:{}});fq.exports={pinoErrProto:pq,pinoErrorSymbols:{seen:DJ,rawSymbol:Pv}}});var mq=b((vle,hq)=>{"use strict";hq.exports=EC;var{messageWithCauses:qJ,stackWithCauses:jJ,isErrorLike:dq}=SC(),{pinoErrProto:UJ,pinoErrorSymbols:FJ}=wC(),{seen:CC}=FJ,{toString:MJ}=Object.prototype;function EC(e){if(!dq(e))return e;e[CC]=void 0;let t=Object.create(UJ);t.type=MJ.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=qJ(e),t.stack=jJ(e),Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>EC(r)));for(let r in e)if(t[r]===void 0){let i=e[r];dq(i)?r!=="cause"&&!Object.prototype.hasOwnProperty.call(i,CC)&&(t[r]=EC(i)):t[r]=i}return delete e[CC],t.raw=e,t}});var gq=b((xle,yq)=>{"use strict";yq.exports=Rv;var{isErrorLike:TC}=SC(),{pinoErrProto:VJ,pinoErrorSymbols:KJ}=wC(),{seen:Nv}=KJ,{toString:HJ}=Object.prototype;function Rv(e){if(!TC(e))return e;e[Nv]=void 0;let t=Object.create(VJ);t.type=HJ.call(e.constructor)==="[object Function]"?e.constructor.name:e.name,t.message=e.message,t.stack=e.stack,Array.isArray(e.errors)&&(t.aggregateErrors=e.errors.map(r=>Rv(r))),TC(e.cause)&&!Object.prototype.hasOwnProperty.call(e.cause,Nv)&&(t.cause=Rv(e.cause));for(let r in e)if(t[r]===void 0){let i=e[r];TC(i)?Object.prototype.hasOwnProperty.call(i,Nv)||(t[r]=Rv(i)):t[r]=i}return delete e[Nv],t.raw=e,t}});var _q=b((ble,bq)=>{"use strict";bq.exports={mapHttpRequest:$J,reqSerializer:xq};var IC=Symbol("pino-raw-req-ref"),vq=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[IC]},set:function(e){this[IC]=e}}});Object.defineProperty(vq,IC,{writable:!0,value:{}});function xq(e){let t=e.info||e.socket,r=Object.create(vq);if(r.id=typeof e.id=="function"?e.id():e.id||(e.info?e.info.id:void 0),r.method=e.method,e.originalUrl)r.url=e.originalUrl;else{let i=e.path;r.url=typeof i=="string"?i:e.url?e.url.path||e.url:void 0}return e.query&&(r.query=e.query),e.params&&(r.params=e.params),r.headers=e.headers,r.remoteAddress=t&&t.remoteAddress,r.remotePort=t&&t.remotePort,r.raw=e.raw||e,r}function $J(e){return{req:xq(e)}}});var Cq=b((_le,wq)=>{"use strict";wq.exports={mapHttpResponse:zJ,resSerializer:Sq};var BC=Symbol("pino-raw-res-ref"),Aq=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[BC]},set:function(e){this[BC]=e}}});Object.defineProperty(Aq,BC,{writable:!0,value:{}});function Sq(e){let t=Object.create(Aq);return t.statusCode=e.headersSent?e.statusCode:null,t.headers=e.getHeaders?e.getHeaders():e._headers,t.raw=e,t}function zJ(e){return{res:Sq(e)}}});var PC=b((Ale,Eq)=>{"use strict";var kC=mq(),GJ=gq(),Ov=_q(),Lv=Cq();Eq.exports={err:kC,errWithCause:GJ,mapHttpRequest:Ov.mapHttpRequest,mapHttpResponse:Lv.mapHttpResponse,req:Ov.reqSerializer,res:Lv.resSerializer,wrapErrorSerializer:function(t){return t===kC?t:function(i){return t(kC(i))}},wrapRequestSerializer:function(t){return t===Ov.reqSerializer?t:function(i){return t(Ov.reqSerializer(i))}},wrapResponseSerializer:function(t){return t===Lv.resSerializer?t:function(i){return t(Lv.resSerializer(i))}}}});var NC=b((Sle,Tq)=>{"use strict";function WJ(e,t){return t}Tq.exports=function(){let t=Error.prepareStackTrace;Error.prepareStackTrace=WJ;let r=new Error().stack;if(Error.prepareStackTrace=t,!Array.isArray(r))return;let i=r.slice(2),n=[];for(let s of i)s&&n.push(s.getFileName());return n}});var Bq=b((wle,Iq)=>{"use strict";Iq.exports=YJ;function YJ(e={}){let{ERR_PATHS_MUST_BE_STRINGS:t=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:r=i=>`fast-redact \u2013 Invalid path (${i})`}=e;return function({paths:n}){n.forEach(s=>{if(typeof s!="string")throw Error(t());try{if(/〇/.test(s))throw Error();let a=(s[0]==="["?"":".")+s.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").replace(/\[\*\]/g,"[\u3007]");if(/\n|\r|;/.test(a)||/\/\*/.test(a))throw Error();Function(`
|
|
51
|
+
'use strict'
|
|
52
|
+
const o = new Proxy({}, { get: () => o, set: () => { throw Error() } });
|
|
53
|
+
const \u3007 = null;
|
|
54
|
+
o${a}
|
|
55
|
+
if ([o${a}].length !== 1) throw Error()`)()}catch{throw Error(r(s))}})}}});var Dv=b((Cle,kq)=>{"use strict";kq.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var Nq=b((Ele,Pq)=>{"use strict";var QJ=Dv();Pq.exports=JJ;function JJ({paths:e}){let t=[];var r=0;let i=e.reduce(function(n,s,a){var o=s.match(QJ).map(l=>l.replace(/'|"|`/g,""));let c=s[0]==="[";o=o.map(l=>l[0]==="["?l.substr(1,l.length-2):l);let u=o.indexOf("*");if(u>-1){let l=o.slice(0,u),p=l.join("."),d=o.slice(u+1,o.length),h=d.length>0;r++,t.push({before:l,beforeStr:p,after:d,nested:h})}else n[s]={path:o,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(s),leadingBracket:c};return n},{});return{wildcards:t,wcLen:r,secret:i}}});var Oq=b((Tle,Rq)=>{"use strict";var XJ=Dv();Rq.exports=ZJ;function ZJ({secret:e,serialize:t,wcLen:r,strict:i,isCensorFct:n,censorFctTakesPath:s},a){let o=Function("o",`
|
|
56
|
+
if (typeof o !== 'object' || o == null) {
|
|
57
|
+
${iX(i,t)}
|
|
58
|
+
}
|
|
59
|
+
const { censor, secret } = this
|
|
60
|
+
const originalSecret = {}
|
|
61
|
+
const secretKeys = Object.keys(secret)
|
|
62
|
+
for (var i = 0; i < secretKeys.length; i++) {
|
|
63
|
+
originalSecret[secretKeys[i]] = secret[secretKeys[i]]
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
${eX(e,n,s)}
|
|
67
|
+
this.compileRestore()
|
|
68
|
+
${tX(r>0,n,s)}
|
|
69
|
+
this.secret = originalSecret
|
|
70
|
+
${rX(t)}
|
|
71
|
+
`).bind(a);return o.state=a,t===!1&&(o.restore=c=>a.restore(c)),o}function eX(e,t,r){return Object.keys(e).map(i=>{let{escPath:n,leadingBracket:s,path:a}=e[i],o=s?1:0,c=s?"":".",u=[];for(var l;(l=XJ.exec(i))!==null;){let[,f]=l,{index:m,input:y}=l;m>o&&u.push(y.substring(0,m-(f?0:1)))}var p=u.map(f=>`o${c}${f}`).join(" && ");p.length===0?p+=`o${c}${i} != null`:p+=` && o${c}${i} != null`;let d=`
|
|
72
|
+
switch (true) {
|
|
73
|
+
${u.reverse().map(f=>`
|
|
74
|
+
case o${c}${f} === censor:
|
|
75
|
+
secret[${n}].circle = ${JSON.stringify(f)}
|
|
76
|
+
break
|
|
77
|
+
`).join(`
|
|
78
|
+
`)}
|
|
79
|
+
}
|
|
80
|
+
`,h=r?`val, ${JSON.stringify(a)}`:"val";return`
|
|
81
|
+
if (${p}) {
|
|
82
|
+
const val = o${c}${i}
|
|
83
|
+
if (val === censor) {
|
|
84
|
+
secret[${n}].precensored = true
|
|
85
|
+
} else {
|
|
86
|
+
secret[${n}].val = val
|
|
87
|
+
o${c}${i} = ${t?`censor(${h})`:"censor"}
|
|
88
|
+
${d}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
`}).join(`
|
|
92
|
+
`)}function tX(e,t,r){return e===!0?`
|
|
93
|
+
{
|
|
94
|
+
const { wildcards, wcLen, groupRedact, nestedRedact } = this
|
|
95
|
+
for (var i = 0; i < wcLen; i++) {
|
|
96
|
+
const { before, beforeStr, after, nested } = wildcards[i]
|
|
97
|
+
if (nested === true) {
|
|
98
|
+
secret[beforeStr] = secret[beforeStr] || []
|
|
99
|
+
nestedRedact(secret[beforeStr], o, before, after, censor, ${t}, ${r})
|
|
100
|
+
} else secret[beforeStr] = groupRedact(o, before, censor, ${t}, ${r})
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
`:""}function rX(e){return e===!1?"return o":`
|
|
104
|
+
var s = this.serialize(o)
|
|
105
|
+
this.restore(o)
|
|
106
|
+
return s
|
|
107
|
+
`}function iX(e,t){return e===!0?"throw Error('fast-redact: primitives cannot be redacted')":t===!1?"return o":"return this.serialize(o)"}});var OC=b((Ile,qq)=>{"use strict";qq.exports={groupRedact:sX,groupRestore:nX,nestedRedact:oX,nestedRestore:aX};function nX({keys:e,values:t,target:r}){if(r==null||typeof r=="string")return;let i=e.length;for(var n=0;n<i;n++){let s=e[n];r[s]=t[n]}}function sX(e,t,r,i,n){let s=Lq(e,t);if(s==null||typeof s=="string")return{keys:null,values:null,target:s,flat:!0};let a=Object.keys(s),o=a.length,c=t.length,u=n?[...t]:void 0,l=new Array(o);for(var p=0;p<o;p++){let d=a[p];l[p]=s[d],n?(u[c]=d,s[d]=r(s[d],u)):i?s[d]=r(s[d]):s[d]=r}return{keys:a,values:l,target:s,flat:!0}}function aX(e){for(let t=0;t<e.length;t++){let{target:r,path:i,value:n}=e[t],s=r;for(let a=i.length-1;a>0;a--)s=s[i[a]];s[i[0]]=n}}function oX(e,t,r,i,n,s,a){let o=Lq(t,r);if(o==null)return;let c=Object.keys(o),u=c.length;for(var l=0;l<u;l++){let p=c[l];cX(e,o,p,r,i,n,s,a)}return e}function RC(e,t){return e!=null?"hasOwn"in Object?Object.hasOwn(e,t):Object.prototype.hasOwnProperty.call(e,t):!1}function cX(e,t,r,i,n,s,a,o){let c=n.length,u=c-1,l=r;var p=-1,d,h,f,m=null,y=null,_,A,S=!1,B=0,O=0,N=uX();if(f=d=t[r],typeof d=="object"){for(;d!=null&&++p<c&&(O+=1,r=n[p],m=f,!(r!=="*"&&!y&&!(typeof d=="object"&&r in d)));)if(!(r==="*"&&(y==="*"&&(S=!0),y=r,p!==u))){if(y){let q=Object.keys(d);for(var Y=0;Y<q.length;Y++){let z=q[Y];if(A=d[z],_=r==="*",S)N=qs(N,z,O),B=p,f=Dq(A,B-1,r,i,n,s,a,o,l,d,h,f,_,z,p,u,N,e,t[l],O+1);else if(_||typeof A=="object"&&A!==null&&r in A){if(_?f=A:f=A[r],h=p!==u?f:a?o?s(f,[...i,l,...n]):s(f):s,_){let oe=Ph(qs(N,z,O),f,t[l]);e.push(oe),d[z]=h}else if(A[r]!==h)if(h===void 0&&s!==void 0||RC(A,r)&&h===f)N=qs(N,z,O);else{N=qs(N,z,O);let oe=Ph(qs(N,r,O+1),f,t[l]);e.push(oe),A[r]=h}}}y=null}else{if(f=d[r],N=qs(N,r,O),h=p!==u?f:a?o?s(f,[...i,l,...n]):s(f):s,!(RC(d,r)&&h===f||h===void 0&&s!==void 0)){let q=Ph(N,f,t[l]);e.push(q),d[r]=h}d=d[r]}if(typeof d!="object")break}}}function Lq(e,t){for(var r=-1,i=t.length,n=e;n!=null&&++r<i;)n=n[t[r]];return n}function Dq(e,t,r,i,n,s,a,o,c,u,l,p,d,h,f,m,y,_,A,S){if(t===0&&(d||typeof e=="object"&&e!==null&&r in e)){if(d?p=e:p=e[r],l=f!==m?p:a?o?s(p,[...i,c,...n]):s(p):s,d){let B=Ph(y,p,A);_.push(B),u[h]=l}else if(e[r]!==l){if(!(l===void 0&&s!==void 0||RC(e,r)&&l===p)){let B=Ph(qs(y,r,S+1),p,A);_.push(B),e[r]=l}}}for(let B in e)typeof e[B]=="object"&&(y=qs(y,B,S),Dq(e[B],t-1,r,i,n,s,a,o,c,u,l,p,d,h,f,m,y,_,A,S+1))}function uX(){return{parent:null,key:null,children:[],depth:0}}function qs(e,t,r){if(e.depth===r)return qs(e.parent,t,r);var i={parent:e,key:t,depth:r,children:[]};return e.children.push(i),i}function Ph(e,t,r){let i=e,n=[];do n.push(i.key),i=i.parent;while(i.parent!=null);return{path:n,value:t,target:r}}});var Uq=b((Ble,jq)=>{"use strict";var{groupRestore:lX,nestedRestore:pX}=OC();jq.exports=fX;function fX(){return function(){if(this.restore){this.restore.state.secret=this.secret;return}let{secret:t,wcLen:r}=this,i=Object.keys(t),n=dX(t,i),s=r>0,a=s?{secret:t,groupRestore:lX,nestedRestore:pX}:{secret:t};this.restore=Function("o",hX(n,i,s)).bind(a),this.restore.state=a}}function dX(e,t){return t.map(r=>{let{circle:i,escPath:n,leadingBracket:s}=e[r],o=i?`o.${i} = secret[${n}].val`:`o${s?"":"."}${r} = secret[${n}].val`,c=`secret[${n}].val = undefined`;return`
|
|
108
|
+
if (secret[${n}].val !== undefined) {
|
|
109
|
+
try { ${o} } catch (e) {}
|
|
110
|
+
${c}
|
|
111
|
+
}
|
|
112
|
+
`}).join("")}function hX(e,t,r){return`
|
|
113
|
+
const secret = this.secret
|
|
114
|
+
${r===!0?`
|
|
115
|
+
const keys = Object.keys(secret)
|
|
116
|
+
const len = keys.length
|
|
117
|
+
for (var i = len - 1; i >= ${t.length}; i--) {
|
|
118
|
+
const k = keys[i]
|
|
119
|
+
const o = secret[k]
|
|
120
|
+
if (o) {
|
|
121
|
+
if (o.flat === true) this.groupRestore(o)
|
|
122
|
+
else this.nestedRestore(o)
|
|
123
|
+
secret[k] = null
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
`:""}
|
|
127
|
+
${e}
|
|
128
|
+
return o
|
|
129
|
+
`}});var Mq=b((kle,Fq)=>{"use strict";Fq.exports=mX;function mX(e){let{secret:t,censor:r,compileRestore:i,serialize:n,groupRedact:s,nestedRedact:a,wildcards:o,wcLen:c}=e,u=[{secret:t,censor:r,compileRestore:i}];return n!==!1&&u.push({serialize:n}),c>0&&u.push({groupRedact:s,nestedRedact:a,wildcards:o,wcLen:c}),Object.assign(...u)}});var Hq=b((Ple,Kq)=>{"use strict";var Vq=Bq(),yX=Nq(),gX=Oq(),vX=Uq(),{groupRedact:xX,nestedRedact:bX}=OC(),_X=Mq(),AX=Dv(),SX=Vq(),LC=e=>e;LC.restore=LC;var wX="[REDACTED]";DC.rx=AX;DC.validator=Vq;Kq.exports=DC;function DC(e={}){let t=Array.from(new Set(e.paths||[])),r="serialize"in e&&(e.serialize===!1||typeof e.serialize=="function")?e.serialize:JSON.stringify,i=e.remove;if(i===!0&&r!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let n=i===!0?void 0:"censor"in e?e.censor:wX,s=typeof n=="function",a=s&&n.length>1;if(t.length===0)return r||LC;SX({paths:t,serialize:r,censor:n});let{wildcards:o,wcLen:c,secret:u}=yX({paths:t,censor:n}),l=vX(),p="strict"in e?e.strict:!0;return gX({secret:u,wcLen:c,serialize:r,strict:p,isCensorFct:s,censorFctTakesPath:a},_X({secret:u,censor:n,compileRestore:l,serialize:r,groupRedact:xX,nestedRedact:bX,wildcards:o,wcLen:c}))}});var Fl=b((Nle,$q)=>{"use strict";var CX=Symbol("pino.setLevel"),EX=Symbol("pino.getLevel"),TX=Symbol("pino.levelVal"),IX=Symbol("pino.levelComp"),BX=Symbol("pino.useLevelLabels"),kX=Symbol("pino.useOnlyCustomLevels"),PX=Symbol("pino.mixin"),NX=Symbol("pino.lsCache"),RX=Symbol("pino.chindings"),OX=Symbol("pino.asJson"),LX=Symbol("pino.write"),DX=Symbol("pino.redactFmt"),qX=Symbol("pino.time"),jX=Symbol("pino.timeSliceIndex"),UX=Symbol("pino.stream"),FX=Symbol("pino.stringify"),MX=Symbol("pino.stringifySafe"),VX=Symbol("pino.stringifiers"),KX=Symbol("pino.end"),HX=Symbol("pino.formatOpts"),$X=Symbol("pino.messageKey"),zX=Symbol("pino.errorKey"),GX=Symbol("pino.nestedKey"),WX=Symbol("pino.nestedKeyStr"),YX=Symbol("pino.mixinMergeStrategy"),QX=Symbol("pino.msgPrefix"),JX=Symbol("pino.wildcardFirst"),XX=Symbol.for("pino.serializers"),ZX=Symbol.for("pino.formatters"),eZ=Symbol.for("pino.hooks"),tZ=Symbol.for("pino.metadata");$q.exports={setLevelSym:CX,getLevelSym:EX,levelValSym:TX,levelCompSym:IX,useLevelLabelsSym:BX,mixinSym:PX,lsCacheSym:NX,chindingsSym:RX,asJsonSym:OX,writeSym:LX,serializersSym:XX,redactFmtSym:DX,timeSym:qX,timeSliceIndexSym:jX,streamSym:UX,stringifySym:FX,stringifySafeSym:MX,stringifiersSym:VX,endSym:KX,formatOptsSym:HX,messageKeySym:$X,errorKeySym:zX,nestedKeySym:GX,wildcardFirstSym:JX,needsMetadataGsym:tZ,useOnlyCustomLevelsSym:kX,formattersSym:ZX,hooksSym:eZ,nestedKeyStrSym:WX,mixinMergeStrategySym:YX,msgPrefixSym:QX}});var UC=b((Rle,Yq)=>{"use strict";var jC=Hq(),{redactFmtSym:rZ,wildcardFirstSym:qv}=Fl(),{rx:qC,validator:iZ}=jC,zq=iZ({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:e=>`pino \u2013 redact paths array contains an invalid path (${e})`}),Gq="[Redacted]",Wq=!1;function nZ(e,t){let{paths:r,censor:i}=sZ(e),n=r.reduce((o,c)=>{qC.lastIndex=0;let u=qC.exec(c),l=qC.exec(c),p=u[1]!==void 0?u[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):u[0];if(p==="*"&&(p=qv),l===null)return o[p]=null,o;if(o[p]===null)return o;let{index:d}=l,h=`${c.substr(d,c.length-1)}`;return o[p]=o[p]||[],p!==qv&&o[p].length===0&&o[p].push(...o[qv]||[]),p===qv&&Object.keys(o).forEach(function(f){o[f]&&o[f].push(h)}),o[p].push(h),o},{}),s={[rZ]:jC({paths:r,censor:i,serialize:t,strict:Wq})},a=(...o)=>t(typeof i=="function"?i(...o):i);return[...Object.keys(n),...Object.getOwnPropertySymbols(n)].reduce((o,c)=>{if(n[c]===null)o[c]=u=>a(u,[c]);else{let u=typeof i=="function"?(l,p)=>i(l,[c,...p]):i;o[c]=jC({paths:n[c],censor:u,serialize:t,strict:Wq})}return o},s)}function sZ(e){if(Array.isArray(e))return e={paths:e,censor:Gq},zq(e),e;let{paths:t,censor:r=Gq,remove:i}=e;if(Array.isArray(t)===!1)throw Error("pino \u2013 redact must contain an array of strings");return i===!0&&(r=void 0),zq({paths:t,censor:r}),{paths:t,censor:r}}Yq.exports=nZ});var Jq=b((Ole,Qq)=>{"use strict";var aZ=()=>"",oZ=()=>`,"time":${Date.now()}`,cZ=()=>`,"time":${Math.round(Date.now()/1e3)}`,uZ=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;Qq.exports={nullTime:aZ,epochTime:oZ,unixTime:cZ,isoTime:uZ}});var Zq=b((Lle,Xq)=>{"use strict";function lZ(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}Xq.exports=pZ;function pZ(e,t,r){var i=r&&r.stringify||lZ,n=1;if(typeof e=="object"&&e!==null){var s=t.length+n;if(s===1)return e;var a=new Array(s);a[0]=i(e);for(var o=1;o<s;o++)a[o]=i(t[o]);return a.join(" ")}if(typeof e!="string")return e;var c=t.length;if(c===0)return e;for(var u="",l=1-n,p=-1,d=e&&e.length||0,h=0;h<d;){if(e.charCodeAt(h)===37&&h+1<d){switch(p=p>-1?p:0,e.charCodeAt(h+1)){case 100:case 102:if(l>=c||t[l]==null)break;p<h&&(u+=e.slice(p,h)),u+=Number(t[l]),p=h+2,h++;break;case 105:if(l>=c||t[l]==null)break;p<h&&(u+=e.slice(p,h)),u+=Math.floor(Number(t[l])),p=h+2,h++;break;case 79:case 111:case 106:if(l>=c||t[l]===void 0)break;p<h&&(u+=e.slice(p,h));var f=typeof t[l];if(f==="string"){u+="'"+t[l]+"'",p=h+2,h++;break}if(f==="function"){u+=t[l].name||"<anonymous>",p=h+2,h++;break}u+=i(t[l]),p=h+2,h++;break;case 115:if(l>=c)break;p<h&&(u+=e.slice(p,h)),u+=String(t[l]),p=h+2,h++;break;case 37:p<h&&(u+=e.slice(p,h)),u+="%",p=h+2,h++,l--;break}++l}++h}return p===-1?e:(p<d&&(u+=e.slice(p)),u)}});var MC=b((Dle,FC)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let t=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(e,0,0,Number(r))},e=new Int32Array(new SharedArrayBuffer(4));FC.exports=t}else{let e=function(t){if((t>0&&t<1/0)===!1)throw typeof t!="number"&&typeof t!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let i=Date.now()+Number(t);for(;i>Date.now(););};FC.exports=e}});var o8=b((qle,a8)=>{"use strict";var Zt=require("fs"),fZ=require("events"),dZ=require("util").inherits,e8=require("path"),KC=MC(),jv=100,Uv=Buffer.allocUnsafe(0),hZ=16*1024,t8="buffer",r8="utf8";function i8(e,t){t._opening=!0,t._writing=!0,t._asyncDrainScheduled=!1;function r(s,a){if(s){t._reopening=!1,t._writing=!1,t._opening=!1,t.sync?process.nextTick(()=>{t.listenerCount("error")>0&&t.emit("error",s)}):t.emit("error",s);return}let o=t._reopening;t.fd=a,t.file=e,t._reopening=!1,t._opening=!1,t._writing=!1,t.sync?process.nextTick(()=>t.emit("ready")):t.emit("ready"),!t.destroyed&&(!t._writing&&t._len>t.minLength||t._flushPending?t._actualWrite():o&&process.nextTick(()=>t.emit("drain")))}let i=t.append?"a":"w",n=t.mode;if(t.sync)try{t.mkdir&&Zt.mkdirSync(e8.dirname(e),{recursive:!0});let s=Zt.openSync(e,i,n);r(null,s)}catch(s){throw r(s),s}else t.mkdir?Zt.mkdir(e8.dirname(e),{recursive:!0},s=>{if(s)return r(s);Zt.open(e,i,n,r)}):Zt.open(e,i,n,r)}function _n(e){if(!(this instanceof _n))return new _n(e);let{fd:t,dest:r,minLength:i,maxLength:n,maxWrite:s,sync:a,append:o=!0,mkdir:c,retryEAGAIN:u,fsync:l,contentMode:p,mode:d}=e||{};t=t||r,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(i||0,16387),this.file=null,this.destroyed=!1,this.minLength=i||0,this.maxLength=n||0,this.maxWrite=s||hZ,this.sync=a||!1,this.writable=!0,this._fsync=l||!1,this.append=o||!1,this.mode=d,this.retryEAGAIN=u||(()=>!0),this.mkdir=c||!1;let h,f;if(p===t8)this._writingBuf=Uv,this.write=gZ,this.flush=xZ,this.flushSync=_Z,this._actualWrite=SZ,h=()=>Zt.writeSync(this.fd,this._writingBuf),f=()=>Zt.write(this.fd,this._writingBuf,this.release);else if(p===void 0||p===r8)this._writingBuf="",this.write=yZ,this.flush=vZ,this.flushSync=bZ,this._actualWrite=AZ,h=()=>Zt.writeSync(this.fd,this._writingBuf,"utf8"),f=()=>Zt.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "${r8}" and "${t8}", but passed ${p}`);if(typeof t=="number")this.fd=t,process.nextTick(()=>this.emit("ready"));else if(typeof t=="string")i8(t,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(m,y)=>{if(m){if((m.code==="EAGAIN"||m.code==="EBUSY")&&this.retryEAGAIN(m,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{KC(jv),this.release(void 0,0)}catch(S){this.release(S)}else setTimeout(f,jv);else this._writing=!1,this.emit("error",m);return}this.emit("write",y);let _=VC(this._writingBuf,this._len,y);if(this._len=_.len,this._writingBuf=_.writingBuf,this._writingBuf.length){if(!this.sync){f();return}try{do{let S=h(),B=VC(this._writingBuf,this._len,S);this._len=B.len,this._writingBuf=B.writingBuf}while(this._writingBuf.length)}catch(S){this.release(S);return}}this._fsync&&Zt.fsyncSync(this.fd);let A=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):A>this.minLength?this._actualWrite():this._ending?A>0?this._actualWrite():(this._writing=!1,Fv(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(mZ,this)):this.emit("drain"))},this.on("newListener",function(m){m==="drain"&&(this._asyncDrainScheduled=!1)})}function VC(e,t,r){return typeof e=="string"&&Buffer.byteLength(e)!==r&&(r=Buffer.from(e).subarray(0,r).toString().length),t=Math.max(t-r,0),e=e.slice(r),{writingBuf:e,len:t}}function mZ(e){e.listenerCount("drain")>0&&(e._asyncDrainScheduled=!1,e.emit("drain"))}dZ(_n,fZ);function n8(e,t){return e.length===0?Uv:e.length===1?e[0]:Buffer.concat(e,t)}function yZ(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||r[r.length-1].length+e.length>this.maxWrite?r.push(""+e):r[r.length-1]+=e,this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function gZ(e){if(this.destroyed)throw new Error("SonicBoom destroyed");let t=this._len+e.length,r=this._bufs,i=this._lens;return this.maxLength&&t>this.maxLength?(this.emit("drop",e),this._len<this._hwm):(r.length===0||i[i.length-1]+e.length>this.maxWrite?(r.push([e]),i.push(e.length)):(r[r.length-1].push(e),i[i.length-1]+=e.length),this._len=t,!this._writing&&this._len>=this.minLength&&this._actualWrite(),this._len<this._hwm)}function s8(e){this._flushPending=!0;let t=()=>{this._fsync?(this._flushPending=!1,e()):Zt.fsync(this.fd,i=>{this._flushPending=!1,e(i)}),this.off("error",r)},r=i=>{this._flushPending=!1,e(i),this.off("drain",t)};this.once("drain",t),this.once("error",r)}function vZ(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&s8.call(this,e),!this._writing&&(this._bufs.length===0&&this._bufs.push(""),this._actualWrite())}function xZ(e){if(e!=null&&typeof e!="function")throw new Error("flush cb must be a function");if(this.destroyed){let t=new Error("SonicBoom destroyed");if(e){e(t);return}throw t}if(this.minLength<=0){e?.();return}e&&s8.call(this,e),!this._writing&&(this._bufs.length===0&&(this._bufs.push([]),this._lens.push(0)),this._actualWrite())}_n.prototype.reopen=function(e){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(e)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(e&&(this.file=e),this._reopening=!0,this._writing)return;let t=this.fd;this.once("ready",()=>{t!==this.fd&&Zt.close(t,r=>{if(r)return this.emit("error",r)})}),i8(this.file,this)};_n.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?this._actualWrite():Fv(this)))};function bZ(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");let e="";for(;this._bufs.length||e;){e.length<=0&&(e=this._bufs[0]);try{let t=Zt.writeSync(this.fd,e,"utf8"),r=VC(e,this._len,t);e=r.writingBuf,this._len=r.len,e.length<=0&&this._bufs.shift()}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;KC(jv)}}try{Zt.fsyncSync(this.fd)}catch{}}function _Z(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift([this._writingBuf]),this._writingBuf=Uv);let e=Uv;for(;this._bufs.length||e.length;){e.length<=0&&(e=n8(this._bufs[0],this._lens[0]));try{let t=Zt.writeSync(this.fd,e);e=e.subarray(t),this._len=Math.max(this._len-t,0),e.length<=0&&(this._bufs.shift(),this._lens.shift())}catch(t){if((t.code==="EAGAIN"||t.code==="EBUSY")&&!this.retryEAGAIN(t,e.length,this._len-e.length))throw t;KC(jv)}}}_n.prototype.destroy=function(){this.destroyed||Fv(this)};function AZ(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf||this._bufs.shift()||"",this.sync)try{let t=Zt.writeSync(this.fd,this._writingBuf,"utf8");e(null,t)}catch(t){e(t)}else Zt.write(this.fd,this._writingBuf,"utf8",e)}function SZ(){let e=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:n8(this._bufs.shift(),this._lens.shift()),this.sync)try{let t=Zt.writeSync(this.fd,this._writingBuf);e(null,t)}catch(t){e(t)}else Zt.write(this.fd,this._writingBuf,e)}function Fv(e){if(e.fd===-1){e.once("ready",Fv.bind(null,e));return}e.destroyed=!0,e._bufs=[],e._lens=[],Zt.fsync(e.fd,t);function t(){e.fd!==1&&e.fd!==2?Zt.close(e.fd,r):r()}function r(i){if(i){e.emit("error",i);return}e._ending&&!e._writing&&e.emit("finish"),e.emit("close")}}_n.SonicBoom=_n;_n.default=_n;a8.exports=_n});var HC=b((jle,f8)=>{"use strict";var An={exit:[],beforeExit:[]},c8={exit:EZ,beforeExit:TZ},Ml;function wZ(){Ml===void 0&&(Ml=new FinalizationRegistry(IZ))}function CZ(e){An[e].length>0||process.on(e,c8[e])}function u8(e){An[e].length>0||(process.removeListener(e,c8[e]),An.exit.length===0&&An.beforeExit.length===0&&(Ml=void 0))}function EZ(){l8("exit")}function TZ(){l8("beforeExit")}function l8(e){for(let t of An[e]){let r=t.deref(),i=t.fn;r!==void 0&&i(r,e)}An[e]=[]}function IZ(e){for(let t of["exit","beforeExit"]){let r=An[t].indexOf(e);An[t].splice(r,r+1),u8(t)}}function p8(e,t,r){if(t===void 0)throw new Error("the object can't be undefined");CZ(e);let i=new WeakRef(t);i.fn=r,wZ(),Ml.register(t,i),An[e].push(i)}function BZ(e,t){p8("exit",e,t)}function kZ(e,t){p8("beforeExit",e,t)}function PZ(e){if(Ml!==void 0){Ml.unregister(e);for(let t of["exit","beforeExit"])An[t]=An[t].filter(r=>{let i=r.deref();return i&&i!==e}),u8(t)}}f8.exports={register:BZ,registerBeforeExit:kZ,unregister:PZ}});var d8=b((Ule,NZ)=>{NZ.exports={name:"thread-stream",version:"2.7.0",description:"A streaming way to send data to a Node.js Worker Thread",main:"index.js",types:"index.d.ts",dependencies:{"real-require":"^0.2.0"},devDependencies:{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5",desm:"^1.3.0",fastbench:"^1.0.1",husky:"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^3.0.0",standard:"^17.0.0",tap:"^16.2.0","ts-node":"^10.8.0",typescript:"^5.3.2","why-is-node-running":"^2.2.2"},scripts:{test:'standard && npm run transpile && tap "test/**/*.test.*js" && tap --ts test/*.test.*ts',"test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":'tap --no-check-coverage --timeout=120 --coverage-report=lcovonly "test/**/*.test.*js"',"test:ci:ts":'tap --ts --no-check-coverage --coverage-report=lcovonly "test/**/*.test.*ts"',"test:yarn":'npm run transpile && tap "test/**/*.test.js" --no-check-coverage',transpile:"sh ./test/ts/transpile.sh",prepare:"husky install"},standard:{ignore:["test/ts/**/*"]},repository:{type:"git",url:"git+https://github.com/mcollina/thread-stream.git"},keywords:["worker","thread","threads","stream"],author:"Matteo Collina <hello@matteocollina.com>",license:"MIT",bugs:{url:"https://github.com/mcollina/thread-stream/issues"},homepage:"https://github.com/mcollina/thread-stream#readme"}});var m8=b((Fle,h8)=>{"use strict";function RZ(e,t,r,i,n){let s=Date.now()+i,a=Atomics.load(e,t);if(a===r){n(null,"ok");return}let o=a,c=u=>{Date.now()>s?n(null,"timed-out"):setTimeout(()=>{o=a,a=Atomics.load(e,t),a===o?c(u>=1e3?1e3:u*2):a===r?n(null,"ok"):n(null,"not-equal")},u)};c(1)}function OZ(e,t,r,i,n){let s=Date.now()+i,a=Atomics.load(e,t);if(a!==r){n(null,"ok");return}let o=c=>{Date.now()>s?n(null,"timed-out"):setTimeout(()=>{a=Atomics.load(e,t),a!==r?n(null,"ok"):o(c>=1e3?1e3:c*2)},c)};o(1)}h8.exports={wait:RZ,waitDiff:OZ}});var g8=b((Mle,y8)=>{"use strict";y8.exports={WRITE_INDEX:4,READ_INDEX:8}});var A8=b((Vle,_8)=>{"use strict";var{version:LZ}=d8(),{EventEmitter:DZ}=require("events"),{Worker:qZ}=require("worker_threads"),{join:jZ}=require("path"),{pathToFileURL:UZ}=require("url"),{wait:FZ}=m8(),{WRITE_INDEX:bi,READ_INDEX:ns}=g8(),MZ=require("buffer"),VZ=require("assert"),K=Symbol("kImpl"),KZ=MZ.constants.MAX_STRING_LENGTH,Nh=class{constructor(t){this._value=t}deref(){return this._value}},Vv=class{register(){}unregister(){}},HZ=process.env.NODE_V8_COVERAGE?Vv:global.FinalizationRegistry||Vv,$Z=process.env.NODE_V8_COVERAGE?Nh:global.WeakRef||Nh,v8=new HZ(e=>{e.exited||e.terminate()});function zZ(e,t){let{filename:r,workerData:i}=t,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||jZ(__dirname,"lib","worker.js"),a=new qZ(s,{...t.workerOpts,trackUnmanagedFds:!1,workerData:{filename:r.indexOf("file://")===0?r:UZ(r).href,dataBuf:e[K].dataBuf,stateBuf:e[K].stateBuf,workerData:{$context:{threadStreamVersion:LZ},...i}}});return a.stream=new Nh(e),a.on("message",GZ),a.on("exit",b8),v8.register(e,a),a}function x8(e){VZ(!e[K].sync),e[K].needDrain&&(e[K].needDrain=!1,e.emit("drain"))}function Mv(e){let t=Atomics.load(e[K].state,bi),r=e[K].data.length-t;if(r>0){if(e[K].buf.length===0){e[K].flushing=!1,e[K].ending?YC(e):e[K].needDrain&&process.nextTick(x8,e);return}let i=e[K].buf.slice(0,r),n=Buffer.byteLength(i);n<=r?(e[K].buf=e[K].buf.slice(r),Kv(e,i,Mv.bind(null,e))):e.flush(()=>{if(!e.destroyed){for(Atomics.store(e[K].state,ns,0),Atomics.store(e[K].state,bi,0);n>e[K].data.length;)r=r/2,i=e[K].buf.slice(0,r),n=Buffer.byteLength(i);e[K].buf=e[K].buf.slice(r),Kv(e,i,Mv.bind(null,e))}})}else if(r===0){if(t===0&&e[K].buf.length===0)return;e.flush(()=>{Atomics.store(e[K].state,ns,0),Atomics.store(e[K].state,bi,0),Mv(e)})}else ss(e,new Error("overwritten"))}function GZ(e){let t=this.stream.deref();if(t===void 0){this.exited=!0,this.terminate();return}switch(e.code){case"READY":this.stream=new $Z(t),t.flush(()=>{t[K].ready=!0,t.emit("ready")});break;case"ERROR":ss(t,e.err);break;case"EVENT":Array.isArray(e.args)?t.emit(e.name,...e.args):t.emit(e.name,e.args);break;case"WARNING":process.emitWarning(e.err);break;default:ss(t,new Error("this should not happen: "+e.code))}}function b8(e){let t=this.stream.deref();t!==void 0&&(v8.unregister(t),t.worker.exited=!0,t.worker.off("exit",b8),ss(t,e!==0?new Error("the worker thread exited"):null))}var zC=class extends DZ{constructor(t={}){if(super(),t.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[K]={},this[K].stateBuf=new SharedArrayBuffer(128),this[K].state=new Int32Array(this[K].stateBuf),this[K].dataBuf=new SharedArrayBuffer(t.bufferSize||4*1024*1024),this[K].data=Buffer.from(this[K].dataBuf),this[K].sync=t.sync||!1,this[K].ending=!1,this[K].ended=!1,this[K].needDrain=!1,this[K].destroyed=!1,this[K].flushing=!1,this[K].ready=!1,this[K].finished=!1,this[K].errored=null,this[K].closed=!1,this[K].buf="",this.worker=zZ(this,t),this.on("message",(r,i)=>{this.worker.postMessage(r,i)})}write(t){if(this[K].destroyed)return GC(this,new Error("the worker has exited")),!1;if(this[K].ending)return GC(this,new Error("the worker is ending")),!1;if(this[K].flushing&&this[K].buf.length+t.length>=KZ)try{$C(this),this[K].flushing=!0}catch(r){return ss(this,r),!1}if(this[K].buf+=t,this[K].sync)try{return $C(this),!0}catch(r){return ss(this,r),!1}return this[K].flushing||(this[K].flushing=!0,setImmediate(Mv,this)),this[K].needDrain=this[K].data.length-this[K].buf.length-Atomics.load(this[K].state,bi)<=0,!this[K].needDrain}end(){this[K].destroyed||(this[K].ending=!0,YC(this))}flush(t){if(this[K].destroyed){typeof t=="function"&&process.nextTick(t,new Error("the worker has exited"));return}let r=Atomics.load(this[K].state,bi);FZ(this[K].state,ns,r,1/0,(i,n)=>{if(i){ss(this,i),process.nextTick(t,i);return}if(n==="not-equal"){this.flush(t);return}process.nextTick(t)})}flushSync(){this[K].destroyed||($C(this),WC(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[K].ready}get destroyed(){return this[K].destroyed}get closed(){return this[K].closed}get writable(){return!this[K].destroyed&&!this[K].ending}get writableEnded(){return this[K].ending}get writableFinished(){return this[K].finished}get writableNeedDrain(){return this[K].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[K].errored}};function GC(e,t){setImmediate(()=>{e.emit("error",t)})}function ss(e,t){e[K].destroyed||(e[K].destroyed=!0,t&&(e[K].errored=t,GC(e,t)),e.worker.exited?setImmediate(()=>{e[K].closed=!0,e.emit("close")}):e.worker.terminate().catch(()=>{}).then(()=>{e[K].closed=!0,e.emit("close")}))}function Kv(e,t,r){let i=Atomics.load(e[K].state,bi),n=Buffer.byteLength(t);return e[K].data.write(t,i),Atomics.store(e[K].state,bi,i+n),Atomics.notify(e[K].state,bi),r(),!0}function YC(e){if(!(e[K].ended||!e[K].ending||e[K].flushing)){e[K].ended=!0;try{e.flushSync();let t=Atomics.load(e[K].state,ns);Atomics.store(e[K].state,bi,-1),Atomics.notify(e[K].state,bi);let r=0;for(;t!==-1;){if(Atomics.wait(e[K].state,ns,t,1e3),t=Atomics.load(e[K].state,ns),t===-2){ss(e,new Error("end() failed"));return}if(++r===10){ss(e,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{e[K].finished=!0,e.emit("finish")})}catch(t){ss(e,t)}}}function $C(e){let t=()=>{e[K].ending?YC(e):e[K].needDrain&&process.nextTick(x8,e)};for(e[K].flushing=!1;e[K].buf.length!==0;){let r=Atomics.load(e[K].state,bi),i=e[K].data.length-r;if(i===0){WC(e),Atomics.store(e[K].state,ns,0),Atomics.store(e[K].state,bi,0);continue}else if(i<0)throw new Error("overwritten");let n=e[K].buf.slice(0,i),s=Buffer.byteLength(n);if(s<=i)e[K].buf=e[K].buf.slice(i),Kv(e,n,t);else{for(WC(e),Atomics.store(e[K].state,ns,0),Atomics.store(e[K].state,bi,0);s>e[K].buf.length;)i=i/2,n=e[K].buf.slice(0,i),s=Buffer.byteLength(n);e[K].buf=e[K].buf.slice(i),Kv(e,n,t)}}}function WC(e){if(e[K].flushing)throw new Error("unable to flush while flushing");let t=Atomics.load(e[K].state,bi),r=0;for(;;){let i=Atomics.load(e[K].state,ns);if(i===-2)throw Error("_flushSync failed");if(i!==t)Atomics.wait(e[K].state,ns,i,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}_8.exports=zC});var XC=b((Kle,S8)=>{"use strict";var{createRequire:WZ}=require("module"),YZ=NC(),{join:QC,isAbsolute:QZ,sep:JZ}=require("path"),XZ=MC(),JC=HC(),ZZ=A8();function eee(e){JC.register(e,ree),JC.registerBeforeExit(e,iee),e.on("close",function(){JC.unregister(e)})}function tee(e,t,r){let i=new ZZ({filename:e,workerData:t,workerOpts:r});i.on("ready",n),i.on("close",function(){process.removeListener("exit",s)}),process.on("exit",s);function n(){process.removeListener("exit",s),i.unref(),r.autoEnd!==!1&&eee(i)}function s(){i.closed||(i.flushSync(),XZ(100),i.end())}return i}function ree(e){e.ref(),e.flushSync(),e.end(),e.once("close",function(){e.unref()})}function iee(e){e.flushSync()}function nee(e){let{pipeline:t,targets:r,levels:i,dedupe:n,options:s={},worker:a={},caller:o=YZ()}=e,c=typeof o=="string"?[o]:o,u="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},l=e.target;if(l&&r)throw new Error("only one of target or targets can be specified");return r?(l=u["pino-worker"]||QC(__dirname,"worker.js"),s.targets=r.map(d=>({...d,target:p(d.target)}))):t&&(l=u["pino-pipeline-worker"]||QC(__dirname,"worker-pipeline.js"),s.targets=t.map(d=>({...d,target:p(d.target)}))),i&&(s.levels=i),n&&(s.dedupe=n),s.pinoWillSendConfig=!0,tee(p(l),s,a);function p(d){if(d=u[d]||d,QZ(d)||d.indexOf("file://")===0)return d;if(d==="pino/file")return QC(__dirname,"..","file.js");let h;for(let f of c)try{let m=f==="node:repl"?process.cwd()+JZ:f;h=WZ(m).resolve(d);break}catch{continue}if(!h)throw new Error(`unable to determine transport target for "${d}"`);return h}}S8.exports=nee});var zv=b((Hle,O8)=>{"use strict";var w8=Zq(),{mapHttpRequest:see,mapHttpResponse:aee}=PC(),eE=o8(),C8=HC(),{lsCacheSym:oee,chindingsSym:I8,writeSym:E8,serializersSym:B8,formatOptsSym:T8,endSym:cee,stringifiersSym:k8,stringifySym:P8,stringifySafeSym:tE,wildcardFirstSym:N8,nestedKeySym:uee,formattersSym:R8,messageKeySym:lee,errorKeySym:pee,nestedKeyStrSym:fee,msgPrefixSym:Hv}=Fl(),{isMainThread:dee}=require("worker_threads"),hee=XC();function Vl(){}function mee(e,t){if(!t)return r;return function(...n){t.call(this,n,r,e)};function r(i,...n){if(typeof i=="object"){let s=i;i!==null&&(i.method&&i.headers&&i.socket?i=see(i):typeof i.setHeader=="function"&&(i=aee(i)));let a;s===null&&n.length===0?a=[null]:(s=n.shift(),a=n),typeof this[Hv]=="string"&&s!==void 0&&s!==null&&(s=this[Hv]+s),this[E8](i,w8(s,a,this[T8]),e)}else{let s=i===void 0?n.shift():i;typeof this[Hv]=="string"&&s!==void 0&&s!==null&&(s=this[Hv]+s),this[E8](null,w8(s,n,this[T8]),e)}}}function ZC(e){let t="",r=0,i=!1,n=255,s=e.length;if(s>100)return JSON.stringify(e);for(var a=0;a<s&&n>=32;a++)n=e.charCodeAt(a),(n===34||n===92)&&(t+=e.slice(r,a)+"\\",r=a,i=!0);return i?t+=e.slice(r):t=e,n<32?JSON.stringify(e):'"'+t+'"'}function yee(e,t,r,i){let n=this[P8],s=this[tE],a=this[k8],o=this[cee],c=this[I8],u=this[B8],l=this[R8],p=this[lee],d=this[pee],h=this[oee][r]+i;h=h+c;let f;l.log&&(e=l.log(e));let m=a[N8],y="";for(let A in e)if(f=e[A],Object.prototype.hasOwnProperty.call(e,A)&&f!==void 0){u[A]?f=u[A](f):A===d&&u.err&&(f=u.err(f));let S=a[A]||m;switch(typeof f){case"undefined":case"function":continue;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":S&&(f=S(f));break;case"string":f=(S||ZC)(f);break;default:f=(S||n)(f,s)}if(f===void 0)continue;let B=ZC(A);y+=","+B+":"+f}let _="";if(t!==void 0){f=u[p]?u[p](t):t;let A=a[p]||m;switch(typeof f){case"function":break;case"number":Number.isFinite(f)===!1&&(f=null);case"boolean":A&&(f=A(f)),_=',"'+p+'":'+f;break;case"string":f=(A||ZC)(f),_=',"'+p+'":'+f;break;default:f=(A||n)(f,s),_=',"'+p+'":'+f}}return this[uee]&&y?h+this[fee]+y.slice(1)+"}"+_+o:h+y+_+o}function gee(e,t){let r,i=e[I8],n=e[P8],s=e[tE],a=e[k8],o=a[N8],c=e[B8],u=e[R8].bindings;t=u(t);for(let l in t)if(r=t[l],(l!=="level"&&l!=="serializers"&&l!=="formatters"&&l!=="customLevels"&&t.hasOwnProperty(l)&&r!==void 0)===!0){if(r=c[l]?c[l](r):r,r=(a[l]||o||n)(r,s),r===void 0)continue;i+=',"'+l+'":'+r}return i}function vee(e){return e.write!==e.constructor.prototype.write}var xee=process.env.NODE_V8_COVERAGE||process.env.V8_COVERAGE;function $v(e){let t=new eE(e);return t.on("error",r),!xee&&!e.sync&&dee&&(C8.register(t,bee),t.on("close",function(){C8.unregister(t)})),t;function r(i){if(i.code==="EPIPE"){t.write=Vl,t.end=Vl,t.flushSync=Vl,t.destroy=Vl;return}t.removeListener("error",r),t.emit("error",i)}}function bee(e,t){e.destroyed||(t==="beforeExit"?(e.flush(),e.on("drain",function(){e.end()})):e.flushSync())}function _ee(e){return function(r,i,n={},s){if(typeof n=="string")s=$v({dest:n}),n={};else if(typeof s=="string"){if(n&&n.transport)throw Error("only one of option.transport or stream can be specified");s=$v({dest:s})}else if(n instanceof eE||n.writable||n._writableState)s=n,n={};else if(n.transport){if(n.transport instanceof eE||n.transport.writable||n.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(n.transport.targets&&n.transport.targets.length&&n.formatters&&typeof n.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let c;n.customLevels&&(c=n.useOnlyCustomLevels?n.customLevels:Object.assign({},n.levels,n.customLevels)),s=hee({caller:i,...n.transport,levels:c})}if(n=Object.assign({},e,n),n.serializers=Object.assign({},e.serializers,n.serializers),n.formatters=Object.assign({},e.formatters,n.formatters),n.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:a,onChild:o}=n;return a===!1&&(n.level="silent"),o||(n.onChild=Vl),s||(vee(process.stdout)?s=process.stdout:s=$v({fd:process.stdout.fd||1})),{opts:n,stream:s}}}function Aee(e,t){try{return JSON.stringify(e)}catch{try{return(t||this[tE])(e)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function See(e,t,r){return{level:e,bindings:t,log:r}}function wee(e){let t=Number(e);return typeof e=="string"&&Number.isFinite(t)?t:e===void 0?1:e}O8.exports={noop:Vl,buildSafeSonicBoom:$v,asChindings:gee,asJson:yee,genLog:mee,createArgsNormalizer:_ee,stringify:Aee,buildFormatters:See,normalizeDestFileDescriptor:wee}});var Gv=b(($le,L8)=>{var Cee={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Eee={ASC:"ASC",DESC:"DESC"};L8.exports={DEFAULT_LEVELS:Cee,SORTING_ORDER:Eee}});var nE=b((zle,U8)=>{"use strict";var{lsCacheSym:Tee,levelValSym:rE,useOnlyCustomLevelsSym:Iee,streamSym:Bee,formattersSym:kee,hooksSym:Pee,levelCompSym:D8}=Fl(),{noop:Nee,genLog:fc}=zv(),{DEFAULT_LEVELS:as,SORTING_ORDER:q8}=Gv(),j8={fatal:e=>{let t=fc(as.fatal,e);return function(...r){let i=this[Bee];if(t.call(this,...r),typeof i.flushSync=="function")try{i.flushSync()}catch{}}},error:e=>fc(as.error,e),warn:e=>fc(as.warn,e),info:e=>fc(as.info,e),debug:e=>fc(as.debug,e),trace:e=>fc(as.trace,e)},iE=Object.keys(as).reduce((e,t)=>(e[as[t]]=t,e),{}),Ree=Object.keys(iE).reduce((e,t)=>(e[t]='{"level":'+Number(t),e),{});function Oee(e){let t=e[kee].level,{labels:r}=e.levels,i={};for(let n in r){let s=t(r[n],Number(n));i[n]=JSON.stringify(s).slice(0,-1)}return e[Tee]=i,e}function Lee(e,t){if(t)return!1;switch(e){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function Dee(e){let{labels:t,values:r}=this.levels;if(typeof e=="number"){if(t[e]===void 0)throw Error("unknown level value"+e);e=t[e]}if(r[e]===void 0)throw Error("unknown level "+e);let i=this[rE],n=this[rE]=r[e],s=this[Iee],a=this[D8],o=this[Pee].logMethod;for(let c in r){if(a(r[c],n)===!1){this[c]=Nee;continue}this[c]=Lee(c,s)?j8[c](o):fc(r[c],o)}this.emit("level-change",e,n,t[i],i,this)}function qee(e){let{levels:t,levelVal:r}=this;return t&&t.labels?t.labels[r]:""}function jee(e){let{values:t}=this.levels,r=t[e];return r!==void 0&&this[D8](r,this[rE])}function Uee(e,t,r){return e===q8.DESC?t<=r:t>=r}function Fee(e){return typeof e=="string"?Uee.bind(null,e):e}function Mee(e=null,t=!1){let r=e?Object.keys(e).reduce((s,a)=>(s[e[a]]=a,s),{}):null,i=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),t?null:iE,r),n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),t?null:as,e);return{labels:i,values:n}}function Vee(e,t,r){if(typeof e=="number"){if(![].concat(Object.keys(t||{}).map(s=>t[s]),r?[]:Object.keys(iE).map(s=>+s),1/0).includes(e))throw Error(`default level:${e} must be included in custom levels`);return}let i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:as,t);if(!(e in i))throw Error(`default level:${e} must be included in custom levels`)}function Kee(e,t){let{labels:r,values:i}=e;for(let n in t){if(n in i)throw Error("levels cannot be overridden");if(t[n]in r)throw Error("pre-existing level values cannot be used for new levels")}}function Hee(e){if(typeof e!="function"&&!(typeof e=="string"&&Object.values(q8).includes(e)))throw new Error('Levels comparison should be one of "ASC", "DESC" or "function" type')}U8.exports={initialLsCache:Ree,genLsCache:Oee,levelMethods:j8,getLevel:qee,setLevel:Dee,isLevelEnabled:jee,mappings:Mee,assertNoLevelCollisions:Kee,assertDefaultLevelFound:Vee,genLevelComparison:Fee,assertLevelComparison:Hee}});var sE=b((Gle,F8)=>{"use strict";F8.exports={version:"8.21.0"}});var J8=b((Yle,Q8)=>{"use strict";var{EventEmitter:$ee}=require("events"),{lsCacheSym:zee,levelValSym:Gee,setLevelSym:oE,getLevelSym:M8,chindingsSym:cE,parsedChindingsSym:Wee,mixinSym:Yee,asJsonSym:z8,writeSym:Qee,mixinMergeStrategySym:Jee,timeSym:Xee,timeSliceIndexSym:Zee,streamSym:G8,serializersSym:dc,formattersSym:aE,errorKeySym:ete,messageKeySym:tte,useOnlyCustomLevelsSym:rte,needsMetadataGsym:ite,redactFmtSym:nte,stringifySym:ste,formatOptsSym:ate,stringifiersSym:ote,msgPrefixSym:V8}=Fl(),{getLevel:cte,setLevel:ute,isLevelEnabled:lte,mappings:pte,initialLsCache:fte,genLsCache:dte,assertNoLevelCollisions:hte}=nE(),{asChindings:W8,asJson:mte,buildFormatters:K8,stringify:H8}=zv(),{version:yte}=sE(),gte=UC(),vte=class{},Y8={constructor:vte,child:xte,bindings:bte,setBindings:_te,flush:Cte,isLevelEnabled:lte,version:yte,get level(){return this[M8]()},set level(e){this[oE](e)},get levelVal(){return this[Gee]},set levelVal(e){throw Error("levelVal is read-only")},[zee]:fte,[Qee]:Ste,[z8]:mte,[M8]:cte,[oE]:ute};Object.setPrototypeOf(Y8,$ee.prototype);Q8.exports=function(){return Object.create(Y8)};var $8=e=>e;function xte(e,t){if(!e)throw Error("missing bindings for child Pino");t=t||{};let r=this[dc],i=this[aE],n=Object.create(this);if(t.hasOwnProperty("serializers")===!0){n[dc]=Object.create(null);for(let l in r)n[dc][l]=r[l];let c=Object.getOwnPropertySymbols(r);for(var s=0;s<c.length;s++){let l=c[s];n[dc][l]=r[l]}for(let l in t.serializers)n[dc][l]=t.serializers[l];let u=Object.getOwnPropertySymbols(t.serializers);for(var a=0;a<u.length;a++){let l=u[a];n[dc][l]=t.serializers[l]}}else n[dc]=r;if(t.hasOwnProperty("formatters")){let{level:c,bindings:u,log:l}=t.formatters;n[aE]=K8(c||i.level,u||$8,l||i.log)}else n[aE]=K8(i.level,$8,i.log);if(t.hasOwnProperty("customLevels")===!0&&(hte(this.levels,t.customLevels),n.levels=pte(t.customLevels,n[rte]),dte(n)),typeof t.redact=="object"&&t.redact!==null||Array.isArray(t.redact)){n.redact=t.redact;let c=gte(n.redact,H8),u={stringify:c[nte]};n[ste]=H8,n[ote]=c,n[ate]=u}typeof t.msgPrefix=="string"&&(n[V8]=(this[V8]||"")+t.msgPrefix),n[cE]=W8(n,e);let o=t.level||this.level;return n[oE](o),this.onChild(n),n}function bte(){let t=`{${this[cE].substr(1)}}`,r=JSON.parse(t);return delete r.pid,delete r.hostname,r}function _te(e){let t=W8(this,e);this[cE]=t,delete this[Wee]}function Ate(e,t){return Object.assign(t,e)}function Ste(e,t,r){let i=this[Xee](),n=this[Yee],s=this[ete],a=this[tte],o=this[Jee]||Ate,c;e==null?c={}:e instanceof Error?(c={[s]:e},t===void 0&&(t=e.message)):(c=e,t===void 0&&e[a]===void 0&&e[s]&&(t=e[s].message)),n&&(c=o(c,n(c,r,this)));let u=this[z8](c,t,r,i),l=this[G8];l[ite]===!0&&(l.lastLevel=r,l.lastObj=c,l.lastMsg=t,l.lastTime=i.slice(this[Zee]),l.lastLogger=this),l.write(u)}function wte(){}function Cte(e){if(e!=null&&typeof e!="function")throw Error("callback must be a function");let t=this[G8];typeof t.flush=="function"?t.flush(e||wte):e&&e()}});var t5=b((fE,e5)=>{"use strict";var{hasOwnProperty:Rh}=Object.prototype,mc=pE();mc.configure=pE;mc.stringify=mc;mc.default=mc;fE.stringify=mc;fE.configure=pE;e5.exports=mc;var Ete=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]/;function Ea(e){return e.length<5e3&&!Ete.test(e)?`"${e}"`:JSON.stringify(e)}function uE(e,t){if(e.length>200||t)return e.sort(t);for(let r=1;r<e.length;r++){let i=e[r],n=r;for(;n!==0&&e[n-1]>i;)e[n]=e[n-1],n--;e[n]=i}return e}var Tte=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function lE(e){return Tte.call(e)!==void 0&&e.length!==0}function X8(e,t,r){e.length<r&&(r=e.length);let i=t===","?"":" ",n=`"0":${i}${e[0]}`;for(let s=1;s<r;s++)n+=`${t}"${s}":${i}${e[s]}`;return n}function Ite(e){if(Rh.call(e,"circularValue")){let t=e.circularValue;if(typeof t=="string")return`"${t}"`;if(t==null)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function Bte(e){let t;if(Rh.call(e,"deterministic")&&(t=e.deterministic,typeof t!="boolean"&&typeof t!="function"))throw new TypeError('The "deterministic" argument must be of type boolean or comparator function');return t===void 0?!0:t}function kte(e,t){let r;if(Rh.call(e,t)&&(r=e[t],typeof r!="boolean"))throw new TypeError(`The "${t}" argument must be of type boolean`);return r===void 0?!0:r}function Z8(e,t){let r;if(Rh.call(e,t)){if(r=e[t],typeof r!="number")throw new TypeError(`The "${t}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${t}" argument must be an integer`);if(r<1)throw new RangeError(`The "${t}" argument must be >= 1`)}return r===void 0?1/0:r}function hc(e){return e===1?"1 item":`${e} items`}function Pte(e){let t=new Set;for(let r of e)(typeof r=="string"||typeof r=="number")&&t.add(String(r));return t}function Nte(e){if(Rh.call(e,"strict")){let t=e.strict;if(typeof t!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(t)return r=>{let i=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(i+=` (${r.toString()})`),new Error(i)}}}function pE(e){e={...e};let t=Nte(e);t&&(e.bigint===void 0&&(e.bigint=!1),"circularValue"in e||(e.circularValue=Error));let r=Ite(e),i=kte(e,"bigint"),n=Bte(e),s=typeof n=="function"?n:void 0,a=Z8(e,"maximumDepth"),o=Z8(e,"maximumBreadth");function c(h,f,m,y,_,A){let S=f[h];switch(typeof S=="object"&&S!==null&&typeof S.toJSON=="function"&&(S=S.toJSON(h)),S=y.call(f,h,S),typeof S){case"string":return Ea(S);case"object":{if(S===null)return"null";if(m.indexOf(S)!==-1)return r;let B="",O=",",N=A;if(Array.isArray(S)){if(S.length===0)return"[]";if(a<m.length+1)return'"[Array]"';m.push(S),_!==""&&(A+=_,B+=`
|
|
130
|
+
${A}`,O=`,
|
|
131
|
+
${A}`);let be=Math.min(S.length,o),Be=0;for(;Be<be-1;Be++){let Ee=c(String(Be),S,m,y,_,A);B+=Ee!==void 0?Ee:"null",B+=O}let De=c(String(Be),S,m,y,_,A);if(B+=De!==void 0?De:"null",S.length-1>o){let Ee=S.length-o-1;B+=`${O}"... ${hc(Ee)} not stringified"`}return _!==""&&(B+=`
|
|
132
|
+
${N}`),m.pop(),`[${B}]`}let Y=Object.keys(S),q=Y.length;if(q===0)return"{}";if(a<m.length+1)return'"[Object]"';let z="",oe="";_!==""&&(A+=_,O=`,
|
|
133
|
+
${A}`,z=" ");let _e=Math.min(q,o);n&&!lE(S)&&(Y=uE(Y,s)),m.push(S);for(let be=0;be<_e;be++){let Be=Y[be],De=c(Be,S,m,y,_,A);De!==void 0&&(B+=`${oe}${Ea(Be)}:${z}${De}`,oe=O)}if(q>o){let be=q-o;B+=`${oe}"...":${z}"${hc(be)} not stringified"`,oe=O}return _!==""&&oe.length>1&&(B=`
|
|
134
|
+
${A}${B}
|
|
135
|
+
${N}`),m.pop(),`{${B}}`}case"number":return isFinite(S)?String(S):t?t(S):"null";case"boolean":return S===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(S);default:return t?t(S):void 0}}function u(h,f,m,y,_,A){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(h)),typeof f){case"string":return Ea(f);case"object":{if(f===null)return"null";if(m.indexOf(f)!==-1)return r;let S=A,B="",O=",";if(Array.isArray(f)){if(f.length===0)return"[]";if(a<m.length+1)return'"[Array]"';m.push(f),_!==""&&(A+=_,B+=`
|
|
136
|
+
${A}`,O=`,
|
|
137
|
+
${A}`);let q=Math.min(f.length,o),z=0;for(;z<q-1;z++){let _e=u(String(z),f[z],m,y,_,A);B+=_e!==void 0?_e:"null",B+=O}let oe=u(String(z),f[z],m,y,_,A);if(B+=oe!==void 0?oe:"null",f.length-1>o){let _e=f.length-o-1;B+=`${O}"... ${hc(_e)} not stringified"`}return _!==""&&(B+=`
|
|
138
|
+
${S}`),m.pop(),`[${B}]`}m.push(f);let N="";_!==""&&(A+=_,O=`,
|
|
139
|
+
${A}`,N=" ");let Y="";for(let q of y){let z=u(q,f[q],m,y,_,A);z!==void 0&&(B+=`${Y}${Ea(q)}:${N}${z}`,Y=O)}return _!==""&&Y.length>1&&(B=`
|
|
140
|
+
${A}${B}
|
|
141
|
+
${S}`),m.pop(),`{${B}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return t?t(f):void 0}}function l(h,f,m,y,_){switch(typeof f){case"string":return Ea(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(h),typeof f!="object")return l(h,f,m,y,_);if(f===null)return"null"}if(m.indexOf(f)!==-1)return r;let A=_;if(Array.isArray(f)){if(f.length===0)return"[]";if(a<m.length+1)return'"[Array]"';m.push(f),_+=y;let z=`
|
|
142
|
+
${_}`,oe=`,
|
|
143
|
+
${_}`,_e=Math.min(f.length,o),be=0;for(;be<_e-1;be++){let De=l(String(be),f[be],m,y,_);z+=De!==void 0?De:"null",z+=oe}let Be=l(String(be),f[be],m,y,_);if(z+=Be!==void 0?Be:"null",f.length-1>o){let De=f.length-o-1;z+=`${oe}"... ${hc(De)} not stringified"`}return z+=`
|
|
144
|
+
${A}`,m.pop(),`[${z}]`}let S=Object.keys(f),B=S.length;if(B===0)return"{}";if(a<m.length+1)return'"[Object]"';_+=y;let O=`,
|
|
145
|
+
${_}`,N="",Y="",q=Math.min(B,o);lE(f)&&(N+=X8(f,O,o),S=S.slice(f.length),q-=f.length,Y=O),n&&(S=uE(S,s)),m.push(f);for(let z=0;z<q;z++){let oe=S[z],_e=l(oe,f[oe],m,y,_);_e!==void 0&&(N+=`${Y}${Ea(oe)}: ${_e}`,Y=O)}if(B>o){let z=B-o;N+=`${Y}"...": "${hc(z)} not stringified"`,Y=O}return Y!==""&&(N=`
|
|
146
|
+
${_}${N}
|
|
147
|
+
${A}`),m.pop(),`{${N}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return t?t(f):void 0}}function p(h,f,m){switch(typeof f){case"string":return Ea(f);case"object":{if(f===null)return"null";if(typeof f.toJSON=="function"){if(f=f.toJSON(h),typeof f!="object")return p(h,f,m);if(f===null)return"null"}if(m.indexOf(f)!==-1)return r;let y="",_=f.length!==void 0;if(_&&Array.isArray(f)){if(f.length===0)return"[]";if(a<m.length+1)return'"[Array]"';m.push(f);let N=Math.min(f.length,o),Y=0;for(;Y<N-1;Y++){let z=p(String(Y),f[Y],m);y+=z!==void 0?z:"null",y+=","}let q=p(String(Y),f[Y],m);if(y+=q!==void 0?q:"null",f.length-1>o){let z=f.length-o-1;y+=`,"... ${hc(z)} not stringified"`}return m.pop(),`[${y}]`}let A=Object.keys(f),S=A.length;if(S===0)return"{}";if(a<m.length+1)return'"[Object]"';let B="",O=Math.min(S,o);_&&lE(f)&&(y+=X8(f,",",o),A=A.slice(f.length),O-=f.length,B=","),n&&(A=uE(A,s)),m.push(f);for(let N=0;N<O;N++){let Y=A[N],q=p(Y,f[Y],m);q!==void 0&&(y+=`${B}${Ea(Y)}:${q}`,B=",")}if(S>o){let N=S-o;y+=`${B}"...":"${hc(N)} not stringified"`}return m.pop(),`{${y}}`}case"number":return isFinite(f)?String(f):t?t(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return t?t(f):void 0}}function d(h,f,m){if(arguments.length>1){let y="";if(typeof m=="number"?y=" ".repeat(Math.min(m,10)):typeof m=="string"&&(y=m.slice(0,10)),f!=null){if(typeof f=="function")return c("",{"":h},[],f,y,"");if(Array.isArray(f))return u("",h,[],Pte(f),y,"")}if(y.length!==0)return l("",h,[],y,"")}return p("",h,[])}return d}});var n5=b((Qle,i5)=>{"use strict";var dE=Symbol.for("pino.metadata"),{DEFAULT_LEVELS:r5}=Gv(),Rte=r5.info;function Ote(e,t){let r=0;e=e||[],t=t||{dedupe:!1};let i=Object.create(r5);i.silent=1/0,t.levels&&typeof t.levels=="object"&&Object.keys(t.levels).forEach(p=>{i[p]=t.levels[p]});let n={write:s,add:c,emit:a,flushSync:o,end:u,minLevel:0,streams:[],clone:l,[dE]:!0,streamLevels:i};return Array.isArray(e)?e.forEach(c,n):c.call(n,e),e=null,n;function s(p){let d,h=this.lastLevel,{streams:f}=this,m=0,y;for(let _=Dte(f.length,t.dedupe);jte(_,f.length,t.dedupe);_=qte(_,t.dedupe))if(d=f[_],d.level<=h){if(m!==0&&m!==d.level)break;if(y=d.stream,y[dE]){let{lastTime:A,lastMsg:S,lastObj:B,lastLogger:O}=this;y.lastLevel=h,y.lastTime=A,y.lastMsg=S,y.lastObj=B,y.lastLogger=O}y.write(p),t.dedupe&&(m=d.level)}else if(!t.dedupe)break}function a(...p){for(let{stream:d}of this.streams)typeof d.emit=="function"&&d.emit(...p)}function o(){for(let{stream:p}of this.streams)typeof p.flushSync=="function"&&p.flushSync()}function c(p){if(!p)return n;let d=typeof p.write=="function"||p.stream,h=p.write?p:p.stream;if(!d)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:f,streamLevels:m}=this,y;typeof p.levelVal=="number"?y=p.levelVal:typeof p.level=="string"?y=m[p.level]:typeof p.level=="number"?y=p.level:y=Rte;let _={stream:h,level:y,levelVal:void 0,id:r++};return f.unshift(_),f.sort(Lte),this.minLevel=f[0].level,n}function u(){for(let{stream:p}of this.streams)typeof p.flushSync=="function"&&p.flushSync(),p.end()}function l(p){let d=new Array(this.streams.length);for(let h=0;h<d.length;h++)d[h]={level:p,stream:this.streams[h].stream};return{write:s,add:c,minLevel:p,streams:d,clone:l,emit:a,flushSync:o,[dE]:!0}}}function Lte(e,t){return e.level-t.level}function Dte(e,t){return t?e-1:0}function qte(e,t){return t?e-1:e+1}function jte(e,t,r){return r?e>=0:e<t}i5.exports=Ote});var g5=b((Jle,Yi)=>{"use strict";var Ute=require("os"),f5=PC(),Fte=NC(),Mte=UC(),d5=Jq(),Vte=J8(),h5=Fl(),{configure:Kte}=t5(),{assertDefaultLevelFound:Hte,mappings:m5,genLsCache:$te,genLevelComparison:zte,assertLevelComparison:Gte}=nE(),{DEFAULT_LEVELS:Wte,SORTING_ORDER:Yte}=Gv(),{createArgsNormalizer:Qte,asChindings:Jte,buildSafeSonicBoom:s5,buildFormatters:Xte,stringify:hE,normalizeDestFileDescriptor:a5,noop:Zte}=zv(),{version:ere}=sE(),{chindingsSym:o5,redactFmtSym:tre,serializersSym:c5,timeSym:rre,timeSliceIndexSym:ire,streamSym:nre,stringifySym:u5,stringifySafeSym:mE,stringifiersSym:l5,setLevelSym:sre,endSym:are,formatOptsSym:ore,messageKeySym:cre,errorKeySym:ure,nestedKeySym:lre,mixinSym:pre,levelCompSym:fre,useOnlyCustomLevelsSym:dre,formattersSym:p5,hooksSym:hre,nestedKeyStrSym:mre,mixinMergeStrategySym:yre,msgPrefixSym:gre}=h5,{epochTime:y5,nullTime:vre}=d5,{pid:xre}=process,bre=Ute.hostname(),_re=f5.err,Are={level:"info",levelComparison:Yte.ASC,levels:Wte,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:xre,hostname:bre},serializers:Object.assign(Object.create(null),{err:_re}),formatters:Object.assign(Object.create(null),{bindings(e){return e},level(e,t){return{level:t}}}),hooks:{logMethod:void 0},timestamp:y5,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},Sre=Qte(Are),wre=Object.assign(Object.create(null),f5);function yE(...e){let t={},{opts:r,stream:i}=Sre(t,Fte(),...e),{redact:n,crlf:s,serializers:a,timestamp:o,messageKey:c,errorKey:u,nestedKey:l,base:p,name:d,level:h,customLevels:f,levelComparison:m,mixin:y,mixinMergeStrategy:_,useOnlyCustomLevels:A,formatters:S,hooks:B,depthLimit:O,edgeLimit:N,onChild:Y,msgPrefix:q}=r,z=Kte({maximumDepth:O,maximumBreadth:N}),oe=Xte(S.level,S.bindings,S.log),_e=hE.bind({[mE]:z}),be=n?Mte(n,_e):{},Be=n?{stringify:be[tre]}:{stringify:_e},De="}"+(s?`\r
|
|
148
|
+
`:`
|
|
149
|
+
`),Ee=Jte.bind(null,{[o5]:"",[c5]:a,[l5]:be,[u5]:hE,[mE]:z,[p5]:oe}),Pe="";p!==null&&(d===void 0?Pe=Ee(p):Pe=Ee(Object.assign({},p,{name:d})));let re=o instanceof Function?o:o?y5:vre,dt=re().indexOf(":")+1;if(A&&!f)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(y&&typeof y!="function")throw Error(`Unknown mixin type "${typeof y}" - expected "function"`);if(q&&typeof q!="string")throw Error(`Unknown msgPrefix type "${typeof q}" - expected "string"`);Hte(h,f,A);let or=m5(f,A);typeof i.emit=="function"&&i.emit("message",{code:"PINO_CONFIG",config:{levels:or,messageKey:c,errorKey:u}}),Gte(m);let fe=zte(m);return Object.assign(t,{levels:or,[fre]:fe,[dre]:A,[nre]:i,[rre]:re,[ire]:dt,[u5]:hE,[mE]:z,[l5]:be,[are]:De,[ore]:Be,[cre]:c,[ure]:u,[lre]:l,[mre]:l?`,${JSON.stringify(l)}:{`:"",[c5]:a,[pre]:y,[yre]:_,[o5]:Pe,[p5]:oe,[hre]:B,silent:Zte,onChild:Y,[gre]:q}),Object.setPrototypeOf(t,Vte()),$te(t),t[sre](h),t}Yi.exports=yE;Yi.exports.destination=(e=process.stdout.fd)=>typeof e=="object"?(e.dest=a5(e.dest||process.stdout.fd),s5(e)):s5({dest:a5(e),minLength:0});Yi.exports.transport=XC();Yi.exports.multistream=n5();Yi.exports.levels=m5();Yi.exports.stdSerializers=wre;Yi.exports.stdTimeFunctions=Object.assign({},d5);Yi.exports.symbols=h5;Yi.exports.version=ere;Yi.exports.default=yE;Yi.exports.pino=yE});var v5=require("http"),Yv=require("https"),x5=require("crypto");var bc=require("fs");function ME(e){return typeof e>"u"||e===null}function j5(e){return typeof e=="object"&&e!==null}function U5(e){return Array.isArray(e)?e:ME(e)?[]:[e]}function F5(e,t){var r,i,n,s;if(t)for(s=Object.keys(t),r=0,i=s.length;r<i;r+=1)n=s[r],e[n]=t[n];return e}function M5(e,t){var r="",i;for(i=0;i<t;i+=1)r+=e;return r}function V5(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var K5=ME,H5=j5,$5=U5,z5=M5,G5=V5,W5=F5,pr={isNothing:K5,isObject:H5,toArray:$5,repeat:z5,isNegativeZero:G5,extend:W5};function VE(e,t){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!t&&e.mark.snippet&&(r+=`
|
|
150
|
+
|
|
151
|
+
`+e.mark.snippet),i+" "+r):i}function $l(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=VE(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}$l.prototype=Object.create(Error.prototype);$l.prototype.constructor=$l;$l.prototype.toString=function(t){return this.name+": "+VE(this,t)};var Kr=$l;function Zv(e,t,r,i,n){var s="",a="",o=Math.floor(n/2)-1;return i-t>o&&(s=" ... ",t=i-o+s.length),r-i>o&&(a=" ...",r=i+o-a.length),{str:s+e.slice(t,r).replace(/\t/g,"\u2192")+a,pos:i-t+s.length}}function ex(e,t){return pr.repeat(" ",t-e.length)+e}function Y5(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),typeof t.indent!="number"&&(t.indent=1),typeof t.linesBefore!="number"&&(t.linesBefore=3),typeof t.linesAfter!="number"&&(t.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],s,a=-1;s=r.exec(e.buffer);)n.push(s.index),i.push(s.index+s[0].length),e.position<=s.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var o="",c,u,l=Math.min(e.line+t.linesAfter,n.length).toString().length,p=t.maxLength-(t.indent+l+3);for(c=1;c<=t.linesBefore&&!(a-c<0);c++)u=Zv(e.buffer,i[a-c],n[a-c],e.position-(i[a]-i[a-c]),p),o=pr.repeat(" ",t.indent)+ex((e.line-c+1).toString(),l)+" | "+u.str+`
|
|
152
|
+
`+o;for(u=Zv(e.buffer,i[a],n[a],e.position,p),o+=pr.repeat(" ",t.indent)+ex((e.line+1).toString(),l)+" | "+u.str+`
|
|
153
|
+
`,o+=pr.repeat("-",t.indent+l+3+u.pos)+`^
|
|
154
|
+
`,c=1;c<=t.linesAfter&&!(a+c>=n.length);c++)u=Zv(e.buffer,i[a+c],n[a+c],e.position-(i[a]-i[a+c]),p),o+=pr.repeat(" ",t.indent)+ex((e.line+c+1).toString(),l)+" | "+u.str+`
|
|
155
|
+
`;return o.replace(/\n$/,"")}var Q5=Y5,J5=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],X5=["scalar","sequence","mapping"];function Z5(e){var t={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(i){t[String(i)]=r})}),t}function ej(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(J5.indexOf(r)===-1)throw new Kr('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=Z5(t.styleAliases||null),X5.indexOf(this.kind)===-1)throw new Kr('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var Ir=ej;function EE(e,t){var r=[];return e[t].forEach(function(i){var n=r.length;r.forEach(function(s,a){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(n=a)}),r[n]=i}),r}function tj(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function i(n){n.multi?(e.multi[n.kind].push(n),e.multi.fallback.push(n)):e[n.kind][n.tag]=e.fallback[n.tag]=n}for(t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(i);return e}function rx(e){return this.extend(e)}rx.prototype.extend=function(t){var r=[],i=[];if(t instanceof Ir)i.push(t);else if(Array.isArray(t))i=i.concat(t);else if(t&&(Array.isArray(t.implicit)||Array.isArray(t.explicit)))t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(i=i.concat(t.explicit));else throw new Kr("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Ir))throw new Kr("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new Kr("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new Kr("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof Ir))throw new Kr("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(rx.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=EE(n,"implicit"),n.compiledExplicit=EE(n,"explicit"),n.compiledTypeMap=tj(n.compiledImplicit,n.compiledExplicit),n};var KE=rx,HE=new Ir("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),$E=new Ir("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),zE=new Ir("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),GE=new KE({explicit:[HE,$E,zE]});function rj(e){if(e===null)return!0;var t=e.length;return t===1&&e==="~"||t===4&&(e==="null"||e==="Null"||e==="NULL")}function ij(){return null}function nj(e){return e===null}var WE=new Ir("tag:yaml.org,2002:null",{kind:"scalar",resolve:rj,construct:ij,predicate:nj,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function sj(e){if(e===null)return!1;var t=e.length;return t===4&&(e==="true"||e==="True"||e==="TRUE")||t===5&&(e==="false"||e==="False"||e==="FALSE")}function aj(e){return e==="true"||e==="True"||e==="TRUE"}function oj(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var YE=new Ir("tag:yaml.org,2002:bool",{kind:"scalar",resolve:sj,construct:aj,predicate:oj,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function cj(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function uj(e){return 48<=e&&e<=55}function lj(e){return 48<=e&&e<=57}function pj(e){if(e===null)return!1;var t=e.length,r=0,i=!1,n;if(!t)return!1;if(n=e[r],(n==="-"||n==="+")&&(n=e[++r]),n==="0"){if(r+1===t)return!0;if(n=e[++r],n==="b"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!cj(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<t;r++)if(n=e[r],n!=="_"){if(!uj(e.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<t;r++)if(n=e[r],n!=="_"){if(!lj(e.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}function fj(e){var t=e,r=1,i;if(t.indexOf("_")!==-1&&(t=t.replace(/_/g,"")),i=t[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),t=t.slice(1),i=t[0]),t==="0")return 0;if(i==="0"){if(t[1]==="b")return r*parseInt(t.slice(2),2);if(t[1]==="x")return r*parseInt(t.slice(2),16);if(t[1]==="o")return r*parseInt(t.slice(2),8)}return r*parseInt(t,10)}function dj(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!pr.isNegativeZero(e)}var QE=new Ir("tag:yaml.org,2002:int",{kind:"scalar",resolve:pj,construct:fj,predicate:dj,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),hj=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function mj(e){return!(e===null||!hj.test(e)||e[e.length-1]==="_")}function yj(e){var t,r;return t=e.replace(/_/g,"").toLowerCase(),r=t[0]==="-"?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),t===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:t===".nan"?NaN:r*parseFloat(t,10)}var gj=/^[-+]?[0-9]+e/;function vj(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(pr.isNegativeZero(e))return"-0.0";return r=e.toString(10),gj.test(r)?r.replace("e",".e"):r}function xj(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||pr.isNegativeZero(e))}var JE=new Ir("tag:yaml.org,2002:float",{kind:"scalar",resolve:mj,construct:yj,predicate:xj,represent:vj,defaultStyle:"lowercase"}),XE=GE.extend({implicit:[WE,YE,QE,JE]}),ZE=XE,eT=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),tT=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function bj(e){return e===null?!1:eT.exec(e)!==null||tT.exec(e)!==null}function _j(e){var t,r,i,n,s,a,o,c=0,u=null,l,p,d;if(t=eT.exec(e),t===null&&(t=tT.exec(e)),t===null)throw new Error("Date resolve error");if(r=+t[1],i=+t[2]-1,n=+t[3],!t[4])return new Date(Date.UTC(r,i,n));if(s=+t[4],a=+t[5],o=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+="0";c=+c}return t[9]&&(l=+t[10],p=+(t[11]||0),u=(l*60+p)*6e4,t[9]==="-"&&(u=-u)),d=new Date(Date.UTC(r,i,n,s,a,o,c)),u&&d.setTime(d.getTime()-u),d}function Aj(e){return e.toISOString()}var rT=new Ir("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:bj,construct:_j,instanceOf:Date,represent:Aj});function Sj(e){return e==="<<"||e===null}var iT=new Ir("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Sj}),ox=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
156
|
+
\r`;function wj(e){if(e===null)return!1;var t,r,i=0,n=e.length,s=ox;for(r=0;r<n;r++)if(t=s.indexOf(e.charAt(r)),!(t>64)){if(t<0)return!1;i+=6}return i%8===0}function Cj(e){var t,r,i=e.replace(/[\r\n=]/g,""),n=i.length,s=ox,a=0,o=[];for(t=0;t<n;t++)t%4===0&&t&&(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)),a=a<<6|s.indexOf(i.charAt(t));return r=n%4*6,r===0?(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)):r===18?(o.push(a>>10&255),o.push(a>>2&255)):r===12&&o.push(a>>4&255),new Uint8Array(o)}function Ej(e){var t="",r=0,i,n,s=e.length,a=ox;for(i=0;i<s;i++)i%3===0&&i&&(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]),r=(r<<8)+e[i];return n=s%3,n===0?(t+=a[r>>18&63],t+=a[r>>12&63],t+=a[r>>6&63],t+=a[r&63]):n===2?(t+=a[r>>10&63],t+=a[r>>4&63],t+=a[r<<2&63],t+=a[64]):n===1&&(t+=a[r>>2&63],t+=a[r<<4&63],t+=a[64],t+=a[64]),t}function Tj(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var nT=new Ir("tag:yaml.org,2002:binary",{kind:"scalar",resolve:wj,construct:Cj,predicate:Tj,represent:Ej}),Ij=Object.prototype.hasOwnProperty,Bj=Object.prototype.toString;function kj(e){if(e===null)return!0;var t=[],r,i,n,s,a,o=e;for(r=0,i=o.length;r<i;r+=1){if(n=o[r],a=!1,Bj.call(n)!=="[object Object]")return!1;for(s in n)if(Ij.call(n,s))if(!a)a=!0;else return!1;if(!a)return!1;if(t.indexOf(s)===-1)t.push(s);else return!1}return!0}function Pj(e){return e!==null?e:[]}var sT=new Ir("tag:yaml.org,2002:omap",{kind:"sequence",resolve:kj,construct:Pj}),Nj=Object.prototype.toString;function Rj(e){if(e===null)return!0;var t,r,i,n,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1){if(i=a[t],Nj.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;s[t]=[n[0],i[n[0]]]}return!0}function Oj(e){if(e===null)return[];var t,r,i,n,s,a=e;for(s=new Array(a.length),t=0,r=a.length;t<r;t+=1)i=a[t],n=Object.keys(i),s[t]=[n[0],i[n[0]]];return s}var aT=new Ir("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Rj,construct:Oj}),Lj=Object.prototype.hasOwnProperty;function Dj(e){if(e===null)return!0;var t,r=e;for(t in r)if(Lj.call(r,t)&&r[t]!==null)return!1;return!0}function qj(e){return e!==null?e:{}}var oT=new Ir("tag:yaml.org,2002:set",{kind:"mapping",resolve:Dj,construct:qj}),cx=ZE.extend({implicit:[rT,iT],explicit:[nT,sT,aT,oT]}),Us=Object.prototype.hasOwnProperty,Dh=1,cT=2,uT=3,qh=4,tx=1,jj=2,TE=3,Uj=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Fj=/[\x85\u2028\u2029]/,Mj=/[,\[\]\{\}]/,lT=/^(?:!|!!|![a-z\-]+!)$/i,pT=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function IE(e){return Object.prototype.toString.call(e)}function Sn(e){return e===10||e===13}function Ia(e){return e===9||e===32}function Zr(e){return e===9||e===32||e===10||e===13}function gc(e){return e===44||e===91||e===93||e===123||e===125}function Vj(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}function Kj(e){return e===120?2:e===117?4:e===85?8:0}function Hj(e){return 48<=e&&e<=57?e-48:-1}function BE(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
|
|
157
|
+
`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function $j(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function fT(e,t,r){t==="__proto__"?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}var dT=new Array(256),hT=new Array(256);for(Ta=0;Ta<256;Ta++)dT[Ta]=BE(Ta)?1:0,hT[Ta]=BE(Ta);var Ta;function zj(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||cx,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function mT(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=Q5(r),new Kr(t,r)}function Ae(e,t){throw mT(e,t)}function jh(e,t){e.onWarning&&e.onWarning.call(null,mT(e,t))}var kE={YAML:function(t,r,i){var n,s,a;t.version!==null&&Ae(t,"duplication of %YAML directive"),i.length!==1&&Ae(t,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&Ae(t,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),a=parseInt(n[2],10),s!==1&&Ae(t,"unacceptable YAML version of the document"),t.version=i[0],t.checkLineBreaks=a<2,a!==1&&a!==2&&jh(t,"unsupported YAML version of the document")},TAG:function(t,r,i){var n,s;i.length!==2&&Ae(t,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],lT.test(n)||Ae(t,"ill-formed tag handle (first argument) of the TAG directive"),Us.call(t.tagMap,n)&&Ae(t,'there is a previously declared suffix for "'+n+'" tag handle'),pT.test(s)||Ae(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Ae(t,"tag prefix is malformed: "+s)}t.tagMap[n]=s}};function js(e,t,r,i){var n,s,a,o;if(t<r){if(o=e.input.slice(t,r),i)for(n=0,s=o.length;n<s;n+=1)a=o.charCodeAt(n),a===9||32<=a&&a<=1114111||Ae(e,"expected valid JSON character");else Uj.test(o)&&Ae(e,"the stream contains non-printable characters");e.result+=o}}function PE(e,t,r,i){var n,s,a,o;for(pr.isObject(r)||Ae(e,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),a=0,o=n.length;a<o;a+=1)s=n[a],Us.call(t,s)||(fT(t,s,r[s]),i[s]=!0)}function vc(e,t,r,i,n,s,a,o,c){var u,l;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),u=0,l=n.length;u<l;u+=1)Array.isArray(n[u])&&Ae(e,"nested arrays are not supported inside keys"),typeof n=="object"&&IE(n[u])==="[object Object]"&&(n[u]="[object Object]");if(typeof n=="object"&&IE(n)==="[object Object]"&&(n="[object Object]"),n=String(n),t===null&&(t={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(u=0,l=s.length;u<l;u+=1)PE(e,t,s[u],r);else PE(e,t,s,r);else!e.json&&!Us.call(r,n)&&Us.call(t,n)&&(e.line=a||e.line,e.lineStart=o||e.lineStart,e.position=c||e.position,Ae(e,"duplicated mapping key")),fT(t,n,s),delete r[n];return t}function ux(e){var t;t=e.input.charCodeAt(e.position),t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):Ae(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function tr(e,t,r){for(var i=0,n=e.input.charCodeAt(e.position);n!==0;){for(;Ia(n);)n===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),n=e.input.charCodeAt(++e.position);if(t&&n===35)do n=e.input.charCodeAt(++e.position);while(n!==10&&n!==13&&n!==0);if(Sn(n))for(ux(e),n=e.input.charCodeAt(e.position),i++,e.lineIndent=0;n===32;)e.lineIndent++,n=e.input.charCodeAt(++e.position);else break}return r!==-1&&i!==0&&e.lineIndent<r&&jh(e,"deficient indentation"),i}function Mh(e){var t=e.position,r;return r=e.input.charCodeAt(t),!!((r===45||r===46)&&r===e.input.charCodeAt(t+1)&&r===e.input.charCodeAt(t+2)&&(t+=3,r=e.input.charCodeAt(t),r===0||Zr(r)))}function lx(e,t){t===1?e.result+=" ":t>1&&(e.result+=pr.repeat(`
|
|
158
|
+
`,t-1))}function Gj(e,t,r){var i,n,s,a,o,c,u,l,p=e.kind,d=e.result,h;if(h=e.input.charCodeAt(e.position),Zr(h)||gc(h)||h===35||h===38||h===42||h===33||h===124||h===62||h===39||h===34||h===37||h===64||h===96||(h===63||h===45)&&(n=e.input.charCodeAt(e.position+1),Zr(n)||r&&gc(n)))return!1;for(e.kind="scalar",e.result="",s=a=e.position,o=!1;h!==0;){if(h===58){if(n=e.input.charCodeAt(e.position+1),Zr(n)||r&&gc(n))break}else if(h===35){if(i=e.input.charCodeAt(e.position-1),Zr(i))break}else{if(e.position===e.lineStart&&Mh(e)||r&&gc(h))break;if(Sn(h))if(c=e.line,u=e.lineStart,l=e.lineIndent,tr(e,!1,-1),e.lineIndent>=t){o=!0,h=e.input.charCodeAt(e.position);continue}else{e.position=a,e.line=c,e.lineStart=u,e.lineIndent=l;break}}o&&(js(e,s,a,!1),lx(e,e.line-c),s=a=e.position,o=!1),Ia(h)||(a=e.position+1),h=e.input.charCodeAt(++e.position)}return js(e,s,a,!1),e.result?!0:(e.kind=p,e.result=d,!1)}function Wj(e,t){var r,i,n;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,i=n=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(js(e,i,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)i=e.position,e.position++,n=e.position;else return!0;else Sn(r)?(js(e,i,n,!0),lx(e,tr(e,!1,t)),i=n=e.position):e.position===e.lineStart&&Mh(e)?Ae(e,"unexpected end of the document within a single quoted scalar"):(e.position++,n=e.position);Ae(e,"unexpected end of the stream within a single quoted scalar")}function Yj(e,t){var r,i,n,s,a,o;if(o=e.input.charCodeAt(e.position),o!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=i=e.position;(o=e.input.charCodeAt(e.position))!==0;){if(o===34)return js(e,r,e.position,!0),e.position++,!0;if(o===92){if(js(e,r,e.position,!0),o=e.input.charCodeAt(++e.position),Sn(o))tr(e,!1,t);else if(o<256&&dT[o])e.result+=hT[o],e.position++;else if((a=Kj(o))>0){for(n=a,s=0;n>0;n--)o=e.input.charCodeAt(++e.position),(a=Vj(o))>=0?s=(s<<4)+a:Ae(e,"expected hexadecimal character");e.result+=$j(s),e.position++}else Ae(e,"unknown escape sequence");r=i=e.position}else Sn(o)?(js(e,r,i,!0),lx(e,tr(e,!1,t)),r=i=e.position):e.position===e.lineStart&&Mh(e)?Ae(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}Ae(e,"unexpected end of the stream within a double quoted scalar")}function Qj(e,t){var r=!0,i,n,s,a=e.tag,o,c=e.anchor,u,l,p,d,h,f=Object.create(null),m,y,_,A;if(A=e.input.charCodeAt(e.position),A===91)l=93,h=!1,o=[];else if(A===123)l=125,h=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),A=e.input.charCodeAt(++e.position);A!==0;){if(tr(e,!0,t),A=e.input.charCodeAt(e.position),A===l)return e.position++,e.tag=a,e.anchor=c,e.kind=h?"mapping":"sequence",e.result=o,!0;r?A===44&&Ae(e,"expected the node content, but found ','"):Ae(e,"missed comma between flow collection entries"),y=m=_=null,p=d=!1,A===63&&(u=e.input.charCodeAt(e.position+1),Zr(u)&&(p=d=!0,e.position++,tr(e,!0,t))),i=e.line,n=e.lineStart,s=e.position,xc(e,t,Dh,!1,!0),y=e.tag,m=e.result,tr(e,!0,t),A=e.input.charCodeAt(e.position),(d||e.line===i)&&A===58&&(p=!0,A=e.input.charCodeAt(++e.position),tr(e,!0,t),xc(e,t,Dh,!1,!0),_=e.result),h?vc(e,o,f,y,m,_,i,n,s):p?o.push(vc(e,null,f,y,m,_,i,n,s)):o.push(m),tr(e,!0,t),A=e.input.charCodeAt(e.position),A===44?(r=!0,A=e.input.charCodeAt(++e.position)):r=!1}Ae(e,"unexpected end of the stream within a flow collection")}function Jj(e,t){var r,i,n=tx,s=!1,a=!1,o=t,c=0,u=!1,l,p;if(p=e.input.charCodeAt(e.position),p===124)i=!1;else if(p===62)i=!0;else return!1;for(e.kind="scalar",e.result="";p!==0;)if(p=e.input.charCodeAt(++e.position),p===43||p===45)tx===n?n=p===43?TE:jj:Ae(e,"repeat of a chomping mode identifier");else if((l=Hj(p))>=0)l===0?Ae(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?Ae(e,"repeat of an indentation width identifier"):(o=t+l-1,a=!0);else break;if(Ia(p)){do p=e.input.charCodeAt(++e.position);while(Ia(p));if(p===35)do p=e.input.charCodeAt(++e.position);while(!Sn(p)&&p!==0)}for(;p!==0;){for(ux(e),e.lineIndent=0,p=e.input.charCodeAt(e.position);(!a||e.lineIndent<o)&&p===32;)e.lineIndent++,p=e.input.charCodeAt(++e.position);if(!a&&e.lineIndent>o&&(o=e.lineIndent),Sn(p)){c++;continue}if(e.lineIndent<o){n===TE?e.result+=pr.repeat(`
|
|
159
|
+
`,s?1+c:c):n===tx&&s&&(e.result+=`
|
|
160
|
+
`);break}for(i?Ia(p)?(u=!0,e.result+=pr.repeat(`
|
|
161
|
+
`,s?1+c:c)):u?(u=!1,e.result+=pr.repeat(`
|
|
162
|
+
`,c+1)):c===0?s&&(e.result+=" "):e.result+=pr.repeat(`
|
|
163
|
+
`,c):e.result+=pr.repeat(`
|
|
164
|
+
`,s?1+c:c),s=!0,a=!0,c=0,r=e.position;!Sn(p)&&p!==0;)p=e.input.charCodeAt(++e.position);js(e,r,e.position,!1)}return!0}function NE(e,t){var r,i=e.tag,n=e.anchor,s=[],a,o=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ae(e,"tab characters must not be used in indentation")),!(c!==45||(a=e.input.charCodeAt(e.position+1),!Zr(a))));){if(o=!0,e.position++,tr(e,!0,-1)&&e.lineIndent<=t){s.push(null),c=e.input.charCodeAt(e.position);continue}if(r=e.line,xc(e,t,uT,!1,!0),s.push(e.result),tr(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&c!==0)Ae(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break}return o?(e.tag=i,e.anchor=n,e.kind="sequence",e.result=s,!0):!1}function Xj(e,t,r){var i,n,s,a,o,c,u=e.tag,l=e.anchor,p={},d=Object.create(null),h=null,f=null,m=null,y=!1,_=!1,A;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=p),A=e.input.charCodeAt(e.position);A!==0;){if(!y&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,Ae(e,"tab characters must not be used in indentation")),i=e.input.charCodeAt(e.position+1),s=e.line,(A===63||A===58)&&Zr(i))A===63?(y&&(vc(e,p,d,h,f,null,a,o,c),h=f=m=null),_=!0,y=!0,n=!0):y?(y=!1,n=!0):Ae(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,A=i;else{if(a=e.line,o=e.lineStart,c=e.position,!xc(e,r,cT,!1,!0))break;if(e.line===s){for(A=e.input.charCodeAt(e.position);Ia(A);)A=e.input.charCodeAt(++e.position);if(A===58)A=e.input.charCodeAt(++e.position),Zr(A)||Ae(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(vc(e,p,d,h,f,null,a,o,c),h=f=m=null),_=!0,y=!1,n=!1,h=e.tag,f=e.result;else if(_)Ae(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=u,e.anchor=l,!0}else if(_)Ae(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=u,e.anchor=l,!0}if((e.line===s||e.lineIndent>t)&&(y&&(a=e.line,o=e.lineStart,c=e.position),xc(e,t,qh,!0,n)&&(y?f=e.result:m=e.result),y||(vc(e,p,d,h,f,m,a,o,c),h=f=m=null),tr(e,!0,-1),A=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&A!==0)Ae(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&vc(e,p,d,h,f,null,a,o,c),_&&(e.tag=u,e.anchor=l,e.kind="mapping",e.result=p),_}function Zj(e){var t,r=!1,i=!1,n,s,a;if(a=e.input.charCodeAt(e.position),a!==33)return!1;if(e.tag!==null&&Ae(e,"duplication of a tag property"),a=e.input.charCodeAt(++e.position),a===60?(r=!0,a=e.input.charCodeAt(++e.position)):a===33?(i=!0,n="!!",a=e.input.charCodeAt(++e.position)):n="!",t=e.position,r){do a=e.input.charCodeAt(++e.position);while(a!==0&&a!==62);e.position<e.length?(s=e.input.slice(t,e.position),a=e.input.charCodeAt(++e.position)):Ae(e,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Zr(a);)a===33&&(i?Ae(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),lT.test(n)||Ae(e,"named tag handle cannot contain such characters"),i=!0,t=e.position+1)),a=e.input.charCodeAt(++e.position);s=e.input.slice(t,e.position),Mj.test(s)&&Ae(e,"tag suffix cannot contain flow indicator characters")}s&&!pT.test(s)&&Ae(e,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Ae(e,"tag name is malformed: "+s)}return r?e.tag=s:Us.call(e.tagMap,n)?e.tag=e.tagMap[n]+s:n==="!"?e.tag="!"+s:n==="!!"?e.tag="tag:yaml.org,2002:"+s:Ae(e,'undeclared tag handle "'+n+'"'),!0}function eU(e){var t,r;if(r=e.input.charCodeAt(e.position),r!==38)return!1;for(e.anchor!==null&&Ae(e,"duplication of an anchor property"),r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Zr(r)&&!gc(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&Ae(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function tU(e){var t,r,i;if(i=e.input.charCodeAt(e.position),i!==42)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;i!==0&&!Zr(i)&&!gc(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&Ae(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Us.call(e.anchorMap,r)||Ae(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],tr(e,!0,-1),!0}function xc(e,t,r,i,n){var s,a,o,c=1,u=!1,l=!1,p,d,h,f,m,y;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,s=a=o=qh===r||uT===r,i&&tr(e,!0,-1)&&(u=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;Zj(e)||eU(e);)tr(e,!0,-1)?(u=!0,o=s,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):o=!1;if(o&&(o=u||n),(c===1||qh===r)&&(Dh===r||cT===r?m=t:m=t+1,y=e.position-e.lineStart,c===1?o&&(NE(e,y)||Xj(e,y,m))||Qj(e,m)?l=!0:(a&&Jj(e,m)||Wj(e,m)||Yj(e,m)?l=!0:tU(e)?(l=!0,(e.tag!==null||e.anchor!==null)&&Ae(e,"alias node should not have any properties")):Gj(e,m,Dh===r)&&(l=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(l=o&&NE(e,y))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&Ae(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),p=0,d=e.implicitTypes.length;p<d;p+=1)if(f=e.implicitTypes[p],f.resolve(e.result)){e.result=f.construct(e.result),e.tag=f.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(Us.call(e.typeMap[e.kind||"fallback"],e.tag))f=e.typeMap[e.kind||"fallback"][e.tag];else for(f=null,h=e.typeMap.multi[e.kind||"fallback"],p=0,d=h.length;p<d;p+=1)if(e.tag.slice(0,h[p].tag.length)===h[p].tag){f=h[p];break}f||Ae(e,"unknown tag !<"+e.tag+">"),e.result!==null&&f.kind!==e.kind&&Ae(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):Ae(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||l}function rU(e){var t=e.position,r,i,n,s=!1,a;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(a=e.input.charCodeAt(e.position))!==0&&(tr(e,!0,-1),a=e.input.charCodeAt(e.position),!(e.lineIndent>0||a!==37));){for(s=!0,a=e.input.charCodeAt(++e.position),r=e.position;a!==0&&!Zr(a);)a=e.input.charCodeAt(++e.position);for(i=e.input.slice(r,e.position),n=[],i.length<1&&Ae(e,"directive name must not be less than one character in length");a!==0;){for(;Ia(a);)a=e.input.charCodeAt(++e.position);if(a===35){do a=e.input.charCodeAt(++e.position);while(a!==0&&!Sn(a));break}if(Sn(a))break;for(r=e.position;a!==0&&!Zr(a);)a=e.input.charCodeAt(++e.position);n.push(e.input.slice(r,e.position))}a!==0&&ux(e),Us.call(kE,i)?kE[i](e,i,n):jh(e,'unknown document directive "'+i+'"')}if(tr(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,tr(e,!0,-1)):s&&Ae(e,"directives end mark is expected"),xc(e,e.lineIndent-1,qh,!1,!0),tr(e,!0,-1),e.checkLineBreaks&&Fj.test(e.input.slice(t,e.position))&&jh(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Mh(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,tr(e,!0,-1));return}if(e.position<e.length-1)Ae(e,"end of the stream or a document separator is expected");else return}function yT(e,t){e=String(e),t=t||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
165
|
+
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var r=new zj(e,t),i=e.indexOf("\0");for(i!==-1&&(r.position=i,Ae(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)rU(r);return r.documents}function iU(e,t,r){t!==null&&typeof t=="object"&&typeof r>"u"&&(r=t,t=null);var i=yT(e,r);if(typeof t!="function")return i;for(var n=0,s=i.length;n<s;n+=1)t(i[n])}function nU(e,t){var r=yT(e,t);if(r.length!==0){if(r.length===1)return r[0];throw new Kr("expected a single document in the stream, but found more")}}var sU=iU,aU=nU,gT={loadAll:sU,load:aU},vT=Object.prototype.toString,xT=Object.prototype.hasOwnProperty,px=65279,oU=9,zl=10,cU=13,uU=32,lU=33,pU=34,ix=35,fU=37,dU=38,hU=39,mU=42,bT=44,yU=45,Uh=58,gU=61,vU=62,xU=63,bU=64,_T=91,AT=93,_U=96,ST=123,AU=124,wT=125,qr={};qr[0]="\\0";qr[7]="\\a";qr[8]="\\b";qr[9]="\\t";qr[10]="\\n";qr[11]="\\v";qr[12]="\\f";qr[13]="\\r";qr[27]="\\e";qr[34]='\\"';qr[92]="\\\\";qr[133]="\\N";qr[160]="\\_";qr[8232]="\\L";qr[8233]="\\P";var SU=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],wU=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function CU(e,t){var r,i,n,s,a,o,c;if(t===null)return{};for(r={},i=Object.keys(t),n=0,s=i.length;n<s;n+=1)a=i[n],o=String(t[a]),a.slice(0,2)==="!!"&&(a="tag:yaml.org,2002:"+a.slice(2)),c=e.compiledTypeMap.fallback[a],c&&xT.call(c.styleAliases,o)&&(o=c.styleAliases[o]),r[a]=o;return r}function EU(e){var t,r,i;if(t=e.toString(16).toUpperCase(),e<=255)r="x",i=2;else if(e<=65535)r="u",i=4;else if(e<=4294967295)r="U",i=8;else throw new Kr("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+r+pr.repeat("0",i-t.length)+t}var TU=1,Gl=2;function IU(e){this.schema=e.schema||cx,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=pr.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=CU(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?Gl:TU,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function RE(e,t){for(var r=pr.repeat(" ",t),i=0,n=-1,s="",a,o=e.length;i<o;)n=e.indexOf(`
|
|
166
|
+
`,i),n===-1?(a=e.slice(i),i=o):(a=e.slice(i,n+1),i=n+1),a.length&&a!==`
|
|
167
|
+
`&&(s+=r),s+=a;return s}function nx(e,t){return`
|
|
168
|
+
`+pr.repeat(" ",e.indent*t)}function BU(e,t){var r,i,n;for(r=0,i=e.implicitTypes.length;r<i;r+=1)if(n=e.implicitTypes[r],n.resolve(t))return!0;return!1}function Fh(e){return e===uU||e===oU}function Wl(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==px||65536<=e&&e<=1114111}function OE(e){return Wl(e)&&e!==px&&e!==cU&&e!==zl}function LE(e,t,r){var i=OE(e),n=i&&!Fh(e);return(r?i:i&&e!==bT&&e!==_T&&e!==AT&&e!==ST&&e!==wT)&&e!==ix&&!(t===Uh&&!n)||OE(t)&&!Fh(t)&&e===ix||t===Uh&&n}function kU(e){return Wl(e)&&e!==px&&!Fh(e)&&e!==yU&&e!==xU&&e!==Uh&&e!==bT&&e!==_T&&e!==AT&&e!==ST&&e!==wT&&e!==ix&&e!==dU&&e!==mU&&e!==lU&&e!==AU&&e!==gU&&e!==vU&&e!==hU&&e!==pU&&e!==fU&&e!==bU&&e!==_U}function PU(e){return!Fh(e)&&e!==Uh}function Hl(e,t){var r=e.charCodeAt(t),i;return r>=55296&&r<=56319&&t+1<e.length&&(i=e.charCodeAt(t+1),i>=56320&&i<=57343)?(r-55296)*1024+i-56320+65536:r}function CT(e){var t=/^\n* /;return t.test(e)}var ET=1,sx=2,TT=3,IT=4,yc=5;function NU(e,t,r,i,n,s,a,o){var c,u=0,l=null,p=!1,d=!1,h=i!==-1,f=-1,m=kU(Hl(e,0))&&PU(Hl(e,e.length-1));if(t||a)for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=Hl(e,c),!Wl(u))return yc;m=m&&LE(u,l,o),l=u}else{for(c=0;c<e.length;u>=65536?c+=2:c++){if(u=Hl(e,c),u===zl)p=!0,h&&(d=d||c-f-1>i&&e[f+1]!==" ",f=c);else if(!Wl(u))return yc;m=m&&LE(u,l,o),l=u}d=d||h&&c-f-1>i&&e[f+1]!==" "}return!p&&!d?m&&!a&&!n(e)?ET:s===Gl?yc:sx:r>9&&CT(e)?yc:a?s===Gl?yc:sx:d?IT:TT}function RU(e,t,r,i,n){e.dump=(function(){if(t.length===0)return e.quotingType===Gl?'""':"''";if(!e.noCompatMode&&(SU.indexOf(t)!==-1||wU.test(t)))return e.quotingType===Gl?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),a=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s),o=i||e.flowLevel>-1&&r>=e.flowLevel;function c(u){return BU(e,u)}switch(NU(t,o,e.indent,a,c,e.quotingType,e.forceQuotes&&!i,n)){case ET:return t;case sx:return"'"+t.replace(/'/g,"''")+"'";case TT:return"|"+DE(t,e.indent)+qE(RE(t,s));case IT:return">"+DE(t,e.indent)+qE(RE(OU(t,a),s));case yc:return'"'+LU(t)+'"';default:throw new Kr("impossible error: invalid scalar style")}})()}function DE(e,t){var r=CT(e)?String(t):"",i=e[e.length-1]===`
|
|
169
|
+
`,n=i&&(e[e.length-2]===`
|
|
170
|
+
`||e===`
|
|
171
|
+
`),s=n?"+":i?"":"-";return r+s+`
|
|
172
|
+
`}function qE(e){return e[e.length-1]===`
|
|
173
|
+
`?e.slice(0,-1):e}function OU(e,t){for(var r=/(\n+)([^\n]*)/g,i=(function(){var u=e.indexOf(`
|
|
174
|
+
`);return u=u!==-1?u:e.length,r.lastIndex=u,jE(e.slice(0,u),t)})(),n=e[0]===`
|
|
175
|
+
`||e[0]===" ",s,a;a=r.exec(e);){var o=a[1],c=a[2];s=c[0]===" ",i+=o+(!n&&!s&&c!==""?`
|
|
176
|
+
`:"")+jE(c,t),n=s}return i}function jE(e,t){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,i,n=0,s,a=0,o=0,c="";i=r.exec(e);)o=i.index,o-n>t&&(s=a>n?a:o,c+=`
|
|
177
|
+
`+e.slice(n,s),n=s+1),a=o;return c+=`
|
|
178
|
+
`,e.length-n>t&&a>n?c+=e.slice(n,a)+`
|
|
179
|
+
`+e.slice(a+1):c+=e.slice(n),c.slice(1)}function LU(e){for(var t="",r=0,i,n=0;n<e.length;r>=65536?n+=2:n++)r=Hl(e,n),i=qr[r],!i&&Wl(r)?(t+=e[n],r>=65536&&(t+=e[n+1])):t+=i||EU(r);return t}function DU(e,t,r){var i="",n=e.tag,s,a,o;for(s=0,a=r.length;s<a;s+=1)o=r[s],e.replacer&&(o=e.replacer.call(r,String(s),o)),(os(e,t,o,!1,!1)||typeof o>"u"&&os(e,t,null,!1,!1))&&(i!==""&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=n,e.dump="["+i+"]"}function UE(e,t,r,i){var n="",s=e.tag,a,o,c;for(a=0,o=r.length;a<o;a+=1)c=r[a],e.replacer&&(c=e.replacer.call(r,String(a),c)),(os(e,t+1,c,!0,!0,!1,!0)||typeof c>"u"&&os(e,t+1,null,!0,!0,!1,!0))&&((!i||n!=="")&&(n+=nx(e,t)),e.dump&&zl===e.dump.charCodeAt(0)?n+="-":n+="- ",n+=e.dump);e.tag=s,e.dump=n||"[]"}function qU(e,t,r){var i="",n=e.tag,s=Object.keys(r),a,o,c,u,l;for(a=0,o=s.length;a<o;a+=1)l="",i!==""&&(l+=", "),e.condenseFlow&&(l+='"'),c=s[a],u=r[c],e.replacer&&(u=e.replacer.call(r,c,u)),os(e,t,c,!1,!1)&&(e.dump.length>1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),os(e,t,u,!1,!1)&&(l+=e.dump,i+=l));e.tag=n,e.dump="{"+i+"}"}function jU(e,t,r,i){var n="",s=e.tag,a=Object.keys(r),o,c,u,l,p,d;if(e.sortKeys===!0)a.sort();else if(typeof e.sortKeys=="function")a.sort(e.sortKeys);else if(e.sortKeys)throw new Kr("sortKeys must be a boolean or a function");for(o=0,c=a.length;o<c;o+=1)d="",(!i||n!=="")&&(d+=nx(e,t)),u=a[o],l=r[u],e.replacer&&(l=e.replacer.call(r,u,l)),os(e,t+1,u,!0,!0,!0)&&(p=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,p&&(e.dump&&zl===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,p&&(d+=nx(e,t)),os(e,t+1,l,!0,p)&&(e.dump&&zl===e.dump.charCodeAt(0)?d+=":":d+=": ",d+=e.dump,n+=d));e.tag=s,e.dump=n||"{}"}function FE(e,t,r){var i,n,s,a,o,c;for(n=r?e.explicitTypes:e.implicitTypes,s=0,a=n.length;s<a;s+=1)if(o=n[s],(o.instanceOf||o.predicate)&&(!o.instanceOf||typeof t=="object"&&t instanceof o.instanceOf)&&(!o.predicate||o.predicate(t))){if(r?o.multi&&o.representName?e.tag=o.representName(t):e.tag=o.tag:e.tag="?",o.represent){if(c=e.styleMap[o.tag]||o.defaultStyle,vT.call(o.represent)==="[object Function]")i=o.represent(t,c);else if(xT.call(o.represent,c))i=o.represent[c](t,c);else throw new Kr("!<"+o.tag+'> tag resolver accepts not "'+c+'" style');e.dump=i}return!0}return!1}function os(e,t,r,i,n,s,a){e.tag=null,e.dump=r,FE(e,r,!1)||FE(e,r,!0);var o=vT.call(e.dump),c=i,u;i&&(i=e.flowLevel<0||e.flowLevel>t);var l=o==="[object Object]"||o==="[object Array]",p,d;if(l&&(p=e.duplicates.indexOf(r),d=p!==-1),(e.tag!==null&&e.tag!=="?"||d||e.indent!==2&&t>0)&&(n=!1),d&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(l&&d&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),o==="[object Object]")i&&Object.keys(e.dump).length!==0?(jU(e,t,e.dump,n),d&&(e.dump="&ref_"+p+e.dump)):(qU(e,t,e.dump),d&&(e.dump="&ref_"+p+" "+e.dump));else if(o==="[object Array]")i&&e.dump.length!==0?(e.noArrayIndent&&!a&&t>0?UE(e,t-1,e.dump,n):UE(e,t,e.dump,n),d&&(e.dump="&ref_"+p+e.dump)):(DU(e,t,e.dump),d&&(e.dump="&ref_"+p+" "+e.dump));else if(o==="[object String]")e.tag!=="?"&&RU(e,e.dump,t,s,c);else{if(o==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new Kr("unacceptable kind of an object to dump "+o)}e.tag!==null&&e.tag!=="?"&&(u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?u="!"+u:u.slice(0,18)==="tag:yaml.org,2002:"?u="!!"+u.slice(18):u="!<"+u+">",e.dump=u+" "+e.dump)}return!0}function UU(e,t){var r=[],i=[],n,s;for(ax(e,r,i),n=0,s=i.length;n<s;n+=1)t.duplicates.push(r[i[n]]);t.usedDuplicates=new Array(s)}function ax(e,t,r){var i,n,s;if(e!==null&&typeof e=="object")if(n=t.indexOf(e),n!==-1)r.indexOf(n)===-1&&r.push(n);else if(t.push(e),Array.isArray(e))for(n=0,s=e.length;n<s;n+=1)ax(e[n],t,r);else for(i=Object.keys(e),n=0,s=i.length;n<s;n+=1)ax(e[i[n]],t,r)}function FU(e,t){t=t||{};var r=new IU(t);r.noRefs||UU(e,r);var i=e;return r.replacer&&(i=r.replacer.call({"":i},"",i)),os(r,0,i,!0,!0)?r.dump+`
|
|
180
|
+
`:""}var MU=FU,VU={dump:MU};function fx(e,t){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+t+" instead, which is now safe by default.")}}var KU=Ir,HU=KE,$U=GE,zU=XE,GU=ZE,WU=cx,YU=gT.load,QU=gT.loadAll,JU=VU.dump,XU=Kr,ZU={binary:nT,float:JE,map:zE,null:WE,pairs:aT,set:oT,timestamp:rT,bool:YE,int:QE,merge:iT,omap:sT,seq:$E,str:HE},e6=fx("safeLoad","load"),t6=fx("safeLoadAll","loadAll"),r6=fx("safeDump","dump"),BT={Type:KU,Schema:HU,FAILSAFE_SCHEMA:$U,JSON_SCHEMA:zU,CORE_SCHEMA:GU,DEFAULT_SCHEMA:WU,load:YU,loadAll:QU,dump:JU,YAMLException:XU,types:ZU,safeLoad:e6,safeLoadAll:t6,safeDump:r6};var kT=require("events"),{load:i6}=BT,n6={gateway:{httpPort:80,httpsPort:443,adminPort:9090,adminEnabled:!0},acme:{email:"",staging:!0,renewDays:30},security:{waf:{enabled:!0,mode:"block",rules:["sqli","xss","lfi","rfi","rce","proto"]},anomaly:{enabled:!0,threshold:.35,alertThreshold:3},rateLimit:{enabled:!0,windowMs:6e4,max:100},headers:{hsts:!0,hstsMaxAge:31536e3,hstsPreload:!0,noSniff:!0,xssProtection:!0,frameOptions:"DENY",csp:"default-src 'self'"}},apps:[]},Vh=class extends kT.EventEmitter{constructor(t){super(),this.configPath=t,this.config=null,this.apps=new Map,this._watcher=null,this._debounceTimer=null}load(){if(!(0,bc.existsSync)(this.configPath))throw new Error(`Config file not found: ${this.configPath}`);let t=(0,bc.readFileSync)(this.configPath,"utf8"),r=i6(t);return this.config=this._merge(n6,r),this._processApps(),this.config}_merge(t,r){let i={...t};for(let[n,s]of Object.entries(r||{}))s&&typeof s=="object"&&!Array.isArray(s)?i[n]=this._merge(t[n]||{},s):i[n]=s;return i}_processApps(){let t=new Set(this.apps.keys());this.apps.clear();for(let r of this.config.apps||[]){if(!r.domain||!r.upstream){console.warn("[Config] App missing domain or upstream, skipping");continue}let i=this._domainToPattern(r.domain);this.apps.set(i,{originalDomain:r.domain,pattern:i,upstream:r.upstream,ssl:r.ssl!==!1,ws:r.ws!==!1,healthCheck:r.healthCheck||"/health",healthInterval:r.healthInterval||3e4,timeout:r.timeout||3e4,retries:r.retries||3,rateLimit:r.rateLimit||null,waf:r.waf!==!1,anomaly:r.anomaly!==!1,headers:r.headers||{}}),t.delete(i)}return{added:[...this.apps.keys()],removed:[...t]}}_domainToPattern(t){if(t.startsWith("*.")){let r=t.slice(2).replace(/\./g,"\\.");return new RegExp(`^[^.]+\\.${r}$`,"i")}return t.toLowerCase()}getApp(t){if(!t)return null;let r=t.toLowerCase();for(let[i,n]of this.apps)if(typeof i=="string"&&i===r)return n;for(let[i,n]of this.apps)if(i instanceof RegExp&&i.test(r))return n;return null}getAllDomains(){let t=[];for(let r of this.apps.values())r.originalDomain.startsWith("*.")||t.push(r.originalDomain);return t}startWatching(){if(!this._watcher)try{this._watcher=(0,bc.watch)(this.configPath,t=>{t==="change"&&(this._debounceTimer&&clearTimeout(this._debounceTimer),this._debounceTimer=setTimeout(()=>{this._handleChange()},100))})}catch(t){this.emit("error",t)}}_handleChange(){try{let t=new Set(this.apps.keys());this.load();let r=new Set(this.apps.keys()),i=[...r].filter(s=>!t.has(s)),n=[...t].filter(s=>!r.has(s));this.emit("reload",{added:i,removed:n})}catch(t){this.emit("error",t)}}stopWatching(){this._watcher&&(this._watcher.close(),this._watcher=null),this._debounceTimer&&(clearTimeout(this._debounceTimer),this._debounceTimer=null)}};var jl=Xv(kD(),1),Dr=require("fs"),Ca=require("path"),mC=require("crypto"),PD=require("events"),bv=class extends PD.EventEmitter{constructor(t={}){super(),this.certsDir=t.certsDir||"./certs",this.email=t.email,this.staging=t.staging??!1,this.renewDays=t.renewDays||30,this._client=null,this._challenges=new Map,this._certs=new Map,this._renewalTimer=null}async init(){(0,Dr.mkdirSync)(this.certsDir,{recursive:!0});let t=this.staging?jl.default.directory.letsencrypt.staging:jl.default.directory.letsencrypt.production,r=(0,Ca.join)(this.certsDir,"account.key"),i;return(0,Dr.existsSync)(r)?i=(0,Dr.readFileSync)(r):(i=await jl.default.crypto.createPrivateKey(),(0,Dr.writeFileSync)(r,i)),this._client=new jl.default.Client({directoryUrl:t,accountKey:i}),await this._client.createAccount({termsOfServiceAgreed:!0,contact:[`mailto:${this.email}`]}),await this._loadExistingCerts(),this}async _loadExistingCerts(){let t=(0,Ca.join)(this.certsDir,"index.json");if((0,Dr.existsSync)(t))try{let r=JSON.parse((0,Dr.readFileSync)(t,"utf8"));for(let[i,n]of Object.entries(r)){let s=(0,Ca.join)(this.certsDir,`${n.hash}.crt`),a=(0,Ca.join)(this.certsDir,`${n.hash}.key`);(0,Dr.existsSync)(s)&&(0,Dr.existsSync)(a)&&this._certs.set(i,{cert:(0,Dr.readFileSync)(s),key:(0,Dr.readFileSync)(a),expiry:new Date(n.expiry),domains:n.domains})}}catch(r){console.error("[ACME] Failed to load cert index:",r.message)}}_saveIndex(){let t={};for(let[r,i]of this._certs){let n=(0,mC.createHash)("md5").update(r).digest("hex").slice(0,8);t[r]={hash:n,expiry:i.expiry.toISOString(),domains:i.domains}}(0,Dr.writeFileSync)((0,Ca.join)(this.certsDir,"index.json"),JSON.stringify(t,null,2))}challengeMiddleware(){return(t,r,i)=>{if(t.url.startsWith("/.well-known/acme-challenge/")){let n=t.url.split("/").pop(),s=this._challenges.get(n);if(s){r.setHeader("Content-Type","text/plain"),r.end(s);return}}i()}}async getCert(t){let r=this._certs.get(t);return r&&(r.expiry-Date.now())/864e5>this.renewDays?r:this._issueCert([t])}async getCertForDomains(t){let r=t[0],i=this._certs.get(r);if(i){let n=(i.expiry-Date.now())/864e5,s=t.every(a=>i.domains.includes(a));if(n>this.renewDays&&s)return i}return this._issueCert(t)}async _issueCert(t){if(!this._client)throw new Error("CertManager not initialized");let r=t[0];this.emit("issuing",{domains:t});try{let[i,n]=await jl.default.crypto.createCsr({commonName:r,altNames:t.length>1?t:void 0}),s=await this._client.auto({csr:n,email:this.email,termsOfServiceAgreed:!0,challengeCreateFn:async(u,l,p)=>{l.type==="http-01"&&this._challenges.set(l.token,p)},challengeRemoveFn:async(u,l)=>{l.type==="http-01"&&this._challenges.delete(l.token)}}),a=this._parseExpiry(s)||new Date(Date.now()+2160*60*60*1e3),o=(0,mC.createHash)("md5").update(r).digest("hex").slice(0,8);(0,Dr.writeFileSync)((0,Ca.join)(this.certsDir,`${o}.crt`),s),(0,Dr.writeFileSync)((0,Ca.join)(this.certsDir,`${o}.key`),i);let c={cert:Buffer.from(s),key:Buffer.from(i),expiry:a,domains:t};for(let u of t)this._certs.set(u,c);return this._saveIndex(),this.emit("issued",{domains:t,expiry:a}),c}catch(i){throw this.emit("error",{domains:t,error:i}),i}}_parseExpiry(t){let r=t.toString().match(/Not After\s*:\s*(.+)/i);return r?new Date(r[1]):null}hasCert(t){return this._certs.has(t)}getSecureContext(t){let r=this._certs.get(t);return r?{key:r.key,cert:r.cert}:null}startAutoRenewal(){this._renewalTimer=setInterval(()=>this._checkRenewals(),720*60*1e3),this._checkRenewals()}async _checkRenewals(){let t=new Set;for(let[r,i]of this._certs){let n=i.domains[0];if(t.has(n))continue;if(t.add(n),(i.expiry-Date.now())/(1e3*60*60*24)<=this.renewDays)try{await this._issueCert(i.domains),this.emit("renewed",{domains:i.domains})}catch(a){this.emit("renewalError",{domains:i.domains,error:a})}}}stopAutoRenewal(){this._renewalTimer&&(clearInterval(this._renewalTimer),this._renewalTimer=null)}async ensureCerts(t){let r=t.filter(i=>!this.hasCert(i));if(r.length!==0)for(let i of r)await this._issueCert([i]),await new Promise(n=>setTimeout(n,1e3))}};var gJ={sqli:[/(\%27)|(\')|(\-\-)|(\%23)|(#)/i,/((\%3D)|(=))[^\n]*((\%27)|(\')|(\-\-)|(\%3B)|(;))/i,/\w*((\%27)|(\'))((\%6F)|o|(\%4F))((\%72)|r|(\%52))/i,/((\%27)|(\'))union/i,/exec(\s|\+)+(s|x)p\w+/i,/union(\s+)select/i,/insert(\s+)into/i,/select(\s+).*(\s+)from/i,/delete(\s+)from/i,/drop(\s+)table/i,/update(\s+).*(\s+)set/i,/\bor\b.*=.*\b/i,/\band\b.*=.*\b/i],xss:[/<script[^>]*>[\s\S]*?<\/script>/i,/<script[^>]*>/i,/javascript:/i,/on\w+\s*=/i,/<iframe/i,/<object/i,/<embed/i,/<svg[^>]*onload/i,/expression\s*\(/i,/vbscript:/i,/data:text\/html/i],lfi:[/\.\.\//,/\.\.\\/,/%2e%2e%2f/i,/%2e%2e\//i,/\.%2e\//i,/%2e\.\//i,/etc\/passwd/i,/etc\/shadow/i,/proc\/self/i,/var\/log/i,/windows\/system32/i],rfi:[/^(https?|ftp|php|data):/i,/\=https?:\/\//i,/\=ftp:\/\//i,/\=(php|data):/i],rce:[/;\s*(ls|cat|rm|wget|curl|bash|sh|python|perl|ruby|nc|netcat)/i,/\|\s*(ls|cat|rm|wget|curl|bash|sh|python|perl|ruby|nc|netcat)/i,/`.*`/,/\$\(.*\)/,/system\s*\(/i,/exec\s*\(/i,/passthru\s*\(/i,/shell_exec\s*\(/i,/eval\s*\(/i,/assert\s*\(/i],proto:[/__proto__/i,/constructor\s*\[/i,/prototype\s*\[/i]},_v=class{constructor(t={}){this.enabled=t.enabled??!0,this.mode=t.mode||"block",this.rules=t.rules||["sqli","xss","lfi","rfi","rce","proto"],this.whitelist=new Set(t.whitelist||[]),this.onBlock=t.onBlock||null,this.onLog=t.onLog||null}check(t){if(!this.enabled)return{blocked:!1};let r=typeof t=="string"?t:JSON.stringify(t);for(let i of this.rules){let n=gJ[i];if(n){for(let s of n)if(s.test(r))return{blocked:!0,rule:i,pattern:s.toString(),input:r.slice(0,200)}}}return{blocked:!1}}checkRequest(t){let r=this.check(t.url);if(r.blocked)return{...r,location:"url"};if(t.query)for(let[n,s]of Object.entries(t.query)){let a=this.check(n);if(a.blocked)return{...a,location:"query.key",key:n};let o=this.check(s);if(o.blocked)return{...o,location:"query.value",key:n}}let i=["referer","user-agent","cookie","x-forwarded-for"];for(let n of i)if(t.headers[n]){let s=this.check(t.headers[n]);if(s.blocked)return{...s,location:"header",header:n}}if(t.body){let n=this.check(t.body);if(n.blocked)return{...n,location:"body"}}return{blocked:!1}}middleware(){return(t,r,i)=>{let n=t.headers["x-forwarded-for"]?.split(",")[0]?.trim()||t.socket?.remoteAddress;if(this.whitelist.has(n))return i();let s=this.checkRequest(t);if(s.blocked){let a={timestamp:new Date().toISOString(),ip:n,method:t.method,url:t.url,rule:s.rule,location:s.location,pattern:s.pattern};if(this.onLog&&this.onLog(a),this.mode==="block"){this.onBlock&&this.onBlock(a),r.statusCode=403,r.setHeader("Content-Type","application/json"),r.end(JSON.stringify({error:"Forbidden",code:"WAF_BLOCKED",rule:s.rule}));return}}i()}}};function ND(e){let t=e.indexOf("?");if(t===-1)return{};let r={},i=e.slice(t+1).split("&");for(let n of i){let[s,a]=n.split("=").map(decodeURIComponent);r[s]=a}return r}var gC=require("events");var yC=class{constructor(t=.3,r=100,i=!0){this.threshold=t,this.windowSize=r,this.scores=[],this.unsupervised=i}update(t,r=!1,i=!1){if(this.scores.push(t),this.scores.length>this.windowSize&&this.scores.shift(),r){let n=!i&&t>this.threshold,s=i&&t<=this.threshold;n&&(this.threshold*=1.05),s&&(this.threshold*=.95),this.threshold=Math.max(.1,Math.min(.9,this.threshold))}else if(this.unsupervised&&this.scores.length>=this.windowSize){let n=[...this.scores].sort((s,a)=>s-a);this.threshold=n[Math.floor(n.length*.95)],this.threshold=Math.max(.1,Math.min(.9,this.threshold))}}getStats(){if(this.scores.length===0)return{threshold:this.threshold,p50:null,p95:null,p99:null};let t=[...this.scores].sort((r,i)=>r-i);return{threshold:this.threshold,p50:t[Math.floor(t.length*.5)],p95:t[Math.floor(t.length*.95)],p99:t[Math.floor(t.length*.99)]}}},Av=class e extends gC.EventEmitter{constructor(t,r={}){if(super(),!Number.isInteger(t)||t<=0)throw new Error("Network size must be a positive integer");this.size=t,this.learningRule=r.learningRule||"hebbian",this.weights=new Float64Array(t*t),this.seed=r.seed||null,this._rngState=r.seed||Date.now(),this.trained=!1,this.strictCapacity=r.strictCapacity||!1}_getWeight(t,r){return this.weights[t*this.size+r]}_setWeight(t,r,i){this.weights[t*this.size+r]=i}_random(){return this._rngState=(this._rngState*1664525+1013904223)%2147483648,this._rngState/2147483648}estimateCapacity(t=null){let r=this.learningRule==="hebbian"?.138:.25;if(!t||t.length<2)return Math.floor(r*this.size);let i=0,n=0;for(let a=0;a<t.length;a++)for(let o=a+1;o<t.length;o++){let c=0;for(let u=0;u<this.size;u++)c+=t[a][u]*t[o][u];i+=Math.abs(c)/this.size,n++}i/=n;let s=r/(1+i*10);return Math.floor(s*this.size)}train(t){if(!Array.isArray(t)||t.length===0)throw new Error("Patterns must be a non-empty array");t.forEach((i,n)=>{if(!Array.isArray(i)||i.length!==this.size)throw new Error(`Pattern ${n} must be an array of size ${this.size}`);if(!i.every(s=>s===-1||s===1))throw new Error(`Pattern ${n} must contain only -1 or 1 values`)});let r=this.estimateCapacity(t);if(t.length>r){let i=this.learningRule==="hebbian"?.138:.25,n=Math.ceil(t.length/i),s=`[Hopfield] Training ${t.length} patterns exceeds estimated capacity (~${r} due to pattern correlations). Consider using Storkey rule or increasing network size to ${n}.`;if(this.strictCapacity)throw new Error(s);console.warn(s)}if(this.learningRule==="hebbian")this._trainHebbian(t);else if(this.learningRule==="storkey")this._trainStorkey(t);else throw new Error(`Unknown learning rule: ${this.learningRule}`);this.trained=!0,this.emit("trained",{patterns:t.length})}_trainHebbian(t){let r=this.size;this.weights.fill(0);for(let i of t)for(let n=0;n<r;n++)for(let s=n+1;s<r;s++){let a=i[n]*i[s]/r;this._setWeight(n,s,this._getWeight(n,s)+a),this._setWeight(s,n,this._getWeight(s,n)+a)}for(let i=0;i<r;i++)this._setWeight(i,i,0)}_trainStorkey(t){let r=this.size;this.weights.fill(0);for(let i of t){let n=new Float64Array(r);for(let s=0;s<r;s++){let a=0;for(let o=0;o<r;o++)o!==s&&(a+=this._getWeight(s,o)*i[o]);n[s]=a}for(let s=0;s<r;s++)for(let a=s+1;a<r;a++){let o=(i[s]*i[a]-i[s]*n[a]-n[s]*i[a])/r;this._setWeight(s,a,this._getWeight(s,a)+o),this._setWeight(a,s,this._getWeight(a,s)+o)}}for(let i=0;i<r;i++)this._setWeight(i,i,0)}recall(t,r=10){if(!this.trained)throw new Error("Network must be trained before recall");if(!Array.isArray(t)||t.length!==this.size)throw new Error(`Input must be an array of size ${this.size}`);let i=new Int8Array(t),n=[this.energy(i)],s=new Uint32Array(this.size);for(let a=0;a<r;a++){let o=0;for(let c=0;c<this.size;c++)s[c]=c;for(let c=this.size-1;c>0;c--){let u=Math.floor(this._random()*(c+1));[s[c],s[u]]=[s[u],s[c]]}for(let c=0;c<this.size;c++){let u=s[c],l=0;for(let d=0;d<this.size;d++)d!==u&&(l+=this._getWeight(u,d)*i[d]);let p=l>=0?1:-1;p!==i[u]&&(i[u]=p,o++)}if(n.push(this.energy(i)),o===0)return{state:Array.from(i),iterations:a+1,energyPath:n,converged:!0}}return{state:Array.from(i),iterations:r,energyPath:n,converged:!1}}energy(t){let r=0;for(let i=0;i<this.size;i++)for(let n=i+1;n<this.size;n++)r-=this._getWeight(i,n)*t[i]*t[n];return r}getInfo(){return{size:this.size,trained:this.trained,learningRule:this.learningRule,capacity:this.estimateCapacity(),seed:this.seed,strictCapacity:this.strictCapacity}}toJSON(){return{size:this.size,learningRule:this.learningRule,weights:Array.from(this.weights),trained:this.trained,seed:this.seed,strictCapacity:this.strictCapacity}}static fromJSON(t){let r=new e(t.size,{learningRule:t.learningRule,seed:t.seed,strictCapacity:t.strictCapacity});return r.weights=new Float64Array(t.weights),r.trained=t.trained,r}},Sv=class e extends gC.EventEmitter{constructor(t={}){super();let{featureCount:r,snapshotLength:i=5,anomalyThreshold:n=.3,maxIterations:s=10,learningRule:a="hebbian",adaptiveThreshold:o=!0,unsupervisedAdaptive:c=!0,scoreWeights:u={energy:.25,drop:.25,hamming:.25,margin:.25},strictCapacity:l=!1,seed:p=null}=t;if(!Number.isInteger(r)||r<=0)throw new Error("featureCount must be a positive integer");this.featureCount=r,this.snapshotLength=i,this.patternSize=r*i,this.anomalyThreshold=n,this.maxIterations=s,this.useAdaptiveThreshold=o,this.scoreWeights=u,this.network=new Av(this.patternSize,{learningRule:a,seed:p,strictCapacity:l}),this.buffer=[],this.thresholds={},this.featureNames=[],this.trained=!1,this.baseline={energy:{mean:0,std:1},drop:{mean:0,std:1},hamming:{mean:0,std:1},margin:{mean:0,std:1}},this.useAdaptiveThreshold&&(this.adaptiveThreshold=new yC(n,100,c)),this.stats={dataPointsProcessed:0,anomaliesDetected:0,lastAnomaly:null,anomalyHistory:[]}}setThresholds(t,r=null){let i=Object.keys(t);if(i.length!==this.featureCount)throw new Error(`Expected ${this.featureCount} thresholds, got ${i.length}`);i.forEach(n=>{let s=t[n];if(!s.mode)throw new Error(`Threshold for '${n}' missing mode`);if(!["above","below","equal","range"].includes(s.mode))throw new Error(`Invalid mode '${s.mode}' for '${n}'`);if(s.mode==="range"){if(s.min===void 0||s.max===void 0)throw new Error(`Range mode for '${n}' requires min and max`)}else if(s.value===void 0)throw new Error(`Threshold for '${n}' missing value`)}),this.thresholds=t,this.featureNames=r||i}_featuresToBinary(t){let r=[];for(let i of this.featureNames){if(!(i in t))throw new Error(`Missing feature: ${i}`);let n=t[i],s=this.thresholds[i],a;switch(s.mode){case"above":a=n>s.value?1:0;break;case"below":a=n<s.value?1:0;break;case"equal":a=n===s.value?1:0;break;case"range":a=n>=s.min&&n<=s.max?1:0;break;default:a=0}r.push(a)}return r}_binToBipolar(t){return t.map(r=>r===0?-1:1)}_bipolarToBin(t){return t.map(r=>r<0?0:1)}_computeStats(t){if(t.length===0)return{mean:0,std:1};let r=t.reduce((s,a)=>s+a,0)/t.length,i=t.reduce((s,a)=>s+Math.pow(a-r,2),0)/t.length,n=Math.sqrt(i)||1;return{mean:r,std:n}}train(t={}){if(Object.keys(this.thresholds).length===0)throw new Error("Thresholds must be set before training");let{patterns:r,useDefaults:i=!1}=t,n=r;if(i&&!n){let u=Array(this.patternSize).fill(-1),l=Array(this.patternSize).fill(1);n=[u,l]}if(!n)throw new Error("No training patterns provided");this.network.train(n);let s=[],a=[],o=[],c=[];for(let u of n){let l=[...u],p=this.network.recall(l,this.maxIterations),d=this.network.energy(l),h=this.network.energy(p.state),f=d-h,y=l.reduce((A,S,B)=>A+(S!==p.state[B]?1:0),0)/this.patternSize,_=0;for(let A=0;A<this.patternSize;A++){let S=0;for(let B=0;B<this.patternSize;B++)B!==A&&(S+=this.network._getWeight(A,B)*p.state[B]);_+=Math.abs(S)*(p.state[A]===(S>=0?1:-1)?1:0)}_/=this.patternSize,s.push(d),a.push(Math.max(0,-f)),o.push(y),c.push(1-_)}this.baseline={energy:this._computeStats(s),drop:this._computeStats(a),hamming:this._computeStats(o),margin:this._computeStats(c)},this.trained=!0}trainWithDefaults(){this.train({useDefaults:!0})}addDataPoint(t){let r=this._featuresToBinary(t);return this.buffer.push(r),this.buffer.length>this.snapshotLength&&this.buffer.shift(),this.stats.dataPointsProcessed++,this.buffer.length===this.snapshotLength}detect(){if(!this.trained)throw new Error("Network not trained. Call train() first.");if(this.buffer.length<this.snapshotLength)return null;let t=this.buffer.flat(),r=this._binToBipolar(t),i=this.network.recall(r,this.maxIterations),n=this.network.energy(r),s=this.network.energy(i.state),a=n-s,o=Math.max(0,-a),c=r.reduce((q,z,oe)=>q+(z!==i.state[oe]?1:0),0),u=c/this.patternSize,l=0;for(let q=0;q<this.patternSize;q++){let z=0;for(let oe=0;oe<this.patternSize;oe++)oe!==q&&(z+=this.network._getWeight(q,oe)*i.state[oe]);l+=Math.abs(z)*(i.state[q]===(z>=0?1:-1)?1:0)}l/=this.patternSize;let p=1-l,d=(n-this.baseline.energy.mean)/this.baseline.energy.std,h=(o-this.baseline.drop.mean)/this.baseline.drop.std,f=(u-this.baseline.hamming.mean)/this.baseline.hamming.std,m=(p-this.baseline.margin.mean)/this.baseline.margin.std,y=this.scoreWeights.energy*Math.max(0,d)+this.scoreWeights.drop*Math.max(0,h)+this.scoreWeights.hamming*Math.max(0,f)+this.scoreWeights.margin*Math.max(0,m),_=this.anomalyThreshold;this.useAdaptiveThreshold&&(this.adaptiveThreshold.update(y),_=this.adaptiveThreshold.threshold);let A=y>_,S=new Date().toISOString();A&&(this.stats.anomaliesDetected++,this.stats.lastAnomaly=S,this.stats.anomalyHistory.push(S),this.stats.anomalyHistory.length>100&&this.stats.anomalyHistory.shift(),this.emit("anomaly",{score:y,timestamp:S}));let B=new Float64Array(this.patternSize);for(let q=0;q<this.patternSize;q++){B[q]=0;for(let z=0;z<this.patternSize;z++)B[q]+=this.network._getWeight(q,z)*r[z]}let O=[];for(let q=0;q<this.featureCount;q++){let z=0,oe=q*this.snapshotLength,_e=oe+this.snapshotLength;for(let Be=oe;Be<_e;Be++){let De=0;for(let Pe=oe;Pe<_e;Pe++)Pe!==Be&&(De+=this.network._getWeight(Be,Pe)*r[Pe]);let Ee=B[Be]-De;z+=r[Be]*Ee}let be=2*z;O.push({name:this.featureNames[q],index:q,energyDelta:be})}O.sort((q,z)=>Math.abs(z.energyDelta)-Math.abs(q.energyDelta));let N=[],Y=this._bipolarToBin(i.state);for(let q=0;q<this.featureCount;q++){let z=Y.slice(q*this.snapshotLength,(q+1)*this.snapshotLength),oe=z.filter(_e=>_e===1).length/this.snapshotLength;oe>0&&N.push({name:this.featureNames[q],index:q,activation:oe,pattern:z})}return{isAnomaly:A,anomalyScore:y,confidence:Math.abs(y-_),timestamp:S,snapshot:t,recalledPattern:Y,contributingFeatures:N,featureImpact:O,energy:s,metrics:{energyInput:n,energyRecalled:s,energyDrop:a,hammingDistance:c,relativeHamming:u,margin:l,zEnergy:d,zDrop:h,zHamming:f,zMargin:m},convergence:{iterations:i.iterations,energyPath:i.energyPath,converged:i.converged}}}reset(){this.buffer=[]}getStats(){let t={...this.stats,bufferSize:this.buffer.length,trained:this.trained,anomalyRate:this.stats.dataPointsProcessed>0?this.stats.anomaliesDetected/this.stats.dataPointsProcessed*100:0,networkInfo:this.network.getInfo(),baseline:this.baseline,scoreWeights:this.scoreWeights};return this.useAdaptiveThreshold&&(t.thresholdStats=this.adaptiveThreshold.getStats()),t}static benchmark(t={featureCount:10,snapshotLength:5,dataPoints:1e3}){let r=new e({featureCount:t.featureCount,snapshotLength:t.snapshotLength});r.featureNames=Array.from({length:r.featureCount},(h,f)=>`f${f}`),r.setThresholds(Object.fromEntries(r.featureNames.map(h=>[h,{mode:"range",min:0,max:1}])));let i=process.hrtime.bigint();r.trainWithDefaults();let n=process.hrtime.bigint(),s=Number(n-i)/1e6,a=process.hrtime.bigint(),o=0;for(let h=0;h<t.dataPoints;h++){let f=Object.fromEntries(r.featureNames.map(m=>[m,Math.random()]));r.addDataPoint(f),r.buffer.length===r.snapshotLength&&(r.detect(),o++)}let c=process.hrtime.bigint(),u=Number(c-a)/1e6,l=t.dataPoints/(u/1e3),p=o>0?u/o:0,d=process.memoryUsage();return{trainingTime:s,averageDetectLatency:p,throughput:l,memory:d}}exportConfig(){return{featureCount:this.featureCount,snapshotLength:this.snapshotLength,anomalyThreshold:this.anomalyThreshold,maxIterations:this.maxIterations,learningRule:this.network.learningRule,adaptiveThreshold:this.useAdaptiveThreshold,seed:this.network.seed,scoreWeights:this.scoreWeights,thresholds:this.thresholds,featureNames:this.featureNames,network:this.network.toJSON(),baseline:this.baseline}}static fromConfig(t){let r=new e({featureCount:t.featureCount,snapshotLength:t.snapshotLength,anomalyThreshold:t.anomalyThreshold,maxIterations:t.maxIterations,learningRule:t.learningRule,adaptiveThreshold:t.adaptiveThreshold,scoreWeights:t.scoreWeights,seed:t.seed});return r.setThresholds(t.thresholds,t.featureNames),r.network=Av.fromJSON(t.network),r.trained=r.network.trained,r.baseline=t.baseline,r}};var RD=require("events"),wv=class extends RD.EventEmitter{constructor(t={}){super(),this.enabled=t.enabled??!0,this.threshold=t.threshold||.35,this.alertThreshold=t.alertThreshold||3,this.windowMs=t.windowMs||6e4,this.detector=new Sv({featureCount:10,snapshotLength:20,anomalyThreshold:this.threshold,learningRule:"storkey",scoreWeights:{energy:.3,drop:.2,hamming:.3,margin:.2},seed:Date.now()}),this._configureThresholds(),this._initWindow(),this.consecutiveAnomalies=new Map}_configureThresholds(){this.detector.setThresholds({reqPerSec:{mode:"range",min:0,max:100},avgResponseTime:{mode:"range",min:0,max:5e3},errorRate:{mode:"below",value:.2},payloadSize:{mode:"range",min:0,max:1048576},uniquePaths:{mode:"range",min:1,max:500},methodDistribution:{mode:"range",min:0,max:1},statusDistribution:{mode:"range",min:0,max:1},headerCount:{mode:"range",min:1,max:50},queryComplexity:{mode:"range",min:0,max:20},burstScore:{mode:"below",value:10}})}_initWindow(){this.window={start:Date.now(),requests:0,errors:0,totalResponseTime:0,totalPayloadSize:0,paths:new Set,methods:{GET:0,POST:0,PUT:0,DELETE:0,OTHER:0},statuses:{"2xx":0,"3xx":0,"4xx":0,"5xx":0},headerCounts:[],queryParams:[],timestamps:[]}}record(t,r,i){if(!this.enabled)return;let n=Date.now();n-this.window.start>this.windowMs&&(this._analyzeWindow(),this._initWindow()),this.window.requests++,this.window.totalResponseTime+=i,this.window.totalPayloadSize+=parseInt(t.headers["content-length"])||0,this.window.paths.add(t.url.split("?")[0]),this.window.timestamps.push(n);let s=t.method.toUpperCase();this.window.methods[s]!==void 0?this.window.methods[s]++:this.window.methods.OTHER++;let a=r.statusCode;a>=200&&a<300?this.window.statuses["2xx"]++:a>=300&&a<400?this.window.statuses["3xx"]++:a>=400&&a<500?this.window.statuses["4xx"]++:a>=500&&(this.window.statuses["5xx"]++,this.window.errors++),this.window.headerCounts.push(Object.keys(t.headers).length);let o=t.url.indexOf("?"),c=o>-1?t.url.slice(o+1).split("&").length:0;this.window.queryParams.push(c)}_analyzeWindow(){if(this.window.requests<5)return;let t=(Date.now()-this.window.start)/1e3,r=0;if(this.window.timestamps.length>1){let s=[];for(let c=1;c<this.window.timestamps.length;c++)s.push(this.window.timestamps[c]-this.window.timestamps[c-1]);let a=s.reduce((c,u)=>c+u,0)/s.length,o=s.reduce((c,u)=>c+Math.pow(u-a,2),0)/s.length;r=Math.sqrt(o)/(a+1)}let i={reqPerSec:this.window.requests/t,avgResponseTime:this.window.totalResponseTime/this.window.requests,errorRate:this.window.errors/this.window.requests,payloadSize:this.window.totalPayloadSize/this.window.requests,uniquePaths:this.window.paths.size,methodDistribution:this.window.methods.GET/this.window.requests,statusDistribution:this.window.statuses["2xx"]/this.window.requests,headerCount:this._avg(this.window.headerCounts),queryComplexity:this._avg(this.window.queryParams),burstScore:r},n=this.detector.detect(i);return n.isAnomaly&&this.emit("anomaly",{score:n.anomalyScore,confidence:n.confidence,features:i,featureImpact:n.featureImpact?.slice(0,5),timestamp:new Date().toISOString()}),n}_avg(t){return t.length?t.reduce((r,i)=>r+i,0)/t.length:0}checkIP(t){return(this.consecutiveAnomalies.get(t)||0)>=this.alertThreshold}incrementIP(t){let r=(this.consecutiveAnomalies.get(t)||0)+1;this.consecutiveAnomalies.set(t,r),r>=this.alertThreshold&&this.emit("alert",{ip:t,count:r})}resetIP(t){this.consecutiveAnomalies.delete(t)}middleware(){return(t,r,i)=>{if(!this.enabled)return i();let n=Date.now(),s=t.headers["x-forwarded-for"]?.split(",")[0]?.trim()||t.socket?.remoteAddress;if(this.checkIP(s)){r.statusCode=429,r.setHeader("Content-Type","application/json"),r.setHeader("Retry-After","60"),r.end(JSON.stringify({error:"Too Many Requests",code:"ANOMALY_BLOCKED"}));return}r.on("finish",()=>{let a=Date.now()-n;this.record(t,r,a)}),i()}}getStats(){return{enabled:this.enabled,threshold:this.threshold,windowRequests:this.window.requests,flaggedIPs:this.consecutiveAnomalies.size}}};var Cv=class{constructor(t={}){this.enabled=t.enabled??!0,this.windowMs=t.windowMs||6e4,this.max=t.max||100,this._windows=new Map,this._cleanupTimer=null,this.enabled&&this._startCleanup()}_startCleanup(){this._cleanupTimer=setInterval(()=>{let t=Date.now();for(let[r,i]of this._windows)t>i.resetTime&&this._windows.delete(r)},6e4),this._cleanupTimer.unref?.()}_getWindow(t){let r=Date.now(),i=this._windows.get(t);return(!i||r>i.resetTime)&&(i={count:0,resetTime:r+this.windowMs},this._windows.set(t,i)),i}check(t,r=null){if(!this.enabled)return{allowed:!0};let i=r||this.max,n=this._getWindow(t);return n.count>=i?{allowed:!1,retryAfter:Math.ceil((n.resetTime-Date.now())/1e3),limit:i,remaining:0}:(n.count++,{allowed:!0,limit:i,remaining:i-n.count})}middleware(t=null,r=null){return(i,n,s)=>{if(!this.enabled)return s();let a=t?t(i):i.headers["x-forwarded-for"]?.split(",")[0]?.trim()||i.socket?.remoteAddress,o=r?r(i):null,c=this.check(a,o);if(n.setHeader("X-RateLimit-Limit",c.limit),n.setHeader("X-RateLimit-Remaining",c.remaining||0),!c.allowed){n.setHeader("Retry-After",c.retryAfter),n.statusCode=429,n.setHeader("Content-Type","application/json"),n.end(JSON.stringify({error:"Too Many Requests",code:"RATE_LIMITED",retryAfter:c.retryAfter}));return}s()}}reset(t){this._windows.delete(t)}getStats(){return{enabled:this.enabled,windowMs:this.windowMs,max:this.max,activeWindows:this._windows.size}}destroy(){this._cleanupTimer&&(clearInterval(this._cleanupTimer),this._cleanupTimer=null),this._windows.clear()}};var sq=Xv(nq(),1),aq=require("events"),Bv=class extends aq.EventEmitter{constructor(t={}){super(),this.timeout=t.timeout||3e4,this.retries=t.retries||3,this._upstreams=new Map,this._proxy=sq.default.createProxyServer({xfwd:!0,ws:!0,timeout:this.timeout,proxyTimeout:this.timeout}),this._setupProxyEvents()}_setupProxyEvents(){this._proxy.on("error",(t,r,i)=>{this.emit("proxyError",{error:t,url:r.url,upstream:r._qritonUpstream}),i&&!i.headersSent&&i.writeHead&&(i.writeHead(502,{"Content-Type":"application/json"}),i.end(JSON.stringify({error:"Bad Gateway",code:"UPSTREAM_ERROR"})))}),this._proxy.on("proxyReq",(t,r)=>{let i=r.headers["x-forwarded-for"]?.split(",")[0]?.trim()||r.socket?.remoteAddress;i&&t.setHeader("X-Real-IP",i),t.setHeader("X-Forwarded-Proto",r.socket?.encrypted?"https":"http")})}registerUpstream(t,r,i={}){let n=this._patternKey(t),s=this._upstreams.get(n);s?.timer&&clearInterval(s.timer);let a={pattern:t,upstream:r,healthy:!0,lastCheck:null,healthPath:i.healthCheck||"/health",healthInterval:i.healthInterval||3e4,timer:null,consecutiveFailures:0};i.healthCheck&&(a.timer=setInterval(()=>{this._checkHealth(n)},a.healthInterval),a.timer.unref?.(),this._checkHealth(n)),this._upstreams.set(n,a)}unregister(t){let r=this._patternKey(t),i=this._upstreams.get(r);i?.timer&&clearInterval(i.timer),this._upstreams.delete(r)}_patternKey(t){return t instanceof RegExp?t.toString():t}async _checkHealth(t){let r=this._upstreams.get(t);if(r){try{let i=new URL(r.healthPath,r.upstream),n=new AbortController,s=setTimeout(()=>n.abort(),5e3),a=await fetch(i.toString(),{method:"GET",signal:n.signal});clearTimeout(s),a.ok?r.healthy||(r.healthy=!0,r.consecutiveFailures=0,this.emit("upstreamUp",{domain:r.pattern,upstream:r.upstream})):this._markUnhealthy(t,r,`HTTP ${a.status}`)}catch(i){this._markUnhealthy(t,r,i.message)}r.lastCheck=Date.now()}}_markUnhealthy(t,r,i){r.consecutiveFailures++,r.consecutiveFailures>=3&&r.healthy&&(r.healthy=!1,this.emit("upstreamDown",{domain:r.pattern,upstream:r.upstream,error:i}))}isHealthy(t){let r=this._patternKey(t);return this._upstreams.get(r)?.healthy??!0}proxy(t,r,i){let n=this._patternKey(i.pattern),s=this._upstreams.get(n);if(s&&!s.healthy){r.writeHead(503,{"Content-Type":"application/json"}),r.end(JSON.stringify({error:"Service Unavailable",code:"UPSTREAM_UNHEALTHY"}));return}t._qritonUpstream=i.upstream,this._proxy.web(t,r,{target:i.upstream,changeOrigin:!0})}proxyWs(t,r,i,n){let s=this._patternKey(n.pattern),a=this._upstreams.get(s);if(a&&!a.healthy){r.destroy();return}this._proxy.ws(t,r,i,{target:n.upstream,changeOrigin:!0})}getStats(){let t={upstreams:[]};for(let[r,i]of this._upstreams)t.upstreams.push({pattern:r,upstream:i.upstream,healthy:i.healthy,lastCheck:i.lastCheck,consecutiveFailures:i.consecutiveFailures});return t}destroy(){for(let t of this._upstreams.values())t.timer&&clearInterval(t.timer);this._upstreams.clear(),this._proxy.close()}};var oq=require("http"),kv=class{constructor(t,r={}){this.gateway=t,this.port=r.port||9090,this.host=r.host||"127.0.0.1",this._server=null}start(){return this._server=(0,oq.createServer)((t,r)=>{this._handleRequest(t,r)}),this._server.listen(this.port,this.host,()=>{this.gateway.logger?.info({port:this.port,host:this.host},"Admin API listening")}),this}async _handleRequest(t,r){r.setHeader("Content-Type","application/json");let i=t.socket?.remoteAddress;if(!this._isLocalhost(i)){r.writeHead(403),r.end(JSON.stringify({error:"Forbidden",code:"NOT_LOCAL"}));return}let s=new URL(t.url,`http://${t.headers.host}`).pathname,a=t.method.toUpperCase();try{if(a==="GET"&&s==="/health")return this._jsonResponse(r,200,{status:"healthy",uptime:process.uptime()});if(a==="GET"&&s==="/stats")return this._jsonResponse(r,200,this.gateway.getStats());if(a==="GET"&&s==="/apps")return this._jsonResponse(r,200,this.gateway.getApps());if(a==="GET"&&s==="/config")return this._jsonResponse(r,200,this.gateway.getConfig());if(a==="POST"&&s==="/config/reload")return await this.gateway.reload(),this._jsonResponse(r,200,{status:"reloaded"});if(a==="GET"&&s==="/certs")return this._jsonResponse(r,200,this.gateway.getCertStatus());if(a==="POST"&&s.startsWith("/certs/")){let o=s.slice(7);return await this.gateway.issueCert(o),this._jsonResponse(r,200,{status:"issued",domain:o})}if(a==="GET"&&s==="/waf")return this._jsonResponse(r,200,this.gateway.getWAFStats());if(a==="GET"&&s==="/anomaly")return this._jsonResponse(r,200,this.gateway.getAnomalyStats());if(a==="GET"&&s==="/upstreams")return this._jsonResponse(r,200,this.gateway.getUpstreamStats());r.writeHead(404),r.end(JSON.stringify({error:"Not Found",code:"UNKNOWN_ENDPOINT"}))}catch(o){r.writeHead(500),r.end(JSON.stringify({error:"Internal Error",message:o.message}))}}_isLocalhost(t){return t?t==="127.0.0.1"||t==="::1"||t==="::ffff:127.0.0.1"||t==="localhost":!1}_jsonResponse(t,r,i){t.writeHead(r),t.end(JSON.stringify(i,null,2))}stop(){return new Promise(t=>{this._server?(this._server.close(t),this._server=null):t()})}};var b5=require("events"),_5=Xv(g5(),1),Wv=class extends b5.EventEmitter{constructor(t,r={}){super(),this.configPath=t,this.logger=r.logger||(0,_5.default)({level:process.env.LOG_LEVEL||r.logLevel||"info",transport:process.env.LOG_PRETTY==="true"||r.pretty?{target:"pino-pretty"}:void 0}),this.config=null,this.configManager=new Vh(t),this.certManager=null,this.waf=null,this.anomaly=null,this.rateLimiter=null,this.proxy=null,this.admin=null,this._httpServer=null,this._httpsServer=null,this._sniContexts=new Map}async start(){this.logger.info("Starting QRITON Gateway..."),this.config=this.configManager.load(),this.logger.info({apps:this.config.apps.length},"Config loaded"),this.config.acme.email&&(this.certManager=new bv({email:this.config.acme.email,staging:this.config.acme.staging,renewDays:this.config.acme.renewDays,certsDir:"./certs"}),await this.certManager.init(),this._setupCertEvents()),this.waf=new _v({enabled:this.config.security.waf.enabled,mode:this.config.security.waf.mode,rules:this.config.security.waf.rules,onBlock:t=>this.logger.warn({waf:t},"WAF blocked request"),onLog:t=>this.logger.debug({waf:t},"WAF detected pattern")}),this.anomaly=new wv({enabled:this.config.security.anomaly.enabled,threshold:this.config.security.anomaly.threshold,alertThreshold:this.config.security.anomaly.alertThreshold}),this._setupAnomalyEvents(),this.rateLimiter=new Cv({enabled:this.config.security.rateLimit.enabled,windowMs:this.config.security.rateLimit.windowMs,max:this.config.security.rateLimit.max}),this.proxy=new Bv({timeout:3e4,retries:3}),this._setupProxyEvents();for(let t of this.configManager.apps.values())this.proxy.registerUpstream(t.pattern,t.upstream,{healthCheck:t.healthCheck,healthInterval:t.healthInterval});if(this.certManager){let t=this.configManager.getAllDomains();t.length>0&&(this.logger.info({domains:t},"Ensuring certificates"),await this.certManager.ensureCerts(t),this.certManager.startAutoRenewal())}return await this._startHttpServer(),await this._startHttpsServer(),this.config.gateway.adminEnabled&&(this.admin=new kv(this,{port:this.config.gateway.adminPort}),this.admin.start()),this.configManager.startWatching(),this.configManager.on("reload",t=>this._handleConfigReload(t)),this.configManager.on("error",t=>this.logger.error({err:t},"Config reload error")),this.logger.info({http:this.config.gateway.httpPort,https:this.config.gateway.httpsPort,admin:this.config.gateway.adminEnabled?this.config.gateway.adminPort:"disabled"},"Gateway started"),this}_setupCertEvents(){this.certManager.on("issuing",({domains:t})=>{this.logger.info({domains:t},"Issuing certificate")}),this.certManager.on("issued",({domains:t,expiry:r})=>{this.logger.info({domains:t,expiry:r},"Certificate issued");for(let i of t)this._updateSNIContext(i)}),this.certManager.on("renewed",({domains:t})=>{this.logger.info({domains:t},"Certificate renewed")}),this.certManager.on("error",({domains:t,error:r})=>{this.logger.error({domains:t,error:r.message},"Certificate error")})}_setupAnomalyEvents(){this.anomaly.on("anomaly",t=>{this.logger.warn({anomaly:t},"Anomaly detected")}),this.anomaly.on("alert",({ip:t,count:r})=>{this.logger.warn({ip:t,count:r},"IP flagged for anomalous behavior")})}_setupProxyEvents(){this.proxy.on("upstreamDown",({domain:t,upstream:r,error:i})=>{this.logger.error({domain:t,upstream:r,error:i},"Upstream down")}),this.proxy.on("upstreamUp",({domain:t,upstream:r})=>{this.logger.info({domain:t,upstream:r},"Upstream recovered")}),this.proxy.on("proxyError",({error:t,url:r})=>{this.logger.error({error:t.message,url:r},"Proxy error")})}async _startHttpServer(){return this._httpServer=(0,v5.createServer)((t,r)=>{if(t.url.startsWith("/.well-known/acme-challenge/")&&this.certManager)return this.certManager.challengeMiddleware()(t,r,()=>{r.writeHead(404),r.end()});let i=t.headers.host?.split(":")[0]||"localhost",n=this.config.gateway.httpsPort===443?"":`:${this.config.gateway.httpsPort}`;r.writeHead(301,{Location:`https://${i}${n}${t.url}`}),r.end()}),new Promise(t=>{this._httpServer.listen(this.config.gateway.httpPort,()=>{this.logger.info({port:this.config.gateway.httpPort},"HTTP server listening"),t()})})}async _startHttpsServer(){let t={key:null,cert:null},r=this.configManager.getAllDomains();if(r.length>0&&this.certManager)try{let i=await this.certManager.getCert(r[0]);t={key:i.key,cert:i.cert}}catch(i){this.logger.warn({error:i.message},"Failed to get cert, using self-signed"),t=this._generateSelfSigned()}else t=this._generateSelfSigned();return this._httpsServer=(0,Yv.createServer)({key:t.key,cert:t.cert,SNICallback:(i,n)=>{let s=this._getSNIContext(i);n(null,s)},minVersion:"TLSv1.2"}),this._httpsServer.on("request",(i,n)=>this._handleRequest(i,n)),this._httpsServer.on("upgrade",(i,n,s)=>this._handleUpgrade(i,n,s)),new Promise(i=>{this._httpsServer.listen(this.config.gateway.httpsPort,()=>{this.logger.info({port:this.config.gateway.httpsPort},"HTTPS server listening"),i()})})}_getSNIContext(t){if(this._sniContexts.has(t))return this._sniContexts.get(t);let r=this.certManager?.getSecureContext(t);if(r){let i=(0,Yv.createSecureContext)(r);return this._sniContexts.set(t,i),i}return null}_updateSNIContext(t){this._sniContexts.delete(t)}_generateSelfSigned(){let{privateKey:t,publicKey:r}=(0,x5.generateKeyPairSync)("rsa",{modulusLength:2048});return this.logger.warn("Using placeholder self-signed certificate - configure ACME for production"),{key:t.export({type:"pkcs8",format:"pem"}),cert:this._createSelfSignedCert(t)}}_createSelfSignedCert(t){let r=require("crypto"),i=(require&&require.resolve,null);return`-----BEGIN CERTIFICATE-----
|
|
181
|
+
MIIBkTCB+wIJAKHBfLSGxIxaMA0GCSqGSIb3DQEBCwUAMBExDzANBgNVBAMMBmxv
|
|
182
|
+
Y2FsaDAeFw0yMzAxMDEwMDAwMDBaFw0yNDAxMDEwMDAwMDBaMBExDzANBgNVBAMM
|
|
183
|
+
BmxvY2FsMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMVgEXyV0FcL1QJXzENV0tFs
|
|
184
|
+
QqQPzELDE9kYq3ZyTFPpCHKBlnmFcnVWwwN+mC8lEK3QrkRB+Wx8D3QWJwrN2VcC
|
|
185
|
+
AwEAATANBgkqhkiG9w0BAQsFAANBAIHjLpGj/phCMoKBiKnHtPqCOn7AAjdR/khJ
|
|
186
|
+
PLx5g5xyNF3WWQZ3mDCMSyLx3PFqAptmhFOPOCAPT01hfowkXD0=
|
|
187
|
+
-----END CERTIFICATE-----`}_handleRequest(t,r){let i=t.headers.host?.split(":")[0],n=this.configManager.getApp(i);if(!n){r.writeHead(404,{"Content-Type":"application/json"}),r.end(JSON.stringify({error:"Not Found",code:"UNKNOWN_HOST"}));return}t.query=ND(t.url),this._setSecurityHeaders(r,n);let s=[];this.rateLimiter.enabled&&s.push(this.rateLimiter.middleware(null,()=>n.rateLimit||null)),this.waf.enabled&&n.waf!==!1&&s.push(this.waf.middleware()),this.anomaly.enabled&&n.anomaly!==!1&&s.push(this.anomaly.middleware()),this._runMiddlewares(t,r,s,()=>{this.proxy.proxy(t,r,n)})}_handleUpgrade(t,r,i){let n=t.headers.host?.split(":")[0],s=this.configManager.getApp(n);if(!s||!s.ws){r.destroy();return}this.proxy.proxyWs(t,r,i,s)}_setSecurityHeaders(t,r){let i=this.config.security.headers;if(i.hsts){let n=`max-age=${i.hstsMaxAge}`;i.hstsPreload&&(n+="; includeSubDomains; preload"),t.setHeader("Strict-Transport-Security",n)}if(i.noSniff&&t.setHeader("X-Content-Type-Options","nosniff"),i.xssProtection&&t.setHeader("X-XSS-Protection","1; mode=block"),i.frameOptions&&t.setHeader("X-Frame-Options",i.frameOptions),i.csp&&t.setHeader("Content-Security-Policy",i.csp),t.setHeader("Referrer-Policy","strict-origin-when-cross-origin"),t.setHeader("Permissions-Policy","geolocation=(), microphone=(), camera=()"),r.headers)for(let[n,s]of Object.entries(r.headers))t.setHeader(n,s)}_runMiddlewares(t,r,i,n){let s=0,a=()=>{if(s>=i.length)return n();let o=i[s++];o(t,r,a)};a()}async _handleConfigReload(t){this.logger.info({added:t.added.length,removed:t.removed.length},"Config reloaded");for(let r of t.removed)this.proxy.unregister(r);for(let r of this.configManager.apps.values())this.proxy.registerUpstream(r.pattern,r.upstream,{healthCheck:r.healthCheck,healthInterval:r.healthInterval});if(this.certManager){let r=t.added.filter(i=>typeof i=="string");r.length>0&&await this.certManager.ensureCerts(r)}this.emit("reload",t)}getStats(){return{uptime:process.uptime(),memory:process.memoryUsage(),apps:this.configManager.apps.size,waf:this.waf.enabled?"enabled":"disabled",anomaly:this.anomaly.getStats(),rateLimit:this.rateLimiter.getStats()}}getApps(){let t=[];for(let r of this.configManager.apps.values())t.push({domain:r.originalDomain,upstream:r.upstream,ssl:r.ssl,ws:r.ws,healthy:this.proxy.isHealthy(r.pattern)});return t}getConfig(){return this.config}async reload(){this.config=this.configManager.load(),this.emit("reload",{manual:!0})}getCertStatus(){let t={};for(let r of this.configManager.getAllDomains()){let i=this.certManager?.hasCert(r)||!1;t[r]={hasCert:i}}return t}async issueCert(t){if(!this.certManager)throw new Error("ACME not configured");return this.certManager.getCert(t)}getWAFStats(){return{enabled:this.waf.enabled,mode:this.waf.mode,rules:this.waf.rules}}getAnomalyStats(){return this.anomaly.getStats()}getUpstreamStats(){return this.proxy.getStats()}async stop(){this.logger.info("Stopping gateway..."),this.configManager.stopWatching(),this.certManager?.stopAutoRenewal(),this.rateLimiter?.destroy(),this.proxy?.destroy(),this.admin?.stop(),await new Promise(t=>this._httpServer?.close(t)),await new Promise(t=>this._httpsServer?.close(t)),this.logger.info("Gateway stopped")}};var Oh=require("fs"),A5=require("path"),S5="1.0.0",Cre=`
|
|
188
|
+
\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
189
|
+
\u2551 QRITON Gateway v${S5} \u2551
|
|
190
|
+
\u2551 Secure reverse proxy with WAF & neural anomaly detection \u2551
|
|
191
|
+
\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
192
|
+
`,Ere=`# QRITON Gateway Configuration
|
|
193
|
+
# Edit this file - changes apply instantly (hot-reload)
|
|
194
|
+
|
|
195
|
+
gateway:
|
|
196
|
+
httpPort: 80
|
|
197
|
+
httpsPort: 443
|
|
198
|
+
adminPort: 9090
|
|
199
|
+
adminEnabled: true
|
|
200
|
+
|
|
201
|
+
acme:
|
|
202
|
+
email: admin@example.com # Required for Let's Encrypt
|
|
203
|
+
staging: true # Set to false for production certs
|
|
204
|
+
renewDays: 30
|
|
205
|
+
|
|
206
|
+
security:
|
|
207
|
+
waf:
|
|
208
|
+
enabled: true
|
|
209
|
+
mode: block # block | log
|
|
210
|
+
rules:
|
|
211
|
+
- sqli
|
|
212
|
+
- xss
|
|
213
|
+
- lfi
|
|
214
|
+
- rfi
|
|
215
|
+
- rce
|
|
216
|
+
- proto
|
|
217
|
+
anomaly:
|
|
218
|
+
enabled: true
|
|
219
|
+
threshold: 0.35
|
|
220
|
+
alertThreshold: 3
|
|
221
|
+
rateLimit:
|
|
222
|
+
enabled: true
|
|
223
|
+
windowMs: 60000
|
|
224
|
+
max: 100
|
|
225
|
+
headers:
|
|
226
|
+
hsts: true
|
|
227
|
+
hstsMaxAge: 31536000
|
|
228
|
+
hstsPreload: true
|
|
229
|
+
noSniff: true
|
|
230
|
+
xssProtection: true
|
|
231
|
+
frameOptions: DENY
|
|
232
|
+
csp: "default-src 'self'"
|
|
233
|
+
|
|
234
|
+
apps:
|
|
235
|
+
# Example app configuration
|
|
236
|
+
# - domain: app.example.com
|
|
237
|
+
# upstream: http://localhost:3000
|
|
238
|
+
# ssl: true
|
|
239
|
+
# ws: true
|
|
240
|
+
# healthCheck: /health
|
|
241
|
+
# rateLimit: 1000
|
|
242
|
+
|
|
243
|
+
# Wildcard domain example
|
|
244
|
+
# - domain: "*.staging.example.com"
|
|
245
|
+
# upstream: http://localhost:3001
|
|
246
|
+
`;function Tre(){console.log(`
|
|
247
|
+
Usage: qriton-gateway [options]
|
|
248
|
+
|
|
249
|
+
Options:
|
|
250
|
+
--config, -c <path> Config file path (default: ./apps.yaml)
|
|
251
|
+
--init Create default config file
|
|
252
|
+
--help, -h Show this help
|
|
253
|
+
--version, -v Show version
|
|
254
|
+
|
|
255
|
+
Environment Variables:
|
|
256
|
+
QRITON_CONFIG Config file path
|
|
257
|
+
LOG_LEVEL Log level (debug, info, warn, error)
|
|
258
|
+
LOG_PRETTY Pretty print logs (true/false)
|
|
259
|
+
|
|
260
|
+
Examples:
|
|
261
|
+
qriton-gateway Start with default config
|
|
262
|
+
qriton-gateway --init Create apps.yaml template
|
|
263
|
+
qriton-gateway -c /etc/gateway.yaml Use custom config path
|
|
264
|
+
`)}function Ire(e){let t={config:process.env.QRITON_CONFIG||"./apps.yaml",init:!1,help:!1,version:!1};for(let r=0;r<e.length;r++){let i=e[r];i==="--help"||i==="-h"?t.help=!0:i==="--version"||i==="-v"?t.version=!0:i==="--init"?t.init=!0:(i==="--config"||i==="-c")&&(t.config=e[++r])}return t}async function Bre(){let e=Ire(process.argv.slice(2));e.help&&(Tre(),process.exit(0)),e.version&&(console.log(`qriton-gateway v${S5}`),process.exit(0));let t=(0,A5.resolve)(e.config);e.init&&((0,Oh.existsSync)(t)&&(console.error(`Config file already exists: ${t}`),process.exit(1)),(0,Oh.writeFileSync)(t,Ere),console.log(`Created config file: ${t}`),console.log("Edit the file with your domains and upstreams, then run: qriton-gateway"),process.exit(0)),(0,Oh.existsSync)(t)||(console.error(`Config file not found: ${t}`),console.error('Run "qriton-gateway --init" to create a template'),process.exit(1)),console.log(Cre);let r=new Wv(t),i=async n=>{console.log(`
|
|
265
|
+
[${n}] Shutting down...`),await r.stop(),process.exit(0)};process.on("SIGINT",()=>i("SIGINT")),process.on("SIGTERM",()=>i("SIGTERM"));try{await r.start()}catch(n){console.error("[FATAL]",n.message),process.env.LOG_LEVEL==="debug"&&console.error(n.stack),process.exit(1)}}Bre();
|